Mercurial > public > mercurial-scm > hg
diff mercurial/templatekw.py @ 32909:89610c586fa2
templatekw: reference predecessor node id as {node} in map operation
More predecessor-depending values will be populated by the next patch.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 17 Jun 2017 13:18:03 +0900 |
parents | 1858fc2327ef |
children | 498e9dcc5fa9 |
line wrap: on
line diff
--- a/mercurial/templatekw.py Sun Jun 18 23:05:54 2017 -0400 +++ b/mercurial/templatekw.py Sat Jun 17 13:18:03 2017 +0900 @@ -568,8 +568,8 @@ predecessors = sorted(obsutil.closestpredecessors(repo, ctx.node())) predecessors = map(hex, predecessors) - return _hybrid(None, predecessors, lambda x: {'predecessor': x}, - lambda d: d['predecessor'][:12]) + return _hybrid(None, predecessors, lambda x: {'node': x}, + lambda d: d['node'][:12]) @templatekeyword('p1rev') def showp1rev(repo, ctx, templ, **args):