/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_ancestry.py

  • Committer: Jelmer Vernooij
  • Date: 2020-05-06 02:13:25 UTC
  • mfrom: (7490.7.21 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200506021325-awbmmqu1zyorz7sj
Merge 3.1 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from breezy.tests import TestCaseWithTransport
20
20
 
 
21
 
21
22
class TestAncestry(TestCaseWithTransport):
22
23
 
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')])
26
27
        a_wt.add('foo')
27
 
        a_wt.commit('added foo', rev_id='A1')
 
28
        a_wt.commit('added foo', rev_id=b'A1')
28
29
 
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')
32
33
 
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')
35
36
 
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')
39
40
        return a_wt, b_wt
40
41
 
41
42
    def _check_ancestry(self, location='', result=None):