many uses of DummyProgress are unnecessary

Bug #388266 reported by Martin Pool on 2009-06-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Medium
Martin Pool

Bug Description

Quite a few places in the bzr code use DummyProgress, which is implements the ProgressBar interface and basically ignores all input. Many of these are not worthwhile:

* if there is meaningful progress to report, we should report it, otherwise we should do nothing
* generally speaking, interfaces should not make assumptions that the called or calling code either does or doesn't want to report progress -- DummyProgress is commonly used to stub these out, but it's better to just remove the parameter

ui_factory.nested_progress_bar lets code just report progress when it has something to say.

This bug can be closed when all uses have been checked and unnecessary ones removed.

Related branches

John A Meinel (jameinel) wrote :

I think the only times it makes sense would be for the 'nested generator' stuff, where we can't reliably take out a nested_progress_bar because we will be yielding.

2009/6/17 John A Meinel <email address hidden>:
> I think the only times it makes sense would be for the 'nested
> generator' stuff, where we can't reliably take out a nested_progress_bar
> because we will be yielding.

There's some kind of connection here to generators. I'm not sure if
passing in the progress bar is the best solution or not, but I'll look
at it as part of this.

--
Martin <http://launchpad.net/~mbp/>

Martin Pool (mbp) wrote :

https://code.edge.launchpad.net/~mbp/bzr/progress/+merge/20106 removes the last reference to it. I'll leave the class because it could possibly be useful.

Martin Pool (mbp) on 2010-03-29
Changed in bzr:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers