SOSCMD CLC not updating database

If you are having a problem using SourceOffSite, post a message here.

Moderator: SourceGear

Post Reply
sajaftar
Posts: 1
Joined: Wed Apr 18, 2007 12:19 am

SOSCMD CLC not updating database

Post by sajaftar » Wed Apr 18, 2007 12:28 am

Hi,

I am using SourceOffSite Classic Version 4.1.

Basically i want to Get the latest version at 7:30 am and for that i've created a window service and from that service i am executing SOSCmd.exe with arguments mentioned below.
“SOSCmd.exe -soshome D:\documents and settings\<UserName>\Application Data\SourceGear\SOS\servers\010040049086\database1.sos -command GetProject -server <ServerName> -name <UserName> -password <Password> -database <SOSDatabase\srcsafe.ini> -project <ProjectPath> -workdir <WorkingDirectoryAtLocalDriveWhichisMappedWithSOSDatabase> -recursive –verbose”

The problem is
1.) If i skip or discard –soshome, the status of project or file in sos changed to Renegade.
2.) If i skip –workdir all files get copied in service executable path
3.) And with the command mentioned above files get updated in working directory but database doesn’t get updated i.e. “database1.sos” and the status remains renegade and every time the results is same. The problem here is every time it repalce the file and all the file whether changed or not DateTimeStamp changed with newer DateTime.

The service has been written using .Net Framework 2.0 and language as C#.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Wed Apr 18, 2007 9:47 am

I was able to reproduce this, but haven't determined yet why it is happening. I'll post back more later.
Linda Bauer
SourceGear
Technical Support Manager

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Wed Apr 18, 2007 12:20 pm

I think this is the problem:

Code: Select all

-soshome D:\documents and settings\<UserName>\Application Data\SourceGear\SOS\servers\010040049086\database1.sos 
The CLC is expecting only "D:\documents and settings\<UserName>\Application Data\SourceGear\SOS" for the path to the home directory. So it knows it should use the cache, but it can't find it.

I'd suggest putting the -soshome parameter at the end of the command. Also, when you use -soshome, you shouldn't need -workdir, as the cache will provide information on the working folder.

Example:

Code: Select all

SOSCmd.exe  -command GetProject -server <ServerName> -name <UserName> -password <Password> -database <SOSDatabase\srcsafe.ini> -project <ProjectPath>  -recursive –verbose 
-soshome "D:\documents and settings\<UserName>\Application Data\SourceGear\SOS"
Linda Bauer
SourceGear
Technical Support Manager

Post Reply