~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/serializer/v08.py

  • Committer: Andrew Bennetts
  • Date: 2009-07-27 05:35:00 UTC
  • mfrom: (4570 +trunk)
  • mto: (4634.6.29 2.0)
  • mto: This revision was merged to the branch mainline in revision 4680.
  • Revision ID: andrew.bennetts@canonical.com-20090727053500-q76zsn2dx33jhmj5
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2009 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Serializer factory for reading and writing bundles.
18
18
"""
19
19
 
20
20
import os
21
21
 
22
 
from bzrlib import errors
 
22
from bzrlib import (
 
23
    errors,
 
24
    ui,
 
25
    )
23
26
from bzrlib.bundle.serializer import (BundleSerializer,
24
27
                                      _get_bundle_header,
25
28
                                     )
27
30
from bzrlib.bundle.bundle_data import (RevisionInfo, BundleInfo, BundleTree)
28
31
from bzrlib.diff import internal_diff
29
32
from bzrlib.osutils import pathjoin
30
 
from bzrlib.progress import DummyProgress
31
33
from bzrlib.revision import NULL_REVISION
32
 
import bzrlib.ui
33
34
from bzrlib.testament import StrictTestament
34
35
from bzrlib.timestamp import (
35
36
    format_highres_date,
119
120
        source.lock_read()
120
121
        try:
121
122
            self._write_main_header()
122
 
            pb = DummyProgress()
 
123
            pb = ui.ui_factory.nested_progress_bar()
123
124
            try:
124
125
                self._write_revisions(pb)
125
126
            finally:
126
 
                pass
127
 
                #pb.finished()
 
127
                pb.finished()
128
128
        finally:
129
129
            source.unlock()
130
130
 
183
183
 
184
184
        i_max = len(self.revision_ids)
185
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
187
            rev = self.source.get_revision(rev_id)
188
188
            if rev_id == last_rev_id:
189
189
                rev_tree = last_rev_tree