summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-07-26 16:53:50 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-07-26 16:54:20 -0400
commit29436c57435a44dff91e3408f535d44ffe99f577 (patch)
treee7a8eda0848c4c942846136e085fcb88ae0a9c1e
parent8a5226ec12a0851abf2c86222ed5446f45657768 (diff)
assistant: Fix NetWatcher to not sync with remotes that have remote.<name>.annex-sync set to false.
This affected both the hourly NetWatcherFallback thread and the syncing when network connection is detected. It was a reversion of sorts, introduced in 8655ea7f8e853b7de4defbca2655b741362ecd21, when annex-ignore was changed to not control git syncing. I forgot to make it check annex-sync at that point.
-rw-r--r--Assistant/Threads/NetWatcher.hs8
-rw-r--r--debian/changelog2
-rw-r--r--doc/bugs/assistant_syncs_with_remotes_even_when_all_remotes_disabled.mdwn4
3 files changed, 10 insertions, 4 deletions
diff --git a/Assistant/Threads/NetWatcher.hs b/Assistant/Threads/NetWatcher.hs
index 6ac7203b0..5974de11d 100644
--- a/Assistant/Threads/NetWatcher.hs
+++ b/Assistant/Threads/NetWatcher.hs
@@ -13,8 +13,8 @@ module Assistant.Threads.NetWatcher where
import Assistant.Common
import Assistant.Sync
import Utility.ThreadScheduler
-import Remote.List
import qualified Types.Remote as Remote
+import Assistant.DaemonStatus
#if WITH_DBUS
import Utility.DBus
@@ -125,7 +125,7 @@ listenWicdConnections client callback =
handleConnection :: Assistant ()
handleConnection = reconnectRemotes True =<< networkRemotes
-{- Finds network remotes. -}
+{- Network remotes to sync with. -}
networkRemotes :: Assistant [Remote]
-networkRemotes = liftAnnex $
- filter (isNothing . Remote.localpath) <$> remoteList
+networkRemotes = filter (isNothing . Remote.localpath) . syncRemotes
+ <$> getDaemonStatus
diff --git a/debian/changelog b/debian/changelog
index f904e7df4..929242629 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,8 @@ git-annex (4.20130724) UNRELEASED; urgency=low
gpg.
* unused: No longer shows as unused tmp files that are actively being
transferred.
+ * assistant: Fix NetWatcher to not sync with remotes that have
+ remote.<name>.annex-sync set to false.
-- Joey Hess <joeyh@debian.org> Tue, 23 Jul 2013 12:39:48 -0400
diff --git a/doc/bugs/assistant_syncs_with_remotes_even_when_all_remotes_disabled.mdwn b/doc/bugs/assistant_syncs_with_remotes_even_when_all_remotes_disabled.mdwn
index 99e3eebea..959620ba6 100644
--- a/doc/bugs/assistant_syncs_with_remotes_even_when_all_remotes_disabled.mdwn
+++ b/doc/bugs/assistant_syncs_with_remotes_even_when_all_remotes_disabled.mdwn
@@ -27,3 +27,7 @@ Everything up-to-date
Everything up-to-date
Everything up-to-date
"""]]
+
+> Excellent bug report! Especially useful that you tracked it
+> down to the NetWatcher. Indeed it was not honoring the
+> annex-sync setting. [[fixed|done]] --[[Joey]]