~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store/__init__.py

  • Committer: Robert Collins
  • Date: 2005-10-16 08:29:16 UTC
  • mto: This revision was merged to the branch mainline in revision 1459.
  • Revision ID: robertc@lifelesslap.robertcollins.net-20051016082916-dae075fdf18af47e
unify has() implementations for TransportStore classes

Show diffs side-by-side

added added

removed removed

Lines of Context:
229
229
        except errors.NoSuchFile:
230
230
            raise KeyError(fileid)
231
231
 
232
 
    def _get(self, fn):
233
 
        return self._transport.get(fn)
 
232
    def has(self, fileids, pb=None):
 
233
        """Return True/False for each entry in fileids.
 
234
 
 
235
        :param fileids: A List or generator yielding file ids.
 
236
        :return: A generator or list returning True/False for each entry.
 
237
        """
 
238
        relpaths = (self._relpath(fid) for fid in fileids)
 
239
        return self._transport.has_multi(relpaths, pb=pb)
234
240
 
235
241
    def __init__(self, transport, prefixed=False):
236
242
        assert isinstance(transport, bzrlib.transport.Transport)