def _get_prefix_and_full_hash(repo_data, kernel_partial_hash):
  """Find the prefix and full hash in the repo_data based on the partial."""
  kernel_partial_hash_lookup = 'u\'%s' % kernel_partial_hash
  for line in repo_data.splitlines():
    if kernel_partial_hash_lookup in line:
      prefix, full_hash = line.split(' ', 1)
      return prefix, full_hash.strip('u\'')

  return None, None