soscmd.exe -GetFile error: OperationFailed
Moderator: SourceGear
soscmd.exe -GetFile error: OperationFailed
I use soscmd.exe and successfully enter into Interactive mode by using command Interactive. But when I can not get file in Interactive mode.
The commands are listed as follow:
c:\>soscmd -command Interactive -server *** -name *** -password *** -alias ***
SOS>GetFile -project "$/PMU" -file "PMU.dsw"
Error: Server Response = 400 Operation Failed
SOS>GetFile -project $/PMU -file PMU.dsw
SOS>
It seems that I can not add quotations(") in the -project and -file options.
Note: The SOS version number is 4.1.2.242. It also exists on the SOS for MAC.
Another issue: It can only put the file to current folder even you specify the -workdir option.
The commands are listed as follow:
c:\>soscmd -command Interactive -server *** -name *** -password *** -alias ***
SOS>GetFile -project "$/PMU" -file "PMU.dsw"
Error: Server Response = 400 Operation Failed
SOS>GetFile -project $/PMU -file PMU.dsw
SOS>
It seems that I can not add quotations(") in the -project and -file options.
Note: The SOS version number is 4.1.2.242. It also exists on the SOS for MAC.
Another issue: It can only put the file to current folder even you specify the -workdir option.
When these issues can be fixed?
Hi Beth, when these issues can be fixed?Beth wrote:I've checked this out and logged a bug on it. Thank you for bringing this to our attention.
I am developing some batch programs to automatically do SOS operations through soscmd. Now the command Interactive can now work well, so I have to create soscmd processes frequently, it is very slow. If the command Interactive can work well, I can create a single soscmd process and type commands into it, and get the results, which will obviousely improve the speed.
Using the 4.2 soscmd client, it complains about the lack of -server, -name, -password, -database or -alias although these were specified on the initial command line:
At least - I believe its the 4.2 client, there's no obvious way to tell.[osmith@fedex build]$ soscmd -server 192.168.0.7:8535 -name validusername -password validpassword -database C:\\shared\\Public\\Ddrive\\VSS-Dev\\srcsafe.ini -command Interactive -soshome /home/osmith/.sos
SOS>GetFileList -project $/ww2/be/host/build
The GetFileList command requires valid -server, -name, -password, -project, and -database or -alias parameters.
SOS>GetFileList -project $/ww2/be/host/build -server 192.168.0.7:8535 -name validusername -password validpassword -database C:\shared\Public\Ddrive\VSS-Dev\srcsafe.ini
<lots of files>
SOS>
Did you notice that you had double '\'s listed in the first command in theC:\\shared\\Public\\Ddrive\\VSS-Dev\\srcsafe.ini
path? What happens if you try that with single '\'s like you did the second time?
Also, you didn't use the -soshome the second time around. Try using the exact same command to compare results.
The Unix/Mac shells' interpreters will interpret the "" as an escape character and soscmd will complain that there is no database "C:sharedPublicDDriveVSS-Devsrcsafe.ini". The actual string that gets passed to soscmd is "C:\shared\Public\DDrive\VSS-Dev\srcsafe.ini".Beth wrote:Did you notice that you had double '\'s listed in the first command in theC:\\shared\\Public\\Ddrive\\VSS-Dev\\srcsafe.ini
path? What happens if you try that with single '\'s like you did the second time?
Code: Select all
oliversmac:tmp osmith$ /Applications/SourceOffSite/soscmd -command "Interactive" -server 192.168.0.7:8535 -name $USERNAME -password $PASSWORD -database C:\shared\Public\Ddrive\VSS-Dev\srcsafe.ini
Failed to open database: C:sharedPublicDdriveVSS-Devsrcsafe.ini
Available databases:
C:\shared\Public\Ddrive\VSS-Terrian\srcsafe.ini
C:\shared\Public\Ddrive\VSS-Dev\srcsafe.ini
Can't shutdown socket.. Error: 57 Socket is not connected
I'd tried with and without the soshome in my various experiments; regardless of the commands on the command line - with -soshome, without -soshome, with -nocache, any command I type after the SOS> prompt asks me to specify -server, -name, -password and -database or -alias - which is a minor inconvenience but it /seems/ to defeat the purpose of having an interactive mode, and it suggests that the client is actually doing a fresh connection each time. I've, as yet, to see any advantage to using the interactive mode over reinvoking soscmd multiple times - it doesn't appear to be doing any caching or connection retention.Beth wrote:Also, you didn't use the -soshome the second time around. Try using the exact same command to compare results.
Try using the -alias switch instead of "-database C:\shared\Public\Ddrive\VSS-Dev\srcsafe.ini. " Use the alias you see in the drop down combo box from a login window from the SOS GUI client. This is the same string configured in the SOS Server Manager.
Interactive appears to work with the -alias switch.
Interactive appears to work with the -alias switch.
The -alias is either unrelated to the Project Name in the drop down or it doesn't like spaces in the alias names -- annoyingly, our admin has called the project I need to access "WWIIOL Project" (no quotes).
However, I was able to get it to work by doing the following:
soscmd -server xxx -name xxx -password xxx -database C:\\xxx\xx\x\srcsafe.ini -alias DB -command Interactive
SOS> GetFileList -alias DB -project $/
Which is a big improvement over having to send the details repeatedly.
Thanks
- Oliver
However, I was able to get it to work by doing the following:
soscmd -server xxx -name xxx -password xxx -database C:\\xxx\xx\x\srcsafe.ini -alias DB -command Interactive
SOS> GetFileList -alias DB -project $/
Which is a big improvement over having to send the details repeatedly.
Thanks
- Oliver