From 05c4dfb9411e54c21aa4c0d49e3662117ac2f549 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 25 Jun 2012 20:16:30 -0400 Subject: fixup merges now done when needed --- Assistant/Threads/Merger.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Assistant/Threads/Merger.hs') diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs index d2c8b9b76..77bf9f416 100644 --- a/Assistant/Threads/Merger.hs +++ b/Assistant/Threads/Merger.hs @@ -70,3 +70,11 @@ onAdd g file _ mergeBranch :: Git.Ref -> Git.Repo -> IO Bool mergeBranch = Git.Merge.mergeNonInteractive . Command.Sync.syncBranch + +{- Manually pull from remotes and merge their branches. Called by the pusher + - when a push fails, which can happen due to a remote not having pushed + - changes to us. That could be because it doesn't have us as a remote, or + - because the assistant is not running there, or other reasons. -} +manualPull :: Git.Ref -> [Remote] -> Annex () +manualPull currentbranch remotes = forM_ remotes $ \r -> + Command.Sync.mergeRemote r currentbranch -- cgit v1.2.3