1

我在 clearcase 中的每个任务策略的分支存在问题。
我们正在使用快照视图。我们有各种任务分支和一个集成分支。
因此,我们将分支合并到集成进行测试。

现在,假设我正在处理一个BR1合并到集成分支的文件,并且该文件引用了另一个未合并到集成分支但BR2第二个文件合并到集成分支的文件。

因此,第二个文件指向文件的BR2版本,而我不想要这些更改,但由于我从集成分支中获取所有其他代码,因此它采用该版本。

这是我的配置规范:

element * CHECKEDOUT
element * .../BR1/LATEST
element * .../integration/LATEST -mkbranch BR1
element * /main/LATEST -mkbranch integration
element * /main/0 -mkbranch integration

有没有办法解决?我能想到的一种方法是放置一个标签,因此,将配置规范更改为从该标签中选择,而不是从最新的集成分支中选择,但是随着任务分支中工作的进展,这需要更改标签。还有其他方法吗我们能做到吗?

4

1 回答 1

1

The integration branch is there to integrate, so if you are doing work from that branch, I would really advise you to take all those files.

If the issue is only for one file, you simply can try a "cherry-pick" approach, and checkout that file in your current BR1 branch, replacing its content with any other version you want (with a cleartool get, for instance, as detailed in "Clearcase command to export an element").

Considering your config spec, I would recommend:

  • putting a label 'L_BR1' just after merging BR1 to Integration,
  • select that label over the LATEST of Integration (which contains version merged from BR2)

That would mean a config spec like:

element * CHECKEDOUT
element * .../BR1/LATEST
element * .../integration/L_BR1 -mkbranch BR1    <=== add this select rule
element * .../integration/LATEST -mkbranch BR1
element * /main/LATEST -mkbranch integration
element * /main/0 -mkbranch integration

Caveat: be ware, though, that it wouldn't work well on cross-integrations (when you merge BR1 to Integration, then BR2, then again BR1)

于 2013-10-29T09:02:25.393 回答