comparison hgext/convert/cvs.py @ 36393:54f4328a07c2

py3: make sure regexes are bytes # skip-blame because we added just b'' prefix Differential Revision: https://phab.mercurial-scm.org/D2416
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 24 Feb 2018 16:06:21 +0530
parents 42a393ea56d2
children c6061cadb400
comparison
equal deleted inserted replaced
36392:e9bcc2efb7e8 36393:54f4328a07c2
177 177
178 if not conntype: 178 if not conntype:
179 # :ext:user@host/home/user/path/to/cvsroot 179 # :ext:user@host/home/user/path/to/cvsroot
180 if root.startswith(":ext:"): 180 if root.startswith(":ext:"):
181 root = root[5:] 181 root = root[5:]
182 m = re.match(r'(?:([^@:/]+)@)?([^:/]+):?(.*)', root) 182 m = re.match(br'(?:([^@:/]+)@)?([^:/]+):?(.*)', root)
183 # Do not take Windows path "c:\foo\bar" for a connection strings 183 # Do not take Windows path "c:\foo\bar" for a connection strings
184 if os.path.isdir(root) or not m: 184 if os.path.isdir(root) or not m:
185 conntype = "local" 185 conntype = "local"
186 else: 186 else:
187 conntype = "rsh" 187 conntype = "rsh"