diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-29 17:52:43 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-29 17:52:43 -0400 |
commit | 6b91074b4dda6dff353770e054ae550c7d1c3b4c (patch) | |
tree | e539e242355d306c0e6351053a4fc717902cb93d /Assistant/Sync.hs | |
parent | 37d888f9b4a33933b2e894791ed85647c02e6182 (diff) |
split and lift Assistant.Pushes
Diffstat (limited to 'Assistant/Sync.hs')
-rw-r--r-- | Assistant/Sync.hs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Assistant/Sync.hs b/Assistant/Sync.hs index 6a2f5266e..b16382d82 100644 --- a/Assistant/Sync.hs +++ b/Assistant/Sync.hs @@ -100,17 +100,15 @@ pushToRemotes now notifypushes remotes = do if null failed then do when notifypushes $ - notifyPush (map Remote.uuid succeeded) <<~ pushNotifier + notifyPush (map Remote.uuid succeeded) return True else if shouldretry then retry branch g u failed else fallback branch g u failed - updatemap succeeded failed = do - pushmap <- getAssistant failedPushMap - liftIO $ changeFailedPushMap pushmap $ \m -> - M.union (makemap failed) $ - M.difference m (makemap succeeded) + updatemap succeeded failed = changeFailedPushMap $ \m -> + M.union (makemap failed) $ + M.difference m (makemap succeeded) makemap l = M.fromList $ zip l (repeat now) retry branch g u rs = do @@ -124,7 +122,7 @@ pushToRemotes now notifypushes remotes = do inParallel (pushfallback g u branch) rs updatemap succeeded failed when (notifypushes && (not $ null succeeded)) $ - notifyPush (map Remote.uuid succeeded) <<~ pushNotifier + notifyPush (map Remote.uuid succeeded) return $ null failed push g branch remote = Command.Sync.pushBranch remote branch g |