[rfc] transports to pass progress messages

Martin Pool mbp at sourcefrog.net
Mon Jan 21 03:11:03 GMT 2008


Summary: Transports should have a connection to the ui progress
indicator, and tell it when they read/write data, so that we get a
bottom-up progress indicator, as well as the current top-down one.

At the moment, we typically have high-level operations create a
progress bar stack, which can then be updated as we do various nested
operations like reading indexes or looking at the graph.  This has
several good points: we get a single overall progress bar while the
command is running, can have some text explaining what's going on,
etc.

But there are a couple of shortcomings: if we don't instrument a
particular bit of code, no progress indication is displayed, and there
are a number of bug reports of things apparently "freezing" (while
transfers might still be taking place). Also, it would be useful to
see how fast things are going across the network.

I don't have any code yet.  I expect I will give the transports a
connection to either the ui or pb when they are created, and this will
be inherited when the transport is cloned.  When the transport reads
or writes data, it'll call an abstract method on the pb to say so.
The pb will calculate either a rate or total data or just run a
spinner, on the same line as (but without affecting) the regular
progress bar.

Robert has a branch that clears up the code here so I will probably
start by seeing if that should be finished off.

-- 
Martin



More information about the bazaar mailing list