Question on command line DIFF

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

Moderator: SourceGear

Post Reply
jstarbird
Posts: 146
Joined: Wed Jul 22, 2009 11:49 am

Question on command line DIFF

Post by jstarbird » Tue Aug 24, 2010 1:07 pm

Vault 5.0.2.18753

I'm trying to use a 3rd party Diff program, I need output to go to a file and cannot get the Vault diff to do so from the command line, however, the output will not redirect. Is there some way to get this type of command to work:
vault diff $\src -compareto lastget -norecursive -vaultdiff c:\bin\diff.exe -vaultdiff_options "-bBq >c:\ouputlog.log "

I'm just trying to redirect the output in the options area and that doesn't seem to work. Seems like it should work fine since the program itself works when run directly with these options.

Anyway just wondering if there is someway to get that to work?

Overall what I am trying to do is get Folder Diff output to a file but also ignore whitespace differences in the files which I could not seem to get to work using the Vault diff program so I'm trying the GNUWin32 Diff program.


Thanks,
J

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Question on command line DIFF

Post by jeffhostetler » Wed Aug 25, 2010 6:06 am

A couple of thoughts here.

You might write a short shell script or .bat file that does
what you want. Run the gnu diff using the passed in args
and write or append the output to a know file. Then pass
the name of the script to vault.

Another idea might be to export both versions of the tree
that you want to compare to 2 temp folders and then
have gnu diff compare them. Gnu diff when given folders
will dive and compare things and also tell you about peerless
items.

Do the same export and use DiffMerge to compare the 2
folders. I'm not sure what problems you had with it or what
options you tried, and there are several options on the
"Folder Windows / Equivalence Mode" page of Preferences
dialog. Then you can save a CSV of everything shown.


Hope that helps.
jeff

jstarbird
Posts: 146
Joined: Wed Jul 22, 2009 11:49 am

Re: Question on command line DIFF

Post by jstarbird » Wed Aug 25, 2010 2:30 pm

Jeff,
thanks for the input. The main problem I'm running into using Vault's command line diff, diffmerge, is that for some reason when done via the Vault command line it doesn't seem to use any settings you make in the UI so if I have it set to Ignore white space it doesn't ignore the white space when run from the command line.
I'm only using the GNU diff as it has a command line param to ignore white space, oddly the Vault command line diff by default launches the UI which serves no purpose when you're working from scheduled tasks and scripts.
For now I am just going to dump both versions out and diff but that increases the time it takes to perform this task so it's not really the solution I'd like. Ideally I should be able to diff directly to a file from the Vault command line and pass it params to set any filters.


Thanks,
J

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Question on command line DIFF

Post by jeffhostetler » Thu Aug 26, 2010 8:46 am

Understood. I'll have to log this so we can take a look at it.

Sorry I don't have a better answer right now.
jeff

item:15532

Post Reply