Fossil SCM
Fix an issue with "clone" on the client side: the client was requesting multiple copies of artifacts for which it held a delta with a phantom source.
Commit
7646ee13e34f6aad3dec3787968b1c29d87ea6e5
Parent
53f04b180c9b814…
1 file changed
+2
-3
+2
-3
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -125,14 +125,13 @@ | ||
| 125 | 125 | } |
| 126 | 126 | if( pXfer->nToken==4 ){ |
| 127 | 127 | Blob src; |
| 128 | 128 | srcid = rid_from_uuid(&pXfer->aToken[2], 1); |
| 129 | 129 | if( content_get(srcid, &src)==0 ){ |
| 130 | - content_put(&content, blob_str(&pXfer->aToken[1]), srcid); | |
| 131 | - blob_appendf(pXfer->pOut, "gimme %b\n", &pXfer->aToken[2]); | |
| 132 | - pXfer->nGimmeSent++; | |
| 130 | + rid = content_put(&content, blob_str(&pXfer->aToken[1]), srcid); | |
| 133 | 131 | pXfer->nDanglingFile++; |
| 132 | + db_multi_exec("DELETE FROM phantom WHERE rid=%d", rid); | |
| 134 | 133 | return; |
| 135 | 134 | } |
| 136 | 135 | pXfer->nDeltaRcvd++; |
| 137 | 136 | blob_delta_apply(&src, &content, &content); |
| 138 | 137 | blob_reset(&src); |
| 139 | 138 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -125,14 +125,13 @@ | |
| 125 | } |
| 126 | if( pXfer->nToken==4 ){ |
| 127 | Blob src; |
| 128 | srcid = rid_from_uuid(&pXfer->aToken[2], 1); |
| 129 | if( content_get(srcid, &src)==0 ){ |
| 130 | content_put(&content, blob_str(&pXfer->aToken[1]), srcid); |
| 131 | blob_appendf(pXfer->pOut, "gimme %b\n", &pXfer->aToken[2]); |
| 132 | pXfer->nGimmeSent++; |
| 133 | pXfer->nDanglingFile++; |
| 134 | return; |
| 135 | } |
| 136 | pXfer->nDeltaRcvd++; |
| 137 | blob_delta_apply(&src, &content, &content); |
| 138 | blob_reset(&src); |
| 139 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -125,14 +125,13 @@ | |
| 125 | } |
| 126 | if( pXfer->nToken==4 ){ |
| 127 | Blob src; |
| 128 | srcid = rid_from_uuid(&pXfer->aToken[2], 1); |
| 129 | if( content_get(srcid, &src)==0 ){ |
| 130 | rid = content_put(&content, blob_str(&pXfer->aToken[1]), srcid); |
| 131 | pXfer->nDanglingFile++; |
| 132 | db_multi_exec("DELETE FROM phantom WHERE rid=%d", rid); |
| 133 | return; |
| 134 | } |
| 135 | pXfer->nDeltaRcvd++; |
| 136 | blob_delta_apply(&src, &content, &content); |
| 137 | blob_reset(&src); |
| 138 |