~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge with extras

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        target_stat = os.stat('target/file1')
98
98
        self.assertEqual(source_stat, target_stat)
99
99
 
 
100
class TestBranchStacked(ExternalBase):
 
101
    """Tests for branch --stacked"""
 
102
 
100
103
    def check_shallow_branch(self, branch_revid, stacked_on):
101
104
        """Assert that the branch 'newbranch' has been published correctly.
102
105
        
153
156
        self.assertEqual('', out)
154
157
        self.assertEqual('Branched 1 revision(s).\n',
155
158
            err)
 
159
        # it should have preserved the branch format, and so it should be
 
160
        # capable of supporting stacking, but not actually have a stacked_on
 
161
        # branch configured
156
162
        self.assertRaises(errors.NotStacked,
157
163
            bzrdir.BzrDir.open('newbranch').open_branch().get_stacked_on_url)
158
164
 
207
213
        out, err = self.run_bzr(
208
214
            ['branch', '--stacked', self.get_url('mainline'), 'shallow'])
209
215
 
 
216
    def test_branch_stacked_from_non_stacked_format(self):
 
217
        """The origin format doesn't support stacking"""
 
218
        trunk = self.make_branch('trunk', format='pack-0.92')
 
219
        out, err = self.run_bzr(
 
220
            ['branch', '--stacked', 'trunk', 'shallow'])
 
221
 
210
222
 
211
223
class TestRemoteBranch(TestCaseWithSFTPServer):
212
224