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?
soscmd: cannot create empty directories using GetProject
Moderator: SourceGear
get project
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.
soscmd: cannot create empty directories using GetProject
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.