1

I have a dA/fC@@/main/0 that was created from a new file added to dA@@/main/branchA/3. The new file on branchA became dA/fC@@/main/branchA/1

Successive changes on dA/fC@@/main/branchA/1 eventually end up on last version of dA/fC@@/main/branchA/17.

Then dA/fC@@/main/branchA/17 were merge from branchA into main creating dA/fC@@/main/1.

However dA/fC@@/main/1 does not belong to any version of dA@@main/*.

I want to add dA/fC@@/main/1 to dA@@/main/40 so dA@@/main/41 will contain dA/fC@@/main/1.

What are the ClearCase console commands to run on linux?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
jessarah
  • 351
  • 1
  • 4
  • 13

2 Answers2

1

Make sure the destination view selects /main/LATEST, and the version created will be the one expected.

Main advice: use a different view for the merge, one which is configure to

element * /main/LATEST

Or create a new one, preferably a dynamic one.

For a single file, once merged, you need to merge its parent folder too (or you won't find a version of that folder listing that file at the right version)

On the destination view, display the version tree of that parent folder, right-click on the version where fC was recorded (dA@@/main/branchA/4), select merge to, and click on version 40.

See also "How files and directories are merged".

http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/topic/com.ibm.rational.clearcase.hlp.doc/cc_main/images/merge_algorithm.gif

Each version of a Rational ClearCase directory element contains the names of certain file elements, directory elements, and VOB symbolic links.


Now, if you are sure merging branchA was about fC only, you could have done the merge of the file and its parent folder in one command: cleartool findmerge.
See "ClearCase: findmerge usage"

cd /path/to/view/avob/dA
cleartool findmerge . -nc -fver .../branchA/LATEST -merge

That would have merged fC and dA.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I only want to get `dA/fC@@main/1` to main, however from the target view (main) I don't see any version of `dA/fC` – jessarah Jun 20 '14 at 10:36
  • @jessarah You need first to use the right view. Then the easiest way is to diqplay the version tree of that file, right-click on the version one, select merge to, and click on version 40. – VonC Jun 20 '14 at 10:53
  • VonC Thanks for your tips. Ver 1 is the file `fc` on main, Version 40 is the directory `dC` on main w/o `fC`. The file had already been merge into main/1, however it was missing from main because `dC@@main/40` did not contain `fC`. I would like to know how to directly add `fC@@main/1` to dA w/o creating a new elem with same name. Merge in a way does that however if I had more files added it would bring more files and I am interested in only one. Yes then i could remove the other files. However I think there must be a command to say `dA` display `fC` w/o using merge... – jessarah Jun 20 '14 at 11:58
  • @jessarah right, I missed the dC parent folder part. I have rewritten the answer for you to select. I have added links to other of my answers on the same topic, as well as some documentation. – VonC Jun 20 '14 at 12:46
0

I used the merge GUI to merge the version of dA@@/main/branchA/4 where dA/fC was first added into dA@@/main/40 check-out.

This added dA/fC to the main view that is configured to get element * main/LATEST

I see now dA/fC@@/main/1 on main and can commit.

jessarah
  • 351
  • 1
  • 4
  • 13