We're in the process of migrating from Subversion to Mercurial. The VisualSVN server we were using produced colored diffs within its notification emails, but I can't find how to reproduce this in Mercurial. I have enabled the color
extension on the server, but this has no effect on the emails produced. Any ideas?
Asked
Active
Viewed 133 times
2

Darren Oster
- 9,146
- 10
- 48
- 66
-
What does send the emails? – zerkms Dec 16 '13 at 03:04
-
The Notification hook is set up on a central server, and (I presume) the emails are sent from there. – Darren Oster Dec 16 '13 at 03:05
1 Answers
0
Notifications are sent by a standard hook, which on my Debian system is in /usr/share/pyshared/hgext/notify.py
. It doesn't contain any code to send coloured mail. You could either take a copy and modify it to do colouring, or write a new hook. That could be a shell script using:
hg diff --color=always
or you could use the Mercurial Python API.

Peter Westlake
- 4,894
- 1
- 26
- 35
-
Thanks for the answer. The lack of 'built-in' support for colored, HTML emails makes HG feel like a step backwards from SVN (or VisualSVN, at least), but fortunately it's not a deal breaker. – Darren Oster Dec 20 '13 at 01:04