add transferkey command

Used by the assistant, rather than copy, this is faster because it avoids
using git ls-files, avoids checking the location log redundantly, and
runs in oneshot mode, avoiding making a commit to the git-annex branch
for every file transferred.
This commit is contained in:
Joey Hess 2012-08-24 17:23:58 -04:00
parent ab5e409a95
commit 8de7699f39
4 changed files with 65 additions and 2 deletions

View file

@ -17,6 +17,7 @@ import Logs.Transfer
import Logs.Location
import Annex.Content
import qualified Remote
import Types.Key
import System.Process (create_group)
@ -101,11 +102,12 @@ transferThread dstatus slots t info runner = case (transferRemote info, associat
where
command = "git-annex"
params =
[ Param "copy"
, Param "--fast"
[ Param "transferkey"
, Param $ key2file $ transferKey t
, Param $ if isdownload
then "--from"
else "--to"
, Param $ Remote.name remote
, Param "--file"
, File file
]