# HG changeset patch # User Yuya Nishihara # Date 1412255739 -32400 # Node ID 08a4e70ed1839788ce523fcfd93ad3c4c4c95d1d # Parent cb28d2b3db0b3220122128db7731ec4dd3c13fa7 branches: format rev as integer that is necessary for generic templater diff -r cb28d2b3db0b -r 08a4e70ed183 mercurial/commands.py --- a/mercurial/commands.py Fri Oct 03 22:20:02 2014 +0900 +++ b/mercurial/commands.py Thu Oct 02 22:15:39 2014 +0900 @@ -1116,8 +1116,10 @@ notice = _(' (inactive)') if tag == repo.dirstate.branch(): label = 'branches.current' - rev = str(ctx.rev()).rjust(31 - encoding.colwidth(tag)) - rev = ui.label('%s:%s' % (rev, hexfunc(ctx.node())), + rev = ctx.rev() + padsize = max(31 - len(str(rev)) - encoding.colwidth(tag), 0) + fmt = ' ' * padsize + '%d:%s' + rev = ui.label(fmt % (rev, hexfunc(ctx.node())), 'log.changeset changeset.%s' % ctx.phasestr()) labeledtag = ui.label(tag, label) if ui.quiet: