##// END OF EJS Templates
merge with stable
Matt Mackall -
r26504:875e5d89 merge default
parent child Browse files
Show More
@@ -406,6 +406,8 b' def hook(ui, repo, hooktype, node=None, '
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')
@@ -713,7 +713,7 b' def word(context, mapping, args):'
713 splitter = None
713 splitter = None
714
714
715 tokens = text.split(splitter)
715 tokens = text.split(splitter)
716 if num >= len(tokens):
716 if num >= len(tokens) or num < -len(tokens):
717 return ''
717 return ''
718 else:
718 else:
719 return tokens[num]
719 return tokens[num]
@@ -3448,6 +3448,11 b' Test word for invalid numbers'
3448 hg: parse error: word expects an integer index
3448 hg: parse error: word expects an integer index
3449 [255]
3449 [255]
3450
3450
3451 Test word for out of range
3452
3453 $ hg log -R a --template "{word(10000, desc)}"
3454 $ hg log -R a --template "{word(-10000, desc)}"
3455
3451 Test indent and not adding to empty lines
3456 Test indent and not adding to empty lines
3452
3457
3453 $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a
3458 $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a
General Comments 0
You need to be logged in to leave comments. Login now