git-annex/Remote
Joey Hess 1b55af4c3c
deal with unlocked files when calling rsyncParamsRemote
In copyFromRemote, it used to check isDirect, but that was not needed;
the remote is sending the file, so it doesn't matter if the local,
receiving repository is in direct mode or not. And, since the content is not
present, yet, it's certianly not unlocked. Note that, the remote may indeed
be sending an unlocked file, but sendkey uses sendAnnex, which will detect
if the file is modified before or during transfer, and will exit nonzero,
aborting the upload. So, the receiver doesn't need any checks.

In copyToRemote, it forces recvkey to verify content whenever it's being
sent from a v6 repository. recvkey is almost always going to verify content
anyway, unless annex.verify is not set. So, this doesn't make it any more
expensive, except for in that unusual configuration. The alternative would
be to change the recvkey interface, so that the sender checks afterwards if
what it was sending changed, and the receiver then throws out the bad
transfer. That would be less expensive for the reciever, as it would not
need to do a checksum verification. But, it would mean another network
round trip, and since rsync closes the connection, it would need to open
another ssh connection to do this. Even with connction caching, that would
add latency to uploads. It would also complicate the interface, especially
because an older git-annex-shell would not have the new interface
available. For these reasons, I prefer punting on that at this time, and
instead someone might set annex.verify=false and be unhappy that it still
verifies..

(One other gotcha not dealt with is that a v5 repo could be upgraded to v6
while an upload is in progress, and a file unlocked and modified.)

(Also, I double-checked Remote.GCrypt's calls to rsyncParamsRemote, and
they're fine. When a file is being uploaded to gcrypt, or any other special
repository, it is mediated by sendAnnex, so changes will be detected at
that level and the special remote implementation doesn't need to worry
about them.)
2015-12-26 14:16:27 -04:00
..
Directory update my email address and homepage url 2015-01-21 12:50:09 -04:00
External Added WHEREIS to external special remote protocol. 2015-08-13 17:27:50 -04:00
Helper add unlocked flag for git-annex-shell recvkey 2015-12-26 13:59:27 -04:00
Rsync windows build fix 2015-01-29 13:46:57 -04:00
WebDAV groundwork for parameterizing hash depth 2015-01-28 15:55:17 -04:00
BitTorrent.hs add removeKey action to Remote 2015-10-08 15:01:38 -04:00
Bup.hs add removeKey action to Remote 2015-10-08 15:01:38 -04:00
Ddar.hs add removeKey action to Remote 2015-10-08 15:01:38 -04:00
Directory.hs add removeKey action to Remote 2015-10-08 15:01:38 -04:00
External.hs improve error message when special remote program cannot be run 2015-11-18 12:30:01 -04:00
GCrypt.hs add removeKey action to Remote 2015-10-08 15:01:38 -04:00
Git.hs deal with unlocked files when calling rsyncParamsRemote 2015-12-26 14:16:27 -04:00
Glacier.hs add removeKey action to Remote 2015-10-08 15:01:38 -04:00
Hook.hs add removeKey action to Remote 2015-10-08 15:01:38 -04:00
List.hs Simplify setup process for a ssh remote. 2015-08-05 13:49:58 -04:00
Rsync.hs add removeKey action to Remote 2015-10-08 15:01:38 -04:00
S3.hs Display progress meter in -J mode when downloading from the web. 2015-11-16 21:00:54 -04:00
Tahoe.hs tahoe: Include tahoe capabilities in whereis display. 2015-11-30 15:35:53 -04:00
Web.hs Display progress meter in -J mode when downloading from the web. 2015-11-16 21:00:54 -04:00
WebDAV.hs webdav: When testing the WebDAV server, send a file with content. The empty file it was sending tickled bugs in some php WebDAV server. 2015-12-11 12:13:20 -04:00