equal
deleted
inserted
replaced
101 except svn.core.SubversionException: |
101 except svn.core.SubversionException: |
102 # svn.client.url_from_path() fails with local repositories |
102 # svn.client.url_from_path() fails with local repositories |
103 pass |
103 pass |
104 if os.path.isdir(path): |
104 if os.path.isdir(path): |
105 path = os.path.normpath(os.path.abspath(path)) |
105 path = os.path.normpath(os.path.abspath(path)) |
106 if pycompat.osname == 'nt': |
106 if pycompat.iswindows: |
107 path = '/' + util.normpath(path) |
107 path = '/' + util.normpath(path) |
108 # Module URL is later compared with the repository URL returned |
108 # Module URL is later compared with the repository URL returned |
109 # by svn API, which is UTF-8. |
109 # by svn API, which is UTF-8. |
110 path = encoding.tolocal(path) |
110 path = encoding.tolocal(path) |
111 path = 'file://%s' % quote(path) |
111 path = 'file://%s' % quote(path) |
252 } |
252 } |
253 def issvnurl(ui, url): |
253 def issvnurl(ui, url): |
254 try: |
254 try: |
255 proto, path = url.split('://', 1) |
255 proto, path = url.split('://', 1) |
256 if proto == 'file': |
256 if proto == 'file': |
257 if (pycompat.osname == 'nt' and path[:1] == '/' |
257 if (pycompat.iswindows and path[:1] == '/' |
258 and path[1:2].isalpha() and path[2:6].lower() == '%3a/'): |
258 and path[1:2].isalpha() and path[2:6].lower() == '%3a/'): |
259 path = path[:2] + ':/' + path[6:] |
259 path = path[:2] + ':/' + path[6:] |
260 path = urlreq.url2pathname(path) |
260 path = urlreq.url2pathname(path) |
261 except ValueError: |
261 except ValueError: |
262 proto = 'file' |
262 proto = 'file' |