##// END OF EJS Templates
url: use url.url in ui.expandpath()
Brodie Rao -
r13825:cc383142 default
parent child Browse files
Show More
@@ -7,7 +7,7 b''
7 7
8 8 from i18n import _
9 9 import errno, getpass, os, socket, sys, tempfile, traceback
10 import config, util, error
10 import config, util, error, url
11 11
12 12 class ui(object):
13 13 def __init__(self, src=None):
@@ -111,7 +111,7 b' class ui(object):'
111 111 % (n, p, self.configsource('paths', n)))
112 112 p = p.replace('%%', '%')
113 113 p = util.expandpath(p)
114 if '://' not in p and not os.path.isabs(p):
114 if not url.has_scheme(p) and not os.path.isabs(p):
115 115 p = os.path.normpath(os.path.join(root, p))
116 116 c.set("paths", n, p)
117 117
@@ -325,7 +325,7 b' class ui(object):'
325 325
326 326 def expandpath(self, loc, default=None):
327 327 """Return repository location relative to cwd or from [paths]"""
328 if "://" in loc or os.path.isdir(os.path.join(loc, '.hg')):
328 if url.has_scheme(loc) or os.path.isdir(os.path.join(loc, '.hg')):
329 329 return loc
330 330
331 331 path = self.config('paths', loc)
General Comments 0
You need to be logged in to leave comments. Login now