I want to merge all files from a particular branch to main using a script or a command. Is there a way to do it without checking out each file in target or should i do each file manually.
Asked
Active
Viewed 2,746 times
1 Answers
0
ClearCase is file-based, not repository-based: any merge will be done file by file, and actually first folder by folder (you merge the folders first, then the files).
The easiest way to initiate a merge based on a branch is to use the cleartool findmerge
, which can use a version selector, like -fve/rsion .../branch1/LATEST
.
See also "To prepare to merge"
The usual approach though is to use a view or a tag to select the elements you want to merge, as I described in "How merge sub branch to main branch using clearcase command line under linux?" (using -ftag
).
Note that this works also in an UCM environment, based on activities (even though the deliver and rebase commands remain the recommended merge methods).
-
I actually wanted a command to list all the files checked in to a particular branch, so i can iterate it checkout the file in main and merge each file individually . – Learner Mar 02 '15 at 14:31
-
@Learner findmerge is much more convenient than trying to implement it manually. But to list files in a given branch: http://stackoverflow.com/a/2786120/6309 – VonC Mar 02 '15 at 14:33