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
=== modified file 'bzrlib/bundle/serializer/v08.py'
--- bzrlib/bundle/serializer/v08.py 2009-05-06 05:36:28 +0000
+++ bzrlib/bundle/serializer/v08.py 2009-07-23 23:35:27 +0000
@@ -1,4 +1,4 @@
1# Copyright (C) 2005, 2006 Canonical Ltd1# Copyright (C) 2005, 2006, 2009 Canonical Ltd
2#2#
3# This program is free software; you can redistribute it and/or modify3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by4# it under the terms of the GNU General Public License as published by
@@ -19,7 +19,10 @@
1919
20import os20import os
2121
22from bzrlib import errors22from bzrlib import (
23 errors,
24 ui,
25 )
23from bzrlib.bundle.serializer import (BundleSerializer,26from bzrlib.bundle.serializer import (BundleSerializer,
24 _get_bundle_header,27 _get_bundle_header,
25 )28 )
@@ -27,9 +30,7 @@
27from bzrlib.bundle.bundle_data import (RevisionInfo, BundleInfo, BundleTree)30from bzrlib.bundle.bundle_data import (RevisionInfo, BundleInfo, BundleTree)
28from bzrlib.diff import internal_diff31from bzrlib.diff import internal_diff
29from bzrlib.osutils import pathjoin32from bzrlib.osutils import pathjoin
30from bzrlib.progress import DummyProgress
31from bzrlib.revision import NULL_REVISION33from bzrlib.revision import NULL_REVISION
32import bzrlib.ui
33from bzrlib.testament import StrictTestament34from bzrlib.testament import StrictTestament
34from bzrlib.timestamp import (35from bzrlib.timestamp import (
35 format_highres_date,36 format_highres_date,
@@ -119,12 +120,11 @@
119 source.lock_read()120 source.lock_read()
120 try:121 try:
121 self._write_main_header()122 self._write_main_header()
122 pb = DummyProgress()123 pb = ui.ui_factory.nested_progress_bar()
123 try:124 try:
124 self._write_revisions(pb)125 self._write_revisions(pb)
125 finally:126 finally:
126 pass127 pb.finished()
127 #pb.finished()
128 finally:128 finally:
129 source.unlock()129 source.unlock()
130130
@@ -183,7 +183,7 @@
183183
184 i_max = len(self.revision_ids)184 i_max = len(self.revision_ids)
185 for i, rev_id in enumerate(self.revision_ids):185 for i, rev_id in enumerate(self.revision_ids):
186 pb.update("Generating revsion data", i, i_max)186 pb.update("Generating revision data", i, i_max)
187 rev = self.source.get_revision(rev_id)187 rev = self.source.get_revision(rev_id)
188 if rev_id == last_rev_id:188 if rev_id == last_rev_id:
189 rev_tree = last_rev_tree189 rev_tree = last_rev_tree