~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-03-26 03:06:52 UTC
  • mfrom: (3287.5.10 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080326030652-vgwdkwda9mi8s200
Deprecate VersionedFile.get_parents. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
356
356
        parent_texts = {}
357
357
        versionedfile = {}
358
358
        to_store = self.target.weave_store
 
359
        parent_map = self.source.get_graph().get_parent_map(revs)
359
360
        for tree in self.iter_rev_trees(revs):
360
361
            revision_id = tree.inventory.root.revision
361
362
            root_id = tree.get_root_id()
362
 
            parents = inventory_weave.get_parents(revision_id)
 
363
            parents = parent_map[revision_id]
 
364
            if parents[0] == NULL_REVISION:
 
365
                parents = ()
363
366
            if root_id not in versionedfile:
364
 
                versionedfile[root_id] = to_store.get_weave_or_empty(root_id, 
 
367
                versionedfile[root_id] = to_store.get_weave_or_empty(root_id,
365
368
                    self.target.get_transaction())
366
369
            _, _, parent_texts[root_id] = versionedfile[root_id].add_lines(
367
370
                revision_id, parents, [], parent_texts)