diff options
author | 2013-03-28 14:51:39 -0400 | |
---|---|---|
committer | 2013-03-28 14:51:39 -0400 | |
commit | 7e9d3ef900f7d908c08df27e9562b51fb07b41bc (patch) | |
tree | a132334cfce86f1ea1ab2f052849f03a56b59ddf /Assistant/Sync.hs | |
parent | 30e6eb5acf996eb782e9caa4df22e8f25fab80e3 (diff) |
avoid showing web special remote in sync alert
Diffstat (limited to 'Assistant/Sync.hs')
-rw-r--r-- | Assistant/Sync.hs | 11 |
1 files 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 |