diff hgext/inotify/server.py @ 9117:a87bc6e2a907

inotify: server: explicitely ignore events in subdirs of .hg/ (issue1735)
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Mon, 13 Jul 2009 21:55:17 +0900
parents f90bbf1ea09f
children 954f7a879495
line wrap: on
line diff
--- a/hgext/inotify/server.py	Mon Jul 13 16:49:05 2009 +0200
+++ b/hgext/inotify/server.py	Mon Jul 13 21:55:17 2009 +0900
@@ -636,6 +636,12 @@
             assert evt.fullpath.startswith(self.wprefix)
             wpath = evt.fullpath[len(self.wprefix):]
 
+            # paths have been normalized, wpath never ends with a '/'
+
+            if wpath.startswith('.hg/') and evt.mask & inotify.IN_ISDIR:
+                # ignore subdirectories of .hg/ (merge, patches...)
+                continue
+
             if evt.mask & inotify.IN_UNMOUNT:
                 self.process_unmount(wpath, evt)
             elif evt.mask & (inotify.IN_MODIFY | inotify.IN_ATTRIB):