/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 brzlib/tests/blackbox/test_branches.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 12:41:27 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521124127-iv8etg0vwymyai6y
s/bzr/brz/ in apport config.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
 
"""Black-box tests for brz branches."""
 
18
"""Black-box tests for bzr branches."""
19
19
 
20
 
from breezy.bzr.bzrdir import BzrDir
21
 
from breezy.tests import TestCaseWithTransport
 
20
from brzlib.bzrdir import BzrDir
 
21
from brzlib.tests import TestCaseWithTransport
22
22
 
23
23
 
24
24
class TestBranches(TestCaseWithTransport):
32
32
 
33
33
    def test_no_branch(self):
34
34
        # Listing the branches in a control directory without branches.
35
 
        self.run_bzr('init-shared-repo a')
 
35
        self.run_bzr('init-repo a')
36
36
        out, err = self.run_bzr('branches a')
37
37
        self.assertEqual(out, "")
38
38
 
39
39
    def test_default_current_dir(self):
40
 
        # "brz branches" list the branches in the current directory
 
40
        # "bzr branches" list the branches in the current directory
41
41
        # if no location was specified.
42
 
        self.run_bzr('init-shared-repo a')
 
42
        self.run_bzr('init-repo a')
43
43
        out, err = self.run_bzr('branches', working_dir='a')
44
44
        self.assertEqual(out, "")
45
45
 
62
62
 
63
63
    def test_indicates_non_branch(self):
64
64
        t = self.make_branch_and_tree('a', format='development-colo')
65
 
        t.controldir.create_branch(name='another')
66
 
        t.controldir.create_branch(name='colocated')
 
65
        t.bzrdir.create_branch(name='another')
 
66
        t.bzrdir.create_branch(name='colocated')
67
67
        out, err = self.run_bzr('branches a')
68
68
        self.assertEqual(out, "* (default)\n"
69
 
                              "  another\n"
70
 
                              "  colocated\n")
 
69
                               "  another\n"
 
70
                               "  colocated\n")
71
71
 
72
72
    def test_indicates_branch(self):
73
73
        t = self.make_repository('a', format='development-colo')
74
 
        t.controldir.create_branch(name='another')
75
 
        branch = t.controldir.create_branch(name='colocated')
76
 
        t.controldir.set_branch_reference(target_branch=branch)
 
74
        t.bzrdir.create_branch(name='another')
 
75
        branch = t.bzrdir.create_branch(name='colocated')
 
76
        t.bzrdir.set_branch_reference(target_branch=branch)
77
77
        out, err = self.run_bzr('branches a')
78
78
        self.assertEqual(out, "  another\n"
79
 
                              "* colocated\n")
 
79
                               "* colocated\n")
80
80
 
81
81
    def test_shared_repos(self):
82
82
        self.make_repository('a', shared=True)
85
85
        b.create_checkout(lightweight=True, to_location='b')
86
86
        out, err = self.run_bzr('branches b')
87
87
        self.assertEqual(out, "  branch1\n"
88
 
                              "* branch2\n")
 
88
                               "* branch2\n")
89
89
 
90
90
    def test_standalone_branch(self):
91
91
        self.make_branch('a')