Visual diff survey

22 views
Skip to first unread message

Steve Borho

unread,
Jan 1, 2010, 3:23:09 PM1/1/10
to tortoiseh...@lists.sourceforge.net, mercurial
Hey folks,

I'm in the middle of updating the visual diff configurations that will
ship with TortoiseHg 0.10 and would like some feedback on which visual
diff tools are being used, and the configurations you use for them
(both extdiff and merge-tools configurations). The goal is for
TortoiseHg to detect visual diff tools in release 0.10, much as it
detects merge tools today, and for THG to come preconfigured to use
those visual diff tools in the best way possible.

To give you an idea of how this works, here is the new configuration
for BeyondCompare:

[merge-tools]
beyondcompare3.priority=-1
beyondcompare3.args=$local $other $base $output /ro /lefttitle=parent1
/centertitle=base /righttitle=parent2 /automerge /reviewconflicts
/solo
beyondcompare3.regkey=Software\Scooter Software\Beyond Compare 3
beyondcompare3.regname=ExePath
beyondcompare3.gui=True
beyondcompare3.diffargs=/lro /lefttitle=old /righttitle=new /solo
/expandall $parent $child
beyondcompare3.diff3args=$parent1 $parent2 $child /lefttitle=parent1
/centertitle=merged /righttitle=parent2 /solo /expandall
beyondcompare3.dirdiff=True

Everything up to 'gui' was already there for use as a merge tool by
Mercurial. TortoiseHG is adding three keys:

diffargs - arguments to use for 2-way diffs, variables $parent and
$child are expanded at runtime
diff3args - arguments to use for 3-way file comparisons, variables
$parent1 $parent2 $child expanded at runtime
dirdiff - boolean that determines whether the 2-way diff arguments can
be directories or files.

I may add a dir3diff configurable if there is demand for it. I will
probably also add an $ancestor argument for diff3args since some
visual diff tools can use it to visualize a three way merge instead of
a simpler three way diff.

Again, I'm hoping people respond to this with their extdiff
configurations and with any changes they've made to the default
merge-tools configuration that ships with Mercurial.

Cheers.

--
Steve Borho
_______________________________________________
Mercurial mailing list
Merc...@selenic.com
http://selenic.com/mailman/listinfo/mercurial

Kevin Maris

unread,
Jan 4, 2010, 5:11:06 PM1/4/10
to Steve Borho, mercurial
I'm using winmerge. My uses for it are very simple, and naturally so
is my config. I think pretty much everything is at defaults. From my
mercurial.ini:

[extdiff]
cmd.winmerge = C:\Program Files\WinMerge\WinMergeU.exe
opts.winmerge = /e /x /ub /wl

[tortoisehg]
vdiff = winmerge
vdiffnowin = True
postpull = update

[ui]
username = <deleted>
merge = winmergeu

On Fri, Jan 1, 2010 at 12:23 PM, Steve Borho <st...@borho.org> wrote:
> Hey folks,
>
> I'm in the middle of updating the visual diff configurations that will
> ship with TortoiseHg 0.10 and would like some feedback on which visual
> diff tools are being used, and the configurations you use for them
> (both extdiff and merge-tools configurations).  The goal is for
> TortoiseHg to detect visual diff tools in release 0.10, much as it
> detects merge tools today, and for THG to come preconfigured to use
> those visual diff tools in the best way possible.
>
> To give you an idea of how this works, here is the new configuration
> for BeyondCompare:
>
> [merge-tools]
> beyondcompare3.priority=-1
> beyondcompare3.args=$local $other $base $output /ro /lefttitle=parent1
> /centertitle=base /righttitle=parent2 /automerge /reviewconflicts
> /solo

.....

Peter Arrenbrecht

unread,
Jan 7, 2010, 7:18:34 AM1/7/10
to Steve Borho, tortoiseh...@lists.sourceforge.net, mercurial
> Again, I'm hoping people respond to this with their extdiff
> configurations and with any changes they've made to the default
> merge-tools configuration that ships with Mercurial.

On Ubuntu:

