Joey Hess
7a09d74319
lifted out the kqueue and inotify to a generic DirWatcher interface
...
Kqueue code for dispatching events is not tested and probably doesn't
build.
2012-06-18 23:49:07 -04:00
Joey Hess
9b7f929e96
Merge remote-tracking branch 'origin/watch' into watch
...
Conflicts:
Assistant/Watcher.hs
2012-06-18 22:16:16 -04:00
Joey Hess
22b563408b
refactor
2012-06-19 02:13:39 +00:00
Joey Hess
e164553272
robustness fixes
2012-06-19 02:13:26 +00:00
Joey Hess
2d457bf8df
fix build
2012-06-18 21:53:44 -04:00
Joey Hess
3d163f5ff9
fix build
2012-06-19 01:52:07 +00:00
Joey Hess
5e9fdac92f
update kqueue when new directories are added
2012-06-18 21:46:04 -04:00
Joey Hess
2bfcc0b09c
kqueue: add directory content tracking, and change determination
...
This *may* now return Add or Delete Changes as appropriate. All I know
for sure is that it compiles.
I had hoped to avoid maintaining my own state about the content of the
directory tree, and rely on git to check what was changed. But I can't;
I need to know about new and deleted subdirectories to add them to the
watch list, and git doesn't deal with (empty) directories.
So, wrote all the code to scan directories, remember their past contents,
compare with current contents, generate appropriate Change events, and
update bookkeeping info appropriately.
2012-06-18 21:29:30 -04:00
Joey Hess
ae7d07ddcb
close fds
2012-06-18 19:14:58 -04:00
Joey Hess
f684f282f2
blog for the day
2012-06-18 18:21:03 -04:00
Joey Hess
1f6d80007c
blog for the day
2012-06-18 18:07:29 -04:00
Joey Hess
b141d9bcc8
retry interrupted kevent calls
...
Many thanks to geekosaur in #haskell for help with this.
2012-06-18 18:03:50 -04:00
Joey Hess
a11825a1f1
add test stub
2012-06-18 16:56:05 -04:00
Joey Hess
d680ff7ef0
kqueue code compiles on debian kfreebsd
2012-06-18 16:34:08 -04:00
Joey Hess
90d565149a
flesh out kqueue library
...
Have not tried to build this yet. But barring minor mistakes, I think it's
good.
2012-06-18 16:18:59 -04:00
Joey Hess
89fcee03d0
add some utility functions for later
...
Will need to update the DirMap to add or remove subdirs.
2012-06-18 13:22:36 -04:00
Joey Hess
a39b73d118
recurse dirTree and open the directories for kqueue to watch
2012-06-18 13:01:58 -04:00
Joey Hess
dc3d9d1e98
added dirTree
2012-06-18 12:53:57 -04:00
Joey Hess
3c8a9043b6
skeleton C library for calling kqueue
2012-06-18 12:25:20 -04:00
Joey Hess
0ecc7dc892
close
2012-06-18 10:09:56 -04:00
Jimmy Tang
89f6f820bf
Teach _Makefile_ to only do _-DWITH_INOTIFY_ when on a Linux machine.
2012-06-18 10:09:13 -04:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
762b67c163
2012-06-18 08:39:42 +00:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
123df55d61
2012-06-18 08:24:24 +00:00
Joey Hess
66344a3613
Enable diskfree on kfreebsd, using statvfs.
...
Could not reproduce the build failure I had seen related to this,
but the numbers were wrong with statfs64. Probably pulling from the wrong
place in the structure. statvfs seems to work..
2012-06-17 18:10:57 -04:00
Joey Hess
123766963e
Merge branch 'master' of ssh://git-annex.branchable.com
2012-06-17 17:24:46 -04:00
Joey Hess
9afdf7c954
blog for the day
2012-06-17 17:24:07 -04:00
Joey Hess
91567ab8f6
make inotify a build flag etc
2012-06-17 17:15:56 -04:00
Joey Hess
bf3339e5b7
Merge branch 'master' into watch
2012-06-17 15:45:35 -04:00
Joey Hess
c373f6e954
note
2012-06-17 14:25:02 -04:00
Joey Hess
1863185693
startup check fixes
...
Move lsof check, and display a message before daemon startup if on an
unsupported OS.
2012-06-17 14:21:29 -04:00
Joey Hess
e84b78f40c
reorg
2012-06-17 14:02:40 -04:00
http://joeyh.name/
1a6f7ae00b
Added a comment
2012-06-17 16:39:43 +00:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
bdf66c589a
Added a comment
2012-06-17 08:52:33 +00:00
Joey Hess
ec197feec0
update
2012-06-17 02:08:28 -04:00
Joey Hess
31c15aa9b9
update
2012-06-17 01:34:10 -04:00
Joey Hess
88c0951b57
Merge branch 'master' of ssh://git-annex.branchable.com
2012-06-17 01:28:21 -04:00
Joey Hess
da261b31de
surveyed the OSX and BSD options for file monitoring
2012-06-17 01:28:09 -04:00
Joey Hess
9356f11c60
surveyed the OSX and BSD options for file monitoring
2012-06-17 01:25:48 -04:00
Joey Hess
de04f7153c
Merge branch 'watch' of https://github.com/bgamari/git-annex into watch
2012-06-16 11:37:28 -04:00
Ben Gamari
0b7047f750
stm package name is lowercase
2012-06-16 13:59:20 +02:00
http://dieter-be.myopenid.com/
2a9c5ebfaa
Added a comment
2012-06-16 09:14:27 +00:00
Joey Hess
7d6329e5e4
check lsof at runtime
2012-06-16 02:49:26 -04:00
Joey Hess
0052cec2b7
add lsof build deps
...
Check for it in configure; and add a --force option for people without it
who want to live dangerously.
2012-06-15 23:29:39 -04:00
http://joeyh.name/
eaf4cbec54
Added a comment
2012-06-16 03:26:37 +00:00
Joey Hess
594fb9e565
Merge branch 'master' of ssh://git-annex.branchable.com
2012-06-15 23:01:42 -04:00
Joey Hess
bd8319e78c
update and blog for the day
...
the last of the bad bugs is fixed!
2012-06-15 22:59:32 -04:00
Joey Hess
5d63c2a4bb
check files with lsof in batches before adding
...
I've tested both cases where this is necessary, and it works great!
A file with multiple writers is not added until the last one closes.
2012-06-15 22:36:42 -04:00
Joey Hess
bb6074dfea
work around a wrinkle in how lsof handles hard links to files that are open elsewhere
...
+d is probably more expensive, but I need it
2012-06-15 22:34:42 -04:00
Joey Hess
3dac81d345
remove newly created tmp file before linking
2012-06-15 22:19:12 -04:00
Joey Hess
d91950ecba
cleanup
2012-06-15 22:16:13 -04:00