avoid displaying alert when syncing only to removable drives and all not attached
authorJoey Hess <joey@kitenet.net>
Wed, 27 Mar 2013 18:25:49 +0000 (14:25 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 27 Mar 2013 18:25:49 +0000 (14:25 -0400)
Assistant/Sync.hs
git-annex.cabal

index 1c8f84fcd3a23fbdd40b912c2a3c02117fba90b0..16a16276f02330b95fa9b78c16b5788c131090fb 100644 (file)
@@ -167,8 +167,10 @@ syncAction rs a
                failed <- a rs
                let failed' = filter (not . Git.repoIsLocalUnknown . Remote.repo) failed
                let succeeded = filter (`notElem` failed) nonxmppremotes
-               updateAlertMap $ mergeAlert i $
-                       syncResultAlert succeeded failed'
+               if null succeeded && null failed'
+                       then removeAlert i
+                       else updateAlertMap $ mergeAlert i $
+                               syncResultAlert succeeded failed'
                return failed
   where
        nonxmppremotes = filter (not . isXMPPRemote) rs
index 8a36e5f4f8c4c7a9bdb1a6e6a774039469c86f60..f82ca8048a0de95fd56b17c5b8fe32310027ef11 100644 (file)
@@ -1,5 +1,5 @@
 Name: git-annex
-Version: 4.20130323
+Version: 4.20130324
 Cabal-Version: >= 1.8
 License: GPL
 Maintainer: Joey Hess <joey@kitenet.net>