Phil for Humanity Phil for Humanity
A Guide for the Survival of Humankind and Helping the World, Society, and Yourself.



ClearCase Support: How to Find Merges Needed


If you ever need to determine if you need to merge two versions together, then execute this "findmerge" command in ClearCase.

cleartool findmerge "ELEMENT_PATH" -fversion FROM_VERSION -directory -print -short

The "MERGE TO" version is whatever version that your View's config spec is set to access. If the command outputs nothing, then no merge is necessary. Otherwise, if the command outputs a merge is necessary, then proceed with the upmerge.

Here is an example of this command in action:

cleartool findmerge "filename.txt" -fversion /main/branch/5 -directory -print -short

The output would look something like this:

Needs Merge "filename.txt" [to /main/3 from /main/branch/5
base /main/2]

I recommend that you play around with this command to get use to all the possible options and arguments.

by Phil for Humanity
on 20090608

Related Articles
 » ClearCase Support: How to Merge
 » ClearCase Support: Drawing a Merge Arrow
 » ClearCase Support: How to Find Checked Out Elements