Branch by Label from Command Line

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Branch by Label from Command Line

Post by davenovak » Wed Mar 14, 2007 8:34 am

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.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Wed Mar 14, 2007 9:38 am

We have a feature request logged for that. I can add your "vote". Thanks.

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Post by davenovak » Wed Mar 14, 2007 12:13 pm

That is quite unfortunate. I'm honestly shocked and disappointed that I cannot do this from the command line. I'm trying to automate some of our manual processes (which use branch by label), and now I don’t know what to do.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Wed Mar 14, 2007 12:58 pm

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.

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Post by davenovak » Wed Mar 14, 2007 1:53 pm

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.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Wed Mar 14, 2007 3:53 pm

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.

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Post by davenovak » Wed Mar 14, 2007 5:35 pm

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.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Thu Mar 15, 2007 8:31 am

I was still thinking along the lines of a pin to a version. Use history to get the version associated with the label, pin to that version, branch, and then unpin.

davenovak
Posts: 222
Joined: Mon Jan 15, 2007 2:15 pm
Location: Atlanta, GA

Post by davenovak » Tue Mar 20, 2007 11:35 am

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.

Locked