Using the Command Line Client that came with SOS 4.0.2, it seems that the CheckOutFile command doesn't properly return an error level value (to a batch file) in all cases.
It seems to properly return a non-zero errorlevel if I triy to check out a file that I already have checked out. However, it doesn't do this if somebody else has the file checked out.
This means that my batch files that attempt to check-out a file can't detect that the file is already checked out. It looks like the file was checked-out, but it really just gets a read-only copy of the file.
What's worse, is that if you are not using the -workdir option (which is supposed to use the working directory last set in the GUI client), then the failed CheckOutFile command gets a read-only copy of the file into the same directory as the batch file that called the CheckOutFile command.
Is this just me, or is it really a bug?
Thanks,
Bill
Command Line Client Doesn't Return Error for CheckOutFile...
Moderator: SourceGear
Could you post or email a copy of your command? If you post it, be sure to take out passwords or connection info. Or email to myname@SourceGear.com, with myname as Linda.
Also, are multiple checkouts allowed for your VSS database? This setting is in the VSS Admin Client under Tools->Options
Also, are multiple checkouts allowed for your VSS database? This setting is in the VSS Admin Client under Tools->Options
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
I said this previously:
File already locked: D:\MDS\Planning\Software_Task_Planning\TriMedia_Task_Planning.xls
and it doesn't seem to output this error message when somebody else has it checked out.
So, I guess there are two things that need to be done:
1) Have it output the error message no matter who has the file checked out already.
2) Have it return a non-zero errorlevel whenever an error happens. Better yet, have it output "1" if error, "2" if warning, or something similar.
Bill
But I was wrong. I was doing that from memory. Turns out, it doesn't return a non-zero errorlevel in either case. But, when I have it checked out already, it does return the following error message:It seems to properly return a non-zero errorlevel if I triy to check out a file that I already have checked out. However, it doesn't do this if somebody else has the file checked out.
File already locked: D:\MDS\Planning\Software_Task_Planning\TriMedia_Task_Planning.xls
and it doesn't seem to output this error message when somebody else has it checked out.
So, I guess there are two things that need to be done:
1) Have it output the error message no matter who has the file checked out already.
2) Have it return a non-zero errorlevel whenever an error happens. Better yet, have it output "1" if error, "2" if warning, or something similar.
Bill