inotify: do not rely on stat(.hg/dirstate) to invalidate our dirstate
stat() is not reliable when several events happen quickly. Which means
that if two hg actions occur in the same second, stat() result will not
reflect the second change. And only _one_ invalidate() call was done.
Also ignore the events that occur when wlock is held, since wlock release
will trigger a full rescan anyway.
Fixes 17 run-tests.py --inotify tests.
adding a
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
% should issue warning
adding a
created new head
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
% should not issue warning
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
marked working directory as branch testing
% should not issue warning