comparison mercurial/hg.py @ 6165:0d36de68669c

Allow "file://localhost/" in addition to "file:///" (issue728) file://localhost/ URLs are generated by Mac OS X API calls like [NSURL fileURLWithPath:]. Imported patch from Paul Bx.
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 22 Feb 2008 21:58:15 +0100
parents 152b6c5c1574
children f89fd07fc51d
comparison
equal deleted inserted replaced
6164:0c2b443fb3c3 6165:0d36de68669c
117 if dest is None: 117 if dest is None:
118 dest = defaultdest(source) 118 dest = defaultdest(source)
119 ui.status(_("destination directory: %s\n") % dest) 119 ui.status(_("destination directory: %s\n") % dest)
120 120
121 def localpath(path): 121 def localpath(path):
122 if path.startswith('file://localhost/'):
123 return path[16:]
122 if path.startswith('file://'): 124 if path.startswith('file://'):
123 return path[7:] 125 return path[7:]
124 if path.startswith('file:'): 126 if path.startswith('file:'):
125 return path[5:] 127 return path[5:]
126 return path 128 return path