I have two integration branch int_1
and int_2
.
In the time there has always been merged from int_1
to int_2
.
I want to know when was the last time a merge was done on int_2
branch from int_1
branch.
Is there any command to do that?
I have two integration branch int_1
and int_2
.
In the time there has always been merged from int_1
to int_2
.
I want to know when was the last time a merge was done on int_2
branch from int_1
branch.
Is there any command to do that?
If you are talking about UCM integration branches, that means you have done delivered from one integration Stream of one UCM project to another integration Stream of another project.
In that case, go to the destination branch int_2
, and look for deliver.xxx
activities. The most recent one will tell you when the last deliver was done.
With base ClearCase, this isn't so straightforward.
You need to list the last version of int_2, describing them in order to look for a merge hyperlink.
See "How files and directories are merged"
Here you would see, going back from the most recent to the oldest version of test
, that the last merge from main
was on version 3.
Describing that version would return:
cleartool describe util.h@@/main/3version "util.h@@/main/3"
.
.
.
Hyperlinks:
Merge@278@/vob_3 /vob_3/src/util.h@@/main/rel2_bugfix/1
-> /vob_3/src/util.h@@/main/3
You can also try:
cleartool describe -l util.h@@/main/3version
Strictly speaking, your question has no answer because ClearCase doesn't have changesets or any feature that would represent a single "merge". All you can do is search for merges that occurred between singular file-versions, and see what time each was performed. If they were on the same day, or very close to each other in time, they probably represent one "merge".
For a motivating example to start with look at the manual via "cleartool man find", which lists some examples of using the merge(from-branch, to-branch) clause.
To get the versions int_1 that were merged to int_2, try:
ct find . -type f -branch 'brtype(int_1)' -version 'merge(/main/int_1,/main/int_2) && hltype(Merge,->)'
To see the target versions, add some additional processing, e.g.:
ct find . -type f -branch 'brtype(int_1)' -version 'merge(/main/int_1,/main/int_2) && hltype(Merge,->)' -exec 'echo -n "$CLEARCASE_XPN " && cleartool desc -short -ahlink Merge $CLEARCASE_XPN'
To find out what time the merge occurred, you'll need to do some post-processing of the target version (e.g. cleartool desc -fmt '%Nd' ) to get the timestamp.