Question

I have been running the following to merge from another branch to mine in clearcase:

cleartool merge -to file.C -ver /main/otherBranch/LATEST

but when I'm in a particular directory and I want to merge anything that has changed in that directory how do I do it? For one, what cleartool command would tell me which files need merging and then what would essentially do cleartool merge -to * -ver /main/otherBranch/LATEST in that directory?

Was it helpful?

Solution

The usual command for recursive merge is cleartool findmerge.

See also "To prepare to merge".

For instance:

On a Windows system, for the current directory subtree, compare versions visible in the current view against versions on another branch and perform any required merges. The resulting log file annotates all successful merges with a number sign (#).

cleartool findmerge . -fversion \main\rel2_bugfix\LATEST -merge

Result:

Needs Merge ".\util.c" [to \main\3 from \main\rel2_bugfix\2
base \main\rel2_bugfix\1]
Comment for all listed objects:
Merge from rel2_bugfix branch.
Checked out "util.c" from version "\main\3".
********************************
<<< file 1: M:\view1\george_fig_hw\src\util.c@@\main\rel2_bugfix\1
>> file 2: .\util.c@@\main\rel2_bugfix\2
>> file 3: .\util.c
********************************
-------[changed 7-8 file 1]--------|------[changed to 7-12 file 3]-----
    if (user_env)                  | if (user_env) {
      return user_env;             | if ( strcmp(user_env,"root") == + .
.
.
Moved contributor ".\util.c" to ".\util.c.contrib".
Output of merge is in ".\util.c".
Recorded merge of ".\util.c".
A 'findmerge' log has been written to "findmerge.log.24-Mar-99.13.23.05"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top