~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-03-15 21:00:35 UTC
  • mfrom: (3228.4.15 revision_graph)
  • Revision ID: pqm@pqm.ubuntu.com-20080315210035-5qwda8bre2nwsra3
(jam) Update PackRepo.get_revision_graph() to efficiently handle
        ghosts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
from bzrlib.errors import UnrelatedBranches, NoCommits, BzrCommandError
33
33
from bzrlib.merge import transform_tree, merge_inner, _PlanMerge
34
34
from bzrlib.osutils import pathjoin, file_kind
35
 
from bzrlib.revision import common_ancestor
36
35
from bzrlib.tests import TestCaseWithTransport, TestCaseWithMemoryTransport
37
36
from bzrlib.trace import (enable_test_log, disable_test_log)
38
37
from bzrlib.workingtree import WorkingTree
106
105
        """Merge base is sane when two unrelated branches are merged"""
107
106
        wt1, br2 = self.test_pending_with_null()
108
107
        wt1.commit("blah")
109
 
        last = wt1.branch.last_revision()
110
 
        self.assertEqual(common_ancestor(last, last, wt1.branch.repository), last)
 
108
        wt1.lock_read()
 
109
        try:
 
110
            last = wt1.branch.last_revision()
 
111
            last2 = br2.last_revision()
 
112
            graph = wt1.branch.repository.get_graph()
 
113
            self.assertEqual(last2, graph.find_unique_lca(last, last2))
 
114
        finally:
 
115
            wt1.unlock()
111
116
 
112
117
    def test_create_rename(self):
113
118
        """Rename an inventory entry while creating the file"""