Fossil SCM

Report a delta cycle among purged items as an error in purge_extract_item(), instead of going on with a blob that was never filled in.

dmestas 2026-11-20 21:15 UTC small-fixes
Commit 8ee2f003368aa5f6c369ed3847352c852fba988fd332733e6e6aa5a1d94f32c8
1 file changed +4 -1
+4 -1
--- src/purge.c
+++ src/purge.c
@@ -356,11 +356,14 @@
356356
" WHERE piid=%d", piid);
357357
if( db_step(&q)!=SQLITE_ROW ){
358358
db_finalize(&q);
359359
fossil_fatal("missing purge-item %d", piid);
360360
}
361
- if( bag_find(&busy, piid) ) return 1;
361
+ if( bag_find(&busy, piid) ){
362
+ db_finalize(&q);
363
+ fossil_fatal("purge-item %d is part of a delta cycle", piid);
364
+ }
362365
srcid = db_column_int(&q, 1);
363366
blob_zero(pOut);
364367
blob_zero(&x);
365368
db_column_blob(&q, 2, &x);
366369
blob_uncompress(&x, pOut);
367370
--- src/purge.c
+++ src/purge.c
@@ -356,11 +356,14 @@
356 " WHERE piid=%d", piid);
357 if( db_step(&q)!=SQLITE_ROW ){
358 db_finalize(&q);
359 fossil_fatal("missing purge-item %d", piid);
360 }
361 if( bag_find(&busy, piid) ) return 1;
 
 
 
362 srcid = db_column_int(&q, 1);
363 blob_zero(pOut);
364 blob_zero(&x);
365 db_column_blob(&q, 2, &x);
366 blob_uncompress(&x, pOut);
367
--- src/purge.c
+++ src/purge.c
@@ -356,11 +356,14 @@
356 " WHERE piid=%d", piid);
357 if( db_step(&q)!=SQLITE_ROW ){
358 db_finalize(&q);
359 fossil_fatal("missing purge-item %d", piid);
360 }
361 if( bag_find(&busy, piid) ){
362 db_finalize(&q);
363 fossil_fatal("purge-item %d is part of a delta cycle", piid);
364 }
365 srcid = db_column_int(&q, 1);
366 blob_zero(pOut);
367 blob_zero(&x);
368 db_column_blob(&q, 2, &x);
369 blob_uncompress(&x, pOut);
370

Keyboard Shortcuts

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