comparison mercurial/localrepo.py @ 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 7d3d603e7df9
children cabe62800120
comparison
equal deleted inserted replaced
3622:535da78ae47b 3623:44247ecc2965
41 else: 41 else:
42 raise repo.RepoError(_("repository %s not found") % path) 42 raise repo.RepoError(_("repository %s not found") % path)
43 elif create: 43 elif create:
44 raise repo.RepoError(_("repository %s already exists") % path) 44 raise repo.RepoError(_("repository %s already exists") % path)
45 45
46 self.root = os.path.abspath(path) 46 self.root = os.path.realpath(path)
47 self.origroot = path 47 self.origroot = path
48 self.ui = ui.ui(parentui=parentui) 48 self.ui = ui.ui(parentui=parentui)
49 self.opener = util.opener(self.path) 49 self.opener = util.opener(self.path)
50 self.sopener = util.opener(self.path) 50 self.sopener = util.opener(self.path)
51 self.wopener = util.opener(self.root) 51 self.wopener = util.opener(self.root)