mercurial/fileset.py
changeset 25660 328739ea70c3
parent 25654 af329a84310c
child 25800 f8f7ae0f4d98
equal deleted inserted replaced
25659:d60678a567a9 25660:328739ea70c3
   278     File contains the given regular expression.
   278     File contains the given regular expression.
   279     """
   279     """
   280     try:
   280     try:
   281         # i18n: "grep" is a keyword
   281         # i18n: "grep" is a keyword
   282         r = re.compile(getstring(x, _("grep requires a pattern")))
   282         r = re.compile(getstring(x, _("grep requires a pattern")))
   283     except re.error, e:
   283     except re.error as e:
   284         raise error.ParseError(_('invalid match pattern: %s') % e)
   284         raise error.ParseError(_('invalid match pattern: %s') % e)
   285     return [f for f in mctx.existing() if r.search(mctx.ctx[f].data())]
   285     return [f for f in mctx.existing() if r.search(mctx.ctx[f].data())]
   286 
   286 
   287 def _sizetomax(s):
   287 def _sizetomax(s):
   288     try:
   288     try: