问题
I'm trying to figure out how to look at a file's merge history in Clearcase. I know it can be done graphically, but I need it returned to stdout.
ct lshistory <file>
returns the file history, but unless it's specifically commented you don't know what has been merged to what. I basically have three branches: main, int, and dev. I'm trying to determine if there are versions in the dev branch past what has been merged and labeled to the int branch.
回答1:
This is about finding the merge hyperlinks: see "How files and directories are merged"

The
find
and lsvtree-merge
commands can locate versions with Merge hyperlinks.
The -merge
option allows to:
Includes all versions that are at the from-end of one or more merge arrows (hyperlinks of type Merge). Annotations on each such version indicate the corresponding to-objects.
You will find script examples in that thread, usually about finding versions not merged in a branch, but the idea remains the same.
来源:https://stackoverflow.com/questions/12545198/how-do-you-check-for-a-merge-in-clearcase