changeset 24585:e191d5d8d515

changeset_printer: hide manifest node for workingctx Because workingctx has no manifest, it makes sense to hide "manifest:" row completely.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 14 Mar 2015 17:33:22 +0900
parents 5a40b5d45396
children 90e3f5d22dad
files mercurial/cmdutil.py tests/test-log.t
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Sat Mar 14 20:01:30 2015 +0900
+++ b/mercurial/cmdutil.py	Sat Mar 14 17:33:22 2015 +0900
@@ -1151,7 +1151,7 @@
                           % (pctx.rev(), hexfunc(pctx.node())),
                           label=label)
 
-        if self.ui.debugflag:
+        if self.ui.debugflag and rev is not None:
             mnode = ctx.manifestnode()
             # i18n: column positioning for "hg log"
             self.ui.write(_("manifest:    %d:%s\n") %
--- a/tests/test-log.t	Sat Mar 14 20:01:30 2015 +0900
+++ b/tests/test-log.t	Sat Mar 14 17:33:22 2015 +0900
@@ -1633,6 +1633,15 @@
   $ hg log -r 'wdir()' -q
   0:65624cd9070a+
 
+  $ hg log -r 'wdir()' --debug
+  changeset:   0:65624cd9070a035fa7191a54f2b8af39f16b0c08+
+  phase:       draft
+  parent:      0:65624cd9070a035fa7191a54f2b8af39f16b0c08
+  parent:      -1:0000000000000000000000000000000000000000
+  user:        test
+  date:        [A-Za-z0-9:+ ]+ (re)
+  extra:       branch=default
+  
 Check that adding an arbitrary name shows up in log automatically
 
   $ cat > ../names.py <<EOF