manifest: add support for log-like template keywords and functions
authorYuya Nishihara <yuya@tcha.org>
Sun, 01 Jul 2018 22:06:53 +0900
changeset 38543 ece3f2d0bbd9
parent 38542 7ae0ea739770
child 38544 e8c33e27ee9b
manifest: add support for log-like template keywords and functions "hg manifest --all" isn't supported since it has no single associated revision.
mercurial/commands.py
tests/test-manifest.t
--- a/mercurial/commands.py	Sun Jul 01 22:01:20 2018 +0900
+++ b/mercurial/commands.py	Sun Jul 01 22:06:53 2018 +0900
@@ -3683,6 +3683,7 @@
     ui.pager('manifest')
     for f in ctx:
         fm.startitem()
+        fm.context(ctx=ctx)
         fl = ctx[f].flags()
         fm.condwrite(ui.debugflag, 'hash', '%s ', hex(mf[f]))
         fm.condwrite(ui.verbose, 'mode type', '%s %1s ', mode[fl], char[fl])
--- a/tests/test-manifest.t	Sun Jul 01 22:01:20 2018 +0900
+++ b/tests/test-manifest.t	Sun Jul 01 22:06:53 2018 +0900
@@ -50,6 +50,10 @@
   644   a
   755 * b/a
   644 @ l
+  $ hg manifest -T '{path} {rev}\n'
+  a 1
+  b/a 1
+  l 1
 
   $ hg manifest --debug
   b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644   a