mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2026-05-07 04:46:24 +02:00
Ensure URL encoding of tilde when sanitizing refname
Fixes mnauw/git-remote-hg#44
This commit is contained in:
@@ -193,7 +193,9 @@ def gitref(ref):
|
||||
# standard url percentage encoding with a (legacy) twist:
|
||||
# ' ' -> '___'
|
||||
# '___' also percentage encoded
|
||||
return compat.urlquote(ref).replace(b'___', b'%5F%5F%5F').replace(b'%20', b'___')
|
||||
# python 3.6 considers ~ reserved, whereas python 3.7 no longer
|
||||
return compat.urlquote(ref).replace(b'___', b'%5F%5F%5F'). \
|
||||
replace(b'%20', b'___').replace(b'~', b'%7E')
|
||||
|
||||
def check_version(*check):
|
||||
if not hg_version:
|
||||
|
||||
Reference in New Issue
Block a user