Fossil SCM

In send_file(), do not send an artifact whose content cannot be rebuilt because it is a delta from something that has not arrived. A "file" card with no content was sent for it, which the receiver refused as having the wrong hash, so the sync failed.

dmestas 2026-11-12 04:04 UTC small-fixes
Commit 24256a040bb9a6b8e6d6e06c0f94180f241405e3500abb24051b7551ee6bc6ed
1 file changed +7 -1
+7 -1
--- src/xfer.c
+++ src/xfer.c
@@ -608,11 +608,17 @@
608608
if( size ){
609609
pXfer->nDeltaSent++;
610610
}
611611
}
612612
if( size==0 ){
613
- content_get(rid, &content);
613
+ if( content_get(rid, &content)==0 ){
614
+ /* A delta whose source has not arrived yet. The content cannot
615
+ ** be rebuilt, so there is nothing that can be sent. */
616
+ blob_reset(&content);
617
+ blob_reset(&uuid);
618
+ return;
619
+ }
614620
615621
if( !nativeDelta && blob_size(&content)>100 ){
616622
size = send_delta_parent(pXfer, rid, isPriv, &content, pUuid);
617623
}
618624
if( size==0 ){
619625
--- src/xfer.c
+++ src/xfer.c
@@ -608,11 +608,17 @@
608 if( size ){
609 pXfer->nDeltaSent++;
610 }
611 }
612 if( size==0 ){
613 content_get(rid, &content);
 
 
 
 
 
 
614
615 if( !nativeDelta && blob_size(&content)>100 ){
616 size = send_delta_parent(pXfer, rid, isPriv, &content, pUuid);
617 }
618 if( size==0 ){
619
--- src/xfer.c
+++ src/xfer.c
@@ -608,11 +608,17 @@
608 if( size ){
609 pXfer->nDeltaSent++;
610 }
611 }
612 if( size==0 ){
613 if( content_get(rid, &content)==0 ){
614 /* A delta whose source has not arrived yet. The content cannot
615 ** be rebuilt, so there is nothing that can be sent. */
616 blob_reset(&content);
617 blob_reset(&uuid);
618 return;
619 }
620
621 if( !nativeDelta && blob_size(&content)>100 ){
622 size = send_delta_parent(pXfer, rid, isPriv, &content, pUuid);
623 }
624 if( size==0 ){
625

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button