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, "")
39
39
def test_default_current_dir(self):
40
40
# "brz 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, "")
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"
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"
81
81
def test_shared_repos(self):
82
82
self.make_repository('a', shared=True)
83
ControlDir.create_branch_convenience('a/branch1')
84
b = ControlDir.create_branch_convenience('a/branch2')
83
BzrDir.create_branch_convenience('a/branch1')
84
b = BzrDir.create_branch_convenience('a/branch2')
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"
90
90
def test_standalone_branch(self):
91
91
self.make_branch('a')