--- 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')
--- 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]
--- 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