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.
0: Adding root node
-------
0: Adding root node
=======
marked working directory as branch a
1: Adding a branch
-------
1: Adding a branch
=======
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
marked working directory as branch b
created new head
2: Adding b branch
1: Adding a branch
-------
2: Adding b branch
=======
3: Adding b branch head 1
1: Adding a branch
-------
3: Adding b branch head 1
=======
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
created new head
4: Adding b branch head 2
3: Adding b branch head 1
1: Adding a branch
-------
4: Adding b branch head 2
3: Adding b branch head 1
=======
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
created new head
5: Adding b branch head 3
4: Adding b branch head 2
3: Adding b branch head 1
1: Adding a branch
-------
5: Adding b branch head 3
4: Adding b branch head 2
3: Adding b branch head 1
=======
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
6: Merging b branch head 2 and b branch head 3
3: Adding b branch head 1
1: Adding a branch
-------
6: Merging b branch head 2 and b branch head 3
3: Adding b branch head 1
=======
marked working directory as branch c
7: Adding c branch
3: Adding b branch head 1
1: Adding a branch
-------
7: Adding c branch
=======
no changes on branch c containing . are reachable from 3
1
-------
7: Adding c branch
0
-------
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
0
-------
3: Adding b branch head 1
0
-------
6: Merging b branch head 2 and b branch head 3
3: Adding b branch head 1
0
-------
no changes on branch b containing . are reachable from 7
1
=======
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
7: Adding c branch
3: Adding b branch head 1
1: Adding a branch
-------
0: Adding root node
-------
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7: Adding c branch
3: Adding b branch head 1
1: Adding a branch
-------
1: Adding a branch
-------
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
7: Adding c branch
3: Adding b branch head 1
1: Adding a branch
-------
6: Merging b branch head 2 and b branch head 3
3: Adding b branch head 1
-------
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7: Adding c branch
3: Adding b branch head 1
1: Adding a branch
-------
6: Merging b branch head 2 and b branch head 3
3: Adding b branch head 1
-------
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
7: Adding c branch
3: Adding b branch head 1
1: Adding a branch
-------
6: Merging b branch head 2 and b branch head 3
3: Adding b branch head 1
-------
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
7: Adding c branch
3: Adding b branch head 1
1: Adding a branch
-------
6: Merging b branch head 2 and b branch head 3
3: Adding b branch head 1
-------
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7: Adding c branch
3: Adding b branch head 1
1: Adding a branch
-------
6: Merging b branch head 2 and b branch head 3
3: Adding b branch head 1
-------
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7: Adding c branch
3: Adding b branch head 1
1: Adding a branch
-------
7: Adding c branch
-------
=======
1: Adding a branch
-------
6: Merging b branch head 2 and b branch head 3
3: Adding b branch head 1
-------
7: Adding c branch
-------
abort: unknown revision 'z'!
-------
=======
0: Adding root node
1: Adding a branch
6: Merging b branch head 2 and b branch head 3
3: Adding b branch head 1
7: Adding c branch