parameters: (repo)
docstring: Get top level local directory of a repository.
  
    :param repo:
      Repository instance.
    :type repo:
      :class:`git.Repo <git:git.repo.base.Repo>` or
      :class:`.Subversion.Repository`.
  
    :return: Absolute path to the repository local root.
    :rtype: :class:`str`
  
    :raises: :exc:`~exceptions.Exception` if the local root cannot be determined.
  
    This returns the local file system path to the top level of a repository
    working tree / working copy.
docstring_summary: Get top level local directory of a repository.
docstring_tokens: Get top level local directory of a repository .
function: def localRoot(repo):
    """Get top level local directory of a repository.
  
    :param repo:
      Repository instance.
    :type repo:
      :class:`git.Repo <git:git.repo.base.Repo>` or
      :class:`.Subversion.Repository`.
  
    :return: Absolute path to the repository local root.
    :rtype: :class:`str`
  
    :raises: :exc:`~exceptions.Exception` if the local root cannot be determined.
  
    This returns the local file system path to the top level of a repository
    working tree / working copy.
    """
  
    if hasattr(repo, "working_tree_dir"):
      return repo.working_tree_dir
  
    if hasattr(repo, "wc_root"):
      return repo.wc_root
  
    raise Exception("unable to determine repository local root")
function_tokens: def localRoot ( repo ) : if hasattr ( repo , "working_tree_dir" ) : return repo . working_tree_dir if hasattr ( repo , "wc_root" ) : return repo . wc_root raise Exception ( "unable to determine repository local root" )