From e4f714d1be7b4341d08e10f1305b24c25da6d70e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 22 Jul 2012 15:06:18 -0400 Subject: pull from newly mounted git remotes --- Assistant/DaemonStatus.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Assistant/DaemonStatus.hs') diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs index 64c441cee..88306a636 100644 --- a/Assistant/DaemonStatus.hs +++ b/Assistant/DaemonStatus.hs @@ -60,6 +60,14 @@ modifyDaemonStatus_ handle a = liftIO $ modifyMVar_ handle (return . a) modifyDaemonStatus :: DaemonStatusHandle -> (DaemonStatus -> (DaemonStatus, b)) -> Annex b modifyDaemonStatus handle a = liftIO $ modifyMVar handle (return . a) +{- Updates the cached ordered list of remotes from the list in Annex + - state. -} +updateKnownRemotes :: DaemonStatusHandle -> Annex () +updateKnownRemotes dstatus = do + remotes <- Command.Sync.syncRemotes [] + modifyDaemonStatus_ dstatus $ + \s -> s { knownRemotes = remotes } + {- Load any previous daemon status file, and store it in the MVar for this - process to use as its DaemonStatus. Also gets current transfer status. -} startDaemonStatus :: Annex DaemonStatusHandle -- cgit v1.2.3