Merge lp:~mbp/bzr/dummy-progress into lp:~bzr/bzr/trunk-old

Proposed by Martin Pool
Status: Merged
Approved by: John A Meinel
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~mbp/bzr/dummy-progress
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 55 lines
To merge this branch: bzr merge lp:~mbp/bzr/dummy-progress
Reviewer Review Type Date Requested Status
John A Meinel Approve
Review via email: mp+9177@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote :

OK, it's a baby step, but it removes one unnecessary use of DummyProgress and fixes a typo too.

Revision history for this message
John A Meinel (jameinel) wrote :

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

Martin Pool wrote:
> Martin Pool has proposed merging lp:~mbp/bzr/dummy-progress into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
> OK, it's a baby step, but it removes one unnecessary use of DummyProgress and fixes a typo too.
>

 Review: approve
 merge: approve

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkpobY0ACgkQJdeBCYSNAAOB8QCglJDFCeaebh0m6Z/MVPQ773dm
WGUAnAin+DGr2v8ObqTNhVzp3uDVLLrq
=aFZB
-----END PGP SIGNATURE-----

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/bundle/serializer/v08.py'
2--- bzrlib/bundle/serializer/v08.py 2009-05-06 05:36:28 +0000
3+++ bzrlib/bundle/serializer/v08.py 2009-07-23 23:35:27 +0000
4@@ -1,4 +1,4 @@
5-# Copyright (C) 2005, 2006 Canonical Ltd
6+# Copyright (C) 2005, 2006, 2009 Canonical Ltd
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10@@ -19,7 +19,10 @@
11
12 import os
13
14-from bzrlib import errors
15+from bzrlib import (
16+ errors,
17+ ui,
18+ )
19 from bzrlib.bundle.serializer import (BundleSerializer,
20 _get_bundle_header,
21 )
22@@ -27,9 +30,7 @@
23 from bzrlib.bundle.bundle_data import (RevisionInfo, BundleInfo, BundleTree)
24 from bzrlib.diff import internal_diff
25 from bzrlib.osutils import pathjoin
26-from bzrlib.progress import DummyProgress
27 from bzrlib.revision import NULL_REVISION
28-import bzrlib.ui
29 from bzrlib.testament import StrictTestament
30 from bzrlib.timestamp import (
31 format_highres_date,
32@@ -119,12 +120,11 @@
33 source.lock_read()
34 try:
35 self._write_main_header()
36- pb = DummyProgress()
37+ pb = ui.ui_factory.nested_progress_bar()
38 try:
39 self._write_revisions(pb)
40 finally:
41- pass
42- #pb.finished()
43+ pb.finished()
44 finally:
45 source.unlock()
46
47@@ -183,7 +183,7 @@
48
49 i_max = len(self.revision_ids)
50 for i, rev_id in enumerate(self.revision_ids):
51- pb.update("Generating revsion data", i, i_max)
52+ pb.update("Generating revision data", i, i_max)
53 rev = self.source.get_revision(rev_id)
54 if rev_id == last_rev_id:
55 rev_tree = last_rev_tree