Mercurial > hg
comparison mercurial/localrepo.py @ 15381:c519cd8f0169 stable
backout dbdb777502dc (issue3077) (issue3071)
Using util.realpath turns out to create complex issues on both Mac and
Windows. Back this change out for the release.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 29 Oct 2011 11:02:23 -0500 |
parents | dbdb777502dc |
children | e27561eb4a76 b8d8599410da |
comparison
equal
deleted
inserted
replaced
15380:a53888685a6c | 15381:c519cd8f0169 |
---|---|
26 supported = supportedformats | set(('store', 'fncache', 'shared', | 26 supported = supportedformats | set(('store', 'fncache', 'shared', |
27 'dotencode')) | 27 'dotencode')) |
28 | 28 |
29 def __init__(self, baseui, path=None, create=False): | 29 def __init__(self, baseui, path=None, create=False): |
30 repo.repository.__init__(self) | 30 repo.repository.__init__(self) |
31 self.root = util.realpath(util.expandpath(path)) | 31 self.root = os.path.realpath(util.expandpath(path)) |
32 self.path = os.path.join(self.root, ".hg") | 32 self.path = os.path.join(self.root, ".hg") |
33 self.origroot = path | 33 self.origroot = path |
34 self.auditor = scmutil.pathauditor(self.root, self._checknested) | 34 self.auditor = scmutil.pathauditor(self.root, self._checknested) |
35 self.opener = scmutil.opener(self.path) | 35 self.opener = scmutil.opener(self.path) |
36 self.wopener = scmutil.opener(self.root) | 36 self.wopener = scmutil.opener(self.root) |
77 raise | 77 raise |
78 requirements = set() | 78 requirements = set() |
79 | 79 |
80 self.sharedpath = self.path | 80 self.sharedpath = self.path |
81 try: | 81 try: |
82 s = util.realpath(self.opener.read("sharedpath").rstrip('\n')) | 82 s = os.path.realpath(self.opener.read("sharedpath").rstrip('\n')) |
83 if not os.path.exists(s): | 83 if not os.path.exists(s): |
84 raise error.RepoError( | 84 raise error.RepoError( |
85 _('.hg/sharedpath points to nonexistent directory %s') % s) | 85 _('.hg/sharedpath points to nonexistent directory %s') % s) |
86 self.sharedpath = s | 86 self.sharedpath = s |
87 except IOError, inst: | 87 except IOError, inst: |