在明显的情况下,我开始在名为 main / release4 / release5 的分支上工作。开始工作后,release4被合并到main中。我的同事开始在main / release5上工作。无论如何,我可以将我的 main / release4 / release5 工作移到 main / release5 吗?
到目前为止,我尝试将 main / release4 / release5 合并到 main / release5 但这没用。这些文件保留在 main / release4 / release5 上。
版本树外观的可视示例:
main | \ |发行版4 | / \ 主发行版5 \ 发行版5 *从此处移动文件 \ *到此处这是我使用的原始配置规范。
元素* CHECKEDOUT 元素-目录* / main / LATEST 元素* / main / release4 / release5 / LATEST 元素* / main / release4 / LATEST -mkbranch release5 元素* / main / LATEST -mkbranch版本4这是我的同事开始的配置规范与主线合并版本4之后
元素* CHECKEDOUT 元素-目录* / main / LATEST 元素* main / release5 / LATEST 元素* main / LATEST -mkbranch release5解决方案
以 branchname / LATEST -mkbranch newBranch 结尾的那些选择规则的思想是允许 element (文件或目录)以开始新的分支不管是哪个版本都是最新版本,除非说 newbranch 上已有版本。
所以这是一个为了确保所有从release4开始的文件都合并到main中,请在 all 元素上加上一个 main / LATEST 在合并之后(最好使用用于所述合并的快照视图),然后使用类似以下的配置规范:
元素* CHECKEDOUT 元素* ... / release5 / LATEST 元素* REL4 -mkbranch release5 元素* main /最新-mkbranch版本5从固定标签开始分支比从 / main / LATEST (可以随时看到新版本)开始更安全
OP Gregory Peck 注释:
使用 ... / release5 / LATEST 修复了它!
三点语法有效的原因(如 clearcase特定分支上文件的最新版本)是某些版本具有他们的分支从 release4 分支开始,其他分支从 main 开始。
使用 ... / release5 / LATEST ,选择 release5中的 LATEST ,无论 release5 是从哪个分支开始的。
In clearcase I started work on a branch called main/release4/release5. After I had began my work, release4 was merged into main. My coworkers started work on main/release5. Is there anyway I can move my main/release4/release5 work to main/release5?
So far, I've tried to merge from main/release4/release5 to main/release5 but that didn't work. The files stayed on main/release4/release5.
Visual example of what it looks like in version tree:
main | \ | release 4 | / \ main release 5 \ \ release 5 *move files from here \ *to hereHere is the original config spec I was working with.
element * CHECKEDOUT element - directory * /main/LATEST element * /main/release4/release5/LATEST element * /main/release4/LATEST -mkbranch release5 element * /main/LATEST -mkbranch release4Here is the config spec my coworkers started with after merging release 4 with mainline
element * CHECKEDOUT element - directory * /main/LATEST element * main/release5/LATEST element * main/LATEST -mkbranch release5解决方案
The idea of those selection rules ending with branchname/LATEST -mkbranch newBranch is to allow an element (file or directory) to start a new branch from whatever version happens to be the LATEST, unless there are already versions on said newbranch.
So it is a file-by-file mechanism.
To ensure all files to start from the release4 merged into main, put a label on all elemenents of main/LATEST right after that merge (preferably using the snapshot view used for said merge), then use a config spec like:
element * CHECKEDOUT element * .../release5/LATEST element * REL4 -mkbranch release5 element * main/LATEST -mkbranch release5Starting a branch from a fixed label is safer than starting from /main/LATEST (which can see a new version at any time)
The OP Gregory Peck comments:
using .../release5/LATEST fixed it!
The reason the "three dots" syntax worked (as illustrated in "clearcase latest version of a file on a particular branch") is that some versions had their branches starting from the release4 branch, other from main.
With .../release5/LATEST, you select the LATEST of release5, no matter which branch release5 is starting from.
更多推荐
Clearcase:将子分支移至主分支
发布评论