diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-07 15:40:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-07 15:40:44 -0400 |
commit | 20f425be19dafda17c904945dfbf069c496a4ff8 (patch) | |
tree | f280d77ec5ca6d94488fcb505c7d92f15fed3d3a /Annex | |
parent | 0a11b35d89104fa0b9653f15963d273a0d3585c3 (diff) |
make watch use the queue
May not work. Certianly needs to flush the queue from time to time
when only symlink changes are being made.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Queue.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Annex/Queue.hs b/Annex/Queue.hs index 9f2ad6791..a7d4e153b 100644 --- a/Annex/Queue.hs +++ b/Annex/Queue.hs @@ -1,12 +1,13 @@ {- git-annex command queue - - - Copyright 2011 Joey Hess <joey@kitenet.net> + - Copyright 2011, 2012 Joey Hess <joey@kitenet.net> - - Licensed under the GNU GPL version 3 or higher. -} module Annex.Queue ( addCommand, + addUpdateIndex, flush, flushWhenFull ) where @@ -14,6 +15,7 @@ module Annex.Queue ( import Common.Annex import Annex hiding (new) import qualified Git.Queue +import qualified Git.UpdateIndex import Config {- Adds a git command to the queue. -} @@ -22,6 +24,12 @@ addCommand command params files = do q <- get store =<< inRepo (Git.Queue.addCommand command params files q) +{- Adds an update-index stream to the queue. -} +addUpdateIndex :: Git.UpdateIndex.Streamer -> Annex () +addUpdateIndex streamer = do + q <- get + store =<< inRepo (Git.Queue.addUpdateIndex streamer q) + {- Runs the queue if it is full. Should be called periodically. -} flushWhenFull :: Annex () flushWhenFull = do |