Commit graph

4123 commits

Author SHA1 Message Date
Joey Hess
e0fdfb2e70 maintain set of files pendingAdd
Kqueue needs to remember which files failed to be added due to being open,
and retry them. This commit gets the data in place for such a retry thread.

Broke KeySource out into its own file, and added Eq and Ord instances
so it can be stored in a Set.
2012-06-20 16:31:46 -04:00
Joey Hess
ad11de94e5 typo 2012-06-20 15:53:56 -04:00
Joey Hess
88e26046d7 typo 2012-06-20 15:27:54 -04:00
Joey Hess
483b1b08c6 Merge branch 'master' into watch 2012-06-20 13:15:59 -04:00
Joey Hess
75b6ee81f9 avoid ByteString.Char8 where not needed
Its truncation behavior is a red flag, so avoid using it in these places
where only raw ByteStrings are used, without looking at the data inside.
2012-06-20 13:13:40 -04:00
http://joeyh.name/
6d641f1ac0 Added a comment 2012-06-20 16:59:53 +00:00
Joey Hess
9dc512a3ca fixed 2012-06-20 12:58:31 -04:00
Joey Hess
701231e930 Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-20 12:57:19 -04:00
Joey Hess
dfccee2616 unused: Fix crash when file names contain invalid utf8.
Was decoding the git-cat-file of the symlink target as utf8, but that can't
do, unix filenames are from the 70's and need this shiny disco
fileSystemEncoding.
2012-06-20 12:57:00 -04:00
Joey Hess
ee2acd474f [Word8] to filesystem encoded String
My, GHC makes this hard.
2012-06-20 12:51:25 -04:00
https://www.google.com/accounts/o8/id?id=AItOawnXgp-iIaBK5pnk22xqMVERQb97VyXaejs
77bcc76e87 Added a comment 2012-06-20 14:55:33 +00:00
http://joeyh.name/
568f8d0273 Added a comment 2012-06-20 14:49:09 +00:00
https://www.google.com/accounts/o8/id?id=AItOawnXgp-iIaBK5pnk22xqMVERQb97VyXaejs
e711f20c8f Added a comment 2012-06-20 14:37:10 +00:00
http://joeyh.name/
5774f14958 Added a comment 2012-06-20 14:34:23 +00:00
http://joeyh.name/
5976271390 Added a comment 2012-06-20 14:30:27 +00:00
https://www.google.com/accounts/o8/id?id=AItOawnXgp-iIaBK5pnk22xqMVERQb97VyXaejs
befa378ef7 2012-06-20 11:12:48 +00:00
https://www.google.com/accounts/o8/id?id=AItOawnXgp-iIaBK5pnk22xqMVERQb97VyXaejs
8dbd36ab0a 2012-06-20 11:12:11 +00:00
Joey Hess
dbe7d0e7fe Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-19 18:35:07 -04:00
Joey Hess
2a079a9d37 blog for the day 2012-06-19 18:32:30 -04:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
c838a35d83 2012-06-19 22:28:50 +00:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
23b08efa42 2012-06-19 22:28:08 +00:00
Joey Hess
5580af5789 add closingTracked flag 2012-06-19 10:22:36 -04:00
Joey Hess
8bdb331b60 bug 2012-06-19 10:17:06 -04:00
Joey Hess
39746e30dc typo 2012-06-19 10:11:28 -04:00
Joey Hess
e68b3c99f4 kqueue synthetic add events on startup 2012-06-19 10:08:06 -04:00
Joey Hess
2a61df23e7 kqueue recursive directory adding 2012-06-19 09:56:03 -04:00
Joey Hess
d832a474e9 fixed 2012-06-19 09:19:40 -04:00
Joey Hess
627504744c inverted logic 2012-06-19 09:17:06 -04:00
Joey Hess
27b5fc9fd4 yeah 2012-06-19 09:11:04 -04:00
Joey Hess
c8d4efeed3 Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-19 09:09:47 -04:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
99a3d6a00c 2012-06-19 07:09:09 +00:00
https://www.google.com/accounts/o8/id?id=AItOawncBlzaDI248OZGjKQMXrLVQIx4XrZrzFo
e986d1acb1 2012-06-19 07:08:44 +00:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
d4e5affec0 2012-06-19 07:08:34 +00:00
Joey Hess
57cf65eb6d fix kevent symlink creation 2012-06-19 02:40:21 -04:00
Joey Hess
4ab9449cee add eventsCoalesce 2012-06-19 02:23:45 -04:00
Joey Hess
424e58d960 update 2012-06-19 02:16:31 -04:00
Joey Hess
fd3e945932 fix prototype 2012-06-19 01:57:19 -04:00
Joey Hess
03b9341356 fix scheduling
Handle kevent interruptions in the haskell code, so it can yield to other threads
2012-06-19 04:52:55 +00:00
http://www.davidhaslem.com/
9232bc860f Added a comment 2012-06-19 04:41:28 +00:00
Joey Hess
a5cceb7d4f make --force really bypass lsof check 2012-06-19 00:23:14 -04:00
Joey Hess
02e9fdb0a5 kqueue build fix
new event dispatch seems a bit broken though
2012-06-19 04:07:48 +00:00
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