[PATCH 0 of 2] Let progress act as a silencer

Martin Geisler mg at lazybytes.net
Wed Oct 20 14:23:25 CDT 2010


Matt Mackall <mpm at selenic.com> writes:

> On Wed, 2010-10-20 at 14:04 +0200, Martin Geisler wrote:
>
>> I don't understand why you want to silence the output? I thought the
>> progess extension and the API was designed to handle output
>> interleaved with the progress bar. So when starting the terminal
>> looks like:
>> 
>>   loop [                                                            ] 0/3
>> 
>> then some output is made and it looks like
>> 
>>   first line of output
>>   loop [=================>                                          ] 1/3
>> 
>> more output is made:
>> 
>>   first line of output
>>   second line of output
>>   loop [========================================>                   ] 2/3
>> 
>> and so on.
>
> The issue is that there are a few places Mercurial uses ui.status() to
> indicate progress in potentially long-running commands.

I'm actually not sure why this is an issue -- will the messages not just
pile up above the progress bar?

> In convert, we output a line per changeset, for instance. Another is
> the "searching for changesets" stanza that all the networking commands
> output.
>
> But I still don't like this approach, as lots of ui.status() messages
> are NOT a proxy for progress and having them mysteriously disappear
> when the progress extension was enabled would be bad.

Yeah, I would also be unhappy if messages disappeared.

> We should instead have a new ui method, something like:
>
> ui.progressmsg("convert", _("now at stage foo\n"))
>
> And have the progress extension decide how to deal with it. The
> textual version might decide to just skip it, while a GUI might put it
> somewhere useful.

Okay -- so this is for changing the topic (the 'loop' label above)
without restarting the progress bar? I can see how that would be useful.

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20101020/e652d314/attachment.pgp>


More information about the Mercurial-devel mailing list