Patchwork [STABLE] templates: fix "log -q" output of phases style

login
register
mail settings
Submitter Yuya Nishihara
Date March 28, 2015, 1:29 p.m.
Message ID <2eb5e0aa1ec347e34012.1427549372@mimosa>
Download mbox | patch
Permalink /patch/8331/
State Accepted
Headers show

Comments

Yuya Nishihara - March 28, 2015, 1:29 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1427541723 -32400
#      Sat Mar 28 20:22:03 2015 +0900
# Branch stable
# Node ID 2eb5e0aa1ec347e34012bf0f1e52bd6e1a2a4c85
# Parent  a2285e2fc949d8a4df58af820bb00b51f64def14
templates: fix "log -q" output of phases style

It had the same problem as 6136704b975d, name conflicts of {node} keyword.
Matt Mackall - March 30, 2015, 9:19 p.m.
On Sat, 2015-03-28 at 22:29 +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1427541723 -32400
> #      Sat Mar 28 20:22:03 2015 +0900
> # Branch stable
> # Node ID 2eb5e0aa1ec347e34012bf0f1e52bd6e1a2a4c85
> # Parent  a2285e2fc949d8a4df58af820bb00b51f64def14
> templates: fix "log -q" output of phases style

Queued for stable, thanks.

Patch

diff --git a/mercurial/templates/map-cmdline.phases b/mercurial/templates/map-cmdline.phases
--- a/mercurial/templates/map-cmdline.phases
+++ b/mercurial/templates/map-cmdline.phases
@@ -1,7 +1,7 @@ 
 # Base templates. Due to name clashes with existing keywords, we have
 # to replace some keywords with 'lkeyword', for 'labelled keyword'
 changeset = '{cset}{branches}{bookmarks}{tags}{lphase}{parents}{user}{ldate}{summary}\n'
-changeset_quiet = '{node}'
+changeset_quiet = '{lnode}'
 changeset_verbose = '{cset}{branches}{bookmarks}{tags}{lphase}{parents}{user}{ldate}{lfiles}{lfile_copies_switch}{description}\n'
 changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n'
 
@@ -40,7 +40,7 @@  fullcset = '{label("log.changeset change
 parent = '{label("log.parent changeset.{phase}",
                   "parent:      {rev}:{node|formatnode}")}\n'
 
-node = '{label("log.node",
+lnode = '{label("log.node",
                 "{rev}:{node|short}")}\n'
 
 manifest = '{label("ui.debug log.manifest",
diff --git a/tests/test-log.t b/tests/test-log.t
--- a/tests/test-log.t
+++ b/tests/test-log.t
@@ -150,6 +150,9 @@  log on directory
   summary:     e
   
 
+  $ hg log -f -l1 --style phases -q
+  4:7e4639b4691b
+
 -f, but no args
 
   $ hg log -f