Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 15355:dbdb777502dc stable
consistency: use util.realpath instead of os.path.realpath where useful
exceptions:
hg: os.path.realpath used before util can be imported
tests/run-tests.py: may not import mercurial modules
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 24 Oct 2011 13:51:24 +0200 |
parents | c681e478c429 |
children | c519cd8f0169 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Oct 24 13:54:59 2011 +0200 +++ b/mercurial/localrepo.py Mon Oct 24 13:51:24 2011 +0200 @@ -28,7 +28,7 @@ def __init__(self, baseui, path=None, create=False): repo.repository.__init__(self) - self.root = os.path.realpath(util.expandpath(path)) + self.root = util.realpath(util.expandpath(path)) self.path = os.path.join(self.root, ".hg") self.origroot = path self.auditor = scmutil.pathauditor(self.root, self._checknested) @@ -79,7 +79,7 @@ self.sharedpath = self.path try: - s = os.path.realpath(self.opener.read("sharedpath").rstrip('\n')) + s = util.realpath(self.opener.read("sharedpath").rstrip('\n')) if not os.path.exists(s): raise error.RepoError( _('.hg/sharedpath points to nonexistent directory %s') % s)