[extdiff]
cmd.cxdiff = diff
opts.cxdiff = -Nprc5
cmd.meld =
cmd.cdiff = colordiff
opts.cdiff = -uprN
cmd.cwdiff = diff
opts.cwdiff = -wBNprc -C 5
cmd.kdiff = kdiff3
opts.kdiff =
cmd.xxdiff = xxdiff
opts.xxdiff =
cmd.sub = submerge
opts.sub = diff

I use hgtk. And I almost never using anything except meld from the above.
-parren

Matt Joiner

unread,
Jan 13, 2010, 6:19:33 PM1/13/10
to tortoiseh...@lists.sourceforge.net, mercurial
windows:

[extdiff]
cmd.tortoisemerge = tortoisemerge

[tortoisehg]
vdiff = tortoisemerge

[merge-tools]
#tortoisemerge.priority=-9
#tortoisemerge.args=/base:$output /mine:$local /theirs:$other /merged:$output
#tortoisemerge.regkey=Software\TortoiseSVN
#tortoisemerge.gui=True

additionally, tortoisemerge shows an error for diffs against files which don't exist, this occurs for files that have just been added, or deleted from a repo. if the behaviour under tortoisesvn, that is diffing against an empty file in these cases could be emulated, that would be great (can i do this with some change to my tortoisemerge args or otherwise above?).

On Thu, Jan 7, 2010 at 11:25 PM, Matt Joiner <anac...@gmail.com> wrote:

Steve Borho

unread,
Jan 13, 2010, 8:25:02 PM1/13/10
to Matt Joiner, tortoiseh...@lists.sourceforge.net, mercurial
On Wed, Jan 13, 2010 at 5:19 PM, Matt Joiner <anac...@gmail.com> wrote:
> windows:
>
> [extdiff]
> cmd.tortoisemerge = tortoisemerge
>
> [tortoisehg]
> vdiff = tortoisemerge
>
> [merge-tools]
> #tortoisemerge.priority=-9
> #tortoisemerge.args=/base:$output /mine:$local /theirs:$other
> /merged:$output
> #tortoisemerge.regkey=Software\TortoiseSVN
> #tortoisemerge.gui=True
>
> additionally, tortoisemerge shows an error for diffs against files which
> don't exist, this occurs for files that have just been added, or deleted
> from a repo. if the behaviour under tortoisesvn, that is diffing against an
> empty file in these cases could be emulated, that would be great (can i do
> this with some change to my tortoisemerge args or otherwise above?).

Yes, this is a good point.

The current extdiff code sets the non-existant filename to os.devnull,
which on Linux is '/dev/null' and on Windows is simply 'nul'. Many
diff tools do not handle 'nul' correctly.

Since the new visual diff code is now giving labels for the files, we
could create an empty file for comparison and give it a label like
"[non-existant]@rev". That would work for adds and deletes.

--
Steve Borho

Michael Jay Lippert

unread,
Aug 19, 2010, 7:28:11 PM8/19/10
to Steve Borho, tortoiseh...@lists.sourceforge.net, mercurial
On Fri, Jan 1, 2010 at 4:23 PM, Steve Borho <st...@borho.org> wrote:
Hey folks,

I'm in the middle of updating the visual diff configurations that will
ship with TortoiseHg 0.10 and would like some feedback on which visual
diff tools are being used, and the configurations you use for them
(both extdiff and merge-tools configurations).  The goal is for
TortoiseHg to detect visual diff tools in release 0.10, much as it
detects merge tools today, and for THG to come preconfigured to use
those visual diff tools in the best way possible.

Steve, my company hasn't been willing to update our beyond compare license to ver 3, but we do have a ver 2 license, so I've added the following to the MergeTools.rc

; Windows version of BeyondCompare 2 (2-way diff only)
beyondcompare2.priority=-4
beyondcompare2.args= /ro /title1="Original" /title2="Working copy" $local $other
beyondcompare2.regkey=Software\Scooter Software\Beyond Compare
beyondcompare2.regname=ExePath
beyondcompare2.gui=True
beyondcompare2.diffargs=/lro /title1='$plabel1' /title2='$clabel' $parent $child
beyondcompare2.dirdiff=True

Mike

Reply all
Reply to author
Forward
0 new messages