def _get_object_info_from_revision(revision, known_type):
  """ returns type and id of the searched object, if we have one part of
  the relationship known.
  """
  object_type = revision.destination_type \
      if revision.source_type == known_type \
      else revision.source_type
  object_id = revision.destination_id if \
      revision.source_type == known_type \
      else revision.source_id
  return object_type, object_id