diff options
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/Threads/Merger.hs | 16 | ||||
-rw-r--r-- | Assistant/XMPP/Git.hs | 1 |
2 files changed, 9 insertions, 8 deletions
diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs index f1a64925d..35d02322d 100644 --- a/Assistant/Threads/Merger.hs +++ b/Assistant/Threads/Merger.hs @@ -17,7 +17,7 @@ import Utility.DirWatcher.Types import qualified Annex.Branch import qualified Git import qualified Git.Branch -import Annex.AutoMerge +import qualified Command.Sync import Annex.TaggedPush import Remote (remoteFromUUID) @@ -72,19 +72,21 @@ onChange file unlessM handleDesynced $ queueDeferredDownloads "retrying deferred download" Later | "/synced/" `isInfixOf` file = - mergecurrent =<< liftAnnex (inRepo Git.Branch.current) + mergecurrent =<< liftAnnex (join Command.Sync.getCurrBranch) | otherwise = noop where changedbranch = fileToBranch file - mergecurrent (Just current) - | equivBranches changedbranch current = - whenM (liftAnnex $ inRepo $ Git.Branch.changed current changedbranch) $ do + mergecurrent currbranch@(Just b, _) + | equivBranches changedbranch b = + whenM (liftAnnex $ inRepo $ Git.Branch.changed b changedbranch) $ do debug [ "merging", Git.fromRef changedbranch - , "into", Git.fromRef current + , "into", Git.fromRef b ] - void $ liftAnnex $ autoMergeFrom changedbranch (Just current) Git.Branch.AutomaticCommit + void $ liftAnnex $ Command.Sync.merge + currbranch Git.Branch.AutomaticCommit + changedbranch mergecurrent _ = noop handleDesynced = case fromTaggedBranch changedbranch of diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs index 9e0b9278b..286fcf879 100644 --- a/Assistant/XMPP/Git.hs +++ b/Assistant/XMPP/Git.hs @@ -27,7 +27,6 @@ import Annex.TaggedPush import Annex.CatFile import Config import Git -import qualified Git.Branch import qualified Types.Remote as Remote import qualified Remote as Remote import Remote.List |