~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_rmbranch.py

  • Committer: Patch Queue Manager
  • Date: 2012-03-06 16:45:45 UTC
  • mfrom: (6437.40.2 rmbranch-colo)
  • Revision ID: pqm@pqm.ubuntu.com-20120306164545-6i5cyyfxctiwq11p
(jelmer) Support removing colocated branches in 'bzr rmbranch'. (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
 
63
63
    def test_remove_colo(self):
64
64
        # Remove a colocated branch.
65
 
        tree = self.example_branch('a', format='development-colo')
 
65
        tree = self.example_branch('a')
66
66
        tree.bzrdir.create_branch(name="otherbranch")
67
67
        self.assertTrue(tree.bzrdir.has_branch('otherbranch'))
68
68
        self.run_bzr('rmbranch %s,branch=otherbranch' % tree.bzrdir.user_url)
70
70
        self.assertFalse(dir.has_branch('otherbranch'))
71
71
        self.assertTrue(dir.has_branch())
72
72
 
 
73
    def test_remove_colo_directory(self):
 
74
        # Remove a colocated branch.
 
75
        tree = self.example_branch('a')
 
76
        tree.bzrdir.create_branch(name="otherbranch")
 
77
        self.assertTrue(tree.bzrdir.has_branch('otherbranch'))
 
78
        self.run_bzr('rmbranch otherbranch -d %s' % tree.bzrdir.user_url)
 
79
        dir = bzrdir.BzrDir.open('a')
 
80
        self.assertFalse(dir.has_branch('otherbranch'))
 
81
        self.assertTrue(dir.has_branch())
 
82
 
73
83
 
74
84
class TestSmartServerRemoveBranch(TestCaseWithTransport):
75
85
 
83
93
        # being too low. If rpc_count increases, more network roundtrips have
84
94
        # become necessary for this use case. Please do not adjust this number
85
95
        # upwards without agreement from bzr's network support maintainers.
86
 
        self.assertLength(2, self.hpss_calls)
 
96
        self.assertLength(5, self.hpss_calls)
87
97
        self.assertLength(1, self.hpss_connections)
88
98
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)