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.
Commit
333a89bf9675c2a5b9c3d1999b88f8000db58c2a236b56fef1873be35a88ea35
Parent
ad2e148541fe071…
1 file changed
+15
-14
+15
-14
| --- src/clone.c | ||
| +++ src/clone.c | ||
| @@ -319,24 +319,25 @@ | ||
| 319 | 319 | } |
| 320 | 320 | } |
| 321 | 321 | if( db_get_int("aux-clone-seqno",0)>0 ){ |
| 322 | 322 | fossil_warning("Clone incomplete - it may be possible to resume the" |
| 323 | 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"); | |
| 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 | + } | |
| 338 | 339 | } |
| 339 | 340 | } |
| 340 | 341 | db_end_transaction(0); |
| 341 | 342 | fossil_print("Vacuuming the database... "); fflush(stdout); |
| 342 | 343 | if( db_int(0, "PRAGMA page_count")>1000 |
| 343 | 344 |
| --- 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 |