~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_repository_chk/test_supported.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-06 22:44:57 UTC
  • mfrom: (6436 +trunk)
  • mto: (6437.3.11 2.5)
  • mto: This revision was merged to the branch mainline in revision 6444.
  • Revision ID: jelmer@samba.org-20120106224457-re0pcy0fz31xob77
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    osutils,
23
23
    repository,
24
24
    )
 
25
from bzrlib.remote import RemoteRepository
25
26
from bzrlib.versionedfile import VersionedFiles
 
27
from bzrlib.tests import TestNotApplicable
26
28
from bzrlib.tests.per_repository_chk import TestCaseWithRepositoryCHK
27
29
 
28
30
 
221
223
        # check our setup: B-id and C-id should have identical chk root keys.
222
224
        inv_b = b.repository.get_inventory('B-id')
223
225
        inv_c = b.repository.get_inventory('C-id')
224
 
        self.assertEqual(inv_b.id_to_entry.key(), inv_c.id_to_entry.key())
 
226
        if not isinstance(repo, RemoteRepository):
 
227
            # Remote repositories always return plain inventories
 
228
            self.assertEqual(inv_b.id_to_entry.key(), inv_c.id_to_entry.key())
225
229
        # Now, manually insert objects for a stacked repo with only revision
226
230
        # C-id:
227
231
        # We need ('revisions', 'C-id'), ('inventories', 'C-id'),
250
254
        for a parent inventory of a new revision is missing.
251
255
        """
252
256
        repo = self.make_repository('damaged-repo')
 
257
        if isinstance(repo, RemoteRepository):
 
258
            raise TestNotApplicable(
 
259
                "Unable to obtain CHKInventory from remote repo")
253
260
        b = self.make_branch_with_multiple_chk_nodes()
254
261
        src_repo = b.repository
255
262
        src_repo.lock_read()
293
300
        for a parent inventory of a new revision is missing.
294
301
        """
295
302
        repo = self.make_repository('damaged-repo')
 
303
        if isinstance(repo, RemoteRepository):
 
304
            raise TestNotApplicable(
 
305
                "Unable to obtain CHKInventory from remote repo")
296
306
        b = self.make_branch_with_multiple_chk_nodes()
297
307
        b.lock_read()
298
308
        self.addCleanup(b.unlock)