1

I want to merge all the files labelled with XXX in sub branch AAA to main branch.

The main branch do not update since AAA branched out, so the merge task is just replace all changed files with sub branch files.

How can I do this using ClearCase command line (cleartool) under Linux?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Jeff7566
  • 432
  • 1
  • 5
  • 20

1 Answers1

0

You can use the command cleartool findmerge for that.

The key is to use a view which select those files:

element * MYLABEL
element * /main/LATEST

And use -ftag yourLabelView

You can also directly use -fver YourLabel (meaning, no need to have a special dedicated view)

Go to a dynamic view set on /main, and do a:

cd /view/MyView/vobs/MyVob
cleartool findmerge . -fver MyLabel -whynot -print

The -whynot and -print allow you to preview what would be merge and see if that fits what you expect.

Once the preview seems good:

cleartool findmerge . -c "Merge MyLabel on main" –fver MyLabel –merge
First Last
  • 49
  • 5
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • And what if I need to check if merge is needed to tens of thousands of files, Is there an easy way that when using –print it will show only items that Needs Merge ? Also it there a way that the actual merge will be done only in case merge is automatic ? – Epligam Oct 06 '15 at 13:09
  • @Elad `-print` won't do any merge, only preview. `-gmerge` will perform the merges, automatically if there are no conflict. – VonC Oct 06 '15 at 13:11