def get_vcs_root():
for vcs in (git, hg):<EOL><INDENT>repo_root = vcs.repository_root()<EOL>if repo_root:<EOL><INDENT>return vcs, repo_root<EOL><DEDENT><DEDENT>return (None, None)<EOL>
Returns the vcs module and the root of the repo.

    Returns:
      A tuple containing the vcs module to use (git, hg) and the root of the
      repository. If no repository exisits then (None, None) is returned.