changeset 49900:9282930f8b52 stable

convert: turn the last str regex into bytes in cvs.py (issue6789) Since root is bytes, the regular expression should also be bytes.
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 12 Jan 2023 19:59:01 +0400
parents 05b329cbd23d
children 8f9fbc665928
files hgext/convert/cvs.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/cvs.py	Fri Jan 06 12:16:04 2023 -0500
+++ b/hgext/convert/cvs.py	Thu Jan 12 19:59:01 2023 +0400
@@ -142,7 +142,9 @@
 
         if root.startswith(b":pserver:"):
             root = root[9:]
-            m = re.match(r'(?:(.*?)(?::(.*?))?@)?([^:/]*)(?::(\d*))?(.*)', root)
+            m = re.match(
+                br'(?:(.*?)(?::(.*?))?@)?([^:/]*)(?::(\d*))?(.*)', root
+            )
             if m:
                 conntype = b"pserver"
                 user, passw, serv, port, root = m.groups()