@@ -125,12 +125,16 @@ The following requests *must* all be supported by the special remote.
125
125
* ` PREPARE-FAILURE ErrorMsg `
126
126
Sent as a response to PREPARE if the special remote cannot be used.
127
127
* ` TRANSFER STORE|RETRIEVE Key File `
128
- Requests the transfer of a key. For STORE, the File is the file to upload;
129
- for RETRIEVE the File is where to store the download.
130
- Note that the File should not influence the filename used on the remote.
131
- Note that in some cases, the File may contain whitespace.
132
- It's important that, while a Key is being stored, ` CHECKPRESENT `
133
- not indicate it's present until all the data has been transferred.
128
+ Requests the transfer of a key. This is the main thing a special remote
129
+ does. For STORE, the File contains the content to upload;
130
+ for RETRIEVE the File is where to store the content you download.
131
+ When retrieving, the File may already exist, if its retieval was
132
+ interrupted before. That lets the remote resume downloading, if it's able
133
+ to.
134
+ Note that the File should not influence the filename used on the remote;
135
+ that filename should be based on the Key.
136
+ Note that in some cases, the File's name may include whitespace or other
137
+ special characters.
134
138
While the transfer is running, the remote can send any number of
135
139
` PROGRESS ` messages to indicate its progress. It can also send any of the
136
140
other special remote messages. Once the transfer is done, it finishes by
@@ -140,7 +144,10 @@ The following requests *must* all be supported by the special remote.
140
144
* ` TRANSFER-FAILURE STORE|RETRIEVE Key ErrorMsg `
141
145
Indicates the transfer failed.
142
146
* ` CHECKPRESENT Key `
143
- Requests the remote to check if a key is present in it.
147
+ Requests the remote to check if a key is present in it.
148
+ It's important that, while a key is being transferred to a remote,
149
+ ` CHECKPRESENT ` not indicate it's present in the remote until all
150
+ the data has been sent.
144
151
* ` CHECKPRESENT-SUCCESS Key `
145
152
Indicates that a key has been positively verified to be present in the
146
153
remote.
@@ -270,13 +277,18 @@ handling a request.
270
277
(git-annex does not send a reply to this message, but may give up if it
271
278
doesn't support the necessary protocol version.)
272
279
* ` PROGRESS Int `
273
- Indicates the current progress of the transfer (in bytes). May be repeated
274
- any number of times during the transfer process, but it's wasteful to
275
- update the progress too frequently. Bear in mind that this is used both
280
+ Indicates the current progress of the transfer. The Int is the
281
+ number of bytes from the beginning of the file that have been
282
+ transferred.
283
+ May be repeated any number of times during the transfer
284
+ process, but it's wasteful to update the progress too frequently.
285
+ Bear in mind that this is used both
276
286
to display a progress meter for the user, and for annex.stalldetection.
277
287
So, sending an update on each 1% of the file may not be frequent enough,
278
288
as it could appear to be a stall when transferring a large file.
279
- This is highly recommended for STORE. (It is optional but good for RETRIEVE.)
289
+ This is highly recommended for STORE.
290
+ (It is optional but good for RETRIEVE; git-annex will fall back to
291
+ tracking the size of the file as it grows.)
280
292
(git-annex does not send a reply to this message.)
281
293
* ` DIRHASH Key `
282
294
Gets a two level hash associated with a Key. Something like "aB/Cd".
@@ -291,7 +303,6 @@ handling a request.
291
303
creating hash directory structures to store Keys in. This is the same
292
304
directory hash that is used by eg, the directory special remote.
293
305
(git-annex replies with VALUE followed by the value.)
294
- (First supported by git-annex version 6.20160511.)
295
306
* ` SETCONFIG Setting Value `
296
307
Sets one of the special remote's configuration settings.
297
308
Normally this is sent during INITREMOTE, which allows these settings
0 commit comments