Mercurial > hg
comparison mercurial/revset.py @ 14355:8fdc9dd8264b stable
revset: note case-sensitive match in grep
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Wed, 18 May 2011 09:28:11 +0200 |
parents | c66ba016ebb8 |
children | 02a5bebd0dc4 |
comparison
equal
deleted
inserted
replaced
14354:c66ba016ebb8 | 14355:8fdc9dd8264b |
---|---|
379 return l | 379 return l |
380 | 380 |
381 def grep(repo, subset, x): | 381 def grep(repo, subset, x): |
382 """``grep(regex)`` | 382 """``grep(regex)`` |
383 Like ``keyword(string)`` but accepts a regex. Use ``grep(r'...')`` | 383 Like ``keyword(string)`` but accepts a regex. Use ``grep(r'...')`` |
384 to ensure special escape characters are handled correctly. | 384 to ensure special escape characters are handled correctly. Unlike |
385 ``keyword(string)``, the match is case-sensitive. | |
385 """ | 386 """ |
386 try: | 387 try: |
387 # i18n: "grep" is a keyword | 388 # i18n: "grep" is a keyword |
388 gr = re.compile(getstring(x, _("grep requires a string"))) | 389 gr = re.compile(getstring(x, _("grep requires a string"))) |
389 except re.error, e: | 390 except re.error, e: |