def __init__(self, repo_path, create=False, baseui=None, src_url=None,
                 update_after_clone=False):

        if not isinstance(repo_path, str):
            raise VCSError('Mercurial backend requires repository path to '
                           'be instance of <str> got %s instead' %
                           type(repo_path))

        self.path = abspath(repo_path)
        self.baseui = baseui or ui.ui()
        # We've set path and ui, now we can set _repo itself
        self._repo = self._get_repo(create, src_url, update_after_clone)
Raises RepositoryError if repository could not be find at the given
dataset/ETHPy150Open codeinn/vcs/vcs/backends/hg/repository.py/MercurialRepository.__init__