inotify and FSEvents...

Sean Farley sean at mcs.anl.gov
Sat May 12 11:21:40 CDT 2012


> In the 2.3 Sprint we are talking about underlying notification. In OSX notification is through FSEvents:
>
> Couple of points with FSEvent watching:
> - Updates within a single directory are coalesced.  But all touched directories are
> reported.  (Mads was correct here.)
> - It looks like you can create FSEvents watchers which will report all changes to files as
> well:  http://developer.apple.com/library/mac/#documentation/Darwin/Reference/FSEvents_Ref/FSEvents_h/index.html#//apple_ref/c/tag/FSEventStreamCreateFlags
> This flag is unfortunately new to 10.7 and Mercurial should likely still support 10.6 (Snow Leopard
> if not 10.5 Leopard....)

For my own mercurial notifications, I ended up using the 'watchdog'
module [1]. This enabled me to use the same code for my mac and linux
environments. Has something like this been considered instead of
rolling custom code for fsevents, inotify, kqueue, windows(?), etc.?

[1] http://pypi.python.org/pypi/watchdog


More information about the Mercurial-devel mailing list