Clearcase BASE url of a file from a CI trigger -
i have file foo.c
, want access it's base version. how can it?
for example have foo.c@@/main/2
$env{'clearcase_pn'}
gives me current file path: l:/user/vob/dir/foo.c
$env{'clearcase_xpn'}
gives me next version number l:/user/vob/dir/foo.c@@/main/3
how can open current base version on current view foo.c@@/main/2
?
$env{'clearcase_xpn'}
should give extended path name of current version, selected current view, not "next" version.
here "base" current version before ci trigger allows new 1 created.
in case, cleartool descr -l $env{'clearcase_pn'} should still display 1 selected current view foo.c@@/main/2
.
if not, using '-pred
' (to previous version): cleartool descr -pred -l $env{'clearcase_pn'}
the op coin confirms in comments:
my $desc = 'cleartool descr $env{'clearcase_pn'}'; if($desc =~ /predecessor version:\s*(.+)$/) { die "predecessor: $env{'clearcase_pn'}\@\@$1"; }
"base" interpreted base contributor version merge (see "how perform 'merge' using clearcase?")
in case, can check:
cleartool findmerge -print
, can list names of versions require merge. default listing includes version ids of to-versions , from-versions , version id of base contributor (common ancestor)cleartool describe -anc
, able desribe closest common ancestor version of pname arguments.
Comments
Post a Comment