[PATCH V2] progress: add output-prefix for GUI clients

Matt Mackall mpm at selenic.com
Sun Nov 6 12:11:07 CST 2011


On Sat, 2011-11-05 at 07:12 +0100, Jason Harris wrote:
> # HG changeset patch
> # User Jason Harris <jason at jasonfharris.com>
> # Date 1320467623 -3600
> # Node ID 6e27ea968dd0110eb378b5512fe64cac63dd36e7
> # Parent  dc9d0189f60e6d216e79bbc162525b1d0324752c
> progress: add output-prefix for GUI clients
> 
> For GUI clients which use the progress extension, the progress gets
> reported on stderr and so to differentiate progress from errors it is
> convenient to be able to specify a prefix before any progress reporting.

This doesn't fit very well with my vision of how this should be done.

First, GUI clients (or basically anything that automates against the
command line) should be setting HGPLAIN. This keeps things like random
extensions and aliases from breaking them. This includes color and the
progress extension.

Second, when the progress extension is not enabled, progress messages
are generated in a fixed format on _stdout_, but only with --debug:

http://www.selenic.com/hg/file/afc02adf4ded/mercurial/ui.py#l683

This should generally be preferable from the tool standpoint:

- if you want to ignore it, it's off by default
- if you want to display it, it's in a fixed format for parsing

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list