Listing different/missing files from command-line

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

Moderator: SourceGear

Post Reply
kevinm
Posts: 2
Joined: Wed Nov 03, 2004 2:05 pm

Listing different/missing files from command-line

Post by kevinm » Wed Nov 03, 2004 2:18 pm

Is there a way to use the Vault 2.0.6 command line to list the differences between a repository and a copy of it on disk? I'm trying to automate a daily check that files in a work directory are kept up-to-date on Vault. To do so, I need a report of any local files not checked in, any checked-in files missing locally, and any files that are different on disk than on Vault. I've been looking at the DIFF command-line option, but with no luck.

This could be done in SourceSafe (painful to parse, though), so I would think that Vault supports it as well. Any help is greatly appreciated.

Thanks,

Kevin Mitchell

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

Post by lbauer » Wed Nov 03, 2004 2:39 pm

Our Command Line Client "Diff" section documentation is not very clear, sorry.

First of all, be sure the command uses path of the repository folder, rather than the local working folder.

Also, you have to provide information about the location of the diff tool.

You can do this by setting an environmental variable for VAULTDIFF in System Variable, with the path to SGDM.exe, the SourceGear diff/merge tool (or whatever diff tool you want to use).

Or you can use the option -vaultdiff [absolute path to comparison utility]

Hope this helps.
Linda Bauer
SourceGear
Technical Support Manager

kevinm
Posts: 2
Joined: Wed Nov 03, 2004 2:05 pm

Post by kevinm » Wed Nov 03, 2004 3:57 pm

Thanks for the fast response! Based on your reply, I was able to pop up the information needed in DiffMerge. Is there any command-line way to capture the output of the diff to a file or stdout? I didn't see anything about this in the help. I now understand enough to use another diff tool if needed, but it would be nice to stick with what's already there.

If this can't be done entirely using Vault, it would be a useful feature in later revisions. It would also be nice if a list of mismatching files could be generated on stdout without internally pulling the entire repository folder to a local directory, since this uses a lot of disk space. If you can implement this later, it could be a big help when automating synchronization using scripts.

Again, thanks for your help!

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

Post by lbauer » Wed Nov 03, 2004 4:25 pm

There's no way to capture the output with the CLC if you're using SourceGear Diff/Merge.

You'd need a third party command line diff tool that allows you to use stdout, like Cygwin.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply