~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/bzrdir_implementations/test_bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-03-06 00:49:26 UTC
  • mfrom: (1587.1.14 bound-branches)
  • Revision ID: pqm@pqm.ubuntu.com-20060306004926-6d7a10c990bc17d1
Merge in bound branches core support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
499
499
        dir = source.bzrdir
500
500
        target = dir.sprout(self.get_url('target'))
501
501
        self.assertNotEqual(dir.transport.base, target.transport.base)
502
 
        self.assertDirectoriesEqual(dir.root_transport, target.root_transport)
 
502
        self.assertDirectoriesEqual(dir.root_transport, target.root_transport,
 
503
                                    ['./.bzr/stat-cache',
 
504
                                     './.bzr/checkout/stat-cache',
 
505
                                     './.bzr/inventory',
 
506
                                     './.bzr/checkout/inventory',
 
507
                                     ])
503
508
 
504
509
    def test_sprout_bzrdir_branch_and_repo_shared(self):
505
510
        # sprouting a branch with a repo into a shared repo uses the shared
634
639
        target = dir.sprout(self.get_url('target'))
635
640
        self.assertNotEqual(dir.transport.base, target.transport.base)
636
641
        self.assertDirectoriesEqual(dir.root_transport, target.root_transport,
637
 
                                    ['./.bzr/stat-cache', './.bzr/checkout/stat-cache'])
 
642
                                    ['./.bzr/stat-cache',
 
643
                                     './.bzr/checkout/stat-cache',
 
644
                                     './.bzr/inventory',
 
645
                                     './.bzr/checkout/inventory',
 
646
                                     ])
638
647
 
639
648
    def test_sprout_bzrdir_tree_branch_reference(self):
640
649
        # sprouting should create a repository if needed and a sprouted branch.
641
 
        # the tree state should be copied.
 
650
        # the tree state should not be copied.
642
651
        referenced_branch = self.make_branch('referencced')
643
652
        dir = self.make_bzrdir('source')
644
653
        try:
648
657
            # this is ok too, not all formats have to support references.
649
658
            return
650
659
        self.assertRaises(errors.NoRepositoryPresent, dir.open_repository)
651
 
        dir.create_workingtree()
 
660
        tree = dir.create_workingtree()
 
661
        tree.bzrdir.root_transport.mkdir('subdir')
 
662
        tree.add('subdir')
652
663
        target = dir.sprout(self.get_url('target'))
653
664
        self.assertNotEqual(dir.transport.base, target.transport.base)
654
665
        # we want target to have a branch that is in-place.
656
667
        # and as we dont support repositories being detached yet, a repo in 
657
668
        # place
658
669
        target.open_repository()
659
 
        # we trust that the working tree sprouting works via the other tests.
660
 
        target.open_workingtree()
 
670
        result_tree = target.open_workingtree()
 
671
        self.assertFalse(result_tree.has_filename('subdir'))
661
672
 
662
673
    def test_sprout_bzrdir_tree_branch_reference_revision(self):
663
674
        # sprouting should create a repository if needed and a sprouted branch.
664
 
        # the tree state should be copied but the revision changed,
 
675
        # the tree state should not be copied but the revision changed,
665
676
        # and the likewise the new branch should be truncated too
666
677
        referenced_branch = self.make_branch('referencced')
667
678
        dir = self.make_bzrdir('source')