~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: Martin Pool
  • Date: 2006-06-20 03:30:14 UTC
  • mfrom: (1793 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1797.
  • Revision ID: mbp@sourcefrog.net-20060620033014-e19ce470e2ce6561
[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
        self.from_control = self.from_repository.control_weaves
125
125
        self.count_total = 0
126
126
        self.file_ids_names = {}
127
 
        pp = ProgressPhase('fetch phase', 4, self.pb)
 
127
        pp = ProgressPhase('Fetch phase', 4, self.pb)
128
128
        try:
 
129
            pp.next_phase()
129
130
            revs = self._revids_to_fetch()
130
131
            # something to do ?
131
132
            if revs:
169
170
                    self.from_repository.get_transaction())
170
171
                # we fetch all the texts, because texts do
171
172
                # not reference anything, and its cheap enough
172
 
                to_weave.join(from_weave, version_ids=required_versions)
 
173
                to_weave.join(from_weave, version_ids=required_versions) 
 
174
                # we don't need *all* of this data anymore, but we dont know
 
175
                # what we do. This cache clearing will result in a new read 
 
176
                # of the knit data when we do the checkout, but probably we
 
177
                # want to emit the needed data on the fly rather than at the
 
178
                # end anyhow.
 
179
                # the from weave should know not to cache data being joined,
 
180
                # but its ok to ask it to clear.
 
181
                from_weave.clear_cache()
 
182
                to_weave.clear_cache()
173
183
        finally:
174
184
            texts_pb.finished()
175
185
 
182
192
    
183
193
            child_pb = bzrlib.ui.ui_factory.nested_progress_bar()
184
194
            try:
185
 
                # just merge, this is optimisable and its means we dont
 
195
                # just merge, this is optimisable and its means we don't
186
196
                # copy unreferenced data such as not-needed inventories.
187
197
                pb.update("fetch inventory", 1, 3)
188
198
                from_weave = self.from_repository.get_inventory_weave()
264
274
 
265
275
 
266
276
class Fetcher(object):
267
 
    """Backwards compatability glue for branch.fetch()."""
 
277
    """Backwards compatibility glue for branch.fetch()."""
268
278
 
269
279
    @deprecated_method(zero_eight)
270
280
    def __init__(self, to_branch, from_branch, last_revision=None, pb=None):