2
2
from bzrlib.commit import commit
3
3
from bzrlib.selftest import TestCaseInTempDir
4
4
from bzrlib.merge import merge
5
from bzrlib.errors import UnrelatedBranches, NoCommits
5
7
class TestMerge(TestCaseInTempDir):
6
8
"""Test appending more than one revision"""
7
9
def test_pending(self):
8
br = Branch(".", init=True)
10
br = Branch.initialize(".")
10
12
self.assertEquals(len(br.pending_merges()), 0)
11
13
merge(['.', -1], [None, None])
12
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],