~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testmerge.py

  • Committer: Robert Collins
  • Date: 2005-09-30 02:54:51 UTC
  • mfrom: (1395)
  • mto: This revision was merged to the branch mainline in revision 1397.
  • Revision ID: robertc@robertcollins.net-20050930025451-47b9e412202be44b
symlink and weaves, whaddya know

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
from bzrlib.merge import merge
7
7
from bzrlib.errors import UnrelatedBranches, NoCommits
8
8
from bzrlib.revision import common_ancestor
 
9
from bzrlib.fetch import fetch
9
10
 
10
11
 
11
12
class TestMerge(TestCaseInTempDir):
36
37
        """When base is forced to revno 0, pending_merges is set"""
37
38
        br2 = self.test_unrelated()
38
39
        br1 = Branch.open('.')
 
40
        fetch(from_branch=br2, to_branch=br1)
 
41
        # merge all of branch 2 into branch 1 even though they 
 
42
        # are not related.
39
43
        merge(['branch2', -1], ['branch2', 0])
40
44
        self.assertEquals(len(br1.pending_merges()), 1)
41
45
        return (br1, br2)
44
48
        """Merge base is sane when two unrelated branches are merged"""
45
49
        br1, br2 = self.test_pending_with_null()
46
50
        commit(br1, "blah")
47
 
        last = br1.last_patch()
 
51
        last = br1.last_revision()
48
52
        self.assertEquals(common_ancestor(last, last, br1), last)