下面 2 项中哪个配置规范是正确的,为什么?
element * CHECKEDOUT
element /test_ari/karthik/desk.txt /main/LATEST -mkbranch karthik_9
element /test_ari/karthik/desk.txt .../karthik_9/LATEST
element * /main/LATEST
为什么当我检查这些配置规范时它第一次显示错误。
但当我再次签出时,它第二次起作用,但有一个消息框显示自动分支和选定分支。
我在主要最新版本上创建了一个分支,并在 karthik_9 LATEST
上创建了它,所以它应该可以工作。
是的,它正在工作,但问题是为什么不是第一次。
并查看下面的配置规范,
element * CHECKEDOUT
element /test_ari/karthik/desk.txt .../karthik_9/LATEST
element /test_ari/karthik/desk.txt /main/LATEST -mkbranch karthik_9
element * /main/LATEST
这次它可以正常工作,没有错误或提示。
据我所知,它应该指出一个错误,因为当我们说 karthik_9/LATEST
时,第二行不存在分支,而是创建了我们在第三行中提到的分支并跳转到该分支。
所以问题是它是从上到下还是从下到上执行配置规范规则。如果它是从上到下的,为什么它在第二个代码中没有显示错误,但在第一个代码中显示错误。并且让我知道为什么我们总是应该使用:
element */main/LATEST
作为最后一个命令?有什么具体原因吗?
element * CHECKEDOUT
element /test_ari/karthik/desk.txt /main/LATEST -mkbranch karthik_9
element /test_ari/karthik/desk.txt .../karthik_9/LATEST
element * /main/LATEST
Why it says error for the first time when I do check out with these config spec.
But it works second time when I do check out again but with a message box saying auto branch and selected branch.
I have created a branch on main Latest version and I made it on karthik_9 LATEST
so it should be working.
Yes it is working but the question why not for the first time itself.
And see the below config spec
element * CHECKEDOUT
element /test_ari/karthik/desk.txt .../karthik_9/LATEST
element /test_ari/karthik/desk.txt /main/LATEST -mkbranch karthik_9
element * /main/LATEST
These time it works with no errors or prompts.
To my knowledge it should point an error because there is no branch existing for the second line when we say karthik_9/LATEST
but rather it creates the branch what we mentioned in third line and jumps to that.
So the question is does it execute the config spec rule in the top to bottom or bottom to top. If it is top to bottom why it is not showing an error in the second code but showing an error in first one. And also let me know these why we always should use:
element */main/LATEST
as the last command? Any specific reason?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用分支时应使用第二个:
原因始终与 ClearCase 应用选择规则所使用的顺序有关:您首先需要选择分支的版本(如果存在),如果不存在,则选择从中启动分支的版本。
如果您反转它,所选版本将始终是
/main
中的版本,即使在新分支中签出/签入之后也是如此。The second one should be used when working with branch:
The reason is as always related to the order used by ClearCase to apply a selection rule: you need first to select the version of the branch if it exists, and if not to select the version from which you start a branch.
Should you inverse it, the version selected would always by the one from
/main
, even after a checkout/checkin in a new branch.