Command-line "Add" not recursive?

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

Moderator: SourceGear

Post Reply
kfredericks
Posts: 4
Joined: Mon Jan 26, 2009 9:37 am

Command-line "Add" not recursive?

Post by kfredericks » Mon Jan 26, 2009 9:51 am

Add seems not to be recursive. When I run the command below, it simply creates the top level folder, but does not add any of the subfolders or their files. Am I doing something wrong, or does Add simply not work this way. How then do I add a whole tree of files to Vault? Thanks. -Keith

COMMAND LINE EXECUTED

Code: Select all

"C:\Program Files\SourceGear\Vault Client\vault.exe" ADD "$/WELIS" "d:\temp\production\Ascent" -host ******** -user *** -password *** -repository "******" -commit
XML REPORT

Code: Select all

<vault>
  <changeset>
    <AddFolder>
      <id>0</id>
      <reposfolder>$/WELIS/Ascent</reposfolder>
      <localfolder>d:\temp\production\Ascent</localfolder>
    </AddFolder>
  </changeset>
  <!--Preparing data to begin transaction-->
  <!--Beginning transaction-->
  <!--    Create folder $/WELIS/Ascent-->
  <!--Ending the transaction-->
  <!--Transaction completed successfully-->
  <result>
    <success>True</success>
  </result>
</vault>

shannon

Re: Command-line "Add" not recursive?

Post by shannon » Mon Jan 26, 2009 10:29 am

You're correct, add is not recursive in the CLC. This would be easiest done from the GUI client Add Files/Folders dialog. Is the gui client not an option here?

kfredericks
Posts: 4
Joined: Mon Jan 26, 2009 9:37 am

Re: Command-line "Add" not recursive?

Post by kfredericks » Mon Jan 26, 2009 11:32 am

Correct, I need to do this in an automated way. So far the command-line has serviced all my needs. Do I have to add each file and folder individually. That is terrible.

shannon

Re: Command-line "Add" not recursive?

Post by shannon » Mon Jan 26, 2009 11:46 am

You can pass it a list of local paths for items to add to the repository folder you passed. Alternatively, you could write a small application using our api to walk your tree and add the items.

kfredericks
Posts: 4
Joined: Mon Jan 26, 2009 9:37 am

Re: Command-line "Add" not recursive?

Post by kfredericks » Mon Jan 26, 2009 11:49 am

You can pass it a list of local paths for items to add to the repository folder you passed. Alternatively, you could write a small application using our api to walk your tree and add the items.
Thanks Shannon. I was considering doing just that. Where is the reference documentation for the API. I imagine it is simple to write the code, but it will probably take me longer to find out how to write it than to actually write it. Maybe I'll take a look at he command-line source and that will give me a clue. Thanks again for your help.

shannon

Re: Command-line "Add" not recursive?

Post by shannon » Mon Jan 26, 2009 11:55 am

There are examples here: http://support.sourcegear.com/viewtopic.php?f=31&t=8020

That should get you started. Ask questions if you run into trouble.

Post Reply