summaryrefslogtreecommitdiff
path: root/Utility
Commit message (Collapse)AuthorAge
* move commentGravatar Joey Hess2012-08-07
|
* better pid file locking codeGravatar Joey Hess2012-07-02
|
* avoid untrappable exception if dirContentsRecursive is run on a directoryGravatar Joey Hess2012-07-02
| | | | | | | | that doesn't exist, or cannot be read The problem is its use of unsafeInterleaveIO, which causes its IO code to run when the thunk is forced, outside any exception trapping the caller may do.
* record transfers for git-annex-shellGravatar Joey Hess2012-07-02
| | | | | | | | | Not yet tested and places git-annex-shell is run need to be modified to pass the new field settings. Note that rsyncServerSend was changed to fork, rather than directly exec rsync, because it needs to keep the transfer lock held, and clean up the transfer log when done.
* add fields to git-annex-shellGravatar Joey Hess2012-07-02
|
* pointlessnessGravatar Joey Hess2012-06-29
|
* typoGravatar Joey Hess2012-06-20
|
* Merge branch 'master' into watchGravatar Joey Hess2012-06-20
|\
| * avoid ByteString.Char8 where not neededGravatar Joey Hess2012-06-20
| | | | | | | | | | 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.
| * [Word8] to filesystem encoded StringGravatar Joey Hess2012-06-20
| | | | | | | | My, GHC makes this hard.
* | add closingTracked flagGravatar Joey Hess2012-06-19
| |
* | kqueue synthetic add events on startupGravatar Joey Hess2012-06-19
| |
* | kqueue recursive directory addingGravatar Joey Hess2012-06-19
| |
* | add eventsCoalesceGravatar Joey Hess2012-06-19
| |
* | fix prototypeGravatar Joey Hess2012-06-19
| |
* | fix schedulingGravatar Joey Hess2012-06-19
| | | | | | | | Handle kevent interruptions in the haskell code, so it can yield to other threads
* | kqueue build fixGravatar Joey Hess2012-06-19
| | | | | | | | new event dispatch seems a bit broken though
* | lifted out the kqueue and inotify to a generic DirWatcher interfaceGravatar Joey Hess2012-06-18
| | | | | | | | | | Kqueue code for dispatching events is not tested and probably doesn't build.
* | robustness fixesGravatar Joey Hess2012-06-19
| |
* | update kqueue when new directories are addedGravatar Joey Hess2012-06-18
| |
* | kqueue: add directory content tracking, and change determinationGravatar Joey Hess2012-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | close fdsGravatar Joey Hess2012-06-18
| |
* | retry interrupted kevent callsGravatar Joey Hess2012-06-18
| | | | | | | | Many thanks to geekosaur in #haskell for help with this.
* | add test stubGravatar Joey Hess2012-06-18
| |
* | kqueue code compiles on debian kfreebsdGravatar Joey Hess2012-06-18
| |
* | flesh out kqueue libraryGravatar Joey Hess2012-06-18
| | | | | | | | | | Have not tried to build this yet. But barring minor mistakes, I think it's good.
* | add some utility functions for laterGravatar Joey Hess2012-06-18
| | | | | | | | Will need to update the DirMap to add or remove subdirs.
* | recurse dirTree and open the directories for kqueue to watchGravatar Joey Hess2012-06-18
| |
* | added dirTreeGravatar Joey Hess2012-06-18
| |
* | skeleton C library for calling kqueueGravatar Joey Hess2012-06-18
|/
* Enable diskfree on kfreebsd, using statvfs.Gravatar Joey Hess2012-06-17
| | | | | | 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..
* reorgGravatar Joey Hess2012-06-17
|
* add lsof build depsGravatar Joey Hess2012-06-15
| | | | | Check for it in configure; and add a --force option for people without it who want to live dangerously.
* work around a wrinkle in how lsof handles hard links to files that are open ↵Gravatar Joey Hess2012-06-15
| | | | | | elsewhere +d is probably more expensive, but I need it
* cleanupGravatar Joey Hess2012-06-15
|
* fix pid file writingGravatar Joey Hess2012-06-15
| | | | need to truncate, or part of previous longer pid may be left after writing
* add lsof interfaceGravatar Joey Hess2012-06-15
| | | | Uses lsof -F0 to get machine-readable output
* addGravatar Joey Hess2012-06-15
|
* slightly higher-level thread scheduling codeGravatar Joey Hess2012-06-13
| | | | | Including support for unbound thread sleeping. Haskell's max thread sleep is 37 minutes, due to maxBound Int!
* plumb file status through to event handlersGravatar Joey Hess2012-06-13
| | | | | | | | | | | | | The idea, not yet done, is to use this to detect when a file has an old change time, and avoid expensive restaging of the file. If git-annex watch keeps track of the last time it finished a full scan, then any symlink that is older than that time must have been scanned before, so need not be added. (Relying on moving, copying, etc of a file all updating its change time.) Anyway, this info is available for free since inotify already checks it, so it might as well make it available.
* better optimisation of add checkGravatar Joey Hess2012-06-12
| | | | | | | | | | | | | Now really only done in the startup scan. It turns out to be quite hard for event handlers to know when the startup scan is complete. I tried to make addWatch pass that info, but found threading the state very difficult. For now, a quick hack, using the fast flag. Note that it's actually possible for inotify events to come in while the startup scan is still ongoing. Due to my hack, the expensive check will be done for files added in such inotify events.
* fix bug that turned files already in git into symlinksGravatar Joey Hess2012-06-12
| | | | | | This requires a relatively expensive test at file add time to see if it's in git already. But it can be optimised to only happen during the startup scan.
* add a flag indicating if an event was synthesized during initial dir scanGravatar Joey Hess2012-06-12
|
* hlintGravatar Joey Hess2012-06-12
|
* bugfixGravatar Joey Hess2012-06-11
|
* git annex watch --stopGravatar Joey Hess2012-06-11
|
* fix pid file lockingGravatar Joey Hess2012-06-11
| | | | | Ok, that's odd.. opening it before fork breaks the locking. I don't understand why.
* add a pid fileGravatar Joey Hess2012-06-11
| | | | | Writes pid to a file. Is supposed to take an exclusive lock, but that's not working, and it's too late for me to understand why.
* daemonize git annex watchGravatar Joey Hess2012-06-11
|
* update message based on user feedbackGravatar Joey Hess2012-06-07
|