Error using GETLABELDIFFS from CLC
Moderator: SourceGear
Error using GETLABELDIFFS from CLC
To whom it may concern,
I am using SGV version 3.1.2 (3511) and I have some problem regarding GETLABELDIFF:
We have an automated system for integration builds that is using consecutive label names for each build.
I can get all labels created using the HISTORY command:
vault HISTORY -host <HOST> -user <USER> -repository <REPOSITORY> $/<Project> -norecursive -rowlimit 15 -datesort desc
The command is listing me LABELS used in <item> elements.
I see the LABEL AUC1030 there.
If I try to do
vault GETLABELDIFFS -host <HOST> -user <USER> -repository <REPOSITORY> $/<Project> AUC1030
I get the following error:
<vault>
<error>
Invalid label: AUC1030
</error>
<exception>
System.ArgumentException: Invalid label: AUC1030
at VaultCmdLineClient.VaultCmdLineClient.GetLabelTimeStamps(String item, Stri
ng label1, String label2, DateTime& timestamp1, DateTime& timestamp2)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommandGetLabelDiffs(String s
trReposPath, String strLabel1, String strLabel2)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>
If I use AUC1031 or AUC1029 it all works well.
What is the problem with the above command???
Thanks for you help,
Andreas Kroll
I am using SGV version 3.1.2 (3511) and I have some problem regarding GETLABELDIFF:
We have an automated system for integration builds that is using consecutive label names for each build.
I can get all labels created using the HISTORY command:
vault HISTORY -host <HOST> -user <USER> -repository <REPOSITORY> $/<Project> -norecursive -rowlimit 15 -datesort desc
The command is listing me LABELS used in <item> elements.
I see the LABEL AUC1030 there.
If I try to do
vault GETLABELDIFFS -host <HOST> -user <USER> -repository <REPOSITORY> $/<Project> AUC1030
I get the following error:
<vault>
<error>
Invalid label: AUC1030
</error>
<exception>
System.ArgumentException: Invalid label: AUC1030
at VaultCmdLineClient.VaultCmdLineClient.GetLabelTimeStamps(String item, Stri
ng label1, String label2, DateTime& timestamp1, DateTime& timestamp2)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommandGetLabelDiffs(String s
trReposPath, String strLabel1, String strLabel2)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>
If I use AUC1031 or AUC1029 it all works well.
What is the problem with the above command???
Thanks for you help,
Andreas Kroll
Is there anything in the Vault server log file that corresponds to failed command?
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
Error using GETLABELDIFFS from CLC
No, there are not entries in the logfile indicating any error at all.
The steps are reproducable, not as another customer stated "every second time".
The steps are reproducable, not as another customer stated "every second time".
Yes, that may be the case. But why isn't any error cause given?lbauer wrote: There may not be anything wrong with the command, if the same command works with labels AUC1031 or AUC1029. There may be something wrong with the label.
Can you do a successful "Getlabel" on AUC1029?
As the labels are all set by the same workflow (CCNET) I do not understand why most of the labels "work" but SOME won't.
I can do a GETLABEL on AUC1029 AND AUC1030 wihtout any problems.
So why is the GETLABELDIFF failing on the AUC1030 ???
Is it possible the zero is really the letter O? Or, perhaps there is a space after the name of the label?
Our GETLABELDIFFS code is still a work in progress. It just does a query on the folder for all history and searches for the matching label on the client side. You could try to bring up the command line client in the debugger and figure out why it isn't matching the label.
We're plannning to make improvements so that getting a label through the API works better in the future.
Our GETLABELDIFFS code is still a work in progress. It just does a query on the folder for all history and searches for the matching label on the client side. You could try to bring up the command line client in the debugger and figure out why it isn't matching the label.
We're plannning to make improvements so that getting a label through the API works better in the future.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
No, that is not possible. CCNET does give the labels a unique naming schema.lbauer wrote:Is it possible the zero is really the letter O? Or, perhaps there is a space after the name of the label?
I also said that I CAN do a GETLABEL on the AUC1030, so the name of the label HAS to be right, doesn't it?
What do I have to do to get the Commandline Client in the debugger?lbauer wrote: Our GETLABELDIFFS code is still a work in progress. It just does a query on the folder for all history and searches for the matching label on the client side. You could try to bring up the command line client in the debugger and figure out why it isn't matching the label.
Since you are talking about API and Commandline Client here....lbauer wrote: We're plannning to make improvements so that getting a label through the API works better in the future.
I observed that I do get different results if I get a label using the API and if I use the vault.exe commandline client.
Just recently we had the problem that I could reproduce a get Label from the API does get a wrong (old) version of a single file over 3000 correct ones. If I repeated the command from commandline I got the right version of the file.
Don't you have UNIT tests in your code which should find such errors?
Just download the "Client API" installer from the Vault download page on SourceGear website at http://www.sourcegear.com/vault/downloads.html. The solution file is in there with the command line client code.NTTAKR wrote: What do I have to do to get the Commandline Client in the debugger?
The command line client uses the Vault API, so if the CLC works, then the problem is probably in the program that uses the API. We'd need more info on what you are doing.NTTAKR wrote: Since you are talking about API and Commandline Client here....
I observed that I do get different results if I get a label using the API and if I use the vault.exe commandline client.
Just recently we had the problem that I could reproduce a get Label from the API does get a wrong (old) version of a single file over 3000 correct ones. If I repeated the command from commandline I got the right version of the file.
Re: Error using GETLABELDIFFS from CLC
I began having the same problem with GETLABELDIFFS from the CLC recently, and looking at the source code found out why: the -rowlimit argument is ignored in the history item query in the GetLabelTimeStamps function... instead it is hard-coded to 10K. So if your labels don't fall in the first 10K items (mine were at around 20K), the label(s) won't be found. I replaced this with a 0, and got the diffs.NTTAKR wrote:If I try to do
vault GETLABELDIFFS -host <HOST> -user <USER> -repository <REPOSITORY> $/<Project> AUC1030
I get the following error:
<vault>
<error>
Invalid label: AUC1030
</error>
<exception>
System.ArgumentException: Invalid label: AUC1030
at VaultCmdLineClient.VaultCmdLineClient.GetLabelTimeStamps(String item, Stri
ng label1, String label2, DateTime& timestamp1, DateTime& timestamp2)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommandGetLabelDiffs(String s
trReposPath, String strLabel1, String strLabel2)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>
If I use AUC1031 or AUC1029 it all works well.
What is the problem with the above command???
Frank
Not sure if anyone is still looking at this topic, but note that a HISTORY command using -beginlabel and -endlabel will give you the same results as GETLABELDIFFS, and is much more efficient.
In fact, GETLABELDIFFS will probably be deprecated in the next version of Vault, since it isn't really needed anymore (now that history supports labels)
In fact, GETLABELDIFFS will probably be deprecated in the next version of Vault, since it isn't really needed anymore (now that history supports labels)