mercurial/commands.py
changeset 36492 6e90c59b6da1
parent 36473 ab5f18a9dcac
child 36511 aa3294027936
equal deleted inserted replaced
36491:149c5af35de5 36492:6e90c59b6da1
  2368     if opts.get('ignore_case'):
  2368     if opts.get('ignore_case'):
  2369         reflags |= re.I
  2369         reflags |= re.I
  2370     try:
  2370     try:
  2371         regexp = util.re.compile(pattern, reflags)
  2371         regexp = util.re.compile(pattern, reflags)
  2372     except re.error as inst:
  2372     except re.error as inst:
  2373         ui.warn(_("grep: invalid match pattern: %s\n") % inst)
  2373         ui.warn(_("grep: invalid match pattern: %s\n") % pycompat.bytestr(inst))
  2374         return 1
  2374         return 1
  2375     sep, eol = ':', '\n'
  2375     sep, eol = ':', '\n'
  2376     if opts.get('print0'):
  2376     if opts.get('print0'):
  2377         sep = eol = '\0'
  2377         sep = eol = '\0'
  2378 
  2378