##// END OF EJS Templates
hg.openpath: use url.islocal to tell if the path is local (issue3624)...
Siddharth Agarwal -
r20354:b433b433 stable
parent child Browse files
Show More
@@ -92,8 +92,9 b' def islocal(repo):'
92
92
93 def openpath(ui, path):
93 def openpath(ui, path):
94 '''open path with open if local, url.open if remote'''
94 '''open path with open if local, url.open if remote'''
95 if islocal(path):
95 pathurl = util.url(path, parsequery=False, parsefragment=False)
96 return util.posixfile(util.urllocalpath(path), 'rb')
96 if pathurl.islocal():
97 return util.posixfile(pathurl.localpath(), 'rb')
97 else:
98 else:
98 return url.open(ui, path)
99 return url.open(ui, path)
99
100
General Comments 0
You need to be logged in to leave comments. Login now