diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-10 16:07:48 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-10 16:07:48 -0400 |
commit | 2de50f733a01ce5b282ff0f6eb8a1101bd496216 (patch) | |
tree | 12c71735b637b41d6ffbfb3a5a1b92c14ca255f8 /git-annex.cabal | |
parent | 6e54907e3570f23b50d97f26c7c0580b77ecf81d (diff) |
smart commit thread
The commit thread now has access to a channel containing the times of
all uncommitted changes. This lets it be smart about detecting busy times
when a batch job is running (such as rm -rf, or untarring something, etc),
and avoid committing until it's done. While at the same time, instantly
committing one-off changes that the user is going to expect to see
immediately.
I had to use STM to implement the channel, because of
http://hackage.haskell.org/trac/ghc/ticket/4154
While this adds a dependency, I always wanted to use STM, so this actually
makes me happy. ;)
Also happy that shouldCommit is a pure function, so other commit smartness
strategies can easily be played with. Although the current one seems pretty
good.
There is one bug, for some reason it does double commits, every time.
Diffstat (limited to 'git-annex.cabal')
-rw-r--r-- | git-annex.cabal | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git-annex.cabal b/git-annex.cabal index 114a4069f..e1ad16453 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -36,7 +36,7 @@ Executable git-annex pcre-light, extensible-exceptions, dataenc, SHA, process, json, HTTP, base == 4.5.*, monad-control, transformers-base, lifted-base, IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, - hinotify + hinotify, STM Other-Modules: Utility.Touch C-Sources: Utility/libdiskfree.c Extensions: CPP @@ -52,7 +52,8 @@ Test-Suite test unix, containers, utf8-string, network, mtl, bytestring, old-locale, time, pcre-light, extensible-exceptions, dataenc, SHA, process, json, HTTP, base == 4.5.*, monad-control, transformers-base, lifted-base, - IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance + IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, + hinotify, STM C-Sources: Utility/libdiskfree.c Extensions: CPP |