/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Robert Collins
  • Date: 2009-03-13 04:36:06 UTC
  • mfrom: (4105 +trunk)
  • mto: (4104.5.1 prepare-1.13)
  • mto: This revision was merged to the branch mainline in revision 4160.
  • Revision ID: robertc@robertcollins.net-20090313043606-7ibht1zuuhww2sn2
Cherrypick bugfixes from bzr.dev for 1.13:

4142: Fix performance regression (many small round-trips) when pushing to
a remote pack, and improve some tests.

4129: Fix bug when pushing stackable branch in unstackable repo to
default-stacking target.

4121: Remove __del__ from LockableFiles.

4117: Handle inconsistent inventories in fetch more robustly.

4105: Report network activity for bzr+ssh:// and bzr:// connections.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
from bzrlib.transport.memory import MemoryServer
60
60
from bzrlib.transport.nosmart import NoSmartTransportDecorator
61
61
from bzrlib.transport.readonly import ReadonlyTransportDecorator
62
 
from bzrlib.repofmt import knitrepo, weaverepo
 
62
from bzrlib.repofmt import knitrepo, weaverepo, pack_repo
63
63
 
64
64
 
65
65
class TestDefaultFormat(TestCase):
466
466
        self.assertEqual(child_branch.base,
467
467
                         new_child.open_branch().get_stacked_on_url())
468
468
 
 
469
    def test_default_stacking_with_stackable_branch_unstackable_repo(self):
 
470
        # Make stackable source branch with an unstackable repo format.
 
471
        source_bzrdir = self.make_bzrdir('source')
 
472
        pack_repo.RepositoryFormatKnitPack1().initialize(source_bzrdir)
 
473
        source_branch = bzrlib.branch.BzrBranchFormat7().initialize(source_bzrdir)
 
474
        # Make a directory with a default stacking policy
 
475
        parent_bzrdir = self.make_bzrdir('parent')
 
476
        stacked_on = self.make_branch('parent/stacked-on', format='pack-0.92')
 
477
        parent_bzrdir.get_config().set_default_stack_on(stacked_on.base)
 
478
        # Clone source into directory
 
479
        target = source_bzrdir.clone(self.get_url('parent/target'))
 
480
 
469
481
    def test_sprout_obeys_stacking_policy(self):
470
482
        child_branch, new_child_transport = self.prepare_default_stacking()
471
483
        new_child = child_branch.bzrdir.sprout(new_child_transport.base)