comparison hgext/notify.py @ 26503:5a84a453b503 stable

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.
author Bruce Cran <bruce.cran@gmail.com>
date Mon, 05 Oct 2015 10:43:16 -0600
parents 328739ea70c3
children 56b2bcea2529
comparison
equal deleted inserted replaced
26502:4ca98a389152 26503:5a84a453b503
404 ui.note(_('notify: suppressing notification for merge %d:%s\n') % 404 ui.note(_('notify: suppressing notification for merge %d:%s\n') %
405 (ctx.rev(), ctx.hex()[:12])) 405 (ctx.rev(), ctx.hex()[:12]))
406 return 406 return
407 count += 1 407 count += 1
408 n.diff(ctx) 408 n.diff(ctx)
409 if not author:
410 author = ctx.user()
409 411
410 data += ui.popbuffer() 412 data += ui.popbuffer()
411 fromauthor = ui.config('notify', 'fromauthor') 413 fromauthor = ui.config('notify', 'fromauthor')
412 if author and fromauthor: 414 if author and fromauthor:
413 data = '\n'.join(['From: %s' % author, data]) 415 data = '\n'.join(['From: %s' % author, data])