many uses of DummyProgress are unnecessary

Bug #388266 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
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

Revision history for this message
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.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 388266] Re: many uses of DummyProgress are unnecessary

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/>

Revision history for this message
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)
Changed in bzr:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.