From 7b4bb7ff1d834c6f9b9e256371705ab5c6aee060 Mon Sep 17 00:00:00 2001 From: Stephan Hohe Date: Mon, 19 Feb 2024 23:40:05 +0100 Subject: [PATCH] Fix escape in regular expression --- hg-fast-export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hg-fast-export.py b/hg-fast-export.py index fcd5600..0dc18ad 100755 --- a/hg-fast-export.py +++ b/hg-fast-export.py @@ -228,7 +228,7 @@ def dot(name): if not auto_sanitize: return mapping.get(name,name) n=mapping.get(name,name) - p=re.compile(b'([\\[ ~^:?\\\\*]|\.\.)') + p=re.compile(b'([\\[ ~^:?\\\\*]|\\.\\.)') n=p.sub(b'_', n) if n[-1:] in (b'/', b'.'): n=n[:-1]+b'_' n=b'/'.join([dot(s) for s in n.split(b'/')])