Mercurial > hg-stable
changeset 3623:44247ecc2965
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.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 07 Nov 2006 22:35:07 +0100 |
parents | 535da78ae47b |
children | a90a86929d04 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)