[MERGE 157789] Updated pack progress bar patch

John Arbash Meinel john at arbash-meinel.com
Mon Oct 29 20:30:25 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
> +        pb = ui.ui_factory.nested_progress_bar()
> +        try:
> +            return self._create_pack_from_packs(packs, suffix, revision_ids,
> +                pb)
> +        finally:
> +            pb.finished()
> 
> (comment) This is ok because it's consistent with what we normally do,
> but I'm not sure we really should be finishing progress bars from
> finally blocks.  If we have terminated because of an error or
> interrupt, clearing the bar may obscure something either on the screen
> or in the traceback.
> 
> It would also remove the introduction of extra call layers.

well, if you don't close them in proper reverse nesting, you get a traceback.
So I think avoiding that traceback is better than getting the wrong traceback
completely.

Though you could argue that it shouldn't :). Or we should have pb.abort() which
finishes without clearing.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHJkLgJdeBCYSNAAMRAnSAAJ9UlZ4DfjLbfqZ2bfVN7bkn+i6UGACfRKB4
k7H9mqI1Uuh1z7M4gsNNzaA=
=Etmr
-----END PGP SIGNATURE-----



More information about the bazaar mailing list