From 6b91074b4dda6dff353770e054ae550c7d1c3b4c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 29 Oct 2012 17:52:43 -0400 Subject: split and lift Assistant.Pushes --- Assistant/Sync.hs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Assistant/Sync.hs') 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 -- cgit v1.2.3