~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Aaron Bentley
  • Date: 2007-12-02 17:58:48 UTC
  • mto: This revision was merged to the branch mainline in revision 3073.
  • Revision ID: aaron.bentley@utoronto.ca-20071202175848-xvxy2xv8i9rxkxss
PlanMergeVersionedfile now has multiple Versionedfile fallbacks

Show diffs side-by-side

added added

removed removed

Lines of Context:
300
300
        'other:' pseudo-revision.
301
301
        """
302
302
        from bzrlib import plan_merge
303
 
        if getattr(self, '_get_weave', None) is None:
304
 
            repo = self.branch.repository
305
 
            transaction = repo.get_transaction()
306
 
            base_vf = repo.weave_store.get_weave(file_id, transaction)
307
 
        else:
308
 
            base_vf = self._get_weave(file_id)
309
 
        vf = plan_merge._PlanMergeVersionedfile(base_vf)
 
303
        vf = plan_merge._PlanMergeVersionedfile(file_id)
310
304
        last_revision_a = self._get_file_revision(file_id, vf, 'this:')
311
305
        last_revision_b = other._get_file_revision(file_id, vf, 'other:')
312
306
        plan = plan_merge.PlanMerge(last_revision_a, last_revision_b, vf)
332
326
            parent_revisions = [file_revision(t) for t in iter_parent_trees()]
333
327
            vf.add_lines(last_revision, parent_revisions,
334
328
                         self.get_file(file_id).readlines())
 
329
            repo = self.branch.repository
 
330
            transaction = repo.get_transaction()
 
331
            base_vf = repo.weave_store.get_weave(file_id, transaction)
335
332
        else:
336
333
            last_revision = file_revision(self)
 
334
            base_vf = self._get_weave(file_id)
 
335
        vf.fallback_versionedfiles.append(base_vf)
337
336
        return last_revision
338
337
 
339
338
    inventory = property(_get_inventory,