From 20f425be19dafda17c904945dfbf069c496a4ff8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 7 Jun 2012 15:40:44 -0400 Subject: 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. --- Annex/Queue.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Annex') 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 + - Copyright 2011, 2012 Joey Hess - - 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 -- cgit v1.2.3