~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Patch Queue Manager
  • Date: 2011-09-08 11:01:15 UTC
  • mfrom: (6123.1.16 gpg-typo)
  • Revision ID: pqm@cupuasso-20110908110115-gbb9benwkdksvzk5
(jelmer) Fix a typo (invalid format identifier) in an error message in
 bzrlib.gpg. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
513
513
        # Clone source into directory
514
514
        target = source_bzrdir.clone(self.get_url('parent/target'))
515
515
 
516
 
    def test_format_initialize_on_transport_ex_stacked_on(self):
517
 
        # trunk is a stackable format.  Note that its in the same server area
518
 
        # which is what launchpad does, but not sufficient to exercise the
519
 
        # general case.
520
 
        trunk = self.make_branch('trunk', format='1.9')
521
 
        t = self.get_transport('stacked')
522
 
        old_fmt = bzrdir.format_registry.make_bzrdir('pack-0.92')
523
 
        repo_name = old_fmt.repository_format.network_name()
524
 
        # Should end up with a 1.9 format (stackable)
525
 
        repo, control, require_stacking, repo_policy = \
526
 
            old_fmt.initialize_on_transport_ex(t,
527
 
                    repo_format_name=repo_name, stacked_on='../trunk',
528
 
                    stack_on_pwd=t.base)
529
 
        if repo is not None:
530
 
            # Repositories are open write-locked
531
 
            self.assertTrue(repo.is_write_locked())
532
 
            self.addCleanup(repo.unlock)
533
 
        else:
534
 
            repo = control.open_repository()
535
 
        self.assertIsInstance(control, bzrdir.BzrDir)
536
 
        opened = bzrdir.BzrDir.open(t.base)
537
 
        if not isinstance(old_fmt, remote.RemoteBzrDirFormat):
538
 
            self.assertEqual(control._format.network_name(),
539
 
                old_fmt.network_name())
540
 
            self.assertEqual(control._format.network_name(),
541
 
                opened._format.network_name())
542
 
        self.assertEqual(control.__class__, opened.__class__)
543
 
        self.assertLength(1, repo._fallback_repositories)
544
 
 
545
516
    def test_sprout_obeys_stacking_policy(self):
546
517
        child_branch, new_child_transport = self.prepare_default_stacking()
547
518
        new_child = child_branch.bzrdir.sprout(new_child_transport.base)
1397
1368
        self._transport.put_bytes("a.~1~", "some content")
1398
1369
        self.assertEqual("a.~2~", self._bzrdir._available_backup_name("a"))
1399
1370
 
1400
 
 
1401
 
class TestMeta1DirColoFormat(TestCaseWithTransport):
1402
 
    """Tests specific to the meta1 dir with colocated branches format."""
1403
 
 
1404
 
    def test_supports_colo(self):
1405
 
        format = bzrdir.BzrDirMetaFormat1Colo()
1406
 
        self.assertTrue(format.colocated_branches)