Getting the label string using the commandline

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
Ramesh

Getting the label string using the commandline

Post by Ramesh » Thu Nov 11, 2004 12:47 pm

How can we get the label string for a folder? In VSS we could do something like

ss history <ssafefolder> -L

and do some postprocessing on the string returned to extract the build number - for instance.

But the vault commandline does not give any info on the label. All I get is info about the comment that went with the label command - as follows

<vault>
<history>
<item txid="0" date="11/10/2004 3:41:27 PM" name="Codebase" type="90" version="1" user="joe" comment="Code version moved in to the Vault from Visual Source Safe" />
<item txid="13" date="11/3/2004 5:25:54 PM" name="Codebase" type="10" version="1" user="admin" />


The first item above corresponds to the label command via the GUI
Any help appreciated!

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Fri Nov 12, 2004 10:42 am

It looks like the Vault command line doesn't output the label name, just the type of action. I'll add this as a request to output more info for labels on a history query result.

In the meantime, the source code for the command line client is available, and if this is must-have functionality for you, you could always dive in there and try to implement it.

Ramesh

Post by Ramesh » Fri Nov 12, 2004 11:42 am

Thanks for the reply, Dan.

Yes, I am looking into doing that already. Where can I find documentation for the API?

BTW, I have made a change to the client here that
1. allows it to accept a REMEMBERLOGIN without specifying a repository to use.
2. allows a command to be issued with a -repository repositoryname without an accompanying -user and -password option.

The above allows one to issue the REMEMBERLOGIN command once on the build machine (w/o the repo name), and the scripts can now work with multiple repos by just providing a -repository argument with the command.

(In case someone else has a similar need, let me know - its a simple enough change)

An improvement could be to have a SETREPOSITORY command so that it applies to subsequent commands... :-)

Post Reply