~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge.py

Merge trunk

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
35
36
from bzrlib.tests import TestCaseWithTransport, TestCaseWithMemoryTransport
36
37
from bzrlib.trace import (enable_test_log, disable_test_log)
37
38
from bzrlib.workingtree import WorkingTree
105
106
        """Merge base is sane when two unrelated branches are merged"""
106
107
        wt1, br2 = self.test_pending_with_null()
107
108
        wt1.commit("blah")
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()
 
109
        last = wt1.branch.last_revision()
 
110
        self.assertEqual(common_ancestor(last, last, wt1.branch.repository), last)
116
111
 
117
112
    def test_create_rename(self):
118
113
        """Rename an inventory entry while creating the file"""