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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top