问题
How to apply a label To the latest version of a branch Using config Spec?
Can we apply a label using the Config spec.
Well I have created branches using the Config spec but I applied labels using the apply label option.
But i want to apply it by giving it in the config spec.
Can we do it if so how?
I tried it but Its not working.Thank you in advance
element * CHECKEDOUT
element /test_ari/karthik/omna.txt .../karthik_9/LATEST/karthik_66
element * /main/LATEST
I want to create a label karthik_66
on karthik_9/LATEST
using config spec rules but how do i make it?
回答1:
According to the config spec rules man page, you can use labels within a config spec to select a version, not to label one.
So "no".
When you create/manage a branch, you need 3 rules, not 1 like yo currently have:
element * CHECKEDOUT
# 3 rules here:
element /test_ari/karthik/* .../karthik_9/LATEST
element /test_ari/karthik/* /main/LATEST -mkbranch karthik_9
element /main/0 .../karthik_9/LATEST
element * /main/LATEST
That would create a branch for any file (not just omna.txt
) inside /test_ari/karthik, as well for any new file (the /main/0
selection rule).
Since you view would always refers to .../karthik_9/LATEST
, you can then apply your label at any time, setting it on the LATEST
of karthik_9
.
来源:https://stackoverflow.com/questions/6647653/config-spec-for-applying-a-label