~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/repository_implementations/test_repository.py

  • Committer: Robert Collins
  • Date: 2007-08-15 01:26:30 UTC
  • mfrom: (2698 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2741.
  • Revision ID: robertc@robertcollins.net-20070815012630-xqjtm5z2c4718n8s
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
263
263
        wt = self.make_branch_and_tree('source')
264
264
        wt.commit('A', allow_pointless=True, rev_id='A')
265
265
        repo = wt.branch.repository
 
266
        repo.lock_write()
 
267
        repo.start_write_group()
266
268
        repo.sign_revision('A', bzrlib.gpg.LoopbackGPGStrategy(None))
 
269
        repo.commit_write_group()
 
270
        repo.unlock()
267
271
        old_signature = repo.get_signature_text('A')
268
272
        try:
269
273
            old_format = bzrdir.BzrDirFormat.get_default_format()
604
608
        # a inventory with no parents and the revision has parents..
605
609
        # i.e. a ghost.
606
610
        repo = self.make_repository('inventory_with_unnecessary_ghost')
 
611
        repo.lock_write()
 
612
        repo.start_write_group()
607
613
        inv = Inventory(revision_id = 'ghost')
608
614
        inv.root.revision = 'ghost'
609
615
        sha1 = repo.add_inventory('ghost', inv, [])
630
636
        # check its setup usefully
631
637
        inv_weave = repo.get_inventory_weave()
632
638
        self.assertEqual(['ghost'], inv_weave.get_ancestry(['ghost']))
 
639
        repo.commit_write_group()
 
640
        repo.unlock()
633
641
 
634
642
    def test_corrupt_revision_access_asserts_if_reported_wrong(self):
635
643
        repo_url = self.get_url('inventory_with_unnecessary_ghost')