简体   繁体   English

如何在 clearcase 中撤消分支上的合并?

[英]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?如何撤消特定 clearcase 分支的合并?

Assuming base ClearCase here, you do aa ct lstree --graph on some file to see if they are merged to other branch version.假设这里有基本的 ClearCase,您对某个文件执行 aa ct lstree --graph以查看它们是否合并到其他分支版本。

That is: check if you see a red arrow, as seen in " Find all unmerged files/elements in ClearCase ".即:检查您是否看到红色箭头,如“在 ClearCase 中查找所有未合并的文件/元素”中所示。
That answer includes a cleartool find which would give you all the merged elements between two branches.该答案包括一个 cleartool find,它可以为您提供两个分支之间的所有合并元素。

For each element version involve in that merge (again, assuming base ClearCase), you can:对于该合并中涉及的每个元素版本(再次假设基本 ClearCase),您可以:

  • describe that version and find the merge hyperlink coming from it.描述该版本并找到来自它的合并超链接。
  • do a cleartool rmhlink Merge@xxxxx@/vobs/yourvob , removing said hyperlink.做一个cleartool rmhlink Merge@xxxxx@/vobs/yourvob ,删除所述超链接。

Once there is no more merge hyperlink from view_prod1_dev__456_textDescription , the TRG_PRE_RMBRANCH should not block the rmbranch anymore.一旦没有来自view_prod1_dev__456_textDescription合并超链接, TRG_PRE_RMBRANCH不应再阻塞rmbranch

See cleartool rmhlink , and the previous question: " How do I search for specific kinds of merge hyperlinks in ClearCase? ".请参阅cleartool rmhlink和上一个问题:“如何在 ClearCase 中搜索特定类型的合并超链接? ”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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