Show More
@@ -286,7 +286,7 b' def aliasargs(fn, givenargs):' | |||||
286 | if num < len(givenargs): |
|
286 | if num < len(givenargs): | |
287 | return givenargs[num] |
|
287 | return givenargs[num] | |
288 | raise error.Abort(_('too few arguments for command alias')) |
|
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 | givenargs = [x for i, x in enumerate(givenargs) |
|
290 | givenargs = [x for i, x in enumerate(givenargs) | |
291 | if i not in nums] |
|
291 | if i not in nums] | |
292 | args = pycompat.shlexsplit(cmd) |
|
292 | args = pycompat.shlexsplit(cmd) |
@@ -408,7 +408,7 b' def shellquote(s):' | |||||
408 | return '"%s"' % s |
|
408 | return '"%s"' % s | |
409 | global _needsshellquote |
|
409 | global _needsshellquote | |
410 | if _needsshellquote is None: |
|
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 | if s and not _needsshellquote(s): |
|
412 | if s and not _needsshellquote(s): | |
413 | # "s" shouldn't have to be quoted |
|
413 | # "s" shouldn't have to be quoted | |
414 | return s |
|
414 | return s |
General Comments 0
You need to be logged in to leave comments.
Login now