many uses of DummyProgress are unnecessary
Bug #388266 reported by
Martin Pool
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.
This bug can be closed when all uses have been checked and unnecessary ones removed.
Related branches
lp:~mbp/bzr/dummy-progress
- John A Meinel: Approve
- Diff: 55 lines
lp:~mbp/bzr/progress
- Vincent Ladeuil: Approve
-
Diff: 308 lines (+84/-87)5 files modifiedNEWS (+6/-0)
bzrlib/progress.py (+0/-22)
bzrlib/tests/test_progress.py (+37/-4)
bzrlib/tests/test_ui.py (+4/-48)
bzrlib/ui/text.py (+37/-13)
- John A Meinel: Needs Fixing
- bzr-core: Pending requested
-
Diff: 559 lines (+184/-100)10 files modifiedNEWS (+22/-0)
bzrlib/branch.py (+4/-0)
bzrlib/errors.py (+16/-8)
bzrlib/help_topics/en/patterns.txt (+14/-4)
bzrlib/progress.py (+0/-22)
bzrlib/tests/blackbox/test_commit.py (+16/-0)
bzrlib/tests/test_errors.py (+34/-1)
bzrlib/tests/test_progress.py (+37/-4)
bzrlib/tests/test_ui.py (+4/-48)
bzrlib/ui/text.py (+37/-13)
Changed in bzr: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
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.