templatekw: have {manifest} use ctx.manifestnode() for consistency
authorYuya Nishihara <yuya@tcha.org>
Wed, 08 Apr 2015 21:04:06 +0900
changeset 24676 13c42a883e8b
parent 24675 47e7d5fbbf04
child 24677 9df7ffd706d1
templatekw: have {manifest} use ctx.manifestnode() for consistency changeset_printer was updated at f57640bf10d4 to not access changeset by index.
mercurial/templatekw.py
--- a/mercurial/templatekw.py	Fri Apr 10 00:36:42 2015 +0900
+++ b/mercurial/templatekw.py	Wed Apr 08 21:04:06 2015 +0900
@@ -333,9 +333,9 @@
 
 def showmanifest(**args):
     repo, ctx, templ = args['repo'], args['ctx'], args['templ']
+    mnode = ctx.manifestnode()
     args = args.copy()
-    args.update({'rev': repo.manifest.rev(ctx.changeset()[0]),
-                 'node': hex(ctx.changeset()[0])})
+    args.update({'rev': repo.manifest.rev(mnode), 'node': hex(mnode)})
     return templ('manifest', **args)
 
 def shownode(repo, ctx, templ, **args):