mercurial/commands.py
branchstable
changeset 12385 9a93f4fb141b
parent 12382 28ddf67198b2
child 12386 8eedf53547b8
equal deleted inserted replaced
12384:ffcceca7406d 12385:9a93f4fb141b
  1567     reflags = 0
  1567     reflags = 0
  1568     if opts.get('ignore_case'):
  1568     if opts.get('ignore_case'):
  1569         reflags |= re.I
  1569         reflags |= re.I
  1570     try:
  1570     try:
  1571         regexp = re.compile(pattern, reflags)
  1571         regexp = re.compile(pattern, reflags)
  1572     except Exception, inst:
  1572     except re.error, inst:
  1573         ui.warn(_("grep: invalid match pattern: %s\n") % inst)
  1573         ui.warn(_("grep: invalid match pattern: %s\n") % inst)
  1574         return 1
  1574         return 1
  1575     sep, eol = ':', '\n'
  1575     sep, eol = ':', '\n'
  1576     if opts.get('print0'):
  1576     if opts.get('print0'):
  1577         sep = eol = '\0'
  1577         sep = eol = '\0'