check-code: fix issues with finding patterns in unified tests, fix tests
- old-style patterns without ^ were getting improperly anchored
- finditer was matching against beginning of line poorly
- \s was matching newlines
- [^x] was matching newlines
so we:
- remove earlier hacks for multiline matching
- fix unified test anchoring by adding .*
- replace \s with [ \t]
- replace [^x] with [^\nx]
- force all matches into multiline mode so ^ anchors work
This uncovers a number of test issues that are then repaired.
$ "$TESTDIR/hghave" pyflakes || exit 80
$ cd `dirname $TESTDIR`
$ pyflakes mercurial hgext 2>&1 | $TESTDIR/filterpyflakes.py
hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob)