~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Robert Collins
  • Date: 2007-03-06 12:28:18 UTC
  • mto: (2321.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: robertc@robertcollins.net-20070306122818-xk0lc3l01ecl6vbc
Get merge_nested finally working: change nested tree iterators to take file_ids, and ensure the right branch is connected to in the merge logic. May not be suitable for shared repositories yet.

Show diffs side-by-side

added added

removed removed

Lines of Context:
687
687
            # branch tip correctly, and seed it with history.
688
688
            checkout_branch.pull(self, stop_revision=revision_id)
689
689
        tree = checkout.create_workingtree(revision_id)
690
 
        for path, entry in tree.iter_reference_entries():
691
 
            path = tree.id2path(entry.file_id)
692
 
            reference_parent = self.reference_parent(entry.file_id, path)
693
 
            reference_parent.create_checkout(tree.abspath(path),
694
 
                                             entry.reference_revision,
695
 
                                             lightweight)
 
690
        basis_tree = tree.basis_tree()
 
691
        basis_tree.lock_read()
 
692
        try:
 
693
            for path, file_id in basis_tree.iter_references():
 
694
                reference_parent = self.reference_parent(file_id, path)
 
695
                reference_parent.create_checkout(tree.abspath(path),
 
696
                    basis_tree.get_reference_revision(file_id, path),
 
697
                    lightweight)
 
698
        finally:
 
699
            basis_tree.unlock()
696
700
        return tree
697
701
 
698
702
    def reference_parent(self, file_id, path):