~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-11-26 21:33:20 UTC
  • mfrom: (3015.2.15 pack.read-locks)
  • Revision ID: pqm@pqm.ubuntu.com-20071126213320-adxxra3gsie5inhw
(robertc) Many fixes to support packs on the smart server and as the
        default format. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
 
98
98
        rev = b2.repository.get_revision('revision-1')
99
99
        tree = b2.repository.revision_tree('revision-1')
 
100
        tree.lock_read()
 
101
        self.addCleanup(tree.unlock)
100
102
        self.assertEqual(tree.get_file_text('foo-id'), 'hello')
101
103
 
102
104
    def test_get_revision_delta(self):
262
264
    def test_store_signature(self):
263
265
        wt = self.make_branch_and_tree('.')
264
266
        branch = wt.branch
265
 
        branch.repository.store_revision_signature(
266
 
            gpg.LoopbackGPGStrategy(None), 'FOO', 'A')
 
267
        branch.lock_write()
 
268
        try:
 
269
            branch.repository.start_write_group()
 
270
            try:
 
271
                branch.repository.store_revision_signature(
 
272
                    gpg.LoopbackGPGStrategy(None), 'FOO', 'A')
 
273
            except:
 
274
                branch.repository.abort_write_group()
 
275
                raise
 
276
            else:
 
277
                branch.repository.commit_write_group()
 
278
        finally:
 
279
            branch.unlock()
267
280
        self.assertRaises(errors.NoSuchRevision,
268
281
                          branch.repository.has_signature_for_revision_id,
269
282
                          'A')