How to use DIFF on command line?
Moderator: SourceGear
How to use DIFF on command line?
Not sure what to specify for "Object1" and "Object2" on the command line for the vault.exe DIFF command.
All the other parameters are well documented except for these objects. Seems that the objects specified depend on the "-compareto" specified, but I don't seem to be guessing right atm
TIA, tate.
All the other parameters are well documented except for these objects. Seems that the objects specified depend on the "-compareto" specified, but I don't seem to be guessing right atm
TIA, tate.
If you wish to compare to the current version in the repository or the last get, use the repository path for OBJECT_1 and do not specify OBJECT_2
If you wish to compare a repository object against a label or a different file on disk use OBJECT_1 for repository object and OBJECT_2 as the corresponding object to diff.
Also note, if you are using a Windows based system, you will need to set the VAULTDIFF environment variable to point to the diff program of your choice, as Windows does not have a built in diff utility.
If you wish to compare a repository object against a label or a different file on disk use OBJECT_1 for repository object and OBJECT_2 as the corresponding object to diff.
Also note, if you are using a Windows based system, you will need to set the VAULTDIFF environment variable to point to the diff program of your choice, as Windows does not have a built in diff utility.
Jeff Clausius
SourceGear
SourceGear
i'm a little confused, is there a way to get the command line vault tool to acutally perform a diff and return some result to the command line? Do i need to use a third party tool to do the diff? Am i missing something?
currently i'm trying something like this:
vault.exe DIFF -user blah -password blah -host blah -repository blah -compareto $/path1 $/path2
i'm using vault. 2.0.6
currently i'm trying something like this:
vault.exe DIFF -user blah -password blah -host blah -repository blah -compareto $/path1 $/path2
i'm using vault. 2.0.6
Here's the documentation for the Vault 2.0.6 Command Line diff:
example -vaultdiff "C:\Program Files\SourceGear\Vault Client\sgdm.exe"
Your command is missing info on the location of the diff tool:usage: vault.exe DIFF [options] OBJECT_1 OBJECT2
{0} will run the two objects through a 'diff' program.
Server and authentication information is specified by:
-host host
Hostname of the vault server to connect to - also see SERVER
-ssl
Enables SSL for server connection
-user username
Username to use when connecting to server - also see USERNAME
Password to use when connecting to server
-repository repositoryname
Repository to connect to
his is a list of possible options:
-compareto [current|label|lastget|local|repository]
Type of comparison should be made against your local working version.
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.
example -vaultdiff "C:\Program Files\SourceGear\Vault Client\sgdm.exe"
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
thx for the speed reply.
i have a few more questsions.
Is there a way to get sgdm ( or another vault tool ) to return the difference between two branches in a textual format?
How do i get the detailed usage for a command as you've pasted? if there isn't a way for me to do it, could you please post the usage for the HISTORY command as wel?
i have a few more questsions.
Is there a way to get sgdm ( or another vault tool ) to return the difference between two branches in a textual format?
How do i get the detailed usage for a command as you've pasted? if there isn't a way for me to do it, could you please post the usage for the HISTORY command as wel?
SGDM.exe is a GUI tool. SourceGear doesn't have command line diff tool, but you might be able to find a third party command line tool that would work with Vault.
For documentation on the Vault Command Line Client, cd to the Vault Client directory from a command prompt and type "vault help". Or for help on a specific command, type "vault help <commandname>", as in "vault help diff".
For documentation on the Vault Command Line Client, cd to the Vault Client directory from a command prompt and type "vault help". Or for help on a specific command, type "vault help <commandname>", as in "vault help diff".
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager