mercurial/fileset.py
changeset 38083 5f2dc1b71cf1
parent 37257 f290f130d7fc
child 38325 5cb39a368c80
equal deleted inserted replaced
38082:1978abdb216c 38083:5f2dc1b71cf1
   352     """
   352     """
   353     try:
   353     try:
   354         # i18n: "grep" is a keyword
   354         # i18n: "grep" is a keyword
   355         r = re.compile(getstring(x, _("grep requires a pattern")))
   355         r = re.compile(getstring(x, _("grep requires a pattern")))
   356     except re.error as e:
   356     except re.error as e:
   357         raise error.ParseError(_('invalid match pattern: %s') % e)
   357         raise error.ParseError(_('invalid match pattern: %s') %
       
   358                                stringutil.forcebytestr(e))
   358     return [f for f in mctx.existing() if r.search(mctx.ctx[f].data())]
   359     return [f for f in mctx.existing() if r.search(mctx.ctx[f].data())]
   359 
   360 
   360 def _sizetomax(s):
   361 def _sizetomax(s):
   361     try:
   362     try:
   362         s = s.strip().lower()
   363         s = s.strip().lower()