Sos
From MohidWiki
The sourceoffsite client allows to access sourcesafe databases from outside networks.
Contents
soscmd
The soscmd is the command line client version of sos.
Configure Soscmd
You require a .key file in order to access the sourceoffsite server.
That key is generated with the sos client (import key) from the .iky file.
The .iky file in turn is generated by the sos server.
IMPORTANT:
- -server sos.mohid.com:8890 means the server name you give in sos server is
sos.mohid.com.
- -server einstein:8890 means the server name is einstein.
- -server 192.168.21.13:8890 means the server name is 192.168.21.13 and so on ...
- Otherwise you'll get an error.[1]
Commands
Get
This example gets a listing of available databases of sos.mohid.com
G:\programs\sos>soscmd -command Get -server sos.mohid.com:8890 W:\SourceSafe\WW3\srcsafe.ini W:\SourceSafe\TemporaryDocuments\srcsafe.ini W:\SourceSafe\Mohid_NET\srcsafe.ini W:\SourceSafe\Databases\srcsafe.ini W:\SourceSafe\Mohid_v3\srcsafe.ini W:\SourceSafe\Mohid_v4\srcsafe.ini W:\SourceSafe\OtherTools\srcsafe.ini W:\SourceSafe\Websites\srcsafe.ini
GetProjectTree
This example gets the Mohid_v4 project tree at sos.mohid.com
G:\programs\sos>soscmd -command GetProjectTree -server sos.mohid.com:8890 -name guillaume -password XXXX -database "W:\SourceSafe\Mohid_v4\srcsafe.ini" -soshome "g:\programs\sos"
GetFileList
This example gets a file listing of the Mohid_Base_1 project served at sos.mohid.com
G:\programs\sos>soscmd -command GetFileList -server sos.mohid.com:8890 -name guillaume -password XXXX -database "W:\SourceSafe\Mohid_v4\srcsafe.ini" -project Mohid_Base_1 -soshome "g:\programs\sos"
GetFile
This example gets a file of the Mohid_Base_1 project served at sos.mohid.com
G:\programs\sos>soscmd -command GetFile -server sos.mohid.com:8890 -name guillaume -password XXXX -database "W:\SourceSafe\Mohid_v4\srcsafe.ini" -project Mohid_Base_1 -soshome g:\programs\sos -eol "unix" -file ModuleGlobalData.F90
GetProject
These examples get the full project and the Mohid_Base_1 project served at sos.mohid.com
G:\programs\sos>soscmd -command GetProject -recursive -server sos.mohid.com:8890 -name guillaume -password XXXX -database "W:\SourceSafe\Mohid_v4\srcsafe.ini" -project $/ -soshome "g:\programs\sos"
G:\programs\sos>soscmd -command GetProject -recursive -server sos.mohid.com:8890 -name guillaume -password XXXX -database "W:\SourceSafe\Mohid_v4\srcsafe.ini" -project Mohid_Base_1 -soshome "g:\programs\sos" -workdir "g:\Mohid_v4"
Soscmd in makefiles
The code within a makefile should look something like:
#--------Users: fill these lines with your sourcesafe data------------- SERVER := USER := PASS := SOSHOME := PROJECT := $(basename $(TARGET)) GET := soscmd -command GetFile \ -server $(SERVER):8890 \ -name $(USER) -password $(PASS) \ -database "W:\SourceSafe\Mohid_v4\srcsafe.ini" \ -project $(PROJECT) \ -soshome $(SOSHOME) \ -file S := sos #--------End of sourcesafe data------------- FILES := $(SRCS:.$(F)=.$(S)) .PHONY : sos $(FILES) sos: $(FILES) @-$(GET) Vars.mk @-$(GET) Dependencies.mk $(FILES): @-$(GET) $(@:.$(S)=.$(F)) @echo $(@:.$(S)=.$(F)) ................. [Fetched]
TroubleShoots
Segmentation fault
This error appears often. Apparently it is due to a GTK+ library version issue. No solutions actually found. Best thing to do is to ask to compile the soscmd from source.
Can't connect to server on Einstein
soscmd -command GetFile -server einstein:8890 -name Admin -password ***** -database "W:\SourceSafe\Mohid_v4\srcsafe.ini" -project $ -soshome /home/Projects/Sos -file Makefile Can't connect to server.. Error: 111 Connection refused Could not connect to server einstein at port 8890. Exiting...
Solution: Go to einstein via remote desktop and restart the source-offsite service.