diff -r 67b961a59678 -r d3be8955cb94 src/eric7/Plugins/VcsPlugins/vcsMercurial/hg.py --- a/src/eric7/Plugins/VcsPlugins/vcsMercurial/hg.py Wed Dec 21 11:47:29 2022 +0100 +++ b/src/eric7/Plugins/VcsPlugins/vcsMercurial/hg.py Thu Dec 22 09:34:33 2022 +0100 @@ -3024,7 +3024,7 @@ """ # find the root of the repo repodir = project.getProjectPath() - while not os.path.isdir(os.path.join(repodir, self.adminDir)): + while repodir and not os.path.isdir(os.path.join(repodir, self.adminDir)): repodir = os.path.dirname(repodir) if not repodir or os.path.splitdrive(repodir)[1] == os.sep: repodir = ""