670
Comment: remove hgext. prefix
|
← Revision 8 as of 2018-08-02 16:05:33 ⇥
1184
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
=== Using diff.word-diff config option (4.7+) === Since [[Release4.7|Mercurial 4.7]] word diff is in core. To enable it, put this in your ~/.hgrc: {{{ [diff] word-diff = true }}} It's also enabled by [[FriendlyHGPlan|ui.tweakdefaults]]. To configure word diff colors/styles: {{{ [colors] diff.deleted.changed = ... diff.deleted.unchanged = ... diff.inserted.changed = ... diff.inserted.unchanged = ... }}} Default colors are defined in [[Source:mercurial/color.py]] === Using extdiff extension === |
|
Line 5: | Line 31: |
1. Download [[http://code.google.com/p/cj-overlay/source/browse/cwdiff?repo=evergreens|cwdiff]], a shell script, which wraps wdiff to support directories and colorizes the output. | 1. Download [[https://github.com/junghans/cwdiff/blob/master/cwdiff|cwdiff]], a shell script, which wraps wdiff to support directories and colorizes the output. |
Using diff.word-diff config option (4.7+)
Since Mercurial 4.7 word diff is in core. To enable it, put this in your ~/.hgrc:
[diff] word-diff = true
It's also enabled by ui.tweakdefaults.
To configure word diff colors/styles:
[colors] diff.deleted.changed = ... diff.deleted.unchanged = ... diff.inserted.changed = ... diff.inserted.unchanged = ...
Default colors are defined in mercurial/color.py
Using extdiff extension
Making a word difference using the ExtdiffExtension and GNU wdiff, somehow what git diff --color-words does.
Steps:
Download cwdiff, a shell script, which wraps wdiff to support directories and colorizes the output.
Enable ExtdiffExtension (in ~/.hgrc):
[extensions] extdiff =
- Add wdiff command (in ~/.hgrc):
[extdiff] # if cwdiff is in your path, otherwise set to wherever you've installed cwdiff cmd.wdiff = cwdiff #add --no-color below, if you dislike colors! opts.wdiff = --diff --ab
- Run
$ hg wdiff