~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Aaron Bentley
  • Date: 2008-04-03 21:42:29 UTC
  • mto: (3242.3.25 stacking-policy)
  • mto: This revision was merged to the branch mainline in revision 3538.
  • Revision ID: aaron@aaronbentley.com-20080403214229-typa8zw009rgh4ya
Implement stacking for clone_on_transport

Show diffs side-by-side

added added

removed removed

Lines of Context:
468
468
        repo_policy = child_bzrdir.determine_repository_policy()
469
469
        self.assertEqual('http://example.org', repo_policy._stack_on)
470
470
 
 
471
    def test_clone_on_transport_obeys_stacking_policy(self):
 
472
        parent_bzrdir = self.make_bzrdir('.')
 
473
        child_branch = self.make_branch('child', format='development1')
 
474
        parent_bzrdir.get_config().set_option('child',
 
475
                                              'default_stack_on')
 
476
        new_child_transport = parent_bzrdir.transport.clone('child2')
 
477
        new_child = child_branch.bzrdir.clone_on_transport(new_child_transport)
 
478
        self.assertEqual('child',
 
479
                         new_child.open_branch().get_stacked_on())
 
480
 
471
481
 
472
482
class ChrootedTests(TestCaseWithTransport):
473
483
    """A support class that provides readonly urls outside the local namespace.