/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2009-06-17 19:08:25 UTC
  • mto: This revision was merged to the branch mainline in revision 4460.
  • Revision ID: john@arbash-meinel.com-20090617190825-ktfk82li57rf2im6
It seems that fetch() no longer returns the number of revisions fetched.
It still does for *some* InterRepository fetch paths, but the generic one does not.
It is also not easy to get it to, since the Source and Sink are the ones
that would know how many keys were transmitted, and they are potentially 'remote'
objects.

This was also only tested to occur as a by-product in a random 'test_commit' test.
I assume if we really wanted the assurance, we would have a per_repo or interrepo
test for it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2009 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 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
19
19
 
20
20
import os
21
21
 
22
 
from bzrlib import (
23
 
    errors,
24
 
    ui,
25
 
    )
 
22
from bzrlib import errors
26
23
from bzrlib.bundle.serializer import (BundleSerializer,
27
24
                                      _get_bundle_header,
28
25
                                     )
30
27
from bzrlib.bundle.bundle_data import (RevisionInfo, BundleInfo, BundleTree)
31
28
from bzrlib.diff import internal_diff
32
29
from bzrlib.osutils import pathjoin
 
30
from bzrlib.progress import DummyProgress
33
31
from bzrlib.revision import NULL_REVISION
 
32
import bzrlib.ui
34
33
from bzrlib.testament import StrictTestament
35
34
from bzrlib.timestamp import (
36
35
    format_highres_date,
120
119
        source.lock_read()
121
120
        try:
122
121
            self._write_main_header()
123
 
            pb = ui.ui_factory.nested_progress_bar()
 
122
            pb = DummyProgress()
124
123
            try:
125
124
                self._write_revisions(pb)
126
125
            finally:
127
 
                pb.finished()
 
126
                pass
 
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 revision data", i, i_max)
 
186
            pb.update("Generating revsion 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