[rfc] Progress Bar reworking

Martin Pool mbp at canonical.com
Thu Dec 21 06:50:41 GMT 2006


I am not convinced that it makes sense to talk to the user in terms of
phases 

On 29 Nov 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:

> Because of UI issues, we really only ever want 2 levels of progress. The
> current overall (for the whole command, IMO), and then a nested one for
> the current step. It might be possible to have more nested ones, but the
> basic premise is that you really should have a global view of what is
> going on.
> 
> As another example, I wrote a script which recursively copies a bunch of
> branches. There I have an overall "I'm on branch X of Y", but then a
> narrower "I'm on phase 1/6 for branch 10/20", and then "I'm on revision
> 20/2000 for phase 1/6 for branch 10/20".

I would like to avoid ever saying "phase 1/5" to the user and instead
just say what we're doing.  For example if this phase is about copying
revisions or building a tree then just say that -- and this effectively
eliminates one layer.  Also it will make us all aware of what most needs
performance work, which is probably good.

I can see that phases may still be useful so that there is one overall
monotonic progress bar, but they could be used just to calculate
fractions and not mentioned.

Having integer phase numbers in the code is a bit distasteful to me.

I actually think that as long as the message is reasonable and not at
too low a level, one progress bar may be enough in many cases.

Also remember that not all communication with the user needs to be
through progress bars (or at least not through a single bar).  In your
case of copying multiple branches you could have

  copying branch apple
  copying branch orange
  copying branch pear
  [123/1231] copying revisions

I guess it's not quite as pretty but I think it's perfectly ok.

-- 
Martin




More information about the bazaar mailing list