Search code examples
clearcasecleartool

Merge all files from a branch into main(using a command/script) cleartool


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.


Solution

  • 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).