Show More
@@ -100,7 +100,7 b' class dirstate(object):' | |||
|
100 | 100 | files = [self._join('.hgignore')] |
|
101 | 101 | for name, path in self._ui.configitems("ui"): |
|
102 | 102 | if name == 'ignore' or name.startswith('ignore.'): |
|
103 |
files.append( |
|
|
103 | files.append(util.expandpath(path)) | |
|
104 | 104 | return ignore.ignore(self._root, files, self._ui.warn) |
|
105 | 105 | |
|
106 | 106 | @propertycache |
@@ -248,7 +248,7 b' def _parse(ui, args):' | |||
|
248 | 248 | args = aliasargs(i[0]) + args |
|
249 | 249 | defaults = ui.config("defaults", cmd) |
|
250 | 250 | if defaults: |
|
251 | args = shlex.split(defaults) + args | |
|
251 | args = map(util.expandpath, shlex.split(defaults)) + args | |
|
252 | 252 | c = list(i[1]) |
|
253 | 253 | else: |
|
254 | 254 | cmd = None |
@@ -477,8 +477,7 b' def _runcommand(ui, options, cmd, cmdfun' | |||
|
477 | 477 | output = ui.config('profiling', 'output') |
|
478 | 478 | |
|
479 | 479 | if output: |
|
480 |
path = |
|
|
481 | path = ui.expandpath(path) | |
|
480 | path = ui.expandpath(output) | |
|
482 | 481 | ostream = open(path, 'wb') |
|
483 | 482 | else: |
|
484 | 483 | ostream = sys.stderr |
@@ -30,7 +30,7 b' def find(name):' | |||
|
30 | 30 | |
|
31 | 31 | def loadpath(path, module_name): |
|
32 | 32 | module_name = module_name.replace('.', '_') |
|
33 |
path = |
|
|
33 | path = util.expandpath(path) | |
|
34 | 34 | if os.path.isdir(path): |
|
35 | 35 | # module/__init__.py style |
|
36 | 36 | d, f = os.path.split(path.rstrip('/')) |
@@ -198,10 +198,12 b' class ui(object):' | |||
|
198 | 198 | |
|
199 | 199 | def _path(self, loc): |
|
200 | 200 | p = self.config('paths', loc) |
|
201 |
if p |
|
|
202 | self.warn("(deprecated '%%' in path %s=%s from %s)\n" % | |
|
203 | (loc, p, self.configsource('paths', loc))) | |
|
204 | p = p.replace('%%', '%') | |
|
201 | if p: | |
|
202 | if '%%' in p: | |
|
203 | self.warn("(deprecated '%%' in path %s=%s from %s)\n" % | |
|
204 | (loc, p, self.configsource('paths', loc))) | |
|
205 | p = p.replace('%%', '%') | |
|
206 | p = util.expandpath(p) | |
|
205 | 207 | return p |
|
206 | 208 | |
|
207 | 209 | def expandpath(self, loc, default=None): |
@@ -1158,6 +1158,7 b' def rcpath():' | |||
|
1158 | 1158 | _rcpath = [] |
|
1159 | 1159 | for p in os.environ['HGRCPATH'].split(os.pathsep): |
|
1160 | 1160 | if not p: continue |
|
1161 | p = expandpath(p) | |
|
1161 | 1162 | if os.path.isdir(p): |
|
1162 | 1163 | for f, kind in osutil.listdir(p): |
|
1163 | 1164 | if f.endswith('.rc'): |
@@ -1250,3 +1251,6 b' def iterlines(iterator):' | |||
|
1250 | 1251 | for chunk in iterator: |
|
1251 | 1252 | for line in chunk.splitlines(): |
|
1252 | 1253 | yield line |
|
1254 | ||
|
1255 | def expandpath(path): | |
|
1256 | return os.path.expanduser(os.path.expandvars(path)) |
General Comments 0
You need to be logged in to leave comments.
Login now