~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Patch Queue Manager
  • Date: 2012-02-22 13:39:51 UTC
  • mfrom: (6470.1.1 less-inventory-use-2)
  • Revision ID: pqm@pqm.ubuntu.com-20120222133951-cqvnnx710wox7905
(jelmer) Use inventories directly in fewer places. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1174
1174
    @needs_read_lock
1175
1175
    def verify_revision_signature(self, revision_id, gpg_strategy):
1176
1176
        """Verify the signature on a revision.
1177
 
 
 
1177
        
1178
1178
        :param revision_id: the revision to verify
1179
1179
        :gpg_strategy: the GPGStrategy object to used
1180
 
 
 
1180
        
1181
1181
        :return: gpg.SIGNATURE_VALID or a failed SIGNATURE_ value
1182
1182
        """
1183
1183
        if not self.has_signature_for_revision_id(revision_id):
1189
1189
 
1190
1190
        return gpg_strategy.verify(signature, plaintext)
1191
1191
 
1192
 
    @needs_read_lock
1193
 
    def verify_revision_signatures(self, revision_ids, gpg_strategy):
1194
 
        """Verify revision signatures for a number of revisions.
1195
 
 
1196
 
        :param revision_id: the revision to verify
1197
 
        :gpg_strategy: the GPGStrategy object to used
1198
 
        :return: Iterator over tuples with revision id, result and keys
1199
 
        """
1200
 
        for revid in revision_ids:
1201
 
            (result, key) = self.verify_revision_signature(revid, gpg_strategy)
1202
 
            yield revid, result, key
1203
 
 
1204
1192
    def has_signature_for_revision_id(self, revision_id):
1205
1193
        """Query for a revision signature for revision_id in the repository."""
1206
1194
        raise NotImplementedError(self.has_signature_for_revision_id)