Fossil SCM
Add the --nocompress option to the "fossil clone" command.
Commit
96d0a4becffa5e4150abfe19ab4ae7a44e26e1a18fbd1c17acbe7b0119d39693
Parent
bb9233a61a83eba…
1 file changed
+8
-3
+8
-3
| --- src/clone.c | ||
| +++ src/clone.c | ||
| @@ -109,10 +109,11 @@ | ||
| 109 | 109 | ** admin user. This can be overridden using the -A|--admin-user |
| 110 | 110 | ** parameter. |
| 111 | 111 | ** |
| 112 | 112 | ** Options: |
| 113 | 113 | ** --admin-user|-A USERNAME Make USERNAME the administrator |
| 114 | +** --nocompress Omit extra delta compression | |
| 114 | 115 | ** --once Don't remember the URI. |
| 115 | 116 | ** --private Also clone private branches |
| 116 | 117 | ** --ssl-identity FILENAME Use the SSL identity if requested by the server |
| 117 | 118 | ** --ssh-command|-c SSH Use SSH as the "ssh" command |
| 118 | 119 | ** --httpauth|-B USER:PASS Add HTTP Basic Authorization to requests |
| @@ -126,10 +127,11 @@ | ||
| 126 | 127 | const char *zDefaultUser; /* Optional name of the default user */ |
| 127 | 128 | const char *zHttpAuth; /* HTTP Authorization user:pass information */ |
| 128 | 129 | int nErr = 0; |
| 129 | 130 | int urlFlags = URL_PROMPT_PW | URL_REMEMBER; |
| 130 | 131 | int syncFlags = SYNC_CLONE; |
| 132 | + int noCompress = find_option("nocompress",0,0)!=0; | |
| 131 | 133 | |
| 132 | 134 | /* Also clone private branches */ |
| 133 | 135 | if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE; |
| 134 | 136 | if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER; |
| 135 | 137 | if( find_option("verbose","v",0)!=0) syncFlags |= SYNC_VERBOSE; |
| @@ -211,14 +213,17 @@ | ||
| 211 | 213 | db_open_repository(g.argv[3]); |
| 212 | 214 | } |
| 213 | 215 | db_begin_transaction(); |
| 214 | 216 | fossil_print("Rebuilding repository meta-data...\n"); |
| 215 | 217 | rebuild_db(0, 1, 0); |
| 216 | - fossil_print("Extra delta compression... "); fflush(stdout); | |
| 217 | - extra_deltification(); | |
| 218 | + if( !noCompress ){ | |
| 219 | + fossil_print("Extra delta compression... "); fflush(stdout); | |
| 220 | + extra_deltification(); | |
| 221 | + fossil_print("\n"); | |
| 222 | + } | |
| 218 | 223 | db_end_transaction(0); |
| 219 | - fossil_print("\nVacuuming the database... "); fflush(stdout); | |
| 224 | + fossil_print("Vacuuming the database... "); fflush(stdout); | |
| 220 | 225 | if( db_int(0, "PRAGMA page_count")>1000 |
| 221 | 226 | && db_int(0, "PRAGMA page_size")<8192 ){ |
| 222 | 227 | db_multi_exec("PRAGMA page_size=8192;"); |
| 223 | 228 | } |
| 224 | 229 | db_multi_exec("VACUUM"); |
| 225 | 230 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -109,10 +109,11 @@ | |
| 109 | ** admin user. This can be overridden using the -A|--admin-user |
| 110 | ** parameter. |
| 111 | ** |
| 112 | ** Options: |
| 113 | ** --admin-user|-A USERNAME Make USERNAME the administrator |
| 114 | ** --once Don't remember the URI. |
| 115 | ** --private Also clone private branches |
| 116 | ** --ssl-identity FILENAME Use the SSL identity if requested by the server |
| 117 | ** --ssh-command|-c SSH Use SSH as the "ssh" command |
| 118 | ** --httpauth|-B USER:PASS Add HTTP Basic Authorization to requests |
| @@ -126,10 +127,11 @@ | |
| 126 | const char *zDefaultUser; /* Optional name of the default user */ |
| 127 | const char *zHttpAuth; /* HTTP Authorization user:pass information */ |
| 128 | int nErr = 0; |
| 129 | int urlFlags = URL_PROMPT_PW | URL_REMEMBER; |
| 130 | int syncFlags = SYNC_CLONE; |
| 131 | |
| 132 | /* Also clone private branches */ |
| 133 | if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE; |
| 134 | if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER; |
| 135 | if( find_option("verbose","v",0)!=0) syncFlags |= SYNC_VERBOSE; |
| @@ -211,14 +213,17 @@ | |
| 211 | db_open_repository(g.argv[3]); |
| 212 | } |
| 213 | db_begin_transaction(); |
| 214 | fossil_print("Rebuilding repository meta-data...\n"); |
| 215 | rebuild_db(0, 1, 0); |
| 216 | fossil_print("Extra delta compression... "); fflush(stdout); |
| 217 | extra_deltification(); |
| 218 | db_end_transaction(0); |
| 219 | fossil_print("\nVacuuming the database... "); fflush(stdout); |
| 220 | if( db_int(0, "PRAGMA page_count")>1000 |
| 221 | && db_int(0, "PRAGMA page_size")<8192 ){ |
| 222 | db_multi_exec("PRAGMA page_size=8192;"); |
| 223 | } |
| 224 | db_multi_exec("VACUUM"); |
| 225 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -109,10 +109,11 @@ | |
| 109 | ** admin user. This can be overridden using the -A|--admin-user |
| 110 | ** parameter. |
| 111 | ** |
| 112 | ** Options: |
| 113 | ** --admin-user|-A USERNAME Make USERNAME the administrator |
| 114 | ** --nocompress Omit extra delta compression |
| 115 | ** --once Don't remember the URI. |
| 116 | ** --private Also clone private branches |
| 117 | ** --ssl-identity FILENAME Use the SSL identity if requested by the server |
| 118 | ** --ssh-command|-c SSH Use SSH as the "ssh" command |
| 119 | ** --httpauth|-B USER:PASS Add HTTP Basic Authorization to requests |
| @@ -126,10 +127,11 @@ | |
| 127 | const char *zDefaultUser; /* Optional name of the default user */ |
| 128 | const char *zHttpAuth; /* HTTP Authorization user:pass information */ |
| 129 | int nErr = 0; |
| 130 | int urlFlags = URL_PROMPT_PW | URL_REMEMBER; |
| 131 | int syncFlags = SYNC_CLONE; |
| 132 | int noCompress = find_option("nocompress",0,0)!=0; |
| 133 | |
| 134 | /* Also clone private branches */ |
| 135 | if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE; |
| 136 | if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER; |
| 137 | if( find_option("verbose","v",0)!=0) syncFlags |= SYNC_VERBOSE; |
| @@ -211,14 +213,17 @@ | |
| 213 | db_open_repository(g.argv[3]); |
| 214 | } |
| 215 | db_begin_transaction(); |
| 216 | fossil_print("Rebuilding repository meta-data...\n"); |
| 217 | rebuild_db(0, 1, 0); |
| 218 | if( !noCompress ){ |
| 219 | fossil_print("Extra delta compression... "); fflush(stdout); |
| 220 | extra_deltification(); |
| 221 | fossil_print("\n"); |
| 222 | } |
| 223 | db_end_transaction(0); |
| 224 | fossil_print("Vacuuming the database... "); fflush(stdout); |
| 225 | if( db_int(0, "PRAGMA page_count")>1000 |
| 226 | && db_int(0, "PRAGMA page_size")<8192 ){ |
| 227 | db_multi_exec("PRAGMA page_size=8192;"); |
| 228 | } |
| 229 | db_multi_exec("VACUUM"); |
| 230 |