soscmd requests
Moderator: SourceGear
soscmd requests
Would it be possible to get a refresh on the 4.2 'soscmd' utility?
The current download retains a bug that was fixed some time ago (or I was told it was fixed with -command interactive (every command requires you to supply a -alias or -database, but it actually ignores the value).
It would also be /really/ nice if you could add a -batch parameter which:
- Turns off all the readline stuff,
- Does not display any prompts,
- Perhaps prints a 'Content-length:' header before each output - but not really essential.
It finally struck me earlier that all of the "result" output is terminated with \r\n whereas the client output (such as the blank line after the output) is just\n.
The current download retains a bug that was fixed some time ago (or I was told it was fixed with -command interactive (every command requires you to supply a -alias or -database, but it actually ignores the value).
It would also be /really/ nice if you could add a -batch parameter which:
- Turns off all the readline stuff,
- Does not display any prompts,
- Perhaps prints a 'Content-length:' header before each output - but not really essential.
It finally struck me earlier that all of the "result" output is terminated with \r\n whereas the client output (such as the blank line after the output) is just\n.
Re: soscmd requests
Notes on soscmd with -command interactive:
/Some/ commands (GetFileList, GetFileHistory) always want you to add the -database/-alias (again: this is in interactive mode, seems kinda redundant)
GetFile does not honor -workdir.
/Some/ commands (GetFileList, GetFileHistory) always want you to add the -database/-alias (again: this is in interactive mode, seems kinda redundant)
GetFile does not honor -workdir.
Re: soscmd requests
I will put in a feature request for your first post. I'll need to run some tests on the second item before I can comment on it.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: soscmd requests
Ahh: To use GetFileList and GetFileHistory inside -command interactive you have to provide an alias (any alias) in the command line:
In the end the only way I could get soscmd to work reliably from within a scripting language was to use python's Pexpect and manually specify a terminal size of 16 rows and 511 columns.
Otherwise, whenever a command was longer than 40-60 characters, soscmd would fail on it as an unrecognized command.
So, yeah, a way to turn the pseudo-readline stuff off would be a godsend. I'm trying to automate some testing but doing it one soscmd invocation at a time = agony.
GetFile only seems to honor the command line -workdir argument:osmith@luciddev:/tmp$ soscmd -server 192.168.0.7:8535 -name $SOSUSER -password $SOSPASS -database $SOSDATA -command interactive
SOS>GetFileList -project $/
The GetFileList command requires valid -server, -name, -password, -project, and -database or -alias parameters.
SOS>GetFileList -project $/ -alias X
The GetFileList command requires valid -server, -name, -password, -project, and -database or -alias parameters.
SOS>GetFileList -project $/ -database C:\shared\public\ddrive\vss-dev\srcsafe.ini
SOS>quit
osmith@luciddev:/tmp$ soscmd -server 192.168.0.7:8535 -name $SOSUSER -password $SOSPASS -database $SOSDATA -command interactive -alias X
SOS>GetFileList -project $/
SOS>
I was also having a really hard time trying to drive soscmd via scripting languages etc. Through a process of elimination I managed to work out that it's some weirdness in your tty driving, particularly when you're not a tty.osmith@luciddev:/tmp/sos$ mkdir work
osmith@luciddev:/tmp/sos$ soscmd -server 192.168.0.7:8535 -name $SOSUSER -password $SOSPASS -database $SOSDATA -command interactive -alias X
SOS>GetFile -workdir work -project $/ww2data/ww2mods -file tos.txt
SOS>GetFile -workdir ./work -project $/ww2data/ww2mods -file eula.txt
SOS>GetFile -project ww2data/ww2mods -file tos.txt -workdir work
SOS>GetFile -project ww2data/ww2mods -file eula.txt -workdir /tmp/sos/work
SOS>quit
osmith@luciddev:/tmp/sos$ ls work # nothing in there
osmith@luciddev:/tmp/sos$ ls # they're both in the current working directory...
eula.txt tos.txt work
# Running the command with a -workdir argument this time.
osmith@luciddev:/tmp/sos$ soscmd -server 192.168.0.7:8535 -name $SOSUSER -password $SOSPASS -database $SOSDATA -command interactive -alias X -workdir work
SOS>GetFile -project ww2data/ww2mods -file tos.txt
SOS>GetFile -project ww2data/ww2mods -file eula.txt -workdir /tmp
SOS>quit
osmith@luciddev:/tmp/sos$ ls work # both files in work even tho the second had a -workdir
eula.txt tos.txt
In the end the only way I could get soscmd to work reliably from within a scripting language was to use python's Pexpect and manually specify a terminal size of 16 rows and 511 columns.
Otherwise, whenever a command was longer than 40-60 characters, soscmd would fail on it as an unrecognized command.
So, yeah, a way to turn the pseudo-readline stuff off would be a godsend. I'm trying to automate some testing but doing it one soscmd invocation at a time = agony.
Re: soscmd requests
Lastly... soscmd has this weird habbit of becoming unresponsive after a few GetFiles which seems to be timing related: I can get twice as many files if paste the list or use a redirect, than I can if I type them manually:
osmith@luciddev:/tmp/nightlybuild soscmd -server $SOSSERV -name $SOSUSER -password $SOSPASS -database $SOSDATA -alias D -command interactive -project ww2data/ww2mods
SOS>GetFile -project ww2data/ww2mods/DATA/sounds/bf109e3 -file mgffr.wav -revision 1
SOS>GetFile -project ww2data/ww2mods/DATA/sounds/pziiif -file idle.wav -revision 1
SOS>GetFile -project ww2data/ww2mods/DATA/sounds/pziiif -file dual_mg34.wav -revision 1
SOS>GetFile -project ww2data/ww2mods/DATA/sounds/Charb1 -file idle.wav -revision 1
SOS>GetFile -project ww2data/ww2mods/DATA/sounds/oplblitz -file starter.wav -revision 1
SOS>GetFile -project ww2data/ww2mods/DATA/sounds/Charb1 -file engine.wav -revision 1
SOS>GetFile -project ww2data/ww2mods/DATA/sounds/bf109e3 -file prop.wav -revision 1
(never comes back)
Re: soscmd requests
Back on the SOS cmd issue. Are there areas in your command where you have to use quotes? It appears to be reliant on that. The issue was logged in our bug database, but wasn't able to make it into one of the recent releases.
F: 11576
F: 11576
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: soscmd requests
"are there areas in your command where you have to use quotes"
Not that I'm aware of. I'm doing this with -command interactive, and it seems to dislike quoted parameters.
Not that I'm aware of. I'm doing this with -command interactive, and it seems to dislike quoted parameters.
Re: soscmd requests
Ahh - that may have been another contributing factor - there are some filenames later with spaces in them, but thats much further into the repo than I was getting previously.
I found that I just need to escape them with a slash, i.e.
Some File.url
becomes
Some\ File.url
- Oliver
I found that I just need to escape them with a slash, i.e.
Some File.url
becomes
Some\ File.url
- Oliver
Re: soscmd requests
Spoke too soon on that last... This is under Linux with the most recent SoS client for Linux;
I use a wrapper, "sosdo", which adds the database, username and password.
I am able to retrieve the file with the SoS UI though.
I use a wrapper, "sosdo", which adds the database, username and password.
So far so good,
osmith@luciddev:~/sos2svn$ sosdo -command GetFileHistory -project '$/ww2data/ww2mods/DATA/vehicles/aircraft/ju87b' -file 'Ju87b\ performance.xls' | head -10
dchristopher
07/23/2010 09:43
1.31.4.255
dchristopher
07/16/2010 10:09
1.31.3.255
Don't see anything in the log (but I could be looking in the wrong place)osmith@luciddev:~/sos2svn$ sosdo -command GetFile -project '$/ww2data/ww2mods/DATA/vehicles/aircraft/ju87b' -file 'Ju87b\ performance.xls'
Error: Server response = 400 OperationFailed
I am able to retrieve the file with the SoS UI though.
Re: soscmd requests
Can you describe in further detail what you are looking for here? Do you mean for it to check what you have on disk and update it or something else?Would it be possible to get a refresh on the 4.2 'soscmd' utility?
On the interactive mode, try using -alias when you first start interactive mode instead of -database. In my tests, I didn't need to use -alias again if I used -alias when I first start interactive mode. I did find that if I used -database that I had to use -database with commands. I've haven't tested this with all commands, but I have with GetFileList, GetFileHistory, CheckOutProject, and CheckOutFile. I will log a bug against the interactive mode.
F: 15536
The batch parameter request has been logged. Thank you for your feedback.
F: 15535
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: soscmd requests
Ah, I just mean an update of the executable, e.g. with the fix for spaces in file namesWould it be possible to get a refresh on the 4.2 'soscmd' utility?
Code: Select all
osmith@luciddev:~$ sosdo -command GetFile -project '$/ww2data/ww2mods/DATA/vehicles/aircraft/ju87b' -file 'Ju87b\ performance.xls'
Error: Server response = 400 OperationFailed
osmith@luciddev:~$ sosdo -command GetFile -project '$/ww2data/ww2mods/DATA/vehicles/aircraft/ju87b' -file 'Ju87b performance.xls'
Error: Server response = 401 NoSuchFileOrProject
- Oliver
Re: soscmd requests
What type of machine are you using the command prompt on? Is it a Windows machine or Unix based?
The SOS server log is found in the same directory that the SOS server is installed to and is called log.txt. What errors correspond to the "Server response = 400 OperationFailed?"
I also added a feature request relating to your use of soscmd from in a scripting language.
F: 15543
The SOS server log is found in the same directory that the SOS server is installed to and is called log.txt. What errors correspond to the "Server response = 400 OperationFailed?"
I also added a feature request relating to your use of soscmd from in a scripting language.
F: 15543
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: soscmd requests
Soscmd under Linux, server on Windows Server 2003R2. Neither 4.2 or 5.0 server give anything useful, this is from 5.0:
2010-09-10 15:35:45,940 - Connection accepted from 192.168.0.52:50760 on local address 192.168.0.7:8535, session id is 1.
2010-09-10 15:35:51,534 - 09/10/2010 15:35:51 - Server Exception (400): [C:\Program Files\SourceGear\SourceOffSite 5 Server\temp\<snipped>\ju87b] - OPERATION_FAILED
2010-09-10 15:35:51,659 - 1: Server Error: 400
2010-09-10 15:35:52,440 - 1: VSS database closed for the session id 1.
Re: soscmd requests
Could you increase the logging level to get more information about what's going on with that error? Instructions are posted in the SOS manual: http://download.sourcegear.com/misc/sos ... ER_LOGGING. Debug may make for a large log, but I think it would help narrow down the issue.
When completed, recreate the scenario, and then post the portion of the log that relates to the creation of the 400 error.
When completed, recreate the scenario, and then post the portion of the log that relates to the creation of the 400 error.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support