equal
deleted
inserted
replaced
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: |