[MERGE REVIEW] Progress bar shows overall progess, esp for merge and revert
Robey Pointer
robey at lag.net
Fri Mar 10 06:09:53 GMT 2006
On 9 Mar 2006, at 9:38, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
> I've built on Robert's nested progress bar stuff to implement an
> overall
> progress bar. This indicates the overall progress, with child
> progress
> objects adding a 'child fraction' to the overall progress bar.
>
> So if you have a stack depth of 3 and
>
> bottom = 1/2
> middle = 3/5
> top = 1/4
>
> the overall indicator will be at (1+((3+(1/4))/5))/2 * 100 = 82.5%
I played with that idea but wasn't as patient as you. :) The problem
that stopped me is siblings. Say you have a function that calls
do_foo() and then do_bar(), each of which set up progress bars. If
those are each "top" in your example, then at the end of do_foo(),
the bar is at 90%, after which it will suddenly drop back to 80% again.
If the bars subdivide in this manner, each level of a function stack
needs to track it, possibly adding its own progress bar to the mix.
Maybe this is the right thing to do. But it's something to be aware of.
robey
More information about the bazaar
mailing list