Patchwork [5,of,6,V5] summary: use the same labels as log command in "parent: " line

login
register
mail settings
Submitter Denis Laxalde
Date Jan. 6, 2017, 3:32 p.m.
Message ID <1d9bdfeb0afded737513.1483716748@sh77.tls.logilab.fr>
Download mbox | patch
Permalink /patch/18121/
State Accepted
Headers show

Comments

Denis Laxalde - Jan. 6, 2017, 3:32 p.m.
# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1483709674 -3600
#      Fri Jan 06 14:34:34 2017 +0100
# Node ID 1d9bdfeb0afded737513f51e75cefa11e9231fdf
# Parent  87399b8a6ae5a1c38c4969d705a358ba17d7dffd
# EXP-Topic evolve-ui
summary: use the same labels as log command in "parent: " line

Re-use the cmdutil._changesetlabels function introduced in 5289fd78017a to
have consistent labels between the "changeset: " line in log command and the
"parent: " line in summary.

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5982,7 +5982,7 @@  def summary(ui, repo, **opts):
         # shows a working directory parent *changeset*:
         # i18n: column positioning for "hg summary"
         ui.write(_('parent: %d:%s ') % (p.rev(), str(p)),
-                 label='log.changeset changeset.%s' % p.phasestr())
+                 label=cmdutil._changesetlabels(p))
         ui.write(' '.join(p.tags()), label='log.tag')
         if p.bookmarks():
             marks.extend(p.bookmarks())