How to perform a 'merge' using clearcase?

2019-06-03 11:09发布

问题:

I have been working on branch X and I need to move my code to branch Y. All my code are new classes that I started, so no one else has been working/modified my code, this also does not exist in the branch that I'm moving the code to.

So my question is, what is the process to move the code from one branch to another? i have never done it before. Do i copy and paste the classes into the new branch or is there a tool that is usually used for this ?

回答1:

The key of a ClearCase merge is to do the merge in the destination view (the view associated with the branch or the UCM stream to which you merge to.

You can then start the merge with:

  • cleartool merge
  • Cleartool Merge Manager: see "Howto merge using the ClearCase Merge manager"

As you can see, the first step is to select said target view:

I would recommend using a dynamic view rather than a snapshot view: a snapshot would start by an automatic update (which takes time), as opposed to a dynamic view which would start the merge immediately.
See more at "What are the differences between a snapshot view and a dynamic view?"

It supposes that you have:

  • a source branch or a label which will identify the source versions you want to merge,
  • a destination view with a config spec allowing to create new versions on top of a destination branch (so a config spec with -mkbranch rules in it)

See more at "About merging files and directories in base ClearCase":



回答2:

yepp, there's a tool that helps you: it's the ClearCase MergeManager. It has a nice GUI and helps you to get the job done.