From 7e9d3ef900f7d908c08df27e9562b51fb07b41bc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 28 Mar 2013 14:51:39 -0400 Subject: avoid showing web special remote in sync alert --- Assistant/Sync.hs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Assistant/Sync.hs b/Assistant/Sync.hs index 16a16276f..b431a8439 100644 --- a/Assistant/Sync.hs +++ b/Assistant/Sync.hs @@ -158,22 +158,25 @@ pushToRemotes' now notifypushes remotes = do - XMPP remotes are handled specially; since the action can only start - an async process for them, they are not included in the alert, but are - still passed to the action. + - + - Readonly remotes are also hidden (to hide the web special remote). -} syncAction :: [Remote] -> ([Remote] -> Assistant [Remote]) -> Assistant [Remote] syncAction rs a - | null nonxmppremotes = a rs + | null visibleremotes = a rs | otherwise = do - i <- addAlert $ syncAlert nonxmppremotes + i <- addAlert $ syncAlert visibleremotes failed <- a rs let failed' = filter (not . Git.repoIsLocalUnknown . Remote.repo) failed - let succeeded = filter (`notElem` failed) nonxmppremotes + let succeeded = filter (`notElem` failed) visibleremotes if null succeeded && null failed' then removeAlert i else updateAlertMap $ mergeAlert i $ syncResultAlert succeeded failed' return failed where - nonxmppremotes = filter (not . isXMPPRemote) rs + visibleremotes = filter (not . Remote.readonly) $ + filter (not . isXMPPRemote) rs {- Manually pull from remotes and merge their branches. Returns any - remotes that it failed to pull from, and a Bool indicating -- cgit v1.2.3