From 746ffa773a694b6e50c023bf9954be20e9da795e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 17 Mar 2013 15:59:03 -0400 Subject: [PATCH] assistant: Avoid syncing with annex-ignored remotes when reconnecting to the network, or connecting a drive. --- Assistant/Threads/MountWatcher.hs | 2 +- Assistant/Threads/NetWatcher.hs | 2 +- debian/changelog | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Assistant/Threads/MountWatcher.hs b/Assistant/Threads/MountWatcher.hs index 143ae9cee4..c03eac4f14 100644 --- a/Assistant/Threads/MountWatcher.hs +++ b/Assistant/Threads/MountWatcher.hs @@ -157,7 +157,7 @@ handleMount :: FilePath -> Assistant () handleMount dir = do debug ["detected mount of", dir] rs <- filter (Git.repoIsLocal . Remote.repo) <$> remotesUnder dir - reconnectRemotes True rs + reconnectRemotes True $ filter (not . remoteAnnexIgnore . Remote.gitconfig) rs {- Finds remotes located underneath the mount point. - diff --git a/Assistant/Threads/NetWatcher.hs b/Assistant/Threads/NetWatcher.hs index 6ac7203b0f..6d15d414eb 100644 --- a/Assistant/Threads/NetWatcher.hs +++ b/Assistant/Threads/NetWatcher.hs @@ -128,4 +128,4 @@ handleConnection = reconnectRemotes True =<< networkRemotes {- Finds network remotes. -} networkRemotes :: Assistant [Remote] networkRemotes = liftAnnex $ - filter (isNothing . Remote.localpath) <$> remoteList + filter (isNothing . Remote.localpath) <$> enabledRemoteList diff --git a/debian/changelog b/debian/changelog index 0df456a87d..b79be5309f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,8 @@ git-annex (4.20130315) UNRELEASED; urgency=low * map: Combine duplicate repositories, for a nicer looking map. * Fix several bugs caused by a bad Ord instance for Remote. * webapp: Switch all forms to POST. + * assistant: Avoid syncing with annex-ignored remotes when reconnecting + to the network, or connecting a drive. -- Joey Hess Fri, 15 Mar 2013 00:10:07 -0400