Merged file not showing up in ClearCase

68 Views Asked by At

In ClearCase, I merged file ABC to a branch. This resulted in Version 1 in the version tree. I labeled it LAB_A1.

Later, I merged file XYZ to the same branch. This resulted in Version 2 in the version tree. I labeled it LAB_X1.

File ABC is missing in LAB_X1 and in the version tree Version 2.
I checked out Version 2 and tried to merge file ABC, ClearCase comes back stating there’s nothing to merge.
According to ClearCase file ABC already exists on Version 2. In the version tree I did a diff between Versions 1 and 2.
You can clearly see the file ABC is missing from Version 2.

I need both files ABC and XYZ, in the latest version.
How do I do this?

I merged to our development branch.

Config spec:

element * CHECKEDOUT 
element * LAB_X1 
element lost+found -none 
element * /main/0 -mkbranch DEV 

When using label LAB_X1 in the config spec I can see file XYZ, but not ABC. I can see file ABC if I use LAB_A1 in my config spec.

2

There are 2 best solutions below

2
VonC On

This resulted in Version 2 in the version tree.

That would be version 2 for the parent folder, not the file itself.

File ABC is missing in LAB_X1 and in the version tree Version 2.

It depends on your config spec, whose selection rules order matters.

But assuming those are correct, you can start and simply re-create file ABC in a checked out version of the parent folder, creating a version 3.

At most, you could have evil twins, but if you don't mind working from now on with that new ABC file, you should be fine.

However, the config spec you mention does not work for new elements, as it lacks a /main/LATEST backstop rule.

0
Ted Lyngmo On

You may edit your config spec (cleartool edcs) to show the latest version on your branch.

This should be enough for your case:

element * CHECKEDOUT
element * .../DEV/LATEST
element * /main/LATEST -mkbranch DEV

In this scenario, it doesn't care about labels at all and just selects the latest version of the directory and the files in it by first looking for the DEV branch and secondly for the main branch. With this change, both your files should become visible.

If the actual files don't have a DEV branch, you may need the labels too to select the versions you've labelled:

element * CHECKEDOUT
element * .../DEV/LATEST
element * LAB_X1 -mkbranch DEV
element * LAB_A1 -mkbranch DEV
element * /main/LATEST -mkbranch DEV

or simpler, add mkbranch DEV to all the rules that follows after the .../DEV/LATEST rule:

element * CHECKEDOUT
element * .../DEV/LATEST
mkbranch DEV
element * LAB_X1
element * LAB_A1
element * /main/LATEST