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.
--- a/mercurial/localrepo.py Tue Nov 07 22:18:34 2006 +0100
+++ b/mercurial/localrepo.py Tue Nov 07 22:35:07 2006 +0100
@@ -43,7 +43,7 @@
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)