# HG changeset patch # User Matt Mackall # Date 1444243488 18000 # Node ID 875e5d89dc86a616ac43c12519ded0d1d75e13f5 # Parent 0748083f28985fe4a7a539086250a0e4ad2eee22# Parent 5a84a453b503d13b7a540cded3d52d0b50e3a57a merge with stable diff -r 0748083f2898 -r 875e5d89dc86 hgext/notify.py --- a/hgext/notify.py Fri Oct 02 13:00:47 2015 -0700 +++ b/hgext/notify.py Wed Oct 07 13:44:48 2015 -0500 @@ -406,6 +406,8 @@ return count += 1 n.diff(ctx) + if not author: + author = ctx.user() data += ui.popbuffer() fromauthor = ui.config('notify', 'fromauthor') diff -r 0748083f2898 -r 875e5d89dc86 mercurial/templater.py --- a/mercurial/templater.py Fri Oct 02 13:00:47 2015 -0700 +++ b/mercurial/templater.py Wed Oct 07 13:44:48 2015 -0500 @@ -713,7 +713,7 @@ splitter = None tokens = text.split(splitter) - if num >= len(tokens): + if num >= len(tokens) or num < -len(tokens): return '' else: return tokens[num] diff -r 0748083f2898 -r 875e5d89dc86 tests/test-command-template.t --- a/tests/test-command-template.t Fri Oct 02 13:00:47 2015 -0700 +++ b/tests/test-command-template.t Wed Oct 07 13:44:48 2015 -0500 @@ -3448,6 +3448,11 @@ hg: parse error: word expects an integer index [255] +Test word for out of range + + $ hg log -R a --template "{word(10000, desc)}" + $ hg log -R a --template "{word(-10000, desc)}" + Test indent and not adding to empty lines $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a