diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-09-20 16:22:32 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-09-20 16:22:32 -0400 |
commit | 14f19bdafd2dfcbece16214f168a3f8154a24581 (patch) | |
tree | 9dcac9ace786cb226ebcf98ff7c712dfa139f7cf /Remote/Helper | |
parent | 594a0da4e7510699b2e14abfe9166d3a18035fbb (diff) |
refactor
Diffstat (limited to 'Remote/Helper')
-rw-r--r-- | Remote/Helper/Export.hs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/Remote/Helper/Export.hs b/Remote/Helper/Export.hs index f5c3585c5..8fe4dc524 100644 --- a/Remote/Helper/Export.hs +++ b/Remote/Helper/Export.hs @@ -16,10 +16,7 @@ import Types.Key import Backend import Remote.Helper.Encryptable (isEncrypted) import Database.Export -import Logs.Export import Annex.Export -import Annex.LockFile -import Git.Sha import qualified Data.Map as M import Control.Concurrent.STM @@ -103,16 +100,8 @@ adjustExportable r = case M.lookup "exporttree" (config r) of -- updates the database, to notice when an export has been -- updated from another repository. let getexportlocs = \k -> do - whenM updateonce $ withExclusiveLock (gitAnnexExportLock (uuid r)) $ do - old <- liftIO $ fromMaybe emptyTree - <$> getExportTreeCurrent db - l <- getExport (uuid r) - case map exportedTreeish l of - (new:[]) | new /= old -> do - updateExportTree db old new - liftIO $ recordExportTreeCurrent db new - liftIO $ flushDbQueue db - _ -> return () + whenM updateonce $ + updateExportTreeFromLog db liftIO $ getExportTree db k return $ r |