nested progress bars...

Robert Collins robertc at robertcollins.net
Tue Mar 7 01:30:03 GMT 2006


On Mon, 2006-03-06 at 20:12 -0500, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> | so do we have consensus on the following?
> |
> |  * ui_factory.progress_bar is deprecated but continues to operate as it
> | does now giving a 'replace the current pb' progress bar to the client,
> | which does not stack and does not need to be returned to the ui factory.
> |  * ui_factory.get_progress_bar() will produce a nested progress bar
> |    which must be returned to the factory via pb.finished()
> 
> I worry that a stack-based progress bar will wind up getting out of sync
> with the program stack.  But I guess requiring it to be returned via
> pb.finished will probably work, and allow us to warn if we miss a
> finished() call.

Yup. 

> The reason I wrote the TreeTransform one as I did was because I thought
> progress bars should be off unless a client declared that it wanted them.

Well, I think that generally any long operation should start a progress
bar, and that the global ui factory lets clients determine how they want
the user feedback to be delivered. Theres no reason that specific apis
should not accept a pb, and others create one as needed. I think thats
fine: what is a problem right now is that when there are (say) 4 levels
of activity (i.e. convert repository x/20, fetching data (3/5), copying
versioned files (300/2000), joining versions (2/45)), there is an
all-or-nothing effect of passing it around: at any level we have to pass
the pb down or construct new ones which overwrite the users expectation.


So, given that TT can stay as you have it, how are you on the proposal ?

Rob


-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060307/ebd8d148/attachment.pgp 


More information about the bazaar mailing list