This commit is contained in:
Joey Hess 2012-06-19 02:16:31 -04:00
parent f684f282f2
commit 424e58d960

View file

@ -13,6 +13,14 @@ There is a `watch` branch in git that adds the command.
* When you `git annex unlock` a file, it will immediately be re-locked.
* With kqueue, added files are not staged because the symlink change event
it's expecting rarely arrives. I think due to a race.
* With kqueue, if a while is created and still has a writer, it'll
give up adding it, and it will never get added. This is because kqueue
cannot track file closes. Need to go back and check these files every
second or something.
## beyond Linux
I'd also like to support OSX and if possible the BSDs.
@ -58,40 +66,8 @@ I'd also like to support OSX and if possible the BSDs.
* Windows has a Win32 ReadDirectoryChangesW, and perhaps other things.
## beyond Linux
I'd also like to support OSX and if possible the BSDs.
* kqueue ([haskell bindings](http://hackage.haskell.org/package/kqueue))
is supported by FreeBSD, OSX, and other BSDs.
From what I can find, kqueue does not provide full directory watching
capabilities. To watch a file, you have to have an open file descriptor
to the file. This wouldn't scale.
Gamin does the best it can with just kqueue, supplimented by polling.
The source file `server/gam_kqueue.c` makes for interesting reading.
Using gamin to do the heavy lifting is one option.
([haskell bindings](http://hackage.haskell.org/package/hlibfam) for FAM;
gamin shares the API)
* hfsevents ([haskell bindings](http://hackage.haskell.org/package/hfsevents))
is OSX specific.
Originally it was only directory level, and you were only told a
directory had changed and not which file. Based on the haskell
binding's code, from OSX 10.7.0, file level events were added.
This will be harder for me to develop for, since I don't have access to
OSX machines..
* Windows has a Win32 ReadDirectoryChangesW, and perhaps other things.
## todo
- Support OSes other than Linux; it only uses inotify currently.
OSX and FreeBSD use the same mechanism, and there is a Haskell interface
for it,
- Run niced and ioniced? Seems to make sense, this is a background job.
- configurable option to only annex files meeting certian size or
filename criteria