3

I am trying to merge my development branch with the parent branch to the one I am working in. I do not have graphical ClearCase, I only have the command line. I am using Solaris-10.

When I do lsvtree on the file, the last 3 results I see are:

filename@@/main/release2/10 (PROD_REL2.0, PROD_REL2.1, PROD_REL2.2, ...)
filename@@/main/release2/myprivateview
filename@@/main/release3/myprivateview/1

When I do a describe on the file, I get:

version "filename/@@/main/release3/myprivateview/1"
...
predecessor version: /main/release3/myprivateview/0

I want to merge my changes into the main branch so that other users can see my changes. I have tried :

cleartool findmerge -all -fver /main/release2/LATEST -print
cleartool findmerge -all -fver /main/release2/10 -print
cleartool findmerge filename -fver /main/release2/LATEST -print
cleartool findmerge filename -fver /main/release2/myprivateview/0 -print

and various other combinations.

What happens is it thinks for awhile and then prints...nothing. No error messages, nor listing of merges, nor conflicts, nothing at all gets printed.

I have checked that my view is dynamic. What am I doing wrong?

bk_32
  • 483
  • 1
  • 4
  • 17

2 Answers2

1

Whenever you do a merge or findmerge, you need to do so in a view set to reflect the destination branch (here the main branch, which seems to be for you release3)

So setup another dynamic view, used for the merge, with:

element * CHECKEDOUT
element * .../release3/LATEST
element * /main/0 -mkbranch release3
element * /main/LATEST -mkbranch release3

Here, release3 would be the destination branch, that is the branch you are merging to.

In that view, try your findmerge command again.

Note that, as I explained here, you would need to findmerge (and merge) your folders first, then your files.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Can you explain how to create a view set this way? I am totally new to Clearcase and have never created any views (the one I'm using now was set up by a script) – bk_32 Sep 27 '18 at 21:36
  • @bk_32 you would use `cleartool mkview`: https://stackoverflow.com/a/9357692/6309. The default config spec is, in your case, the right one. – VonC Sep 27 '18 at 21:38
  • Thank you for all your help so far. I don't believe that the default config spec is what I want, as it brought me all the way up to /main, and not to /main/release3, which is where I want to merge to. How can I create a view that is set to /main/release3 ? – bk_32 Sep 28 '18 at 13:35
  • @bk_32 You said: "I am trying to merge my development branch with the main branch.": the main branch is... /main, no? – VonC Sep 28 '18 at 13:37
  • @bk_32 if it is release3, I have edited the answer accordingly. – VonC Sep 28 '18 at 13:44
  • My bad, I meant I wanted to merge with the parent branch to my private branch. – bk_32 Sep 28 '18 at 15:59
1

Thank you @VonC for your advice.
I could not figure out how to create a new view with the config specs you mentioned above.
However I discovered that there is no need to create any new views at all: All I had to do was change my own view to point to the branch level that I wanted to change.

What I did is:

1) $ cleartool edcs
2) save the config specs that were displayed somewhere else
3) edit the file to look like this:
     element * CHECKEDOUT
     element * .../release3/LATEST
     element * /main/LATEST -mkbranch release3
4) $ exit (to reload the view with the new config specs, not sure if this was necessary)
5) $ cleartool setview myprivateview
6) $ cleartool findmerge filename -fver /main/release3/myprivateview/1 -print
7) $ cleartool findmerge filename -fver /main/release3/myprivateview/1 -merge
8) cleartool ci filename
9) cleartool edcs
10) replace config specs as they were before`

This performed the merge exactly how I wanted and these steps will work to merge into any level, without having to create any views.

bk_32
  • 483
  • 1
  • 4
  • 17