# HG changeset patch # User Thomas Arendsen Hein # Date 1162935307 -3600 # Node ID 44247ecc2965f46b5794e675bcc77961c604facf # Parent 535da78ae47b4a50adcd033195bea74ad913209f Fix accessing a repository via -R/--repository through a symlink. Sometimes the repository root was compared to os.getcwd(), which always uses the canonical path without symbolic links in it. This would changes self.root of the localrepo objects to always use os.sep as the directory separator, which is implicitly assumed in some places, but may not be the case if somebody uses -R foo/repo on windows. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -43,7 +43,7 @@ class localrepository(repo.repository): elif create: raise repo.RepoError(_("repository %s already exists") % path) - self.root = os.path.abspath(path) + self.root = os.path.realpath(path) self.origroot = path self.ui = ui.ui(parentui=parentui) self.opener = util.opener(self.path)