diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -119,6 +119,7 @@ testpats = [ (r'\[[^\]]+==', '[ foo == bar ] is a bashism, use [ foo = bar ] instead'), (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w', "use egrep for extended grep syntax"), + (r'(^|\|\s*)e?grep .*\\S', "don't use \\S in regular expression"), (r'(?&1 | egrep '^\S*Error' + $ hg --config extensions.metaedit=$TESTTMP/metaedit.py metaedit 'parents=0' 2>&1 | egrep '^RuntimeError' RuntimeError: can't reuse the manifest: its p1 doesn't match the new ctx p1 $ hg --config extensions.metaedit=$TESTTMP/metaedit.py metaedit 'user=foo '