~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

  • Committer: Aaron Bentley
  • Author(s): Jonathan Lange
  • Date: 2008-06-06 06:16:07 UTC
  • mto: (3242.3.25 stacking-policy)
  • mto: This revision was merged to the branch mainline in revision 3538.
  • Revision ID: aaron@aaronbentley.com-20080606061607-ffpsfhubfdip7w1y
Preserve stacking in clone

Show diffs side-by-side

added added

removed removed

Lines of Context:
346
346
        self.assertRaises(errors.UnstackableRepositoryFormat,
347
347
            branch.set_stacked_on, target.base)
348
348
 
 
349
    def test_clone_stacked_on_unstackable_repo(self):
 
350
        repo = self.make_repository('a', format='dirstate-tags')
 
351
        control = repo.bzrdir
 
352
        branch = _mod_branch.BzrBranchFormat7().initialize(control)
 
353
        # Calling clone should not raise UnstackableRepositoryFormat.
 
354
        cloned_bzrdir = control.clone('cloned')
 
355
 
349
356
    def _test_default_stacked_location(self):
350
357
        branch = self.make_branch('a', format=self.get_format_name())
351
358
        self.assertRaises(errors.NotStacked, branch.get_stacked_on)