1
from bzrlib.branch import Branch
2
from bzrlib.commit import commit
3
from bzrlib.selftest import TestCaseInTempDir
4
from bzrlib.merge import merge
5
from bzrlib.errors import UnrelatedBranches, NoCommits
7
class TestMerge(TestCaseInTempDir):
8
"""Test appending more than one revision"""
9
def test_pending(self):
10
br = Branch.initialize(".")
12
self.assertEquals(len(br.pending_merges()), 0)
13
merge(['.', -1], [None, None])
14
self.assertEquals(len(br.pending_merges()), 0)
16
def test_nocommits(self):
19
br2 = Branch.initialize('branch2')
20
self.assertRaises(NoCommits, merge, ['branch2', -1],
24
def test_unrelated(self):
25
br2 = self.test_nocommits()
27
merge, ['branch2', -1], [None, None]
28
self.assertRaises(UnrelatedBranches, merge, ['branch2', -1],