Mercurial is very convenient to use at the commandline. However, there are certain operations that are better with the GUI. For example, I prefer to use a GUI to go through the diff of uncommitted changes. The ExtDiff extension can be used to launch a GUI Diff tool to view the diff of a single file or across the entire repository.
- To enable the ExtDiff extension, add this line to your hgrc:
[extensions] hgext.extdiff =
- To view the diff of a particular file using a GUI diff program, for example meld:
$ hg extdiff -p meld src/bar/foo.cpp
- To view the diff of all uncommitted files using a GUI diff program, for example meld:
$ hg extdiff -p meld
Make sure that the GUI diff program you use has the ability to show the diff of multiple files in a directory hierarchy.
- If you want to always launch a particular GUI diff program, then it is better to add a custom command for it. For example, to launch meld using a new command named vdiff, add this line to your hgrc:
[extdiff] cmd.vdiff = meld
After this, you can view the diff using the vdiff command:
$ hg vdiff src/bar/foo.cpp $ hg vdiff
Tried with: Mercurial 2.8.2 and Ubuntu 12.04
Advertisements