mercurial/commands.py
branchstable
changeset 46395 7e02e7c721b0
parent 46354 ed43b6fa847e
child 46406 184e0ae0a4b2
equal deleted inserted replaced
46394:83ffc49f7e48 46395:7e02e7c721b0
  3442         reflags |= re.I
  3442         reflags |= re.I
  3443     try:
  3443     try:
  3444         regexp = util.re.compile(pattern, reflags)
  3444         regexp = util.re.compile(pattern, reflags)
  3445     except re.error as inst:
  3445     except re.error as inst:
  3446         ui.warn(
  3446         ui.warn(
  3447             _(b"grep: invalid match pattern: %s\n") % pycompat.bytestr(inst)
  3447             _(b"grep: invalid match pattern: %s\n")
       
  3448             % stringutil.forcebytestr(inst)
  3448         )
  3449         )
  3449         return 1
  3450         return 1
  3450     sep, eol = b':', b'\n'
  3451     sep, eol = b':', b'\n'
  3451     if opts.get(b'print0'):
  3452     if opts.get(b'print0'):
  3452         sep = eol = b'\0'
  3453         sep = eol = b'\0'