lock to avoid more than one export to a remote at a time
This commit was sponsored by Jack Hill on Patreon.
This commit is contained in:
parent
af0958dd70
commit
486902389d
3 changed files with 11 additions and 2 deletions
|
@ -23,6 +23,7 @@ import Types.Remote
|
|||
import Types.Export
|
||||
import Annex.Content
|
||||
import Annex.CatFile
|
||||
import Annex.LockFile
|
||||
import Logs.Location
|
||||
import Logs.Export
|
||||
import Database.Export
|
||||
|
@ -85,7 +86,10 @@ seek o = do
|
|||
r <- getParsed (exportRemote o)
|
||||
unlessM (isExportSupported r) $
|
||||
giveup "That remote does not support exports."
|
||||
withExclusiveLock (gitAnnexExportLock (uuid r)) (seek' o r)
|
||||
|
||||
seek' :: ExportOptions -> Remote -> CommandSeek
|
||||
seek' o r = do
|
||||
new <- fromMaybe (giveup "unknown tree") <$>
|
||||
-- Dereference the tree pointed to by the branch, commit,
|
||||
-- or tag.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue