0

The Mercurial command

hg diff > mypatchfile

compiles a "patch" file representing the differences between the working directory and the last commit. Opening this file as plain text results in a presentation of the changes that is quite difficult to read. I want to open this file in a diff tool for a clearer presentation of the differences.

I know that the diff tool kompare can do exactly this, using the command

kompare mypatchfile

But while its presentation is certainly more readable than the plain text format, I find it lacking.

I much prefer kdiff3. Can this tool open patch files? The command

kdiff3 mypatchfile

doesn't work. Instead, the patch file is just opened in plain-text format in the left panel, while the right panel is empty. But it seems that kdiff3 should be able to open patch files, because I can just write

hg extdiff -p kdiff3

and get exactly the presentation I want. However, I don't see how I can get similar results with a previously exported patch file. Any suggestions?

(I would also appreciate recommendations for other diff tools that can open and display patch files in a readable format.)

andreasdr
  • 3,804
  • 4
  • 28
  • 32

2 Answers2

0
  1. You can't do it easy (but can try to do it with some tricks for some patches)
  2. hg extdiff -p kdiff3 does NOT visualize custom patch, but (read carefully Extdiff extension wiki) only show in dual-window mode difference between two revisions (see difference in terms) - Working Dir and parent in simplest case (and sources for diffing are full files from relevant revisions)
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
0

I think you are just tying to visualize diff output, right ? There's a tool xxdiff that might be useful with few caveats. extdiff is an external diff, that is instead of using Mercurial diff, another program is used to do the diff of two revisions. You can even use linux diff command as an extdiff for Mercurial.

EvgeniySharapov
  • 3,078
  • 3
  • 27
  • 38