changeset 10091:0ce645cc3f20

inotify: completely ignore events on the repository root They can only be events on the top directory object. Those events are meaningless for us: permission changes, repository-wide moves... And they break the assertion that all events happen in repo/*. Just ignore them. Fixes one of the failures of run-test.py --inotify test-permissions
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Fri, 11 Dec 2009 16:17:39 +0900
parents a3ad96ead8f0
children 4e2fb6cc0e1e
files hgext/inotify/linuxserver.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/inotify/linuxserver.py	Fri Dec 11 15:58:09 2009 +0900
+++ b/hgext/inotify/linuxserver.py	Fri Dec 11 16:17:39 2009 +0900
@@ -333,6 +333,10 @@
             self.ui.note(_('%s reading %d events\n') %
                          (self.event_time(), len(events)))
         for evt in events:
+            if evt.fullpath == self.wprefix[:-1]:
+                # events on the root of the repository
+                # itself, e.g. permission changes or repository move
+                continue
             assert evt.fullpath.startswith(self.wprefix)
             wpath = evt.fullpath[self.prefixlen:]