| | @@ -54,11 +54,11 @@ |
| 54 | 54 | time_t maxTime; /* Time when this transfer should be finished */ |
| 55 | 55 | }; |
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | /* |
| 59 | | -** The input blob contains a UUID. Convert it into a record ID. |
| 59 | +** The input blob contains an artifact. Convert it into a record ID. |
| 60 | 60 | ** Create a phantom record if no prior record exists and |
| 61 | 61 | ** phantomize is true. |
| 62 | 62 | ** |
| 63 | 63 | ** Compare to uuid_to_rid(). This routine takes a blob argument |
| 64 | 64 | ** and does less error checking. |
| | @@ -100,12 +100,12 @@ |
| 100 | 100 | ** message. This routine finishes parsing that message and does |
| 101 | 101 | ** a record insert of the file. |
| 102 | 102 | ** |
| 103 | 103 | ** The file line is in one of the following two forms: |
| 104 | 104 | ** |
| 105 | | -** file UUID SIZE \n CONTENT |
| 106 | | -** file UUID DELTASRC SIZE \n CONTENT |
| 105 | +** file HASH SIZE \n CONTENT |
| 106 | +** file HASH DELTASRC SIZE \n CONTENT |
| 107 | 107 | ** |
| 108 | 108 | ** The content is SIZE bytes immediately following the newline. |
| 109 | 109 | ** If DELTASRC exists, then the CONTENT is a delta against the |
| 110 | 110 | ** content of DELTASRC. |
| 111 | 111 | ** |
| | @@ -217,18 +217,18 @@ |
| 217 | 217 | ** a record insert of the file. The difference between "file" and |
| 218 | 218 | ** "cfile" is that with "cfile" the content is already compressed. |
| 219 | 219 | ** |
| 220 | 220 | ** The file line is in one of the following two forms: |
| 221 | 221 | ** |
| 222 | | -** cfile UUID USIZE CSIZE \n CONTENT |
| 223 | | -** cfile UUID DELTASRC USIZE CSIZE \n CONTENT |
| 222 | +** cfile HASH USIZE CSIZE \n CONTENT |
| 223 | +** cfile HASH DELTASRC USIZE CSIZE \n CONTENT |
| 224 | 224 | ** |
| 225 | 225 | ** The content is CSIZE bytes immediately following the newline. |
| 226 | 226 | ** If DELTASRC exists, then the CONTENT is a delta against the |
| 227 | 227 | ** content of DELTASRC. |
| 228 | 228 | ** |
| 229 | | -** The original size of the UUID artifact is USIZE. |
| 229 | +** The original size of the HASH artifact is USIZE. |
| 230 | 230 | ** |
| 231 | 231 | ** If any error occurs, write a message into pErr which has already |
| 232 | 232 | ** be initialized to an empty string. |
| 233 | 233 | ** |
| 234 | 234 | ** Any artifact successfully received by this routine is considered to |
| | @@ -415,11 +415,11 @@ |
| 415 | 415 | static int send_delta_parent( |
| 416 | 416 | Xfer *pXfer, /* The transfer context */ |
| 417 | 417 | int rid, /* record id of the file to send */ |
| 418 | 418 | int isPrivate, /* True if rid is a private artifact */ |
| 419 | 419 | Blob *pContent, /* The content of the file to send */ |
| 420 | | - Blob *pUuid /* The UUID of the file to send */ |
| 420 | + Blob *pUuid /* The HASH of the file to send */ |
| 421 | 421 | ){ |
| 422 | 422 | static const char *const azQuery[] = { |
| 423 | 423 | "SELECT pid FROM plink x" |
| 424 | 424 | " WHERE cid=%d" |
| 425 | 425 | " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)", |
| | @@ -469,11 +469,11 @@ |
| 469 | 469 | */ |
| 470 | 470 | static int send_delta_native( |
| 471 | 471 | Xfer *pXfer, /* The transfer context */ |
| 472 | 472 | int rid, /* record id of the file to send */ |
| 473 | 473 | int isPrivate, /* True if rid is a private artifact */ |
| 474 | | - Blob *pUuid /* The UUID of the file to send */ |
| 474 | + Blob *pUuid /* The HASH of the file to send */ |
| 475 | 475 | ){ |
| 476 | 476 | Blob src, delta; |
| 477 | 477 | int size = 0; |
| 478 | 478 | int srcId; |
| 479 | 479 | |
| | @@ -504,11 +504,11 @@ |
| 504 | 504 | } |
| 505 | 505 | |
| 506 | 506 | /* |
| 507 | 507 | ** Send the file identified by rid. |
| 508 | 508 | ** |
| 509 | | -** The pUuid can be NULL in which case the correct UUID is computed |
| 509 | +** The pUuid can be NULL in which case the correct hash is computed |
| 510 | 510 | ** from the rid. |
| 511 | 511 | ** |
| 512 | 512 | ** Try to send the file as a native delta if nativeDelta is true, or |
| 513 | 513 | ** as a parent delta if nativeDelta is false. |
| 514 | 514 | ** |
| | @@ -1198,12 +1198,12 @@ |
| 1198 | 1198 | while( blob_line(xfer.pIn, &xfer.line) ){ |
| 1199 | 1199 | if( blob_buffer(&xfer.line)[0]=='#' ) continue; |
| 1200 | 1200 | if( blob_size(&xfer.line)==0 ) continue; |
| 1201 | 1201 | xfer.nToken = blob_tokenize(&xfer.line, xfer.aToken, count(xfer.aToken)); |
| 1202 | 1202 | |
| 1203 | | - /* file UUID SIZE \n CONTENT |
| 1204 | | - ** file UUID DELTASRC SIZE \n CONTENT |
| 1203 | + /* file HASH SIZE \n CONTENT |
| 1204 | + ** file HASH DELTASRC SIZE \n CONTENT |
| 1205 | 1205 | ** |
| 1206 | 1206 | ** Accept a file from the client. |
| 1207 | 1207 | */ |
| 1208 | 1208 | if( blob_eq(&xfer.aToken[0], "file") ){ |
| 1209 | 1209 | if( !isPush ){ |
| | @@ -1219,12 +1219,12 @@ |
| 1219 | 1219 | nErr++; |
| 1220 | 1220 | break; |
| 1221 | 1221 | } |
| 1222 | 1222 | }else |
| 1223 | 1223 | |
| 1224 | | - /* cfile UUID USIZE CSIZE \n CONTENT |
| 1225 | | - ** cfile UUID DELTASRC USIZE CSIZE \n CONTENT |
| 1224 | + /* cfile HASH USIZE CSIZE \n CONTENT |
| 1225 | + ** cfile HASH DELTASRC USIZE CSIZE \n CONTENT |
| 1226 | 1226 | ** |
| 1227 | 1227 | ** Accept a file from the client. |
| 1228 | 1228 | */ |
| 1229 | 1229 | if( blob_eq(&xfer.aToken[0], "cfile") ){ |
| 1230 | 1230 | if( !isPush ){ |
| | @@ -1254,11 +1254,11 @@ |
| 1254 | 1254 | nErr++; |
| 1255 | 1255 | break; |
| 1256 | 1256 | } |
| 1257 | 1257 | }else |
| 1258 | 1258 | |
| 1259 | | - /* gimme UUID |
| 1259 | + /* gimme HASH |
| 1260 | 1260 | ** |
| 1261 | 1261 | ** Client is requesting a file. Send it. |
| 1262 | 1262 | */ |
| 1263 | 1263 | if( blob_eq(&xfer.aToken[0], "gimme") |
| 1264 | 1264 | && xfer.nToken==2 |
| | @@ -1282,11 +1282,11 @@ |
| 1282 | 1282 | && blob_is_filename(&xfer.aToken[1]) |
| 1283 | 1283 | ){ |
| 1284 | 1284 | send_unversioned_file(&xfer, blob_str(&xfer.aToken[1]), 0); |
| 1285 | 1285 | }else |
| 1286 | 1286 | |
| 1287 | | - /* igot UUID ?ISPRIVATE? |
| 1287 | + /* igot HASH ?ISPRIVATE? |
| 1288 | 1288 | ** |
| 1289 | 1289 | ** Client announces that it has a particular file. If the ISPRIVATE |
| 1290 | 1290 | ** argument exists and is non-zero, then the file is a private file. |
| 1291 | 1291 | */ |
| 1292 | 1292 | if( xfer.nToken>=2 |
| | @@ -2028,22 +2028,22 @@ |
| 2028 | 2028 | lastPctDone = pctDone; |
| 2029 | 2029 | fflush(stdout); |
| 2030 | 2030 | } |
| 2031 | 2031 | } |
| 2032 | 2032 | |
| 2033 | | - /* file UUID SIZE \n CONTENT |
| 2034 | | - ** file UUID DELTASRC SIZE \n CONTENT |
| 2033 | + /* file HASH SIZE \n CONTENT |
| 2034 | + ** file HASH DELTASRC SIZE \n CONTENT |
| 2035 | 2035 | ** |
| 2036 | 2036 | ** Receive a file transmitted from the server. |
| 2037 | 2037 | */ |
| 2038 | 2038 | if( blob_eq(&xfer.aToken[0],"file") ){ |
| 2039 | 2039 | xfer_accept_file(&xfer, (syncFlags & SYNC_CLONE)!=0, 0, 0); |
| 2040 | 2040 | nArtifactRcvd++; |
| 2041 | 2041 | }else |
| 2042 | 2042 | |
| 2043 | | - /* cfile UUID USIZE CSIZE \n CONTENT |
| 2044 | | - ** cfile UUID DELTASRC USIZE CSIZE \n CONTENT |
| 2043 | + /* cfile HASH USIZE CSIZE \n CONTENT |
| 2044 | + ** cfile HASH DELTASRC USIZE CSIZE \n CONTENT |
| 2045 | 2045 | ** |
| 2046 | 2046 | ** Receive a compressed file transmitted from the server. |
| 2047 | 2047 | */ |
| 2048 | 2048 | if( blob_eq(&xfer.aToken[0],"cfile") ){ |
| 2049 | 2049 | xfer_accept_compressed_file(&xfer, 0, 0); |
| | @@ -2062,11 +2062,11 @@ |
| 2062 | 2062 | fossil_print("\rUnversioned-file received: %s\n", |
| 2063 | 2063 | blob_str(&xfer.aToken[1])); |
| 2064 | 2064 | } |
| 2065 | 2065 | }else |
| 2066 | 2066 | |
| 2067 | | - /* gimme UUID |
| 2067 | + /* gimme HASH |
| 2068 | 2068 | ** |
| 2069 | 2069 | ** Server is requesting a file. If the file is a manifest, assume |
| 2070 | 2070 | ** that the server will also want to know all of the content files |
| 2071 | 2071 | ** associated with the manifest and send those too. |
| 2072 | 2072 | */ |
| | @@ -2078,11 +2078,11 @@ |
| 2078 | 2078 | int rid = rid_from_uuid(&xfer.aToken[1], 0, 0); |
| 2079 | 2079 | if( rid ) send_file(&xfer, rid, &xfer.aToken[1], 0); |
| 2080 | 2080 | } |
| 2081 | 2081 | }else |
| 2082 | 2082 | |
| 2083 | | - /* igot UUID ?PRIVATEFLAG? |
| 2083 | + /* igot HASH ?PRIVATEFLAG? |
| 2084 | 2084 | ** |
| 2085 | 2085 | ** Server announces that it has a particular file. If this is |
| 2086 | 2086 | ** not a file that we have and we are pulling, then create a |
| 2087 | 2087 | ** phantom to cause this file to be requested on the next cycle. |
| 2088 | 2088 | ** Always remember that the server has this file so that we do |
| 2089 | 2089 | |