/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_remote.py

  • Committer: Martin Pool
  • Date: 2008-09-15 09:42:16 UTC
  • mto: (3697.2.6 261315-into-1.7)
  • mto: This revision was merged to the branch mainline in revision 3710.
  • Revision ID: mbp@sourcefrog.net-20080915094216-g4cnw14q7m1u4n14
Disable RemoteBranch stacking, but get get_stacked_on_url working, and passing back exceptions

Show diffs side-by-side

added added

removed removed

Lines of Context:
1452
1452
        # make a branch stacked on another repository containing an empty
1453
1453
        # revision, then open it over hpss - we should be able to see that
1454
1454
        # revision.
 
1455
        raise tests.KnownFailure('bug 261315')
1455
1456
        base_transport = self.get_transport()
1456
1457
        base_builder = self.make_branch_builder('base', format='1.6')
1457
1458
        base_builder.start_series()
1469
1470
        # can get its branch and repository
1470
1471
        remote_branch = remote_bzrdir.open_branch()
1471
1472
        remote_repo = remote_branch.repository
1472
 
        # it should have an appropriate fallback repository, which should also
1473
 
        # be a RemoteRepository
1474
 
        self.assertEquals(len(remote_repo._fallback_repositories), 1)
1475
 
        self.assertIsInstance(remote_repo._fallback_repositories[0],
1476
 
            RemoteRepository)
1477
 
        # and it has the revision committed to the underlying repository;
1478
 
        # these have varying implementations so we try several of them
1479
 
        self.assertTrue(remote_repo.has_revisions([base_revid]))
1480
 
        self.assertTrue(remote_repo.has_revision(base_revid))
1481
 
        self.assertEqual(remote_repo.get_revision(base_revid).message,
1482
 
            'message')
 
1473
        remote_repo.lock_read()
 
1474
        try:
 
1475
            # it should have an appropriate fallback repository, which should also
 
1476
            # be a RemoteRepository
 
1477
            self.assertEquals(len(remote_repo._fallback_repositories), 1)
 
1478
            self.assertIsInstance(remote_repo._fallback_repositories[0],
 
1479
                RemoteRepository)
 
1480
            # and it has the revision committed to the underlying repository;
 
1481
            # these have varying implementations so we try several of them
 
1482
            self.assertTrue(remote_repo.has_revisions([base_revid]))
 
1483
            self.assertTrue(remote_repo.has_revision(base_revid))
 
1484
            self.assertEqual(remote_repo.get_revision(base_revid).message,
 
1485
                'message')
 
1486
        finally:
 
1487
            remote_repo.unlock()