Fossil SCM

For most commands, print an error if unknown command-line options are included on the command-line.

drh 2014-07-30 16:43 trunk merge
Commit 74ac0c925a98ee60e6ae4d905690856640651edd
+20
--- src/add.c
+++ src/add.c
@@ -123,10 +123,14 @@
123123
*/
124124
void test_reserved_names(void){
125125
int i;
126126
const char *z;
127127
int omitRepo = find_option("omitrepo",0,0)!=0;
128
+
129
+ /* We should be done with options.. */
130
+ verify_all_options();
131
+
128132
db_must_be_within_tree();
129133
for(i=0; (z = fossil_reserved_name(i, omitRepo))!=0; i++){
130134
fossil_print("%3d: %s\n", i, z);
131135
}
132136
fossil_print("ALL: (%s)\n", fossil_all_reserved_names(omitRepo));
@@ -257,10 +261,14 @@
257261
zCleanFlag = find_option("clean",0,1);
258262
zIgnoreFlag = find_option("ignore",0,1);
259263
forceFlag = find_option("force","f",0)!=0;
260264
if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL;
261265
capture_case_sensitive_option();
266
+
267
+ /* We should be done with options.. */
268
+ verify_all_options();
269
+
262270
db_must_be_within_tree();
263271
if( zCleanFlag==0 ){
264272
zCleanFlag = db_get("clean-glob", 0);
265273
}
266274
if( zIgnoreFlag==0 ){
@@ -346,10 +354,14 @@
346354
void delete_cmd(void){
347355
int i;
348356
Stmt loop;
349357
350358
capture_case_sensitive_option();
359
+
360
+ /* We should be done with options.. */
361
+ verify_all_options();
362
+
351363
db_must_be_within_tree();
352364
db_begin_transaction();
353365
db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
354366
filename_collation());
355367
for(i=2; i<g.argc; i++){
@@ -511,10 +523,14 @@
511523
512524
if( !dryRunFlag ){
513525
dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
514526
}
515527
capture_case_sensitive_option();
528
+
529
+ /* We should be done with options.. */
530
+ verify_all_options();
531
+
516532
db_must_be_within_tree();
517533
if( zCleanFlag==0 ){
518534
zCleanFlag = db_get("clean-glob", 0);
519535
}
520536
if( zIgnoreFlag==0 ){
@@ -620,10 +636,14 @@
620636
Blob dest;
621637
Stmt q;
622638
623639
capture_case_sensitive_option();
624640
db_must_be_within_tree();
641
+
642
+ /* We should be done with options.. */
643
+ verify_all_options();
644
+
625645
vid = db_lget_int("checkout", 0);
626646
if( vid==0 ){
627647
fossil_fatal("no checkout rename files in");
628648
}
629649
if( g.argc<4 ){
630650
--- src/add.c
+++ src/add.c
@@ -123,10 +123,14 @@
123 */
124 void test_reserved_names(void){
125 int i;
126 const char *z;
127 int omitRepo = find_option("omitrepo",0,0)!=0;
 
 
 
 
128 db_must_be_within_tree();
129 for(i=0; (z = fossil_reserved_name(i, omitRepo))!=0; i++){
130 fossil_print("%3d: %s\n", i, z);
131 }
132 fossil_print("ALL: (%s)\n", fossil_all_reserved_names(omitRepo));
@@ -257,10 +261,14 @@
257 zCleanFlag = find_option("clean",0,1);
258 zIgnoreFlag = find_option("ignore",0,1);
259 forceFlag = find_option("force","f",0)!=0;
260 if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL;
261 capture_case_sensitive_option();
 
 
 
 
262 db_must_be_within_tree();
263 if( zCleanFlag==0 ){
264 zCleanFlag = db_get("clean-glob", 0);
265 }
266 if( zIgnoreFlag==0 ){
@@ -346,10 +354,14 @@
346 void delete_cmd(void){
347 int i;
348 Stmt loop;
349
350 capture_case_sensitive_option();
 
 
 
 
351 db_must_be_within_tree();
352 db_begin_transaction();
353 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
354 filename_collation());
355 for(i=2; i<g.argc; i++){
@@ -511,10 +523,14 @@
511
512 if( !dryRunFlag ){
513 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
514 }
515 capture_case_sensitive_option();
 
 
 
 
516 db_must_be_within_tree();
517 if( zCleanFlag==0 ){
518 zCleanFlag = db_get("clean-glob", 0);
519 }
520 if( zIgnoreFlag==0 ){
@@ -620,10 +636,14 @@
620 Blob dest;
621 Stmt q;
622
623 capture_case_sensitive_option();
624 db_must_be_within_tree();
 
 
 
 
625 vid = db_lget_int("checkout", 0);
626 if( vid==0 ){
627 fossil_fatal("no checkout rename files in");
628 }
629 if( g.argc<4 ){
630
--- src/add.c
+++ src/add.c
@@ -123,10 +123,14 @@
123 */
124 void test_reserved_names(void){
125 int i;
126 const char *z;
127 int omitRepo = find_option("omitrepo",0,0)!=0;
128
129 /* We should be done with options.. */
130 verify_all_options();
131
132 db_must_be_within_tree();
133 for(i=0; (z = fossil_reserved_name(i, omitRepo))!=0; i++){
134 fossil_print("%3d: %s\n", i, z);
135 }
136 fossil_print("ALL: (%s)\n", fossil_all_reserved_names(omitRepo));
@@ -257,10 +261,14 @@
261 zCleanFlag = find_option("clean",0,1);
262 zIgnoreFlag = find_option("ignore",0,1);
263 forceFlag = find_option("force","f",0)!=0;
264 if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL;
265 capture_case_sensitive_option();
266
267 /* We should be done with options.. */
268 verify_all_options();
269
270 db_must_be_within_tree();
271 if( zCleanFlag==0 ){
272 zCleanFlag = db_get("clean-glob", 0);
273 }
274 if( zIgnoreFlag==0 ){
@@ -346,10 +354,14 @@
354 void delete_cmd(void){
355 int i;
356 Stmt loop;
357
358 capture_case_sensitive_option();
359
360 /* We should be done with options.. */
361 verify_all_options();
362
363 db_must_be_within_tree();
364 db_begin_transaction();
365 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
366 filename_collation());
367 for(i=2; i<g.argc; i++){
@@ -511,10 +523,14 @@
523
524 if( !dryRunFlag ){
525 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
526 }
527 capture_case_sensitive_option();
528
529 /* We should be done with options.. */
530 verify_all_options();
531
532 db_must_be_within_tree();
533 if( zCleanFlag==0 ){
534 zCleanFlag = db_get("clean-glob", 0);
535 }
536 if( zIgnoreFlag==0 ){
@@ -620,10 +636,14 @@
636 Blob dest;
637 Stmt q;
638
639 capture_case_sensitive_option();
640 db_must_be_within_tree();
641
642 /* We should be done with options.. */
643 verify_all_options();
644
645 vid = db_lget_int("checkout", 0);
646 if( vid==0 ){
647 fossil_fatal("no checkout rename files in");
648 }
649 if( g.argc<4 ){
650
+45 -17
--- src/checkin.c
+++ src/checkin.c
@@ -159,10 +159,35 @@
159159
int relPathOption = find_option("rel-paths", 0, 0)!=0;
160160
if( absPathOption ){ relativePaths = 0; }
161161
if( relPathOption ){ relativePaths = 1; }
162162
return relativePaths;
163163
}
164
+
165
+void print_changes(
166
+ int useSha1sum, /* Verify file status using SHA1 hashing rather
167
+ than relying on file mtimes. */
168
+ int showHdr, /* Identify the repository if there are changes */
169
+ int verboseFlag, /* Say "(none)" if there are no changes */
170
+ int cwdRelative /* Report relative to the current working dir */
171
+){
172
+ Blob report;
173
+ int vid;
174
+ blob_zero(&report);
175
+
176
+ vid = db_lget_int("checkout", 0);
177
+ vfile_check_signature(vid, useSha1sum ? CKSIG_SHA1 : 0);
178
+ status_report(&report, "", 0, cwdRelative);
179
+ if( verboseFlag && blob_size(&report)==0 ){
180
+ blob_append(&report, " (none)\n", -1);
181
+ }
182
+ if( showHdr && blob_size(&report)>0 ){
183
+ fossil_print("Changes for %s at %s:\n", db_get("project-name","???"),
184
+ g.zLocalRoot);
185
+ }
186
+ blob_write_to_file(&report, "-");
187
+ blob_reset(&report);
188
+}
164189
165190
/*
166191
** COMMAND: changes
167192
**
168193
** Usage: %fossil changes ?OPTIONS?
@@ -182,31 +207,21 @@
182207
** -v|--verbose Say "(none)" if there are no changes
183208
**
184209
** See also: extras, ls, status
185210
*/
186211
void changes_cmd(void){
187
- Blob report;
188
- int vid;
189212
int useSha1sum = find_option("sha1sum", 0, 0)!=0;
190213
int showHdr = find_option("header",0,0)!=0;
191214
int verboseFlag = find_option("verbose","v",0)!=0;
192215
int cwdRelative = 0;
193216
db_must_be_within_tree();
194217
cwdRelative = determine_cwd_relative_option();
195
- blob_zero(&report);
196
- vid = db_lget_int("checkout", 0);
197
- vfile_check_signature(vid, useSha1sum ? CKSIG_SHA1 : 0);
198
- status_report(&report, "", 0, cwdRelative);
199
- if( verboseFlag && blob_size(&report)==0 ){
200
- blob_append(&report, " (none)\n", -1);
201
- }
202
- if( showHdr && blob_size(&report)>0 ){
203
- fossil_print("Changes for %s at %s:\n", db_get("project-name","???"),
204
- g.zLocalRoot);
205
- }
206
- blob_write_to_file(&report, "-");
207
- blob_reset(&report);
218
+
219
+ /* We should be done with options.. */
220
+ verify_all_options();
221
+
222
+ print_changes(useSha1sum, showHdr, verboseFlag, cwdRelative);
208223
}
209224
210225
/*
211226
** COMMAND: status
212227
**
@@ -227,23 +242,32 @@
227242
**
228243
** See also: changes, extras, ls
229244
*/
230245
void status_cmd(void){
231246
int vid;
247
+ int useSha1sum = find_option("sha1sum", 0, 0)!=0;
248
+ int showHdr = find_option("header",0,0)!=0;
249
+ int verboseFlag = find_option("verbose","v",0)!=0;
250
+ int cwdRelative = 0;
232251
db_must_be_within_tree();
233252
/* 012345678901234 */
253
+ cwdRelative = determine_cwd_relative_option();
254
+
255
+ /* We should be done with options.. */
256
+ verify_all_options();
257
+
234258
fossil_print("repository: %s\n", db_repository_filename());
235259
fossil_print("local-root: %s\n", g.zLocalRoot);
236260
if( g.zConfigDbName ){
237261
fossil_print("config-db: %s\n", g.zConfigDbName);
238262
}
239263
vid = db_lget_int("checkout", 0);
240264
if( vid ){
241265
show_common_info(vid, "checkout:", 1, 1);
242266
}
243
- db_record_repository_filename(0);
244
- changes_cmd();
267
+ db_record_repository_filename(0);
268
+ print_changes(useSha1sum, showHdr, verboseFlag, cwdRelative);
245269
}
246270
247271
/*
248272
** COMMAND: ls
249273
**
@@ -454,10 +478,14 @@
454478
455479
if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP;
456480
capture_case_sensitive_option();
457481
db_must_be_within_tree();
458482
cwdRelative = determine_cwd_relative_option();
483
+
484
+ /* We should be done with options.. */
485
+ verify_all_options();
486
+
459487
if( zIgnoreFlag==0 ){
460488
zIgnoreFlag = db_get("ignore-glob", 0);
461489
}
462490
pIgnore = glob_create(zIgnoreFlag);
463491
locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
464492
--- src/checkin.c
+++ src/checkin.c
@@ -159,10 +159,35 @@
159 int relPathOption = find_option("rel-paths", 0, 0)!=0;
160 if( absPathOption ){ relativePaths = 0; }
161 if( relPathOption ){ relativePaths = 1; }
162 return relativePaths;
163 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
165 /*
166 ** COMMAND: changes
167 **
168 ** Usage: %fossil changes ?OPTIONS?
@@ -182,31 +207,21 @@
182 ** -v|--verbose Say "(none)" if there are no changes
183 **
184 ** See also: extras, ls, status
185 */
186 void changes_cmd(void){
187 Blob report;
188 int vid;
189 int useSha1sum = find_option("sha1sum", 0, 0)!=0;
190 int showHdr = find_option("header",0,0)!=0;
191 int verboseFlag = find_option("verbose","v",0)!=0;
192 int cwdRelative = 0;
193 db_must_be_within_tree();
194 cwdRelative = determine_cwd_relative_option();
195 blob_zero(&report);
196 vid = db_lget_int("checkout", 0);
197 vfile_check_signature(vid, useSha1sum ? CKSIG_SHA1 : 0);
198 status_report(&report, "", 0, cwdRelative);
199 if( verboseFlag && blob_size(&report)==0 ){
200 blob_append(&report, " (none)\n", -1);
201 }
202 if( showHdr && blob_size(&report)>0 ){
203 fossil_print("Changes for %s at %s:\n", db_get("project-name","???"),
204 g.zLocalRoot);
205 }
206 blob_write_to_file(&report, "-");
207 blob_reset(&report);
208 }
209
210 /*
211 ** COMMAND: status
212 **
@@ -227,23 +242,32 @@
227 **
228 ** See also: changes, extras, ls
229 */
230 void status_cmd(void){
231 int vid;
 
 
 
 
232 db_must_be_within_tree();
233 /* 012345678901234 */
 
 
 
 
 
234 fossil_print("repository: %s\n", db_repository_filename());
235 fossil_print("local-root: %s\n", g.zLocalRoot);
236 if( g.zConfigDbName ){
237 fossil_print("config-db: %s\n", g.zConfigDbName);
238 }
239 vid = db_lget_int("checkout", 0);
240 if( vid ){
241 show_common_info(vid, "checkout:", 1, 1);
242 }
243 db_record_repository_filename(0);
244 changes_cmd();
245 }
246
247 /*
248 ** COMMAND: ls
249 **
@@ -454,10 +478,14 @@
454
455 if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP;
456 capture_case_sensitive_option();
457 db_must_be_within_tree();
458 cwdRelative = determine_cwd_relative_option();
 
 
 
 
459 if( zIgnoreFlag==0 ){
460 zIgnoreFlag = db_get("ignore-glob", 0);
461 }
462 pIgnore = glob_create(zIgnoreFlag);
463 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
464
--- src/checkin.c
+++ src/checkin.c
@@ -159,10 +159,35 @@
159 int relPathOption = find_option("rel-paths", 0, 0)!=0;
160 if( absPathOption ){ relativePaths = 0; }
161 if( relPathOption ){ relativePaths = 1; }
162 return relativePaths;
163 }
164
165 void print_changes(
166 int useSha1sum, /* Verify file status using SHA1 hashing rather
167 than relying on file mtimes. */
168 int showHdr, /* Identify the repository if there are changes */
169 int verboseFlag, /* Say "(none)" if there are no changes */
170 int cwdRelative /* Report relative to the current working dir */
171 ){
172 Blob report;
173 int vid;
174 blob_zero(&report);
175
176 vid = db_lget_int("checkout", 0);
177 vfile_check_signature(vid, useSha1sum ? CKSIG_SHA1 : 0);
178 status_report(&report, "", 0, cwdRelative);
179 if( verboseFlag && blob_size(&report)==0 ){
180 blob_append(&report, " (none)\n", -1);
181 }
182 if( showHdr && blob_size(&report)>0 ){
183 fossil_print("Changes for %s at %s:\n", db_get("project-name","???"),
184 g.zLocalRoot);
185 }
186 blob_write_to_file(&report, "-");
187 blob_reset(&report);
188 }
189
190 /*
191 ** COMMAND: changes
192 **
193 ** Usage: %fossil changes ?OPTIONS?
@@ -182,31 +207,21 @@
207 ** -v|--verbose Say "(none)" if there are no changes
208 **
209 ** See also: extras, ls, status
210 */
211 void changes_cmd(void){
 
 
212 int useSha1sum = find_option("sha1sum", 0, 0)!=0;
213 int showHdr = find_option("header",0,0)!=0;
214 int verboseFlag = find_option("verbose","v",0)!=0;
215 int cwdRelative = 0;
216 db_must_be_within_tree();
217 cwdRelative = determine_cwd_relative_option();
218
219 /* We should be done with options.. */
220 verify_all_options();
221
222 print_changes(useSha1sum, showHdr, verboseFlag, cwdRelative);
 
 
 
 
 
 
 
 
223 }
224
225 /*
226 ** COMMAND: status
227 **
@@ -227,23 +242,32 @@
242 **
243 ** See also: changes, extras, ls
244 */
245 void status_cmd(void){
246 int vid;
247 int useSha1sum = find_option("sha1sum", 0, 0)!=0;
248 int showHdr = find_option("header",0,0)!=0;
249 int verboseFlag = find_option("verbose","v",0)!=0;
250 int cwdRelative = 0;
251 db_must_be_within_tree();
252 /* 012345678901234 */
253 cwdRelative = determine_cwd_relative_option();
254
255 /* We should be done with options.. */
256 verify_all_options();
257
258 fossil_print("repository: %s\n", db_repository_filename());
259 fossil_print("local-root: %s\n", g.zLocalRoot);
260 if( g.zConfigDbName ){
261 fossil_print("config-db: %s\n", g.zConfigDbName);
262 }
263 vid = db_lget_int("checkout", 0);
264 if( vid ){
265 show_common_info(vid, "checkout:", 1, 1);
266 }
267 db_record_repository_filename(0);
268 print_changes(useSha1sum, showHdr, verboseFlag, cwdRelative);
269 }
270
271 /*
272 ** COMMAND: ls
273 **
@@ -454,10 +478,14 @@
478
479 if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP;
480 capture_case_sensitive_option();
481 db_must_be_within_tree();
482 cwdRelative = determine_cwd_relative_option();
483
484 /* We should be done with options.. */
485 verify_all_options();
486
487 if( zIgnoreFlag==0 ){
488 zIgnoreFlag = db_get("ignore-glob", 0);
489 }
490 pIgnore = glob_create(zIgnoreFlag);
491 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
492
--- src/checkout.c
+++ src/checkout.c
@@ -201,10 +201,14 @@
201201
forceFlag = find_option("force","f",0)!=0;
202202
forceMissingFlag = find_option("force-missing",0,0)!=0;
203203
keepFlag = find_option("keep",0,0)!=0;
204204
latestFlag = find_option("latest",0,0)!=0;
205205
promptFlag = find_option("prompt",0,0)!=0 || forceFlag==0;
206
+
207
+ /* We should be done with options.. */
208
+ verify_all_options();
209
+
206210
if( (latestFlag!=0 && g.argc!=2) || (latestFlag==0 && g.argc!=3) ){
207211
usage("VERSION|--latest ?--force? ?--keep?");
208212
}
209213
if( !forceFlag && unsaved_changes(0) ){
210214
fossil_fatal("there are unsaved changes in the current checkout");
@@ -292,10 +296,14 @@
292296
** See also: open
293297
*/
294298
void close_cmd(void){
295299
int forceFlag = find_option("force","f",0)!=0;
296300
db_must_be_within_tree();
301
+
302
+ /* We should be done with options.. */
303
+ verify_all_options();
304
+
297305
if( !forceFlag && unsaved_changes(0) ){
298306
fossil_fatal("there are unsaved changes in the current checkout");
299307
}
300308
if( !forceFlag
301309
&& db_exists("SELECT 1 FROM %s.sqlite_master WHERE name='stash'",
302310
--- src/checkout.c
+++ src/checkout.c
@@ -201,10 +201,14 @@
201 forceFlag = find_option("force","f",0)!=0;
202 forceMissingFlag = find_option("force-missing",0,0)!=0;
203 keepFlag = find_option("keep",0,0)!=0;
204 latestFlag = find_option("latest",0,0)!=0;
205 promptFlag = find_option("prompt",0,0)!=0 || forceFlag==0;
 
 
 
 
206 if( (latestFlag!=0 && g.argc!=2) || (latestFlag==0 && g.argc!=3) ){
207 usage("VERSION|--latest ?--force? ?--keep?");
208 }
209 if( !forceFlag && unsaved_changes(0) ){
210 fossil_fatal("there are unsaved changes in the current checkout");
@@ -292,10 +296,14 @@
292 ** See also: open
293 */
294 void close_cmd(void){
295 int forceFlag = find_option("force","f",0)!=0;
296 db_must_be_within_tree();
 
 
 
 
297 if( !forceFlag && unsaved_changes(0) ){
298 fossil_fatal("there are unsaved changes in the current checkout");
299 }
300 if( !forceFlag
301 && db_exists("SELECT 1 FROM %s.sqlite_master WHERE name='stash'",
302
--- src/checkout.c
+++ src/checkout.c
@@ -201,10 +201,14 @@
201 forceFlag = find_option("force","f",0)!=0;
202 forceMissingFlag = find_option("force-missing",0,0)!=0;
203 keepFlag = find_option("keep",0,0)!=0;
204 latestFlag = find_option("latest",0,0)!=0;
205 promptFlag = find_option("prompt",0,0)!=0 || forceFlag==0;
206
207 /* We should be done with options.. */
208 verify_all_options();
209
210 if( (latestFlag!=0 && g.argc!=2) || (latestFlag==0 && g.argc!=3) ){
211 usage("VERSION|--latest ?--force? ?--keep?");
212 }
213 if( !forceFlag && unsaved_changes(0) ){
214 fossil_fatal("there are unsaved changes in the current checkout");
@@ -292,10 +296,14 @@
296 ** See also: open
297 */
298 void close_cmd(void){
299 int forceFlag = find_option("force","f",0)!=0;
300 db_must_be_within_tree();
301
302 /* We should be done with options.. */
303 verify_all_options();
304
305 if( !forceFlag && unsaved_changes(0) ){
306 fossil_fatal("there are unsaved changes in the current checkout");
307 }
308 if( !forceFlag
309 && db_exists("SELECT 1 FROM %s.sqlite_master WHERE name='stash'",
310
--- src/clone.c
+++ src/clone.c
@@ -127,10 +127,14 @@
127127
if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
128128
zHttpAuth = find_option("httpauth","B",1);
129129
zDefaultUser = find_option("admin-user","A",1);
130130
clone_ssh_find_options();
131131
url_proxy_options();
132
+
133
+ /* We should be done with options.. */
134
+ verify_all_options();
135
+
132136
if( g.argc < 4 ){
133137
usage("?OPTIONS? FILE-OR-URL NEW-REPOSITORY");
134138
}
135139
db_open_config(0);
136140
if( file_size(g.argv[3])>0 ){
137141
--- src/clone.c
+++ src/clone.c
@@ -127,10 +127,14 @@
127 if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
128 zHttpAuth = find_option("httpauth","B",1);
129 zDefaultUser = find_option("admin-user","A",1);
130 clone_ssh_find_options();
131 url_proxy_options();
 
 
 
 
132 if( g.argc < 4 ){
133 usage("?OPTIONS? FILE-OR-URL NEW-REPOSITORY");
134 }
135 db_open_config(0);
136 if( file_size(g.argv[3])>0 ){
137
--- src/clone.c
+++ src/clone.c
@@ -127,10 +127,14 @@
127 if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
128 zHttpAuth = find_option("httpauth","B",1);
129 zDefaultUser = find_option("admin-user","A",1);
130 clone_ssh_find_options();
131 url_proxy_options();
132
133 /* We should be done with options.. */
134 verify_all_options();
135
136 if( g.argc < 4 ){
137 usage("?OPTIONS? FILE-OR-URL NEW-REPOSITORY");
138 }
139 db_open_config(0);
140 if( file_size(g.argv[3])>0 ){
141
+8
--- src/db.c
+++ src/db.c
@@ -1479,10 +1479,14 @@
14791479
14801480
zTemplate = find_option("template",0,1);
14811481
zDate = find_option("date-override",0,1);
14821482
zDefaultUser = find_option("admin-user","A",1);
14831483
find_option("empty", 0, 0); /* deprecated */
1484
+
1485
+ /* We should be done with options.. */
1486
+ verify_all_options();
1487
+
14841488
if( g.argc!=3 ){
14851489
usage("REPOSITORY-NAME");
14861490
}
14871491
db_create_repository(g.argv[2]);
14881492
db_open_repository(g.argv[2]);
@@ -2033,10 +2037,14 @@
20332037
url_proxy_options();
20342038
emptyFlag = find_option("empty",0,0)!=0;
20352039
keepFlag = find_option("keep",0,0)!=0;
20362040
forceMissingFlag = find_option("force-missing",0,0)!=0;
20372041
allowNested = find_option("nested",0,0)!=0;
2042
+
2043
+ /* We should be done with options.. */
2044
+ verify_all_options();
2045
+
20382046
if( g.argc!=3 && g.argc!=4 ){
20392047
usage("REPOSITORY-FILENAME ?VERSION?");
20402048
}
20412049
if( !allowNested && db_open_local(0) ){
20422050
fossil_fatal("already within an open tree rooted at %s", g.zLocalRoot);
20432051
--- src/db.c
+++ src/db.c
@@ -1479,10 +1479,14 @@
1479
1480 zTemplate = find_option("template",0,1);
1481 zDate = find_option("date-override",0,1);
1482 zDefaultUser = find_option("admin-user","A",1);
1483 find_option("empty", 0, 0); /* deprecated */
 
 
 
 
1484 if( g.argc!=3 ){
1485 usage("REPOSITORY-NAME");
1486 }
1487 db_create_repository(g.argv[2]);
1488 db_open_repository(g.argv[2]);
@@ -2033,10 +2037,14 @@
2033 url_proxy_options();
2034 emptyFlag = find_option("empty",0,0)!=0;
2035 keepFlag = find_option("keep",0,0)!=0;
2036 forceMissingFlag = find_option("force-missing",0,0)!=0;
2037 allowNested = find_option("nested",0,0)!=0;
 
 
 
 
2038 if( g.argc!=3 && g.argc!=4 ){
2039 usage("REPOSITORY-FILENAME ?VERSION?");
2040 }
2041 if( !allowNested && db_open_local(0) ){
2042 fossil_fatal("already within an open tree rooted at %s", g.zLocalRoot);
2043
--- src/db.c
+++ src/db.c
@@ -1479,10 +1479,14 @@
1479
1480 zTemplate = find_option("template",0,1);
1481 zDate = find_option("date-override",0,1);
1482 zDefaultUser = find_option("admin-user","A",1);
1483 find_option("empty", 0, 0); /* deprecated */
1484
1485 /* We should be done with options.. */
1486 verify_all_options();
1487
1488 if( g.argc!=3 ){
1489 usage("REPOSITORY-NAME");
1490 }
1491 db_create_repository(g.argv[2]);
1492 db_open_repository(g.argv[2]);
@@ -2033,10 +2037,14 @@
2037 url_proxy_options();
2038 emptyFlag = find_option("empty",0,0)!=0;
2039 keepFlag = find_option("keep",0,0)!=0;
2040 forceMissingFlag = find_option("force-missing",0,0)!=0;
2041 allowNested = find_option("nested",0,0)!=0;
2042
2043 /* We should be done with options.. */
2044 verify_all_options();
2045
2046 if( g.argc!=3 && g.argc!=4 ){
2047 usage("REPOSITORY-FILENAME ?VERSION?");
2048 }
2049 if( !allowNested && db_open_local(0) ){
2050 fossil_fatal("already within an open tree rooted at %s", g.zLocalRoot);
2051
--- src/descendants.c
+++ src/descendants.c
@@ -317,10 +317,14 @@
317317
fossil_fatal("-W|--width value must be >20 or 0");
318318
}
319319
}else{
320320
width = -1;
321321
}
322
+
323
+ /* We should be done with options.. */
324
+ verify_all_options();
325
+
322326
if( g.argc==2 ){
323327
base = db_lget_int("checkout", 0);
324328
}else{
325329
base = name_to_typed_rid(g.argv[2], "ci");
326330
}
@@ -378,10 +382,14 @@
378382
}
379383
}else{
380384
width = -1;
381385
}
382386
db_find_and_open_repository(0,0);
387
+
388
+ /* We should be done with options.. */
389
+ verify_all_options();
390
+
383391
if( recomputeFlag ) leaf_rebuild();
384392
blob_zero(&sql);
385393
blob_append(&sql, timeline_query_for_tty(), -1);
386394
blob_appendf(&sql, " AND blob.rid IN leaf");
387395
if( showClosed ){
388396
--- src/descendants.c
+++ src/descendants.c
@@ -317,10 +317,14 @@
317 fossil_fatal("-W|--width value must be >20 or 0");
318 }
319 }else{
320 width = -1;
321 }
 
 
 
 
322 if( g.argc==2 ){
323 base = db_lget_int("checkout", 0);
324 }else{
325 base = name_to_typed_rid(g.argv[2], "ci");
326 }
@@ -378,10 +382,14 @@
378 }
379 }else{
380 width = -1;
381 }
382 db_find_and_open_repository(0,0);
 
 
 
 
383 if( recomputeFlag ) leaf_rebuild();
384 blob_zero(&sql);
385 blob_append(&sql, timeline_query_for_tty(), -1);
386 blob_appendf(&sql, " AND blob.rid IN leaf");
387 if( showClosed ){
388
--- src/descendants.c
+++ src/descendants.c
@@ -317,10 +317,14 @@
317 fossil_fatal("-W|--width value must be >20 or 0");
318 }
319 }else{
320 width = -1;
321 }
322
323 /* We should be done with options.. */
324 verify_all_options();
325
326 if( g.argc==2 ){
327 base = db_lget_int("checkout", 0);
328 }else{
329 base = name_to_typed_rid(g.argv[2], "ci");
330 }
@@ -378,10 +382,14 @@
382 }
383 }else{
384 width = -1;
385 }
386 db_find_and_open_repository(0,0);
387
388 /* We should be done with options.. */
389 verify_all_options();
390
391 if( recomputeFlag ) leaf_rebuild();
392 blob_zero(&sql);
393 blob_append(&sql, timeline_query_for_tty(), -1);
394 blob_appendf(&sql, " AND blob.rid IN leaf");
395 if( showClosed ){
396
+4
--- src/diff.c
+++ src/diff.c
@@ -2434,10 +2434,14 @@
24342434
if( find_option("ignore-all-space","w",0)!=0 ){
24352435
annFlags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_EOLWS */
24362436
}
24372437
fileVers = find_option("filevers",0,0)!=0;
24382438
db_must_be_within_tree();
2439
+
2440
+ /* We should be done with options.. */
2441
+ verify_all_options();
2442
+
24392443
if( g.argc<3 ) {
24402444
usage("FILENAME");
24412445
}
24422446
file_tree_name(g.argv[2], &treename, 1);
24432447
zFilename = blob_str(&treename);
24442448
--- src/diff.c
+++ src/diff.c
@@ -2434,10 +2434,14 @@
2434 if( find_option("ignore-all-space","w",0)!=0 ){
2435 annFlags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_EOLWS */
2436 }
2437 fileVers = find_option("filevers",0,0)!=0;
2438 db_must_be_within_tree();
 
 
 
 
2439 if( g.argc<3 ) {
2440 usage("FILENAME");
2441 }
2442 file_tree_name(g.argv[2], &treename, 1);
2443 zFilename = blob_str(&treename);
2444
--- src/diff.c
+++ src/diff.c
@@ -2434,10 +2434,14 @@
2434 if( find_option("ignore-all-space","w",0)!=0 ){
2435 annFlags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_EOLWS */
2436 }
2437 fileVers = find_option("filevers",0,0)!=0;
2438 db_must_be_within_tree();
2439
2440 /* We should be done with options.. */
2441 verify_all_options();
2442
2443 if( g.argc<3 ) {
2444 usage("FILENAME");
2445 }
2446 file_tree_name(g.argv[2], &treename, 1);
2447 zFilename = blob_str(&treename);
2448
+14
--- src/finfo.c
+++ src/finfo.c
@@ -63,10 +63,13 @@
6363
if( find_option("status","s",0) ){
6464
Stmt q;
6565
Blob line;
6666
Blob fname;
6767
int vid;
68
+
69
+ /* We should be done with options.. */
70
+ verify_all_options();
6871
6972
if( g.argc!=3 ) usage("-s|--status FILENAME");
7073
vid = db_lget_int("checkout", 0);
7174
if( vid==0 ){
7275
fossil_fatal("no checkout to finfo files in");
@@ -115,10 +118,13 @@
115118
blob_reset(&line);
116119
}else if( find_option("print","p",0) ){
117120
Blob record;
118121
Blob fname;
119122
const char *zRevision = find_option("revision", "r", 1);
123
+
124
+ /* We should be done with options.. */
125
+ verify_all_options();
120126
121127
file_tree_name(g.argv[2], &fname, 1);
122128
if( zRevision ){
123129
historical_version_of_file(zRevision, blob_str(&fname), &record, 0,0,0,0);
124130
}else{
@@ -158,10 +164,14 @@
158164
fossil_fatal("-W|--width value must be >22 or 0");
159165
}
160166
}else{
161167
iWidth = -1;
162168
}
169
+
170
+ /* We should be done with options.. */
171
+ verify_all_options();
172
+
163173
if( g.argc!=3 ){
164174
usage("?-l|--log? ?-b|--brief? FILENAME");
165175
}
166176
file_tree_name(g.argv[2], &fname, 1);
167177
rid = db_int(0, "SELECT rid FROM vfile WHERE pathname=%B %s",
@@ -241,10 +251,14 @@
241251
int rc;
242252
Blob content, fname;
243253
const char *zRev;
244254
db_find_and_open_repository(0, 0);
245255
zRev = find_option("r","r",1);
256
+
257
+ /* We should be done with options.. */
258
+ verify_all_options();
259
+
246260
for(i=2; i<g.argc; i++){
247261
file_tree_name(g.argv[i], &fname, 1);
248262
blob_zero(&content);
249263
rc = historical_version_of_file(zRev, blob_str(&fname), &content, 0,0,0,0);
250264
if( rc==0 ){
251265
--- src/finfo.c
+++ src/finfo.c
@@ -63,10 +63,13 @@
63 if( find_option("status","s",0) ){
64 Stmt q;
65 Blob line;
66 Blob fname;
67 int vid;
 
 
 
68
69 if( g.argc!=3 ) usage("-s|--status FILENAME");
70 vid = db_lget_int("checkout", 0);
71 if( vid==0 ){
72 fossil_fatal("no checkout to finfo files in");
@@ -115,10 +118,13 @@
115 blob_reset(&line);
116 }else if( find_option("print","p",0) ){
117 Blob record;
118 Blob fname;
119 const char *zRevision = find_option("revision", "r", 1);
 
 
 
120
121 file_tree_name(g.argv[2], &fname, 1);
122 if( zRevision ){
123 historical_version_of_file(zRevision, blob_str(&fname), &record, 0,0,0,0);
124 }else{
@@ -158,10 +164,14 @@
158 fossil_fatal("-W|--width value must be >22 or 0");
159 }
160 }else{
161 iWidth = -1;
162 }
 
 
 
 
163 if( g.argc!=3 ){
164 usage("?-l|--log? ?-b|--brief? FILENAME");
165 }
166 file_tree_name(g.argv[2], &fname, 1);
167 rid = db_int(0, "SELECT rid FROM vfile WHERE pathname=%B %s",
@@ -241,10 +251,14 @@
241 int rc;
242 Blob content, fname;
243 const char *zRev;
244 db_find_and_open_repository(0, 0);
245 zRev = find_option("r","r",1);
 
 
 
 
246 for(i=2; i<g.argc; i++){
247 file_tree_name(g.argv[i], &fname, 1);
248 blob_zero(&content);
249 rc = historical_version_of_file(zRev, blob_str(&fname), &content, 0,0,0,0);
250 if( rc==0 ){
251
--- src/finfo.c
+++ src/finfo.c
@@ -63,10 +63,13 @@
63 if( find_option("status","s",0) ){
64 Stmt q;
65 Blob line;
66 Blob fname;
67 int vid;
68
69 /* We should be done with options.. */
70 verify_all_options();
71
72 if( g.argc!=3 ) usage("-s|--status FILENAME");
73 vid = db_lget_int("checkout", 0);
74 if( vid==0 ){
75 fossil_fatal("no checkout to finfo files in");
@@ -115,10 +118,13 @@
118 blob_reset(&line);
119 }else if( find_option("print","p",0) ){
120 Blob record;
121 Blob fname;
122 const char *zRevision = find_option("revision", "r", 1);
123
124 /* We should be done with options.. */
125 verify_all_options();
126
127 file_tree_name(g.argv[2], &fname, 1);
128 if( zRevision ){
129 historical_version_of_file(zRevision, blob_str(&fname), &record, 0,0,0,0);
130 }else{
@@ -158,10 +164,14 @@
164 fossil_fatal("-W|--width value must be >22 or 0");
165 }
166 }else{
167 iWidth = -1;
168 }
169
170 /* We should be done with options.. */
171 verify_all_options();
172
173 if( g.argc!=3 ){
174 usage("?-l|--log? ?-b|--brief? FILENAME");
175 }
176 file_tree_name(g.argv[2], &fname, 1);
177 rid = db_int(0, "SELECT rid FROM vfile WHERE pathname=%B %s",
@@ -241,10 +251,14 @@
251 int rc;
252 Blob content, fname;
253 const char *zRev;
254 db_find_and_open_repository(0, 0);
255 zRev = find_option("r","r",1);
256
257 /* We should be done with options.. */
258 verify_all_options();
259
260 for(i=2; i<g.argc; i++){
261 file_tree_name(g.argv[i], &fname, 1);
262 blob_zero(&content);
263 rc = historical_version_of_file(zRev, blob_str(&fname), &content, 0,0,0,0);
264 if( rc==0 ){
265
+4
--- src/info.c
+++ src/info.c
@@ -197,10 +197,14 @@
197197
i64 fsize;
198198
int verboseFlag = find_option("verbose","v",0)!=0;
199199
if( !verboseFlag ){
200200
verboseFlag = find_option("detail","l",0)!=0; /* deprecated */
201201
}
202
+
203
+ /* We should be done with options.. */
204
+ verify_all_options();
205
+
202206
if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){
203207
db_open_config(0);
204208
db_record_repository_filename(g.argv[2]);
205209
db_open_repository(g.argv[2]);
206210
fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
207211
--- src/info.c
+++ src/info.c
@@ -197,10 +197,14 @@
197 i64 fsize;
198 int verboseFlag = find_option("verbose","v",0)!=0;
199 if( !verboseFlag ){
200 verboseFlag = find_option("detail","l",0)!=0; /* deprecated */
201 }
 
 
 
 
202 if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){
203 db_open_config(0);
204 db_record_repository_filename(g.argv[2]);
205 db_open_repository(g.argv[2]);
206 fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
207
--- src/info.c
+++ src/info.c
@@ -197,10 +197,14 @@
197 i64 fsize;
198 int verboseFlag = find_option("verbose","v",0)!=0;
199 if( !verboseFlag ){
200 verboseFlag = find_option("detail","l",0)!=0; /* deprecated */
201 }
202
203 /* We should be done with options.. */
204 verify_all_options();
205
206 if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){
207 db_open_config(0);
208 db_record_repository_filename(g.argv[2]);
209 db_open_repository(g.argv[2]);
210 fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
211
+16 -1
--- src/main.c
+++ src/main.c
@@ -936,12 +936,19 @@
936936
** If the verbose option is specified, additional details will
937937
** be output about what optional features this binary was compiled
938938
** with
939939
*/
940940
void version_cmd(void){
941
+ int verboseFlag = 0;
942
+
941943
fossil_print("This is fossil version %s\n", get_version());
942
- if(!find_option("verbose","v",0)){
944
+ verboseFlag = find_option("verbose","v",0)!=0;
945
+
946
+ /* We should be done with options.. */
947
+ verify_all_options();
948
+
949
+ if(!verboseFlag){
943950
return;
944951
}else{
945952
#if defined(FOSSIL_ENABLE_TCL)
946953
int rc;
947954
const char *zRc;
@@ -1928,10 +1935,14 @@
19281935
if( zAltBase ) set_base_url(zAltBase);
19291936
if( find_option("https",0,0)!=0 ) cgi_replace_parameter("HTTPS","on");
19301937
zHost = find_option("host", 0, 1);
19311938
if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost);
19321939
g.cgiOutput = 1;
1940
+
1941
+ /* We should be done with options.. */
1942
+ verify_all_options();
1943
+
19331944
if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){
19341945
fossil_fatal("no repository specified");
19351946
}
19361947
g.fullHttpReply = 1;
19371948
if( g.argc==6 ){
@@ -2107,10 +2118,14 @@
21072118
set_base_url(zAltBase);
21082119
}
21092120
if ( find_option("localhost", 0, 0)!=0 ){
21102121
flags |= HTTP_SERVER_LOCALHOST;
21112122
}
2123
+
2124
+ /* We should be done with options.. */
2125
+ verify_all_options();
2126
+
21122127
if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
21132128
isUiCmd = g.argv[1][0]=='u';
21142129
if( isUiCmd ){
21152130
flags |= HTTP_SERVER_LOCALHOST;
21162131
g.useLocalauth = 1;
21172132
--- src/main.c
+++ src/main.c
@@ -936,12 +936,19 @@
936 ** If the verbose option is specified, additional details will
937 ** be output about what optional features this binary was compiled
938 ** with
939 */
940 void version_cmd(void){
 
 
941 fossil_print("This is fossil version %s\n", get_version());
942 if(!find_option("verbose","v",0)){
 
 
 
 
 
943 return;
944 }else{
945 #if defined(FOSSIL_ENABLE_TCL)
946 int rc;
947 const char *zRc;
@@ -1928,10 +1935,14 @@
1928 if( zAltBase ) set_base_url(zAltBase);
1929 if( find_option("https",0,0)!=0 ) cgi_replace_parameter("HTTPS","on");
1930 zHost = find_option("host", 0, 1);
1931 if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost);
1932 g.cgiOutput = 1;
 
 
 
 
1933 if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){
1934 fossil_fatal("no repository specified");
1935 }
1936 g.fullHttpReply = 1;
1937 if( g.argc==6 ){
@@ -2107,10 +2118,14 @@
2107 set_base_url(zAltBase);
2108 }
2109 if ( find_option("localhost", 0, 0)!=0 ){
2110 flags |= HTTP_SERVER_LOCALHOST;
2111 }
 
 
 
 
2112 if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
2113 isUiCmd = g.argv[1][0]=='u';
2114 if( isUiCmd ){
2115 flags |= HTTP_SERVER_LOCALHOST;
2116 g.useLocalauth = 1;
2117
--- src/main.c
+++ src/main.c
@@ -936,12 +936,19 @@
936 ** If the verbose option is specified, additional details will
937 ** be output about what optional features this binary was compiled
938 ** with
939 */
940 void version_cmd(void){
941 int verboseFlag = 0;
942
943 fossil_print("This is fossil version %s\n", get_version());
944 verboseFlag = find_option("verbose","v",0)!=0;
945
946 /* We should be done with options.. */
947 verify_all_options();
948
949 if(!verboseFlag){
950 return;
951 }else{
952 #if defined(FOSSIL_ENABLE_TCL)
953 int rc;
954 const char *zRc;
@@ -1928,10 +1935,14 @@
1935 if( zAltBase ) set_base_url(zAltBase);
1936 if( find_option("https",0,0)!=0 ) cgi_replace_parameter("HTTPS","on");
1937 zHost = find_option("host", 0, 1);
1938 if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost);
1939 g.cgiOutput = 1;
1940
1941 /* We should be done with options.. */
1942 verify_all_options();
1943
1944 if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){
1945 fossil_fatal("no repository specified");
1946 }
1947 g.fullHttpReply = 1;
1948 if( g.argc==6 ){
@@ -2107,10 +2118,14 @@
2118 set_base_url(zAltBase);
2119 }
2120 if ( find_option("localhost", 0, 0)!=0 ){
2121 flags |= HTTP_SERVER_LOCALHOST;
2122 }
2123
2124 /* We should be done with options.. */
2125 verify_all_options();
2126
2127 if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
2128 isUiCmd = g.argv[1][0]=='u';
2129 if( isUiCmd ){
2130 flags |= HTTP_SERVER_LOCALHOST;
2131 g.useLocalauth = 1;
2132
--- src/merge3.c
+++ src/merge3.c
@@ -368,10 +368,14 @@
368368
** fossil commit
369369
**
370370
*/
371371
void delta_3waymerge_cmd(void){
372372
Blob pivot, v1, v2, merged;
373
+
374
+ /* We should be done with options.. */
375
+ verify_all_options();
376
+
373377
if( g.argc!=6 ){
374378
usage("PIVOT V1 V2 MERGED");
375379
}
376380
if( blob_read_from_file(&pivot, g.argv[2])<0 ){
377381
fossil_fatal("cannot read %s\n", g.argv[2]);
378382
--- src/merge3.c
+++ src/merge3.c
@@ -368,10 +368,14 @@
368 ** fossil commit
369 **
370 */
371 void delta_3waymerge_cmd(void){
372 Blob pivot, v1, v2, merged;
 
 
 
 
373 if( g.argc!=6 ){
374 usage("PIVOT V1 V2 MERGED");
375 }
376 if( blob_read_from_file(&pivot, g.argv[2])<0 ){
377 fossil_fatal("cannot read %s\n", g.argv[2]);
378
--- src/merge3.c
+++ src/merge3.c
@@ -368,10 +368,14 @@
368 ** fossil commit
369 **
370 */
371 void delta_3waymerge_cmd(void){
372 Blob pivot, v1, v2, merged;
373
374 /* We should be done with options.. */
375 verify_all_options();
376
377 if( g.argc!=6 ){
378 usage("PIVOT V1 V2 MERGED");
379 }
380 if( blob_read_from_file(&pivot, g.argv[2])<0 ){
381 fossil_fatal("cannot read %s\n", g.argv[2]);
382
+4
--- src/name.c
+++ src/name.c
@@ -659,10 +659,14 @@
659659
const char *zName;
660660
int verboseFlag;
661661
int i;
662662
db_find_and_open_repository(0,0);
663663
verboseFlag = find_option("verbose","v",0)!=0;
664
+
665
+ /* We should be done with options.. */
666
+ verify_all_options();
667
+
664668
if( g.argc<3 ) usage("whatis NAME ...");
665669
for(i=2; i<g.argc; i++){
666670
zName = g.argv[i];
667671
if( i>2 ) fossil_print("%.79c\n",'-');
668672
rid = symbolic_name_to_rid(zName, 0);
669673
--- src/name.c
+++ src/name.c
@@ -659,10 +659,14 @@
659 const char *zName;
660 int verboseFlag;
661 int i;
662 db_find_and_open_repository(0,0);
663 verboseFlag = find_option("verbose","v",0)!=0;
 
 
 
 
664 if( g.argc<3 ) usage("whatis NAME ...");
665 for(i=2; i<g.argc; i++){
666 zName = g.argv[i];
667 if( i>2 ) fossil_print("%.79c\n",'-');
668 rid = symbolic_name_to_rid(zName, 0);
669
--- src/name.c
+++ src/name.c
@@ -659,10 +659,14 @@
659 const char *zName;
660 int verboseFlag;
661 int i;
662 db_find_and_open_repository(0,0);
663 verboseFlag = find_option("verbose","v",0)!=0;
664
665 /* We should be done with options.. */
666 verify_all_options();
667
668 if( g.argc<3 ) usage("whatis NAME ...");
669 for(i=2; i<g.argc; i++){
670 zName = g.argv[i];
671 if( i>2 ) fossil_print("%.79c\n",'-');
672 rid = symbolic_name_to_rid(zName, 0);
673
--- src/rebuild.c
+++ src/rebuild.c
@@ -578,10 +578,14 @@
578578
usage("?REPOSITORY-FILENAME?");
579579
}
580580
db_close(1);
581581
db_open_repository(g.zRepositoryName);
582582
}
583
+
584
+ /* We should be done with options.. */
585
+ verify_all_options();
586
+
583587
db_begin_transaction();
584588
ttyOutput = 1;
585589
errCnt = rebuild_db(randomizeFlag, 1, doClustering);
586590
reconstruct_private_table();
587591
db_multi_exec(
@@ -793,10 +797,14 @@
793797
int privateOnly = find_option("private",0,0)!=0;
794798
int bNeedRebuild = 0;
795799
db_find_and_open_repository(OPEN_ANY_SCHEMA, 2);
796800
db_close(1);
797801
db_open_repository(g.zRepositoryName);
802
+
803
+ /* We should be done with options.. */
804
+ verify_all_options();
805
+
798806
if( !bForce ){
799807
Blob ans;
800808
char cReply;
801809
prompt_user(
802810
"Scrubbing the repository will permanently delete information.\n"
@@ -915,10 +923,14 @@
915923
fossil_print("\"%s\" is not a directory\n\n", g.argv[3]);
916924
usage("FILENAME DIRECTORY");
917925
}
918926
db_create_repository(g.argv[2]);
919927
db_open_repository(g.argv[2]);
928
+
929
+ /* We should be done with options.. */
930
+ verify_all_options();
931
+
920932
db_open_config(0);
921933
db_begin_transaction();
922934
db_initial_setup(0, 0, 0, 1);
923935
924936
fossil_print("Reading files from directory \"%s\"...\n", g.argv[3]);
925937
--- src/rebuild.c
+++ src/rebuild.c
@@ -578,10 +578,14 @@
578 usage("?REPOSITORY-FILENAME?");
579 }
580 db_close(1);
581 db_open_repository(g.zRepositoryName);
582 }
 
 
 
 
583 db_begin_transaction();
584 ttyOutput = 1;
585 errCnt = rebuild_db(randomizeFlag, 1, doClustering);
586 reconstruct_private_table();
587 db_multi_exec(
@@ -793,10 +797,14 @@
793 int privateOnly = find_option("private",0,0)!=0;
794 int bNeedRebuild = 0;
795 db_find_and_open_repository(OPEN_ANY_SCHEMA, 2);
796 db_close(1);
797 db_open_repository(g.zRepositoryName);
 
 
 
 
798 if( !bForce ){
799 Blob ans;
800 char cReply;
801 prompt_user(
802 "Scrubbing the repository will permanently delete information.\n"
@@ -915,10 +923,14 @@
915 fossil_print("\"%s\" is not a directory\n\n", g.argv[3]);
916 usage("FILENAME DIRECTORY");
917 }
918 db_create_repository(g.argv[2]);
919 db_open_repository(g.argv[2]);
 
 
 
 
920 db_open_config(0);
921 db_begin_transaction();
922 db_initial_setup(0, 0, 0, 1);
923
924 fossil_print("Reading files from directory \"%s\"...\n", g.argv[3]);
925
--- src/rebuild.c
+++ src/rebuild.c
@@ -578,10 +578,14 @@
578 usage("?REPOSITORY-FILENAME?");
579 }
580 db_close(1);
581 db_open_repository(g.zRepositoryName);
582 }
583
584 /* We should be done with options.. */
585 verify_all_options();
586
587 db_begin_transaction();
588 ttyOutput = 1;
589 errCnt = rebuild_db(randomizeFlag, 1, doClustering);
590 reconstruct_private_table();
591 db_multi_exec(
@@ -793,10 +797,14 @@
797 int privateOnly = find_option("private",0,0)!=0;
798 int bNeedRebuild = 0;
799 db_find_and_open_repository(OPEN_ANY_SCHEMA, 2);
800 db_close(1);
801 db_open_repository(g.zRepositoryName);
802
803 /* We should be done with options.. */
804 verify_all_options();
805
806 if( !bForce ){
807 Blob ans;
808 char cReply;
809 prompt_user(
810 "Scrubbing the repository will permanently delete information.\n"
@@ -915,10 +923,14 @@
923 fossil_print("\"%s\" is not a directory\n\n", g.argv[3]);
924 usage("FILENAME DIRECTORY");
925 }
926 db_create_repository(g.argv[2]);
927 db_open_repository(g.argv[2]);
928
929 /* We should be done with options.. */
930 verify_all_options();
931
932 db_open_config(0);
933 db_begin_transaction();
934 db_initial_setup(0, 0, 0, 1);
935
936 fossil_print("Reading files from directory \"%s\"...\n", g.argv[3]);
937
--- src/regexp.c
+++ src/regexp.c
@@ -768,11 +768,10 @@
768768
*/
769769
void re_test_grep(void){
770770
ReCompiled *pRe;
771771
const char *zErr;
772772
int ignoreCase = find_option("ignore-case","i",0)!=0;
773
-
774773
if( g.argc<3 ){
775774
usage("REGEXP [FILE...]");
776775
}
777776
zErr = re_compile(&pRe, g.argv[2], ignoreCase);
778777
if( zErr ) fossil_fatal("%s", zErr);
779778
--- src/regexp.c
+++ src/regexp.c
@@ -768,11 +768,10 @@
768 */
769 void re_test_grep(void){
770 ReCompiled *pRe;
771 const char *zErr;
772 int ignoreCase = find_option("ignore-case","i",0)!=0;
773
774 if( g.argc<3 ){
775 usage("REGEXP [FILE...]");
776 }
777 zErr = re_compile(&pRe, g.argv[2], ignoreCase);
778 if( zErr ) fossil_fatal("%s", zErr);
779
--- src/regexp.c
+++ src/regexp.c
@@ -768,11 +768,10 @@
768 */
769 void re_test_grep(void){
770 ReCompiled *pRe;
771 const char *zErr;
772 int ignoreCase = find_option("ignore-case","i",0)!=0;
 
773 if( g.argc<3 ){
774 usage("REGEXP [FILE...]");
775 }
776 zErr = re_compile(&pRe, g.argv[2], ignoreCase);
777 if( zErr ) fossil_fatal("%s", zErr);
778
+3
--- src/rss.c
+++ src/rss.c
@@ -267,10 +267,13 @@
267267
if(!zBaseURL || !*zBaseURL){
268268
zBaseURL = "URL-PLACEHOLDER";
269269
}
270270
271271
db_find_and_open_repository(0, 0);
272
+
273
+ /* We should be done with options.. */
274
+ verify_all_options();
272275
273276
blob_zero(&bSQL);
274277
blob_append( &bSQL, zSQL1, -1 );
275278
276279
if( zType[0]!='a' ){
277280
--- src/rss.c
+++ src/rss.c
@@ -267,10 +267,13 @@
267 if(!zBaseURL || !*zBaseURL){
268 zBaseURL = "URL-PLACEHOLDER";
269 }
270
271 db_find_and_open_repository(0, 0);
 
 
 
272
273 blob_zero(&bSQL);
274 blob_append( &bSQL, zSQL1, -1 );
275
276 if( zType[0]!='a' ){
277
--- src/rss.c
+++ src/rss.c
@@ -267,10 +267,13 @@
267 if(!zBaseURL || !*zBaseURL){
268 zBaseURL = "URL-PLACEHOLDER";
269 }
270
271 db_find_and_open_repository(0, 0);
272
273 /* We should be done with options.. */
274 verify_all_options();
275
276 blob_zero(&bSQL);
277 blob_append( &bSQL, zSQL1, -1 );
278
279 if( zType[0]!='a' ){
280
+4
--- src/stat.c
+++ src/stat.c
@@ -172,10 +172,14 @@
172172
const int colWidth = -19 /* printf alignment/width for left column */;
173173
const char *p;
174174
175175
brief = find_option("brief", "b",0)!=0;
176176
db_find_and_open_repository(0,0);
177
+
178
+ /* We should be done with options.. */
179
+ verify_all_options();
180
+
177181
fsize = file_size(g.zRepositoryName);
178182
bigSizeName(sizeof(zBuf), zBuf, fsize);
179183
fossil_print( "%*s%s\n", colWidth, "repository-size:", zBuf );
180184
if( !brief ){
181185
n = db_int(0, "SELECT count(*) FROM blob");
182186
--- src/stat.c
+++ src/stat.c
@@ -172,10 +172,14 @@
172 const int colWidth = -19 /* printf alignment/width for left column */;
173 const char *p;
174
175 brief = find_option("brief", "b",0)!=0;
176 db_find_and_open_repository(0,0);
 
 
 
 
177 fsize = file_size(g.zRepositoryName);
178 bigSizeName(sizeof(zBuf), zBuf, fsize);
179 fossil_print( "%*s%s\n", colWidth, "repository-size:", zBuf );
180 if( !brief ){
181 n = db_int(0, "SELECT count(*) FROM blob");
182
--- src/stat.c
+++ src/stat.c
@@ -172,10 +172,14 @@
172 const int colWidth = -19 /* printf alignment/width for left column */;
173 const char *p;
174
175 brief = find_option("brief", "b",0)!=0;
176 db_find_and_open_repository(0,0);
177
178 /* We should be done with options.. */
179 verify_all_options();
180
181 fsize = file_size(g.zRepositoryName);
182 bigSizeName(sizeof(zBuf), zBuf, fsize);
183 fossil_print( "%*s%s\n", colWidth, "repository-size:", zBuf );
184 if( !brief ){
185 n = db_int(0, "SELECT count(*) FROM blob");
186
+16
--- src/sync.c
+++ src/sync.c
@@ -186,10 +186,14 @@
186186
*/
187187
void pull_cmd(void){
188188
unsigned configFlags = 0;
189189
unsigned syncFlags = SYNC_PULL;
190190
process_sync_args(&configFlags, &syncFlags);
191
+
192
+ /* We should be done with options.. */
193
+ verify_all_options();
194
+
191195
client_sync(syncFlags, configFlags, 0);
192196
}
193197
194198
/*
195199
** COMMAND: push
@@ -217,10 +221,14 @@
217221
*/
218222
void push_cmd(void){
219223
unsigned configFlags = 0;
220224
unsigned syncFlags = SYNC_PUSH;
221225
process_sync_args(&configFlags, &syncFlags);
226
+
227
+ /* We should be done with options.. */
228
+ verify_all_options();
229
+
222230
if( db_get_boolean("dont-push",0) ){
223231
fossil_fatal("pushing is prohibited: the 'dont-push' option is set");
224232
}
225233
client_sync(syncFlags, 0, 0);
226234
}
@@ -253,10 +261,14 @@
253261
*/
254262
void sync_cmd(void){
255263
unsigned configFlags = 0;
256264
unsigned syncFlags = SYNC_PUSH|SYNC_PULL;
257265
process_sync_args(&configFlags, &syncFlags);
266
+
267
+ /* We should be done with options.. */
268
+ verify_all_options();
269
+
258270
if( db_get_boolean("dont-push",0) ) syncFlags &= ~SYNC_PUSH;
259271
client_sync(syncFlags, configFlags, 0);
260272
if( (syncFlags & SYNC_PUSH)==0 ){
261273
fossil_warning("pull only: the 'dont-push' option is set");
262274
}
@@ -280,10 +292,14 @@
280292
** See also: clone, push, pull, sync
281293
*/
282294
void remote_url_cmd(void){
283295
char *zUrl;
284296
db_find_and_open_repository(0, 0);
297
+
298
+ /* We should be done with options.. */
299
+ verify_all_options();
300
+
285301
if( g.argc!=2 && g.argc!=3 ){
286302
usage("remote-url ?URL|off?");
287303
}
288304
if( g.argc==3 ){
289305
db_unset("last-sync-url", 0);
290306
--- src/sync.c
+++ src/sync.c
@@ -186,10 +186,14 @@
186 */
187 void pull_cmd(void){
188 unsigned configFlags = 0;
189 unsigned syncFlags = SYNC_PULL;
190 process_sync_args(&configFlags, &syncFlags);
 
 
 
 
191 client_sync(syncFlags, configFlags, 0);
192 }
193
194 /*
195 ** COMMAND: push
@@ -217,10 +221,14 @@
217 */
218 void push_cmd(void){
219 unsigned configFlags = 0;
220 unsigned syncFlags = SYNC_PUSH;
221 process_sync_args(&configFlags, &syncFlags);
 
 
 
 
222 if( db_get_boolean("dont-push",0) ){
223 fossil_fatal("pushing is prohibited: the 'dont-push' option is set");
224 }
225 client_sync(syncFlags, 0, 0);
226 }
@@ -253,10 +261,14 @@
253 */
254 void sync_cmd(void){
255 unsigned configFlags = 0;
256 unsigned syncFlags = SYNC_PUSH|SYNC_PULL;
257 process_sync_args(&configFlags, &syncFlags);
 
 
 
 
258 if( db_get_boolean("dont-push",0) ) syncFlags &= ~SYNC_PUSH;
259 client_sync(syncFlags, configFlags, 0);
260 if( (syncFlags & SYNC_PUSH)==0 ){
261 fossil_warning("pull only: the 'dont-push' option is set");
262 }
@@ -280,10 +292,14 @@
280 ** See also: clone, push, pull, sync
281 */
282 void remote_url_cmd(void){
283 char *zUrl;
284 db_find_and_open_repository(0, 0);
 
 
 
 
285 if( g.argc!=2 && g.argc!=3 ){
286 usage("remote-url ?URL|off?");
287 }
288 if( g.argc==3 ){
289 db_unset("last-sync-url", 0);
290
--- src/sync.c
+++ src/sync.c
@@ -186,10 +186,14 @@
186 */
187 void pull_cmd(void){
188 unsigned configFlags = 0;
189 unsigned syncFlags = SYNC_PULL;
190 process_sync_args(&configFlags, &syncFlags);
191
192 /* We should be done with options.. */
193 verify_all_options();
194
195 client_sync(syncFlags, configFlags, 0);
196 }
197
198 /*
199 ** COMMAND: push
@@ -217,10 +221,14 @@
221 */
222 void push_cmd(void){
223 unsigned configFlags = 0;
224 unsigned syncFlags = SYNC_PUSH;
225 process_sync_args(&configFlags, &syncFlags);
226
227 /* We should be done with options.. */
228 verify_all_options();
229
230 if( db_get_boolean("dont-push",0) ){
231 fossil_fatal("pushing is prohibited: the 'dont-push' option is set");
232 }
233 client_sync(syncFlags, 0, 0);
234 }
@@ -253,10 +261,14 @@
261 */
262 void sync_cmd(void){
263 unsigned configFlags = 0;
264 unsigned syncFlags = SYNC_PUSH|SYNC_PULL;
265 process_sync_args(&configFlags, &syncFlags);
266
267 /* We should be done with options.. */
268 verify_all_options();
269
270 if( db_get_boolean("dont-push",0) ) syncFlags &= ~SYNC_PUSH;
271 client_sync(syncFlags, configFlags, 0);
272 if( (syncFlags & SYNC_PUSH)==0 ){
273 fossil_warning("pull only: the 'dont-push' option is set");
274 }
@@ -280,10 +292,14 @@
292 ** See also: clone, push, pull, sync
293 */
294 void remote_url_cmd(void){
295 char *zUrl;
296 db_find_and_open_repository(0, 0);
297
298 /* We should be done with options.. */
299 verify_all_options();
300
301 if( g.argc!=2 && g.argc!=3 ){
302 usage("remote-url ?URL|off?");
303 }
304 if( g.argc==3 ){
305 db_unset("last-sync-url", 0);
306
+4
--- src/tar.c
+++ src/tar.c
@@ -540,10 +540,14 @@
540540
int rid;
541541
Blob tarball;
542542
const char *zName;
543543
zName = find_option("name", 0, 1);
544544
db_find_and_open_repository(0, 0);
545
+
546
+ /* We should be done with options.. */
547
+ verify_all_options();
548
+
545549
if( g.argc!=4 ){
546550
usage("VERSION OUTPUTFILE");
547551
}
548552
rid = name_to_typed_rid(g.argv[2], "ci");
549553
if( rid==0 ){
550554
--- src/tar.c
+++ src/tar.c
@@ -540,10 +540,14 @@
540 int rid;
541 Blob tarball;
542 const char *zName;
543 zName = find_option("name", 0, 1);
544 db_find_and_open_repository(0, 0);
 
 
 
 
545 if( g.argc!=4 ){
546 usage("VERSION OUTPUTFILE");
547 }
548 rid = name_to_typed_rid(g.argv[2], "ci");
549 if( rid==0 ){
550
--- src/tar.c
+++ src/tar.c
@@ -540,10 +540,14 @@
540 int rid;
541 Blob tarball;
542 const char *zName;
543 zName = find_option("name", 0, 1);
544 db_find_and_open_repository(0, 0);
545
546 /* We should be done with options.. */
547 verify_all_options();
548
549 if( g.argc!=4 ){
550 usage("VERSION OUTPUTFILE");
551 }
552 rid = name_to_typed_rid(g.argv[2], "ci");
553 if( rid==0 ){
554
--- src/timeline.c
+++ src/timeline.c
@@ -1779,10 +1779,14 @@
17791779
}else{
17801780
width = -1;
17811781
}
17821782
zOffset = find_option("offset",0,1);
17831783
iOffset = zOffset ? atoi(zOffset) : 0;
1784
+
1785
+ /* We should be done with options.. */
1786
+ verify_all_options();
1787
+
17841788
if( g.argc>=4 ){
17851789
k = strlen(g.argv[2]);
17861790
if( strncmp(g.argv[2],"before",k)==0 ){
17871791
mode = 1;
17881792
}else if( strncmp(g.argv[2],"after",k)==0 && k>1 ){
17891793
--- src/timeline.c
+++ src/timeline.c
@@ -1779,10 +1779,14 @@
1779 }else{
1780 width = -1;
1781 }
1782 zOffset = find_option("offset",0,1);
1783 iOffset = zOffset ? atoi(zOffset) : 0;
 
 
 
 
1784 if( g.argc>=4 ){
1785 k = strlen(g.argv[2]);
1786 if( strncmp(g.argv[2],"before",k)==0 ){
1787 mode = 1;
1788 }else if( strncmp(g.argv[2],"after",k)==0 && k>1 ){
1789
--- src/timeline.c
+++ src/timeline.c
@@ -1779,10 +1779,14 @@
1779 }else{
1780 width = -1;
1781 }
1782 zOffset = find_option("offset",0,1);
1783 iOffset = zOffset ? atoi(zOffset) : 0;
1784
1785 /* We should be done with options.. */
1786 verify_all_options();
1787
1788 if( g.argc>=4 ){
1789 k = strlen(g.argv[2]);
1790 if( strncmp(g.argv[2],"before",k)==0 ){
1791 mode = 1;
1792 }else if( strncmp(g.argv[2],"after",k)==0 && k>1 ){
1793
--- src/update.c
+++ src/update.c
@@ -139,10 +139,14 @@
139139
verboseFlag = find_option("verbose","v",0)!=0;
140140
forceMissingFlag = find_option("force-missing",0,0)!=0;
141141
debugFlag = find_option("debug",0,0)!=0;
142142
setmtimeFlag = find_option("setmtime",0,0)!=0;
143143
capture_case_sensitive_option();
144
+
145
+ /* We should be done with options.. */
146
+ verify_all_options();
147
+
144148
db_must_be_within_tree();
145149
vid = db_lget_int("checkout", 0);
146150
user_select();
147151
if( !dryRunFlag && !internalUpdate ){
148152
if( autosync_loop(SYNC_PULL + SYNC_VERBOSE*verboseFlag,
149153
--- src/update.c
+++ src/update.c
@@ -139,10 +139,14 @@
139 verboseFlag = find_option("verbose","v",0)!=0;
140 forceMissingFlag = find_option("force-missing",0,0)!=0;
141 debugFlag = find_option("debug",0,0)!=0;
142 setmtimeFlag = find_option("setmtime",0,0)!=0;
143 capture_case_sensitive_option();
 
 
 
 
144 db_must_be_within_tree();
145 vid = db_lget_int("checkout", 0);
146 user_select();
147 if( !dryRunFlag && !internalUpdate ){
148 if( autosync_loop(SYNC_PULL + SYNC_VERBOSE*verboseFlag,
149
--- src/update.c
+++ src/update.c
@@ -139,10 +139,14 @@
139 verboseFlag = find_option("verbose","v",0)!=0;
140 forceMissingFlag = find_option("force-missing",0,0)!=0;
141 debugFlag = find_option("debug",0,0)!=0;
142 setmtimeFlag = find_option("setmtime",0,0)!=0;
143 capture_case_sensitive_option();
144
145 /* We should be done with options.. */
146 verify_all_options();
147
148 db_must_be_within_tree();
149 vid = db_lget_int("checkout", 0);
150 user_select();
151 if( !dryRunFlag && !internalUpdate ){
152 if( autosync_loop(SYNC_PULL + SYNC_VERBOSE*verboseFlag,
153
+4
--- src/zip.c
+++ src/zip.c
@@ -393,10 +393,14 @@
393393
int rid;
394394
Blob zip;
395395
const char *zName;
396396
zName = find_option("name", 0, 1);
397397
db_find_and_open_repository(0, 0);
398
+
399
+ /* We should be done with options.. */
400
+ verify_all_options();
401
+
398402
if( g.argc!=4 ){
399403
usage("VERSION OUTPUTFILE");
400404
}
401405
rid = name_to_typed_rid(g.argv[2],"ci");
402406
if( zName==0 ){
403407
--- src/zip.c
+++ src/zip.c
@@ -393,10 +393,14 @@
393 int rid;
394 Blob zip;
395 const char *zName;
396 zName = find_option("name", 0, 1);
397 db_find_and_open_repository(0, 0);
 
 
 
 
398 if( g.argc!=4 ){
399 usage("VERSION OUTPUTFILE");
400 }
401 rid = name_to_typed_rid(g.argv[2],"ci");
402 if( zName==0 ){
403
--- src/zip.c
+++ src/zip.c
@@ -393,10 +393,14 @@
393 int rid;
394 Blob zip;
395 const char *zName;
396 zName = find_option("name", 0, 1);
397 db_find_and_open_repository(0, 0);
398
399 /* We should be done with options.. */
400 verify_all_options();
401
402 if( g.argc!=4 ){
403 usage("VERSION OUTPUTFILE");
404 }
405 rid = name_to_typed_rid(g.argv[2],"ci");
406 if( zName==0 ){
407

Keyboard Shortcuts

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