code: def open(path, vcs=None):
      
      import os
      assert os.path.isdir(path), path + ' is not a directory'
      vcs = vcs or probe(path)
      cls = _get_repo_class(vcs)
      return cls(path)
docs: Open an existing repository
  
      :param str path: The path of the repository
      :param vcs: If specified, assume the given repository type to avoid
                  auto-detection. Either ``git``, ``hg``, or ``svn``.
      :raises UnknownVCSType: if the repository type couldn't be inferred
  
      If ``vcs`` is not specified, it is inferred via :func:`probe`.