def _extract_url_and_sha_from_deps_entry(entry):
  """Split a DEPS file entry into a URL and git sha."""
  assert 'url' in entry and 'rev' in entry, 'Unexpected format: %s' % entry
  url = entry['url']
  sha = entry['rev']

  # Strip unnecessary ".git" from the URL where applicable.
  if url.endswith('.git'):
    url = url[:-len('.git')]

  return url, sha