notify: how to fine tune it
Greg Lindahl
lindahl at pbm.com
Fri May 2 14:51:20 CDT 2008
On Fri, May 02, 2008 at 09:34:31AM +0200, Alessandro Dentella wrote:
> I'm using notify extention byt i'd like to fine tune the subject/sender of
> the e-mail.
Sandro,
Assuming you mean that you want the author of a commit to be the
sender of the email, I have an incorrect patch that does that. To be
correct, it should affect only "incoming.notify" and not
"changegroup.notify" (changegroups are likely to have several
authors), and it should be an optional feature.
--- notify.py.save 2007-10-23 16:17:35.000000000 -0700
+++ notify.py 2007-10-23 16:19:25.000000000 -0700
@@ -204,7 +204,9 @@
sender = msg['From']
if not sender:
- sender = self.ui.config('email', 'from') or self.ui.username()
+ changes = self.repo.changelog.read(node)
+ sender = changes[1]
+# sender = self.ui.config('email', 'from') or self.ui.username()
if '@' not in sender or '@localhost' in sender:
sender = self.fixmail(sender)
del msg['From']
More information about the Mercurial
mailing list