Fossil SCM

Defer rebuilding the database until the clone is complete. This prevents a lot of unnecessary rebuilding while there aren't enough artifacts to make it worth it.

andybradford 2023-11-30 06:26 clone-resume
Commit 333a89bf9675c2a5b9c3d1999b88f8000db58c2a236b56fef1873be35a88ea35
1 file changed +15 -14
+15 -14
--- src/clone.c
+++ src/clone.c
@@ -319,24 +319,25 @@
319319
}
320320
}
321321
if( db_get_int("aux-clone-seqno",0)>0 ){
322322
fossil_warning("Clone incomplete - it may be possible to resume the"
323323
" clone by running the same command again.");
324
- }
325
- fossil_print("Rebuilding repository meta-data...\n");
326
- rebuild_db(1, 0);
327
- if( !noCompress ){
328
- int nDelta = 0;
329
- i64 nByte;
330
- fossil_print("Extra delta compression... "); fflush(stdout);
331
- nByte = extra_deltification(&nDelta);
332
- if( nDelta==1 ){
333
- fossil_print("1 delta saves %,lld bytes\n", nByte);
334
- }else if( nDelta>1 ){
335
- fossil_print("%d deltas save %,lld bytes\n", nDelta, nByte);
336
- }else{
337
- fossil_print("none found\n");
324
+ }else{
325
+ fossil_print("Rebuilding repository meta-data...\n");
326
+ rebuild_db(1, 0);
327
+ if( !noCompress ){
328
+ int nDelta = 0;
329
+ i64 nByte;
330
+ fossil_print("Extra delta compression... "); fflush(stdout);
331
+ nByte = extra_deltification(&nDelta);
332
+ if( nDelta==1 ){
333
+ fossil_print("1 delta saves %,lld bytes\n", nByte);
334
+ }else if( nDelta>1 ){
335
+ fossil_print("%d deltas save %,lld bytes\n", nDelta, nByte);
336
+ }else{
337
+ fossil_print("none found\n");
338
+ }
338339
}
339340
}
340341
db_end_transaction(0);
341342
fossil_print("Vacuuming the database... "); fflush(stdout);
342343
if( db_int(0, "PRAGMA page_count")>1000
343344
--- src/clone.c
+++ src/clone.c
@@ -319,24 +319,25 @@
319 }
320 }
321 if( db_get_int("aux-clone-seqno",0)>0 ){
322 fossil_warning("Clone incomplete - it may be possible to resume the"
323 " clone by running the same command again.");
324 }
325 fossil_print("Rebuilding repository meta-data...\n");
326 rebuild_db(1, 0);
327 if( !noCompress ){
328 int nDelta = 0;
329 i64 nByte;
330 fossil_print("Extra delta compression... "); fflush(stdout);
331 nByte = extra_deltification(&nDelta);
332 if( nDelta==1 ){
333 fossil_print("1 delta saves %,lld bytes\n", nByte);
334 }else if( nDelta>1 ){
335 fossil_print("%d deltas save %,lld bytes\n", nDelta, nByte);
336 }else{
337 fossil_print("none found\n");
 
338 }
339 }
340 db_end_transaction(0);
341 fossil_print("Vacuuming the database... "); fflush(stdout);
342 if( db_int(0, "PRAGMA page_count")>1000
343
--- src/clone.c
+++ src/clone.c
@@ -319,24 +319,25 @@
319 }
320 }
321 if( db_get_int("aux-clone-seqno",0)>0 ){
322 fossil_warning("Clone incomplete - it may be possible to resume the"
323 " clone by running the same command again.");
324 }else{
325 fossil_print("Rebuilding repository meta-data...\n");
326 rebuild_db(1, 0);
327 if( !noCompress ){
328 int nDelta = 0;
329 i64 nByte;
330 fossil_print("Extra delta compression... "); fflush(stdout);
331 nByte = extra_deltification(&nDelta);
332 if( nDelta==1 ){
333 fossil_print("1 delta saves %,lld bytes\n", nByte);
334 }else if( nDelta>1 ){
335 fossil_print("%d deltas save %,lld bytes\n", nDelta, nByte);
336 }else{
337 fossil_print("none found\n");
338 }
339 }
340 }
341 db_end_transaction(0);
342 fossil_print("Vacuuming the database... "); fflush(stdout);
343 if( db_int(0, "PRAGMA page_count")>1000
344

Keyboard Shortcuts

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