Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 13827:f1823b9f073b
url: nuke some newly-introduced underbars in identifiers
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 31 Mar 2011 10:43:53 -0500 |
parents | cc383142e738 |
children | 9f97de157aad |
comparison
equal
deleted
inserted
replaced
13826:e574207e3bcd | 13827:f1823b9f073b |
---|---|
109 if '%%' in p: | 109 if '%%' in p: |
110 self.warn(_("(deprecated '%%' in path %s=%s from %s)\n") | 110 self.warn(_("(deprecated '%%' in path %s=%s from %s)\n") |
111 % (n, p, self.configsource('paths', n))) | 111 % (n, p, self.configsource('paths', n))) |
112 p = p.replace('%%', '%') | 112 p = p.replace('%%', '%') |
113 p = util.expandpath(p) | 113 p = util.expandpath(p) |
114 if not url.has_scheme(p) and not os.path.isabs(p): | 114 if not url.hasscheme(p) and not os.path.isabs(p): |
115 p = os.path.normpath(os.path.join(root, p)) | 115 p = os.path.normpath(os.path.join(root, p)) |
116 c.set("paths", n, p) | 116 c.set("paths", n, p) |
117 | 117 |
118 if section in (None, 'ui'): | 118 if section in (None, 'ui'): |
119 # update ui options | 119 # update ui options |
323 user = util.shortuser(user) | 323 user = util.shortuser(user) |
324 return user | 324 return user |
325 | 325 |
326 def expandpath(self, loc, default=None): | 326 def expandpath(self, loc, default=None): |
327 """Return repository location relative to cwd or from [paths]""" | 327 """Return repository location relative to cwd or from [paths]""" |
328 if url.has_scheme(loc) or os.path.isdir(os.path.join(loc, '.hg')): | 328 if url.hasscheme(loc) or os.path.isdir(os.path.join(loc, '.hg')): |
329 return loc | 329 return loc |
330 | 330 |
331 path = self.config('paths', loc) | 331 path = self.config('paths', loc) |
332 if not path and default is not None: | 332 if not path and default is not None: |
333 path = self.config('paths', default) | 333 path = self.config('paths', default) |