Fossil SCM

Add the --nocompress option to the "fossil clone" command.

drh 2018-06-22 01:37 trunk
Commit 96d0a4becffa5e4150abfe19ab4ae7a44e26e1a18fbd1c17acbe7b0119d39693
1 file changed +8 -3
+8 -3
--- src/clone.c
+++ src/clone.c
@@ -109,10 +109,11 @@
109109
** admin user. This can be overridden using the -A|--admin-user
110110
** parameter.
111111
**
112112
** Options:
113113
** --admin-user|-A USERNAME Make USERNAME the administrator
114
+** --nocompress Omit extra delta compression
114115
** --once Don't remember the URI.
115116
** --private Also clone private branches
116117
** --ssl-identity FILENAME Use the SSL identity if requested by the server
117118
** --ssh-command|-c SSH Use SSH as the "ssh" command
118119
** --httpauth|-B USER:PASS Add HTTP Basic Authorization to requests
@@ -126,10 +127,11 @@
126127
const char *zDefaultUser; /* Optional name of the default user */
127128
const char *zHttpAuth; /* HTTP Authorization user:pass information */
128129
int nErr = 0;
129130
int urlFlags = URL_PROMPT_PW | URL_REMEMBER;
130131
int syncFlags = SYNC_CLONE;
132
+ int noCompress = find_option("nocompress",0,0)!=0;
131133
132134
/* Also clone private branches */
133135
if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE;
134136
if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
135137
if( find_option("verbose","v",0)!=0) syncFlags |= SYNC_VERBOSE;
@@ -211,14 +213,17 @@
211213
db_open_repository(g.argv[3]);
212214
}
213215
db_begin_transaction();
214216
fossil_print("Rebuilding repository meta-data...\n");
215217
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
+ }
218223
db_end_transaction(0);
219
- fossil_print("\nVacuuming the database... "); fflush(stdout);
224
+ fossil_print("Vacuuming the database... "); fflush(stdout);
220225
if( db_int(0, "PRAGMA page_count")>1000
221226
&& db_int(0, "PRAGMA page_size")<8192 ){
222227
db_multi_exec("PRAGMA page_size=8192;");
223228
}
224229
db_multi_exec("VACUUM");
225230
--- 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

Keyboard Shortcuts

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