soscmd: cannot create empty directories using GetProject

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

Moderator: SourceGear

Post Reply
grok777
Posts: 2
Joined: Wed May 12, 2004 6:00 am
Location: Germany

soscmd: cannot create empty directories using GetProject

Post by grok777 » Wed May 12, 2004 6:18 am

I have a problem using the SOS command line client, and I see the same problem with the SS command line client. However, I do not see this problem in the SOS and VSS GUI tools. The problem is that empty directories are not created in the working directory on the PC when I do a recursive GetProject on a tree. I have set the -nocache option in the client to make sure that it gets the latest structure and filelists. Here is the command:

soscmd -command GetProject -server servName -name u -password p -database dbName -project projName -workdir dirPath -label -labName -recursive

There are obvious workarounds, but this seems like a bug.

One workaround that I tried which failed was the following:
Create an empty directory inside of another empty directory, but if there are no files in that branch of the tree, the top branch is not created:
Dev
|- Project1
|- Project2 (empty)

Result: Project1 is not created.

All I want is an exact copy of the structure we have in the database without having to explicitly make directories in our build script. Does anyone know a solution for this? Is there a command line flag that I am missing? I thought that GetProjectTree would build a directory tree that matches what is in the database, but instead it returns a directory listing to STDOUT, which is not helpful at all. What do they expect me to do -- recursively parse the output and make calls to mkdir? Shouldn't that be automatic?

guest

get project

Post by guest » Thu May 13, 2004 6:54 am

I think you need to use GetProjectTree instead of GetProject. This should populate your directory with folders for the whole tree but not the files themselves. Also - I do not include the parameters that are optional. I only insert the required parameters or parameters that I am using.

grok777
Posts: 2
Joined: Wed May 12, 2004 6:00 am
Location: Germany

soscmd: cannot create empty directories using GetProject

Post by grok777 » Wed May 19, 2004 10:45 am

GetProjectTree did not work from the command line. It only returned a list of the directory tree to STDOUT. It did not populate the working directory. All of the params shown in my first post were actually required for our system. I only filled in dummy data so you could see what command and params I was using. If anyone has a solution for this problem, or if they know that this is an open bug, it would be a big help.

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

Post by lbauer » Wed May 26, 2004 2:33 pm

This is a known issue in SourceOffSite. Empty projects are not retrieved in a Get operation from the CLC. It's logged as a bug to be addressed in a future release.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply