# HG changeset patch # User Matt Mackall # Date 1224722432 18000 # Node ID 1f6d2e4871356c19865915e973ddf7f9b3ae24c5 # Parent 1bd7f90465b33f4336274df3dacb05508c8b29dd inotify: add debugging mode to inotify compare inotify results with dirstate results and report any changes return dirstate results for safety diff -r 1bd7f90465b3 -r 1f6d2e487135 hgext/inotify/__init__.py --- a/hgext/inotify/__init__.py Wed Oct 22 19:40:29 2008 -0500 +++ b/hgext/inotify/__init__.py Wed Oct 22 19:40:32 2008 -0500 @@ -56,6 +56,18 @@ if not ignored and not self.inotifyserver: result = client.query(ui, repo, files, match, False, clean, unknown) + if ui.config('inotify', 'debug'): + r2 = super(inotifydirstate, self).status( + match, False, clean, unknown) + for c,a,b in zip('LMARDUIC', result, r2): + for f in a: + if f not in b: + ui.warn('*** inotify: %s +%s\n' % (c, f)) + for f in b: + if f not in a: + ui.warn('*** inotify: %S -%s\n' % (c, f)) + result = r2 + if result is not None: return result except (OSError, socket.error), err: