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

login
register
mail settings
Submitter Yuya Nishihara
Date March 14, 2015, 2:01 p.m.
Message ID <6136704b975df2928196.1426341665@mimosa>
Download mbox | patch
Permalink /patch/8090/
State Accepted
Commit 6136704b975df292819647ba8ac46209487fbc46
Headers show

Comments

Yuya Nishihara - March 14, 2015, 2:01 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1426340067 -32400
#      Sat Mar 14 22:34:27 2015 +0900
# Branch stable
# Node ID 6136704b975df292819647ba8ac46209487fbc46
# Parent  b73a22d1d9bfe3a7f8633340ea75a0ab1526c21b
templates: fix "log -q" output of default style

It was changed at 0ded0f0b1c04 unintentionally due to name conflicts.
Matt Mackall - March 14, 2015, 9:31 p.m.
On Sat, 2015-03-14 at 23:01 +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1426340067 -32400
> #      Sat Mar 14 22:34:27 2015 +0900
> # Branch stable
> # Node ID 6136704b975df292819647ba8ac46209487fbc46
> # Parent  b73a22d1d9bfe3a7f8633340ea75a0ab1526c21b
> templates: fix "log -q" output of default style

Queued for stable, thanks.

Patch

diff --git a/mercurial/templates/map-cmdline.default b/mercurial/templates/map-cmdline.default
--- a/mercurial/templates/map-cmdline.default
+++ b/mercurial/templates/map-cmdline.default
@@ -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}{parents}{user}{ldate}{summary}\n'
-changeset_quiet = '{node}'
+changeset_quiet = '{lnode}'
 changeset_verbose = '{cset}{branches}{bookmarks}{tags}{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-command-template.t b/tests/test-command-template.t
--- a/tests/test-command-template.t
+++ b/tests/test-command-template.t
@@ -101,6 +101,10 @@  Default style is like normal output:
   $ hg log -v --style default > style.out
   $ cmp log.out style.out || diff -u log.out style.out
 
+  $ hg log -q > log.out
+  $ hg log -q --style default > style.out
+  $ cmp log.out style.out || diff -u log.out style.out
+
   $ hg log --debug > log.out
   $ hg log --debug --style default > style.out
   $ cmp log.out style.out || diff -u log.out style.out
@@ -119,6 +123,9 @@  Default style should also preserve color
   $ hg --color=debug -v log > log.out
   $ hg --color=debug -v log --style default > style.out
   $ cmp log.out style.out || diff -u log.out style.out
+  $ hg --color=debug -q log > log.out
+  $ hg --color=debug -q log --style default > style.out
+  $ cmp log.out style.out || diff -u log.out style.out
   $ hg --color=debug --debug log > log.out
   $ hg --color=debug --debug log --style default > style.out
   $ cmp log.out style.out || diff -u log.out style.out