/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: 2017-07-20 00:00:04 UTC
  • mfrom: (6690.5.2 bundle-guess)
  • Revision ID: jelmer@jelmer.uk-20170720000004-wlknc5gthdk3tokn
Merge lp:~jelmer/brz/bundle-guess.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
import os
18
18
 
19
 
from bzrlib.tests import TestCaseWithTransport
20
 
from bzrlib.workingtree import WorkingTree
21
 
from bzrlib.branch import Branch
22
 
 
 
19
from breezy.tests import TestCaseWithTransport
23
20
 
24
21
class TestAncestry(TestCaseWithTransport):
25
22
 
29
26
        a_wt.add('foo')
30
27
        a_wt.commit('added foo',rev_id='A1')
31
28
 
32
 
        b_wt = a_wt.bzrdir.sprout('B').open_workingtree()
 
29
        b_wt = a_wt.controldir.sprout('B').open_workingtree()
33
30
        self.build_tree_contents([('B/foo', '1111\n22\n')])
34
31
        b_wt.commit('modified B/foo',rev_id='B1')
35
32
 
71
68
 
72
69
        self.make_repository('repo', shared=True)
73
70
 
74
 
        a_tree.bzrdir.sprout('repo/A')
 
71
        a_tree.controldir.sprout('repo/A')
75
72
        self._check_ancestry('repo/A')
76
73
 
77
74
    def test_ancestry_with_checkout(self):
79
76
        checkout of a repository branch."""
80
77
        a_tree = self._build_branches()[0]
81
78
        self.make_repository('repo', shared=True)
82
 
        repo_branch = a_tree.bzrdir.sprout('repo/A').open_branch()
 
79
        repo_branch = a_tree.controldir.sprout('repo/A').open_branch()
83
80
        repo_branch.create_checkout('A-checkout')
84
81
        self._check_ancestry('A-checkout')
85
82
 
88
85
        lightweight checkout of a repository branch."""
89
86
        a_tree = self._build_branches()[0]
90
87
        self.make_repository('repo', shared=True)
91
 
        repo_branch = a_tree.bzrdir.sprout('repo/A').open_branch()
 
88
        repo_branch = a_tree.controldir.sprout('repo/A').open_branch()
92
89
        repo_branch.create_checkout('A-checkout', lightweight=True)
93
90
        self._check_ancestry('A-checkout')
94
91
 
97
94
        checkout of a repository branch with a shortened revision history."""
98
95
        a_tree = self._build_branches()[0]
99
96
        self.make_repository('repo', shared=True)
100
 
        repo_branch = a_tree.bzrdir.sprout('repo/A').open_branch()
 
97
        repo_branch = a_tree.controldir.sprout('repo/A').open_branch()
101
98
        repo_branch.create_checkout('A-checkout',
102
99
                                    revision_id=repo_branch.get_rev_id(2))
103
100
        self._check_ancestry('A-checkout', "A1\nA2\n")
107
104
        checkout of a repository branch with a shortened revision history."""
108
105
        a_tree = self._build_branches()[0]
109
106
        self.make_repository('repo', shared=True)
110
 
        repo_branch = a_tree.bzrdir.sprout('repo/A').open_branch()
 
107
        repo_branch = a_tree.controldir.sprout('repo/A').open_branch()
111
108
        repo_branch.create_checkout('A-checkout',
112
109
                                    revision_id=repo_branch.get_rev_id(2),
113
110
                                    lightweight=True)