fsmonitor: add new watchman notifications to fsmonitor extension
The fsmonitor extension currently sends state-enter and state-leave
notifications to watchman on the update operation. This commit creates
additional notifications for the following events :
- transaction creation and commit/abort. A state-enter notification will be
sent when a transaction is created. It will provide the working copy
parent's hash. A state-leave notification will be sent when the
transaction is committed or aborted. It will provide the working copy
parent's hash.
- calls to set-parent will cause state-enter and state-leave notifications
to be sent. The state-enter notification will be sent prior to the
set-parent operation and the working copy parent's hash will be provided at
this time. The state-leave notification will be sent after the set-parent
operation completes providing the working copy parents hash.
Test Plan:
tested on dev server to check that necessary notifications were sent/received
Differential Revision: https://phab.mercurial-scm.org/D989
#!/usr/bin/env python
# Filter output by pyflakes to control which warnings we check
from __future__ import absolute_import, print_function
import re
import sys
lines = []
for line in sys.stdin:
# We blacklist tests that are too noisy for us
pats = [
r"undefined name 'WindowsError'",
r"redefinition of unused '[^']+' from line",
# for cffi, allow re-exports from pure.*
r"cffi/[^:]*:.*\bimport \*' used",
r"cffi/[^:]*:.*\*' imported but unused",
]
keep = True
for pat in pats:
if re.search(pat, line):
keep = False
break # pattern matches
if keep:
fn = line.split(':', 1)[0]
f = open(fn)
data = f.read()
f.close()
if 'no-' 'check-code' in data:
continue
lines.append(line)
for line in lines:
sys.stdout.write(line)
print()