简体   繁体   中英

How do I undo mergeouts on a branch in clearcase?

Background

I am in a situation where in order to promote code cleanly, views with a certain number have to be branched in a coordinated way as such:

/some/dir/here@@/main/dev/view_dev__456_textDescription
/some/dir/here/file.txt@@/main/dev/view_dev__456_textDescription
/some/dir/here@@/main/dev/prod1/view_prod1_dev__456_textDescription
/some/dir/here/file.txt@@/main/dev/prod1/view_prod1_dev__456_textDescription

Each view of a certain product must be branched from its product branch.

Problem

I am in a situation where I accidentally created a product specific view, but off of the dev branch. Below is the situation I am in:

/some/dir/here@@/main/dev/view_dev__456_textDescription
/some/dir/here/file.txt@@/main/dev/view_dev__456_textDescription
/some/dir/here@@/main/dev/view_prod1_dev__456_textDescription <-- The erroneous branch
/some/dir/here/file.txt@@/main/dev/prod1/view_prod1_dev__456_textDescription

Attempted solution

I tried this command to get rid of the erroneous branch:

ct rmbranch /some/dir/here@@/main/dev/view_prod1_dev__456_textDescription

But I got this error:

...
Checking for mergeouts on branch [view_prod1_dev__456_textDescription] ...
ERROR: Cannot delete a WI branch that has mergeouts
cleartool: Warning: Trigger "TRG_PRE_RMBRANCH" has refused to let rmbranch proceed.
cleartool: Error: Unable to remove branch "/some/dir/here@@/main/dev/view_prod1_dev__456_textDescription"

Based on the error, I need to get rid of the mergeouts for this branch. Thus my question...

Question

How do I undo the mergeouts of a specific clearcase branch?

Assuming base ClearCase here, you do aa ct lstree --graph on some file to see if they are merged to other branch version.

That is: check if you see a red arrow, as seen in " Find all unmerged files/elements in ClearCase ".
That answer includes a cleartool find which would give you all the merged elements between two branches.

For each element version involve in that merge (again, assuming base ClearCase), you can:

  • describe that version and find the merge hyperlink coming from it.
  • do a cleartool rmhlink Merge@xxxxx@/vobs/yourvob , removing said hyperlink.

Once there is no more merge hyperlink from view_prod1_dev__456_textDescription , the TRG_PRE_RMBRANCH should not block the rmbranch anymore.

See cleartool rmhlink , and the previous question: " How do I search for specific kinds of merge hyperlinks in ClearCase? ".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM