I used command line client to compare 2 file, one is in vault, the other is in working directory. After I ran it, I got following success information. I am sure they are different, the "<result success="yes" />" doesn't make any sense to me.
vault DIFF -server servername -user username -password ***** -repository PROJ $/common/PROJ/live/2.0/Utility.cs -compareto local C:\Website\common\PROJ\live\2.0\Utility.cs
<vault>
<result success="yes" />
</vault>
1. Does anyone have good documents or good examples about how to run client command? Since original document is not helpful.
2. Could anyone explain the result to me? Or maybe I did some thing wrong in my command?
Any help will be appreciated!
Michael
How to use command line client
Moderator: SourceGear
You need to specify the path to the diff tool, for one thing.
For documentation, type vault help diff from a command prompt from the Vault GUI Client directory. Or type vault helphtml for an HTML version.
Here's the Diff Help:
For documentation, type vault help diff from a command prompt from the Vault GUI Client directory. Or type vault helphtml for an HTML version.
Here's the Diff Help:
usage: vault.exe DIFF [options] repositorypath
Diff will compare a working file or folder with another file or folder
specified by the -compareto option. The working file or folder is specified
by its repository path.
Server and authentication information is specified by:
-host host
Hostname of the vault 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
-repository repositoryname
Repository to connect to
This is a list of possible options:
-compareto [current|label|lastget|local|repository] [compareto_object]
Type of comparison to be made against your local working version. For
'label', 'local', and 'repository', specify the compareto_object, which
is a label name, local path or repository path.
current - the current repository item
label - the version found within the given label
lastget - the last version retrieved from the repository
local - any local file system item
repository- any item within the repository
-norecursive
Do not act recursively on folders
-vaultdiff [absolute path to comparison utility]
Use this comparison utility for differences.
-vaultdiff_options "[any options]"
Options for the comparison utility.
Use double quotes for multiple options.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
-
- Posts: 5
- Joined: Thu Mar 09, 2006 12:34 pm
Could you give an example?
Thanks for your reply. Could you give an example of how to do it? I already read all help documents as what you said, but I am still confused about it. Could you correct my command?
If you have some examples for other commands, please post it here too.
Thanks lots.
If you have some examples for other commands, please post it here too.
Thanks lots.
To compare the working folder version to the current version in the repository, use this command:
vault DIFF -server servername -user username -password ***** -repository PROJ $/common/PROJ/live/2.0/Utility.cs -compareto current -vaultdiff "C:\Program Files\SourceGear\Vault Client\sgdm.exe"
Note:
The diff -compareto option compares the file in the working folder to:
current -- the current version of the file in the repository
local -- another file on the local machine
label -- a labeled version of the file
lastget - the last version retrieved from the repository
repository -- any other file in the repository
vault DIFF -server servername -user username -password ***** -repository PROJ $/common/PROJ/live/2.0/Utility.cs -compareto current -vaultdiff "C:\Program Files\SourceGear\Vault Client\sgdm.exe"
Note:
The diff -compareto option compares the file in the working folder to:
current -- the current version of the file in the repository
local -- another file on the local machine
label -- a labeled version of the file
lastget - the last version retrieved from the repository
repository -- any other file in the repository
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
Is there any way to issue command-line requests to Vault to compare specific versions of files contained within the repository? I see from your example that I can do this to compare my current local version to the latest version in the repository, but what if I want to compare file.cs v2 to file.cs v4? Can I get this to work somehow?
This would be very handy when doing a code review, so I could create a script to open up several comparison windows at once, each one comparing the specific changes from version x to version y.
This would be very handy when doing a code review, so I could create a script to open up several comparison windows at once, each one comparing the specific changes from version x to version y.