REQUEST - Diffing to a File from the UI

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
JohnHind
Posts: 2
Joined: Mon Jan 09, 2012 5:09 am

REQUEST - Diffing to a File from the UI

Post by JohnHind » Mon Jan 09, 2012 5:39 am

PLEASE, PLEASE (I'm begging ...) could you link the "Diffing to a File" feature to the UI menus so I do not have to wrestle with the command console whenever I need to do this? It seems very obtuse that you would have this feature in a GUI application, but not available from the GUI! I use the -u option as well, so please could that be a tickbox?

Background: I need to make patch files once in a blue moon and every time I need to do this I reach for DiffMerge which I use all the time for GUI file comparisons. Then I spend the next hour faffing about trying to figure out how to do what should be a simple task. It does not help that the help file calls the command "diffmerge" when it is actually "sgdm.exe" and that the installer does not put it on the path so you also have to figure out its full path (with further complications of 32 vs 64 bit). It would be SO much easier if I could just have a simple menu option to save a patch file for the files already open in the GUI!

I know from bitter experience this post is going to get Unix types hooting at me with dirision, so please note I am not disparaging the usefulness of command lines, just asking that it be possible in the GUI *as well* as from the command line!

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

Re: REQUEST - Diffing to a File from the UI

Post by jeffhostetler » Mon Jan 09, 2012 2:33 pm

Neat idea. I'll log it. Not sure how soon it'll in since I just
made an update release a few weeks ago. I might also add
something to the Windows Explorer extension to do the same.

Sorry about the name of the .exe. There was a name collision
with something inside Microsoft Visual Studio. I thought I fixed
the manual in 3.3.2 release.

I'm surprised that the sgdm.exe directory isn't in your PATH,
I updated the installer in 3.3.1 to set it. Did you install it
as another user or logged in as yourself ?

jeff

JohnHind
Posts: 2
Joined: Mon Jan 09, 2012 5:09 am

Re: REQUEST - Diffing to a File from the UI

Post by JohnHind » Tue Jan 10, 2012 3:58 am

My apologies, the program directory IS in the path, I must not have retried it without the full path after I discovered the correct exe name. However I can confirm that in both the CHM and PDF versions of the manual the command is given as 'diffmerge' rather than 'sgdm'.

Thanks for taking my suggestion aboard - no hurry as it will probably be a year or so before I forget how to work the command line again!

A couple more suggestions:

1. It would be useful to be able to merge the patch files for several file pairs together. Perhaps in the UI version, if there is a filename collision when the output file is selected the UI could offer 'append' as well as 'overwrite' as options?

2. The UI for the Windows Explorer extension could attempt to intelligently default both left and right filespecs based on the previous entries and the file currently selected. First time it would record the user's entries for left and right filespecs, and whether they used the selected file as left or as right, in the registry. Next time it would put the selected file in either left or right the same as last time. Then it would compare the selected filespec with the previous entry on that side and remove any common stem. Then it would compare the OLD left and right filespecs and remove any common tail. Then it would paste the resulting stem and tail together and supply that as a suggested entry for the other side. In the common case where one is making repeated file comparisons between two 'snapshots' of initially identical file trees this should 'get it right' most of the time and avoid a lot of unnecessary repeat browsing.

Best regards, John

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

Re: REQUEST - Diffing to a File from the UI

Post by jeffhostetler » Tue Jan 10, 2012 6:18 am

OK. thanks. I'll take a look at this too.

Something I forgot yesterday. You could write a little .bat script
to do the diff-to-file thing and let it take care of the quirky syntax.

jeff

dsalter
Posts: 71
Joined: Wed Dec 15, 2010 9:02 am

Re: REQUEST - Diffing to a File from the UI

Post by dsalter » Wed Nov 20, 2013 1:16 pm

Good day. The users at my location have also expressed a desire to create a patch file from a DIFF. It appears as though it cannot be done. This is with Version 6 of Vault.

Any idea if this will be available in future releases or with an add-on to Vault?

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

Re: REQUEST - Diffing to a File from the UI

Post by jeffhostetler » Wed Nov 20, 2013 4:02 pm

There are a couple of options depending on what you ultimately want to do.

[*] We have a stand-alone release of DiffMerge 4.2 that contains this feature.
There are menu commands to export the diffs in a variety of formats (both
text files and a new html diff in unified, traditional, and side-by-side). You
can download 4.2 and then update the path in the Vault config dialog to point
to the new executable (the other command line args haven't changed).
Then have Vault launch the new DiffMerge and let it export the diffs for you.

(The version of DiffMerge bundled with Vault 6 is based upon a 3.x release.)

http://www.sourcegear.com/diffmerge/downloads.php

[*] In the Vault config dialog, update the command line args to DiffMerge
to add "--diff=PATH --unified" to the existing command line. Then when
you ask Vault to diff a file and it'll just write the diffs to a file without
opening a window. You can do this with either the bundled version of
DiffMerge or the new 4.2 version.

[*] Vault 7 / 7.1 has a new feature that will dump a .ZIP file containing
the full text of both versions of every changed file. You could use this and
then write a little script to unpack it and diff each pair.

FWIW On that last point, gnu-diff has a "2 directories" mode that will
walk the trees for you, so you could get the zip, unpack it, and let gnu-diff
handle the dirty work.

Again, any of these options should work. Just depends on what
your users are wanting to do ultimately.

Hope that helps,
jeff

Post Reply