add unlocked flag for git-annex-shell recvkey

The direct flag is also set when sending unlocked content, to support old
versions of git-annex-shell. At some point, the direct flag will be
removed, and only the unlocked flag will be used.
This commit is contained in:
Joey Hess 2015-12-26 13:59:27 -04:00
parent f324ad24c1
commit f776ac0a11
Failed to extract signature
5 changed files with 14 additions and 6 deletions

View file

@ -126,10 +126,13 @@ rsyncHelper m params = do
{- Generates rsync parameters that ssh to the remote and asks it
- to either receive or send the key's content. -}
rsyncParamsRemote :: Bool -> Remote -> Direction -> Key -> FilePath -> AssociatedFile -> Annex [CommandParam]
rsyncParamsRemote direct r direction key file afile = do
rsyncParamsRemote unlocked r direction key file afile = do
u <- getUUID
let fields = (Fields.remoteUUID, fromUUID u)
: (Fields.direct, if direct then "1" else "")
: (Fields.unlocked, if unlocked then "1" else "")
-- Send direct field for unlocked content, for backwards
-- compatability.
: (Fields.direct, if unlocked then "1" else "")
: maybe [] (\f -> [(Fields.associatedFile, f)]) afile
Just (shellcmd, shellparams) <- git_annex_shell (repo r)
(if direction == Download then "sendkey" else "recvkey")