diff options
author | Joey Hess <joey@kitenet.net> | 2012-07-22 15:06:18 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-07-22 15:06:18 -0400 |
commit | e4f714d1be7b4341d08e10f1305b24c25da6d70e (patch) | |
tree | a38557d87e71f6d0d0c8a68fcbba8e2e64c8ffa4 /Assistant/DaemonStatus.hs | |
parent | 4ec9244f1af85b95d014103d93de913026b20fe3 (diff) |
pull from newly mounted git remotes
Diffstat (limited to 'Assistant/DaemonStatus.hs')
-rw-r--r-- | Assistant/DaemonStatus.hs | 8 |
1 files changed, 8 insertions, 0 deletions
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 |