mercurial/commands.py
changeset 4877 242026115e6a
parent 4866 9858477ed74c
child 4879 da8640113b5a
child 4894 be5dc5e3ab2d
equal deleted inserted replaced
4867:0e2d0a78f81a 4877:242026115e6a
  1090     use the --all flag.
  1090     use the --all flag.
  1091     """
  1091     """
  1092     reflags = 0
  1092     reflags = 0
  1093     if opts['ignore_case']:
  1093     if opts['ignore_case']:
  1094         reflags |= re.I
  1094         reflags |= re.I
  1095     regexp = re.compile(pattern, reflags)
  1095     try:
       
  1096         regexp = re.compile(pattern, reflags)
       
  1097     except Exception, inst:
       
  1098         ui.warn(_("grep: invalid match pattern: %s!\n") % inst)
       
  1099         return None
  1096     sep, eol = ':', '\n'
  1100     sep, eol = ':', '\n'
  1097     if opts['print0']:
  1101     if opts['print0']:
  1098         sep = eol = '\0'
  1102         sep = eol = '\0'
  1099 
  1103 
  1100     fcache = {}
  1104     fcache = {}