Branch by Label from Command Line
Moderator: SourceGear
Branch by Label from Command Line
How do I branch by label from the command line? I'm not seeing this in the command-line help, yet clearly it is supported from the Vault GUI.
The only workarounds I can think of with this is to branch the folder the label is associated with immediately after the label, or you could identify the version of the folder that label is associated with and pin it at that version. Then the current version should be the pin then and you could try to branch.
But doesn't pinning to a version prevent further modifications to that branch? If so, that would not work for me as these are active branches under development. The reason I want to branch on a label is because the label identifies a stable point in time for that code branch.
Again I say that I'm surprised that Vault does not support this from the command line. Clearly the server supports it (as the Client GUI does it). I'm baffled at the decision to keep this functionality out of the command line. Whatever operation I can do from the GUI, I should be able to do (somehow) from the command line (and vice versa).
As a minimum, SourceGear should offer a command-line "power toy" that contains this (and other?) missing functionality until such operations can be officially rolled into the Vault client.
Again I say that I'm surprised that Vault does not support this from the command line. Clearly the server supports it (as the Client GUI does it). I'm baffled at the decision to keep this functionality out of the command line. Whatever operation I can do from the GUI, I should be able to do (somehow) from the command line (and vice versa).
As a minimum, SourceGear should offer a command-line "power toy" that contains this (and other?) missing functionality until such operations can be officially rolled into the Vault client.
I was thinking one would then unpin after the branch was made. I will try to run a test on this.
Oh, and you may wish to check out the Vault Client API. That may provide more functionality for you. There are 3-4 articles on how that works in our Vault KB Article index: http://support.sourcegear.com/viewtopic.php?t=792. Just look for the heading Client API. We also provide the source code for the command line client both as a sample of how to use that API and if you want to make changes.
Again, we do have the issue you are having logged and it has been discussed and scheduled for a future release.
Oh, and you may wish to check out the Vault Client API. That may provide more functionality for you. There are 3-4 articles on how that works in our Vault KB Article index: http://support.sourcegear.com/viewtopic.php?t=792. Just look for the heading Client API. We also provide the source code for the command line client both as a sample of how to use that API and if you want to make changes.
Again, we do have the issue you are having logged and it has been discussed and scheduled for a future release.
I think I understand what you're saying. But can you pin to a label? I'm not seeing this in command-line docs. Unless there is yet another call that I would have to make first to get the version associated with label (as Pin to version is supported). Or, unless you mean I would just look this up once (since it would not change later).
I'll look at the other references you've provided and see where that takes me.
Thanks.
I'll look at the other references you've provided and see where that takes me.
Thanks.
For now, I've concluded that the "easiest" thing for me to do is to branch by label using the GUI, putting the branch result into a Vault folder that only I use. I then run my "automated" tool to branch from that location. The only downside of this approach is that I would have to branch from the GUI with every new major release. That said, I still get some benefit of automation.
I hope that SourceGear will support this soon.
I hope that SourceGear will support this soon.