Nikolay Morozov
Nikolay Morozov

Reputation: 33

How to convert Mercurial diff output to HTML?

Is there a way to add the HTML tags to Hg diff output? Currently our team of developers receives diffs over email every day and we would like to improve their readability, for example add line highlight and change title styles. I know it can be done in SVN via the special script, but I can't seem to find the instructions on how to do it in Hg. Thanks in advance.

Upvotes: 2

Views: 437

Answers (1)

phemios
phemios

Reputation: 674

I've never used it, it's only from a search on Google but you can try this:

http://colorer.sourceforge.net/

hg diff | colorer -h > diff.html

You can combine the output of this command with a hook after a commit. So, after every commit, mercurial can send an email with the diff in HTML. You just need to put the glue between the line above an the examples given for setting hooks in Mercurial.

Upvotes: 2

Related Questions