Trouble getting a version using command line client

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

Moderator: SourceGear

Locked
slyrp
Posts: 2
Joined: Thu Jan 06, 2005 9:16 am

Trouble getting a version using command line client

Post by slyrp » Mon Jul 10, 2006 10:16 am

We are having trouble retrieving a directory using a label from the command line - we use the following comand:

"C:\Program Files\SourceGear\Vault Client API\vault.exe" -host vault.is.not -user build -password **** -repository Repository -destpath C:\build\source\CreditSights\Web\lib\common -setfiletime checkin -norecursive -makewritable GETLABEL $/CreditSights/Web/lib/common/debug build_1_18_PR2

We get back the following error:

<vault>
<error>
Could not find label "build_1_18_PR2" created at item "$/CreditSights/Web/lib/co
mmon/debug".
</error>
<exception>
System.Exception: Could not find label "build_1_18_PR2" created at item "$/Credi
tSights/Web/lib/common/debug".
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommandGetLabel(String reposI
tem, String label, String labelSubItem)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>

Even through the the folder is labelled (the lablel was at the root $/ and the common directory is shared with many projects)

The following command:

"C:\Program Files\SourceGear\Vault Client API\vault.exe" -host vault.is.not -user build -password **** -repository Repository -destpath C:\build\source\CreditSights\Web\lib\common -setfiletime checkin
-makewritable GETLABEL $/CreditSights/Web/lib build_1_18_PR2
<vault>
<result success="yes" />
</vault>

Works perfectly (note the change of the source control path from $/CreditSights/Web/lib/common/debug to $/CreditSights/Web/lib... $/CreditSights/Web/lib/common fails..


Versions:
SourceGear Vault Command Line Client 3.1.8.3771
SourceGear Vault Server 3.1.8 I think - how can we find this out?
Attachments
ss.GIF
Screen shot from client
ss.GIF (35.19 KiB) Viewed 2902 times

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

Post by jclausius » Mon Jul 10, 2006 10:35 am

The most likely cause of this is a label which contains TWO paths to the item due to a folder share (common).

What folder was the label, "build_1_18_PR2" applied?


For example, imagine the following scenario:

$/
$/A/

$/A/X/
$/A/X/Lib/
$/A/X/Common/
$/A/X/Common/Images/

$/A/100/
$/A/100/HTML/
$/A/100/Common/
$/A/100/Common/Images/


Now label $/A/ with "MyLabel".

So if you ask for a GETLABEL against the images/, which folder do you mean? The one under A/X/Common? The one under A/100/Common?

In this case, the GETLABEL command requires a labelpath. So the command line client command would look like the following:

Code: Select all

vault.exe -server vaultserver -user myuser -password mypass -repository Repository -destpath C:\Images GETLABEL $/A/100/Common/Images/ MyLabel A/100/Common/Images
Jeff Clausius
SourceGear

slyrp
Posts: 2
Joined: Thu Jan 06, 2005 9:16 am

Seems to have worked :)

Post by slyrp » Mon Jul 10, 2006 10:42 am

That seemed to fix the issue - will integrate it back into our build script and see how things go :)

Locked