From patchwork Mon Oct 5 17:25:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [STABLE] notify: fix fromauthor setting for 'incoming' hook type (issue4194) From: Bruce Cran X-Patchwork-Id: 10813 Message-Id: To: mercurial-devel@selenic.com Date: Mon, 05 Oct 2015 11:25:04 -0600 # HG changeset patch # User Bruce Cran # Date 1444063396 21600 # Mon Oct 05 10:43:16 2015 -0600 # Branch stable # Node ID df6193e2344862558ca72c3f1fc23496b684406b # Parent 93bfa9fc96e31f1cc5f444bdc2436966c665cf1f notify: fix fromauthor setting for 'incoming' hook type (issue4194) Set the author field in notification emails for the 'incoming' hook type in addition to 'changegroup' and 'outgoing' types. diff --git a/hgext/notify.py b/hgext/notify.py --- a/hgext/notify.py +++ b/hgext/notify.py @@ -401,16 +401,18 @@ def hook(ui, repo, hooktype, node=None, else: if not n.node(ctx): ui.popbuffer() ui.note(_('notify: suppressing notification for merge %d:%s\n') % (ctx.rev(), ctx.hex()[:12])) return count += 1 n.diff(ctx) + if not author: + author = ctx.user() data += ui.popbuffer() fromauthor = ui.config('notify', 'fromauthor') if author and fromauthor: data = '\n'.join(['From: %s' % author, data]) if count: n.send(ctx, count, data)