comparison hgext/inotify/linuxserver.py @ 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 d6512b3e9ac0
comparison
equal deleted inserted replaced
10090:a3ad96ead8f0 10091:0ce645cc3f20
331 events = self.watcher.read(bufsize) 331 events = self.watcher.read(bufsize)
332 if self.ui.debugflag: 332 if self.ui.debugflag:
333 self.ui.note(_('%s reading %d events\n') % 333 self.ui.note(_('%s reading %d events\n') %
334 (self.event_time(), len(events))) 334 (self.event_time(), len(events)))
335 for evt in events: 335 for evt in events:
336 if evt.fullpath == self.wprefix[:-1]:
337 # events on the root of the repository
338 # itself, e.g. permission changes or repository move
339 continue
336 assert evt.fullpath.startswith(self.wprefix) 340 assert evt.fullpath.startswith(self.wprefix)
337 wpath = evt.fullpath[self.prefixlen:] 341 wpath = evt.fullpath[self.prefixlen:]
338 342
339 # paths have been normalized, wpath never ends with a '/' 343 # paths have been normalized, wpath never ends with a '/'
340 344