19
19
from breezy.tests import TestCaseWithTransport
21
22
class TestAncestry(TestCaseWithTransport):
23
24
def _build_branches(self):
24
25
a_wt = self.make_branch_and_tree('A')
25
self.build_tree_contents([('A/foo', '1111\n')])
26
self.build_tree_contents([('A/foo', b'1111\n')])
27
a_wt.commit('added foo', rev_id='A1')
28
a_wt.commit('added foo', rev_id=b'A1')
29
30
b_wt = a_wt.controldir.sprout('B').open_workingtree()
30
self.build_tree_contents([('B/foo', '1111\n22\n')])
31
b_wt.commit('modified B/foo', rev_id='B1')
31
self.build_tree_contents([('B/foo', b'1111\n22\n')])
32
b_wt.commit('modified B/foo', rev_id=b'B1')
33
self.build_tree_contents([('A/foo', '000\n1111\n')])
34
a_wt.commit('modified A/foo', rev_id='A2')
34
self.build_tree_contents([('A/foo', b'000\n1111\n')])
35
a_wt.commit('modified A/foo', rev_id=b'A2')
36
37
a_wt.merge_from_branch(b_wt.branch, b_wt.last_revision(),
37
b_wt.branch.get_rev_id(1))
38
a_wt.commit('merged B into A', rev_id='A3')
38
b_wt.branch.get_rev_id(1))
39
a_wt.commit('merged B into A', rev_id=b'A3')
41
42
def _check_ancestry(self, location='', result=None):