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.
GETLABEL from command line
Moderator: SourceGear
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'
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
SourceGear