SIMPLE example for using command line client

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

Moderator: SourceGear

Post Reply
dhjdhj
Posts: 21
Joined: Tue Sep 02, 2008 12:34 pm

SIMPLE example for using command line client

Post by dhjdhj » Fri Jul 10, 2009 3:16 pm

The documentation I've found lists all the commands and options....lots of them, will take ages to wade through them.

Is there, somewhere, a simple example that just takes you through the process to connect to a repository, view files, check stuff out, etc, so one doesn't have to be an expert to just USE the command line client?

Thanks,
D

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

Re: SIMPLE example for using command line client

Post by lbauer » Mon Jul 13, 2009 7:26 am

Here are a few examples:

To list the folders (but not subfolders) in your folder tree:

Code: Select all

C:\Program Files\SourceGear\Vault Client>vault Listfolder -host vaultserver -user username -password yourpassword -repository "My Repository" $/  -norecursive
To list the contents of a folder and all its subfolders:

Code: Select all

C:\Program Files\SourceGear\Vault Client>vault Listfolder -host vaultserver -user username -password yourpassword -repository "My Repository" $/FolderA
To Get the contents of a folder to an exisiting working folder:

Code: Select all

C:\Program Files\SourceGear\Vault Client>vault Get -host vaultserver -user username -password yourpassword -repository "My Repository" $/FolderA
Let me know if you have additional questions.
Linda Bauer
SourceGear
Technical Support Manager

dhjdhj
Posts: 21
Joined: Tue Sep 02, 2008 12:34 pm

Re: SIMPLE example for using command line client

Post by dhjdhj » Mon Jul 13, 2009 8:03 am

Thank you --- I take it there's no way to setup environment variables (or a response file) so you don't have to keep repeating your username, password and repository, etc?

I guess it's time for a few batch files

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

Re: SIMPLE example for using command line client

Post by lbauer » Mon Jul 13, 2009 12:54 pm

You can use the Remeberlogin command to store login info:

Code: Select all

usage: vault.exe REMEMBERLOGIN [options] 

REMEMBERLOGIN will store server, repository and authentication information
on the local host so that it does not need to be reentered.

Server and authentication information is specified by:
-host host

Hostname of the server to connect to. Can also use "-server".
-ssl 

Enables SSL for server connection.
-user username

Username to use when connecting to server.
-password password

Password to use when connecting to server.
This is a list of possible options:

-repository repositoryname

Repository to connect to.
Linda Bauer
SourceGear
Technical Support Manager

dhjdhj
Posts: 21
Joined: Tue Sep 02, 2008 12:34 pm

Re: SIMPLE example for using command line client

Post by dhjdhj » Tue Jul 14, 2009 6:34 am

On my (very fast) Macintosh, this command line client is painfully slow. Looks like it has to start a java VM every time you enter a command.

Also, I'm getting a warning about Java's log4j subsystem

log4j:WARN No appenders could be found for logger (com.cdesg.jni.natives.NativeLoader).
log4j:WARN Please initialize the log4j system properly.


Finally, everything comes back as XML which is really painful (XML might be a wonderful representation of state but it should never have to be looked at by humans!!!)

Any chance of a real GUI client for the Macintosh? How hard could it be?

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: SIMPLE example for using command line client

Post by jeremy_sg » Thu Jul 16, 2009 10:10 am

Unfortunately, I don't have very good answer for any of your concerns.

Yes, the command line client has to start a new VM every time.

The log4j messages do not indicate an error.

XML output is the only output mode supported at this time.

We are not planning a Mac client at this time.
Subscribe to the Fortress/Vault blog

dhjdhj
Posts: 21
Joined: Tue Sep 02, 2008 12:34 pm

Re: SIMPLE example for using command line client

Post by dhjdhj » Thu Jul 16, 2009 3:31 pm

Thanks --- I've discovered that the Vault plugin for Eclipse works quite well on the Mac so after configuring a "Vault" perspective, I can just use Eclipse as a standalone Vault client on the Mac.

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

Re: SIMPLE example for using command line client

Post by lbauer » Mon Jul 20, 2009 9:54 am

Thanks for the update. Glad you found a solution that works for you.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply