export: Let concurrent transfers be done with -J or annex.jobs

Tested working, although I did find this bug in my testing, which also
afflicts sync -J to an export remote.
This commit is contained in:
Joey Hess 2020-05-26 11:43:58 -04:00
parent f7fe71602c
commit 0bcecb67f5
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 23 additions and 2 deletions

View file

@ -44,7 +44,7 @@ import qualified Data.Map as M
import Control.Concurrent
cmd :: Command
cmd = withGlobalOptions [jsonOptions, jsonProgressOption] $
cmd = withGlobalOptions [jobsOption, jsonOptions, jsonProgressOption] $
command "export" SectionCommon
"export content to a remote"
paramTreeish (seek <$$> optParser)
@ -77,7 +77,7 @@ exportTempName ek = mkExportLocation $ toRawFilePath $
".git-annex-tmp-content-" ++ serializeKey (asKey (ek))
seek :: ExportOptions -> CommandSeek
seek o = do
seek o = startConcurrency commandStages $ do
r <- getParsed (exportRemote o)
unlessM (isExportSupported r) $
giveup "That remote does not support exports."