GETLABEL from command line

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

Moderator: SourceGear

Post Reply
rgkeefer
Posts: 23
Joined: Wed Feb 11, 2004 5:49 pm
Location: Tucson, AZ

GETLABEL from command line

Post by rgkeefer » Mon Apr 05, 2004 10:00 am

I have a batch file that accepts a labelname and then gets the label to a folder on my machine. We just upgraded to 2.0.1 and I am trying to use the GETLABEL command and cant seem to get the syntax correct. Here is what I am using:

vault -user admin -password ****** -host ****** -repository FirstMagnus GETLABEL -destpath c:\inetpub\wwwroot\LenderServices -merge overwrite repositorypath $/LenderServices label LenderServices.2004.04.05.001

what is the correct syntax for repositorypath and labelpath?

---------
vvvvvvvvv
note - edited by jeffc @ sourcegear. i removed the password / server as a safety measure.

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Apr 05, 2004 12:39 pm

repository path - the path of the item that you wish to get. for example - $/foo/file.cpp - is a repository path. note, the word, repositorypath, should not appear in your command.

label - the label name applied to the object that you wish to retrieve. note, the word, label, should not appear in your command.

label path - if an object is shared within a label, this is the path to the object, starting at the root of the label. note, the word, labelpath, should not appear in your command.

this can be confusing. here is an example:

$/
$/dir/
$/dir/dirA/
$/dir/dirA/dir1/
$/dir/dirA/dir1/file.cpp -> shared.
$/dir/dirA/dir2/
$/dir/dirA/dir2/file.cpp -> shared.

imagine a label, 'my label', applied to $/dir/dirA. if you wish to retrieve file.cpp for the label, 'my label', which one would you want? in cases like these, the label path - 'dirA/dir1/file.cpp' is required to resolve the ambiguity of locating an object which appears in multiple places within a label.


here is the command to get dir2's file.cpp:

vault GETLABEL -destpath c:\inetpub\wwwroot\destpath -merge overwrite $/dir/dirA/dir2/file.cpp 'my label' 'dirA/dir2/file.cpp' -user someuser -password somepassword -host somehost -repository 'test repository'
Jeff Clausius
SourceGear

Post Reply