[PATCH 6 of 8] manifest: add support for log-like template keywords and functions

Yuya Nishihara yuya at tcha.org
Tue Jul 3 09:26:09 EDT 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1530450413 -32400
#      Sun Jul 01 22:06:53 2018 +0900
# Node ID 367bf34872603a7c006c104b3cab8de1fba99077
# Parent  28b59a68d834e996fb00fafcae48f7bf7d5226bc
manifest: add support for log-like template keywords and functions

"hg manifest --all" isn't supported since it has no single associated
revision.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3683,6 +3683,7 @@ def manifest(ui, repo, node=None, rev=No
     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])
diff --git a/tests/test-manifest.t b/tests/test-manifest.t
--- a/tests/test-manifest.t
+++ b/tests/test-manifest.t
@@ -50,6 +50,10 @@ The next call is expected to return noth
   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


More information about the Mercurial-devel mailing list