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.
Commit
8ee2f003368aa5f6c369ed3847352c852fba988fd332733e6e6aa5a1d94f32c8
Parent
a020a8cd82a5120…
1 file changed
+4
-1
+4
-1
| --- src/purge.c | ||
| +++ src/purge.c | ||
| @@ -356,11 +356,14 @@ | ||
| 356 | 356 | " WHERE piid=%d", piid); |
| 357 | 357 | if( db_step(&q)!=SQLITE_ROW ){ |
| 358 | 358 | db_finalize(&q); |
| 359 | 359 | fossil_fatal("missing purge-item %d", piid); |
| 360 | 360 | } |
| 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 | + } | |
| 362 | 365 | srcid = db_column_int(&q, 1); |
| 363 | 366 | blob_zero(pOut); |
| 364 | 367 | blob_zero(&x); |
| 365 | 368 | db_column_blob(&q, 2, &x); |
| 366 | 369 | blob_uncompress(&x, pOut); |
| 367 | 370 |
| --- 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 |