Show More
@@ -347,6 +347,15 b' def issvnurl(ui, url):' | |||||
347 | path = os.path.abspath(url) |
|
347 | path = os.path.abspath(url) | |
348 | if proto == b'file': |
|
348 | if proto == b'file': | |
349 | path = util.pconvert(path) |
|
349 | path = util.pconvert(path) | |
|
350 | elif proto in (b'http', 'https'): | |||
|
351 | if not encoding.isasciistr(path): | |||
|
352 | ui.warn( | |||
|
353 | _( | |||
|
354 | b"Subversion sources don't support non-ASCII characters in " | |||
|
355 | b"HTTP(S) URLs. Please percent-encode them.\n" | |||
|
356 | ) | |||
|
357 | ) | |||
|
358 | return False | |||
350 | check = protomap.get(proto, lambda *args: False) |
|
359 | check = protomap.get(proto, lambda *args: False) | |
351 | while b'/' in path: |
|
360 | while b'/' in path: | |
352 | if check(ui, path, proto): |
|
361 | if check(ui, path, proto): |
@@ -153,6 +153,16 b' Check tags are in UTF-8' | |||||
153 |
|
153 | |||
154 | $ cd .. |
|
154 | $ cd .. | |
155 |
|
155 | |||
|
156 | Subversion sources don't support non-ASCII characters in HTTP(S) URLs. | |||
|
157 | ||||
|
158 | $ XFF=$($PYTHON -c 'from mercurial.utils.procutil import stdout; stdout.write(b"\xff")') | |||
|
159 | $ hg convert --source-type=svn http://localhost:$HGPORT/$XFF test | |||
|
160 | initializing destination test repository | |||
|
161 | Subversion sources don't support non-ASCII characters in HTTP(S) URLs. Please percent-encode them. | |||
|
162 | http://localhost:$HGPORT/\xff does not look like a Subversion repository (esc) | |||
|
163 | abort: http://localhost:$HGPORT/\xff: missing or unsupported repository (esc) | |||
|
164 | [255] | |||
|
165 | ||||
156 | #if py3 |
|
166 | #if py3 | |
157 | For now, on Python 3, we abort when encountering non-UTF-8 percent-encoded |
|
167 | For now, on Python 3, we abort when encountering non-UTF-8 percent-encoded | |
158 | bytes in a filename. |
|
168 | bytes in a filename. |
General Comments 0
You need to be logged in to leave comments.
Login now