/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/repofmt/weaverepo.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-01-11 08:32:51 UTC
  • mfrom: (3172.3.3 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080111083251-et161scbblpkphri
(robertc) Add Repository.has_revisions as part of improving pull.
        (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
                        pending.add(revision_id)
177
177
            return result
178
178
 
 
179
    def has_revisions(self, revision_ids):
 
180
        """See Repository.has_revisions()."""
 
181
        result = set()
 
182
        transaction = self.get_transaction()
 
183
        for revision_id in revision_ids:
 
184
            if self._revision_store.has_revision_id(revision_id, transaction):
 
185
                result.add(revision_id)
 
186
        return result
 
187
 
179
188
    @needs_read_lock
180
189
    def is_shared(self):
181
190
        """AllInOne repositories cannot be shared."""
308
317
                        pending.add(revision_id)
309
318
            return result
310
319
 
 
320
    def has_revisions(self, revision_ids):
 
321
        """See Repository.has_revisions()."""
 
322
        result = set()
 
323
        transaction = self.get_transaction()
 
324
        for revision_id in revision_ids:
 
325
            if self._revision_store.has_revision_id(revision_id, transaction):
 
326
                result.add(revision_id)
 
327
        return result
 
328
 
311
329
    def revision_graph_can_have_wrong_parents(self):
312
330
        # XXX: This is an old format that we don't support full checking on, so
313
331
        # just claim that checking for this inconsistency is not required.