Is there any way to pass the output of git or Mercurial diff to a diff diff GUI tool?

The diff result in the text can be difficult to get used to at first. Is there a way to pass this output into a visual demarcation tool, for example, something like

$ hg diff --visual code.rb

or

$ hg diff code.rb | sometool

so that the result can be viewed visually?

+1
source share
4 answers

git has a “diffftool” subcommand that can be used to invoke an external diff viewer, for example. kdiff3.

This is separate from the “external diff driver” than can be used, for example, if you prefer the context of diffs, as some people do .

+6

hg vdiff. , .

+3

, :

~/.hgrc(UNIX/Mac) c:\users [ ]\mercurial.ini,

[extensions]
extdiff=

[extdiff]
cmd.vdiff = opendiff
cmd.kdiff = kdiff3

hg vdiff filename
hg kdiff filename

opendiff kdiff3 , , , .

cmd.echo = echo

, 2 ,

hg echo filename
hg echo -r -2 filename         <-- you will see different filenames if that revision exists
+1

All Articles