diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-28 12:26:16 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-28 12:26:16 -0400 |
commit | 900c29071ad6b342be4eea00439fc355503ecbd2 (patch) | |
tree | d35adcadd1f063f1ae5b7205e82b845f18c8dd5f /Assistant/Threads/Merger.hs | |
parent | 7a15547943bf87131b13804c9337eec59f9b9350 (diff) | |
parent | 68f5d56115c2e4011b9a9be7c2585c1fe43f4957 (diff) |
Merge branch 'no-xmpp'
Diffstat (limited to 'Assistant/Threads/Merger.hs')
-rw-r--r-- | Assistant/Threads/Merger.hs | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs index ce0dfbcb4..0bb37e664 100644 --- a/Assistant/Threads/Merger.hs +++ b/Assistant/Threads/Merger.hs @@ -10,19 +10,12 @@ module Assistant.Threads.Merger where import Assistant.Common import Assistant.TransferQueue import Assistant.BranchChange -import Assistant.DaemonStatus -import Assistant.ScanRemotes import Utility.DirWatcher import Utility.DirWatcher.Types import qualified Annex.Branch import qualified Git import qualified Git.Branch import qualified Command.Sync -import Annex.TaggedPush -import Remote (remoteFromUUID) - -import qualified Data.Set as S -import qualified Data.Text as T {- This thread watches for changes to .git/refs/, and handles incoming - pushes. -} @@ -69,8 +62,7 @@ onChange file branchChanged diverged <- liftAnnex Annex.Branch.forceUpdate when diverged $ - unlessM handleDesynced $ - queueDeferredDownloads "retrying deferred download" Later + queueDeferredDownloads "retrying deferred download" Later | "/synced/" `isInfixOf` file = mergecurrent =<< liftAnnex (join Command.Sync.getCurrBranch) | otherwise = noop @@ -90,22 +82,6 @@ onChange file changedbranch mergecurrent _ = noop - handleDesynced = case fromTaggedBranch changedbranch of - Nothing -> return False - Just (u, info) -> do - mr <- liftAnnex $ remoteFromUUID u - case mr of - Nothing -> return False - Just r -> do - s <- desynced <$> getDaemonStatus - if S.member u s || Just (T.unpack $ getXMPPClientID r) == info - then do - modifyDaemonStatus_ $ \st -> st - { desynced = S.delete u s } - addScanRemotes True [r] - return True - else return False - equivBranches :: Git.Ref -> Git.Ref -> Bool equivBranches x y = base x == base y where |