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

login
register
mail settings
Submitter Yuya Nishihara
Date July 3, 2018, 1:26 p.m.
Message ID <367bf34872603a7c006c.1530624369@mimosa>
Download mbox | patch
Permalink /patch/32585/
State Accepted
Headers show

Comments

Yuya Nishihara - July 3, 2018, 1:26 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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.

Patch

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