##// END OF EJS Templates
py3: make the regular expression bytes to prevent TypeError
Pulkit Goyal -
r31491:492c64af default
parent child Browse files
Show More
@@ -286,7 +286,7 b' def aliasargs(fn, givenargs):'
286 286 if num < len(givenargs):
287 287 return givenargs[num]
288 288 raise error.Abort(_('too few arguments for command alias'))
289 cmd = re.sub(r'\$(\d+|\$)', replacer, cmd)
289 cmd = re.sub(br'\$(\d+|\$)', replacer, cmd)
290 290 givenargs = [x for i, x in enumerate(givenargs)
291 291 if i not in nums]
292 292 args = pycompat.shlexsplit(cmd)
@@ -408,7 +408,7 b' def shellquote(s):'
408 408 return '"%s"' % s
409 409 global _needsshellquote
410 410 if _needsshellquote is None:
411 _needsshellquote = re.compile(r'[^a-zA-Z0-9._/+-]').search
411 _needsshellquote = re.compile(br'[^a-zA-Z0-9._/+-]').search
412 412 if s and not _needsshellquote(s):
413 413 # "s" shouldn't have to be quoted
414 414 return s
General Comments 0
You need to be logged in to leave comments. Login now