notify: how to fine tune it

Alessandro Dentella sandro at e-den.it
Sun May 4 15:03:05 CDT 2008


On Fri, May 02, 2008 at 12:51:20PM -0700, Greg Lindahl wrote:
> 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.

Thanks, in my case it's ok to change changroup.notify, since I want to know
the e-mail of the developer that committed the changeset, and is generally 1
developer for 1 se f changesets.

sandro


> 
> --- 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