Mercurial > hg-stable
changeset 7219:1f6d2e487135
inotify: add debugging mode to inotify
compare inotify results with dirstate results and report any changes
return dirstate results for safety
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 22 Oct 2008 19:40:32 -0500 |
parents | 1bd7f90465b3 |
children | 60826e071ce2 |
files | hgext/inotify/__init__.py |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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: