750
751
"""Return a source for streaming from this repository."""
751
752
return RemoteStreamSource(self, to_format)
753
755
def has_revision(self, revision_id):
754
"""See Repository.has_revision()."""
755
if revision_id == NULL_REVISION:
756
# The null revision is always present.
758
path = self.bzrdir._path_for_remote_call(self._client)
759
response = self._call('Repository.has_revision', path, revision_id)
760
if response[0] not in ('yes', 'no'):
761
raise errors.UnexpectedSmartServerResponse(response)
762
if response[0] == 'yes':
764
for fallback_repo in self._fallback_repositories:
765
if fallback_repo.has_revision(revision_id):
756
"""True if this repository has a copy of the revision."""
757
# Copy of bzrlib.repository.Repository.has_revision
758
return revision_id in self.has_revisions((revision_id,))
769
761
def has_revisions(self, revision_ids):
770
"""See Repository.has_revisions()."""
771
# FIXME: This does many roundtrips, particularly when there are
772
# fallback repositories. -- mbp 20080905
774
for revision_id in revision_ids:
775
if self.has_revision(revision_id):
776
result.add(revision_id)
762
"""Probe to find out the presence of multiple revisions.
764
:param revision_ids: An iterable of revision_ids.
765
:return: A set of the revision_ids that were present.
767
# Copy of bzrlib.repository.Repository.has_revisions
768
parent_map = self.get_parent_map(revision_ids)
769
result = set(parent_map)
770
if _mod_revision.NULL_REVISION in revision_ids:
771
result.add(_mod_revision.NULL_REVISION)
779
774
def has_same_location(self, other):