[PATCH 1 of 5] paths: drop ui.status label from output of "hg paths name"

Yuya Nishihara yuya at tcha.org
Wed Jan 13 06:28:04 CST 2016


On Tue, 12 Jan 2016 14:46:10 -0600, Matt Mackall wrote:
> On Sat, 2016-01-09 at 18:45 +0900, Yuya Nishihara wrote:
> > # HG changeset patch
> > # User Yuya Nishihara <yuya at tcha.org>
> > # Date 1450011240 -32400
> > #      Sun Dec 13 21:54:00 2015 +0900
> > # Node ID 16099841acaa4fa42dffa994b9ac9e16c89a43be
> > # Parent  0db7943a4e1f843814865dc1b2cb22b994acc74f
> > paths: drop ui.status label from output of "hg paths name"
> > 
> > We just need to not print path if --quiet. ui.status label is unwanted.
> 
> Why?
> 
> My guess is: we don't have a problem with the label but the formatter doesn't
> support "status" and "note" output levels. That's probably a weakness of the
> formatter API. Yep:

Because it isn't a status message, it shouldn't be colorized as 'ui.status',
for example.

  $ hg paths --config color.ui.status=red
  default = https://selenic.com/repo/hg/
  $ hg paths default --config color.ui.status=red
  <red>https://selenic.com/repo/hg/</red>  # why is this red?

I agree it will be handy to add a status/note-level fm.condwrite(), but it
shouldn't call ui.status() or ui.note().

Should I resend?


More information about the Mercurial-devel mailing list