assistant: update export db after mergeing git-annex branch changes

Needed so that the assistant can download from exports.
updateExportTreeFromLog is normally only run one time, but needs to be
run repeatedly during the lifetime of the assistant.

This commit was sponsored by Ethan Aubin on Patreon.
This commit is contained in:
Joey Hess 2017-09-20 16:34:29 -04:00
parent 129418615b
commit 82a2d19af1
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 12 additions and 1 deletions

View file

@ -10,6 +10,7 @@ module Assistant.Threads.Merger where
import Assistant.Common
import Assistant.TransferQueue
import Assistant.BranchChange
import Assistant.Sync
import Utility.DirWatcher
import Utility.DirWatcher.Types
import qualified Annex.Branch
@ -62,7 +63,8 @@ onChange file
| isAnnexBranch file = do
branchChanged
diverged <- liftAnnex Annex.Branch.forceUpdate
when diverged $
when diverged $ do
updateExportTreeFromLogAll
queueDeferredDownloads "retrying deferred download" Later
| otherwise = mergecurrent
where