inotify: add debugging mode to inotify
compare inotify results with dirstate results and report any changes
return dirstate results for safety
--- 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: