Make commit-window diff more customizable
Created originally on Bitbucket by BrenBarn
Currently the diff shown in the TortoiseHg commit window is rather limited. It is hard-coded to accept the standard diff format (lines beginning with +/-, etc.) and to colorize it a particular way. Even the colors are hard-coded (see issue #1823 (closed)).
The commit-diff should be made more customizable and amenable to interoperation with other components. At the least, some sort of interface should be provided so that extensions or external programs could tweak the look of the diff. The task of making the commit-diff more customizable would have a couple parts.
First, the program used to do the actual diff should be customizable. This way users could, for instance, substitute a word-based diff tool instead of the regular line-based diff. This could be done by letting users specify an hg command so they could leverage command-line extdiff tools. (That is, I could create an extdiff cmd.somediff, set TortoiseHg to use "somediff" as it's diff, and then the output would be that of command-line "hg somediff".)
Second, the scheme for colorizing the diff should be publically specified so that the commit-diff window can colorize the output of various diff programs. A system that supports ANSI color codes would probably be a good start. The bottom line is that there needs to be a way for an external program to know what to output in order to get the right coloring behavior in the commit-diff display.