Fossil SCM

Restore special handling of the database name from [17885b90c8] in filenames_are_case_sensitive() as it may be needed in some cases. Consolidate all use of the capture_case_sensitive_option() function.

mistachkin 2014-09-15 18:19 trunk merge
Commit 0c51600056ec9804eb7bfd837616db3b7653fd15
+3 -7
--- src/add.c
+++ src/add.c
@@ -260,11 +260,10 @@
260260
261261
zCleanFlag = find_option("clean",0,1);
262262
zIgnoreFlag = find_option("ignore",0,1);
263263
forceFlag = find_option("force","f",0)!=0;
264264
if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL;
265
- capture_case_sensitive_option();
266265
267266
/* We should be done with options.. */
268267
verify_all_options();
269268
270269
db_must_be_within_tree();
@@ -353,12 +352,10 @@
353352
*/
354353
void delete_cmd(void){
355354
int i;
356355
Stmt loop;
357356
358
- capture_case_sensitive_option();
359
-
360357
/* We should be done with options.. */
361358
verify_all_options();
362359
363360
db_must_be_within_tree();
364361
db_begin_transaction();
@@ -445,12 +442,13 @@
445442
#endif
446443
caseSensitive = db_get_boolean("case-sensitive",caseSensitive);
447444
}
448445
if( !caseSensitive && g.localOpen ){
449446
db_multi_exec(
450
- "CREATE INDEX IF NOT EXISTS vfile_nocase"
451
- " ON vfile(pathname COLLATE nocase)"
447
+ "CREATE INDEX IF NOT EXISTS %s.vfile_nocase"
448
+ " ON vfile(pathname COLLATE nocase)",
449
+ db_name("localdb")
452450
);
453451
}
454452
}
455453
return caseSensitive;
456454
}
@@ -522,11 +520,10 @@
522520
Glob *pIgnore, *pClean;
523521
524522
if( !dryRunFlag ){
525523
dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
526524
}
527
- capture_case_sensitive_option();
528525
529526
/* We should be done with options.. */
530527
verify_all_options();
531528
532529
db_must_be_within_tree();
@@ -634,11 +631,10 @@
634631
int vid;
635632
char *zDest;
636633
Blob dest;
637634
Stmt q;
638635
639
- capture_case_sensitive_option();
640636
db_must_be_within_tree();
641637
642638
/* We should be done with options.. */
643639
verify_all_options();
644640
645641
--- src/add.c
+++ src/add.c
@@ -260,11 +260,10 @@
260
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();
@@ -353,12 +352,10 @@
353 */
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();
@@ -445,12 +442,13 @@
445 #endif
446 caseSensitive = db_get_boolean("case-sensitive",caseSensitive);
447 }
448 if( !caseSensitive && g.localOpen ){
449 db_multi_exec(
450 "CREATE INDEX IF NOT EXISTS vfile_nocase"
451 " ON vfile(pathname COLLATE nocase)"
 
452 );
453 }
454 }
455 return caseSensitive;
456 }
@@ -522,11 +520,10 @@
522 Glob *pIgnore, *pClean;
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();
@@ -634,11 +631,10 @@
634 int vid;
635 char *zDest;
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
--- src/add.c
+++ src/add.c
@@ -260,11 +260,10 @@
260
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
266 /* We should be done with options.. */
267 verify_all_options();
268
269 db_must_be_within_tree();
@@ -353,12 +352,10 @@
352 */
353 void delete_cmd(void){
354 int i;
355 Stmt loop;
356
 
 
357 /* We should be done with options.. */
358 verify_all_options();
359
360 db_must_be_within_tree();
361 db_begin_transaction();
@@ -445,12 +442,13 @@
442 #endif
443 caseSensitive = db_get_boolean("case-sensitive",caseSensitive);
444 }
445 if( !caseSensitive && g.localOpen ){
446 db_multi_exec(
447 "CREATE INDEX IF NOT EXISTS %s.vfile_nocase"
448 " ON vfile(pathname COLLATE nocase)",
449 db_name("localdb")
450 );
451 }
452 }
453 return caseSensitive;
454 }
@@ -522,11 +520,10 @@
520 Glob *pIgnore, *pClean;
521
522 if( !dryRunFlag ){
523 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
524 }
 
525
526 /* We should be done with options.. */
527 verify_all_options();
528
529 db_must_be_within_tree();
@@ -634,11 +631,10 @@
631 int vid;
632 char *zDest;
633 Blob dest;
634 Stmt q;
635
 
636 db_must_be_within_tree();
637
638 /* We should be done with options.. */
639 verify_all_options();
640
641
--- src/checkin.c
+++ src/checkin.c
@@ -473,11 +473,10 @@
473473
Glob *pIgnore;
474474
Blob rewrittenPathname;
475475
const char *zPathname, *zDisplayName;
476476
477477
if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP;
478
- capture_case_sensitive_option();
479478
db_must_be_within_tree();
480479
cwdRelative = determine_cwd_relative_option();
481480
482481
/* We should be done with options.. */
483482
verify_all_options();
@@ -596,11 +595,10 @@
596595
if( find_option("allckouts",0,0)!=0 ) scanFlags |= SCAN_NESTED;
597596
zIgnoreFlag = find_option("ignore",0,1);
598597
verboseFlag = find_option("verbose","v",0)!=0;
599598
zKeepFlag = find_option("keep",0,1);
600599
zCleanFlag = find_option("clean",0,1);
601
- capture_case_sensitive_option();
602600
db_must_be_within_tree();
603601
if( zIgnoreFlag==0 ){
604602
zIgnoreFlag = db_get("ignore-glob", 0);
605603
}
606604
if( zKeepFlag==0 ){
607605
--- src/checkin.c
+++ src/checkin.c
@@ -473,11 +473,10 @@
473 Glob *pIgnore;
474 Blob rewrittenPathname;
475 const char *zPathname, *zDisplayName;
476
477 if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP;
478 capture_case_sensitive_option();
479 db_must_be_within_tree();
480 cwdRelative = determine_cwd_relative_option();
481
482 /* We should be done with options.. */
483 verify_all_options();
@@ -596,11 +595,10 @@
596 if( find_option("allckouts",0,0)!=0 ) scanFlags |= SCAN_NESTED;
597 zIgnoreFlag = find_option("ignore",0,1);
598 verboseFlag = find_option("verbose","v",0)!=0;
599 zKeepFlag = find_option("keep",0,1);
600 zCleanFlag = find_option("clean",0,1);
601 capture_case_sensitive_option();
602 db_must_be_within_tree();
603 if( zIgnoreFlag==0 ){
604 zIgnoreFlag = db_get("ignore-glob", 0);
605 }
606 if( zKeepFlag==0 ){
607
--- src/checkin.c
+++ src/checkin.c
@@ -473,11 +473,10 @@
473 Glob *pIgnore;
474 Blob rewrittenPathname;
475 const char *zPathname, *zDisplayName;
476
477 if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP;
 
478 db_must_be_within_tree();
479 cwdRelative = determine_cwd_relative_option();
480
481 /* We should be done with options.. */
482 verify_all_options();
@@ -596,11 +595,10 @@
595 if( find_option("allckouts",0,0)!=0 ) scanFlags |= SCAN_NESTED;
596 zIgnoreFlag = find_option("ignore",0,1);
597 verboseFlag = find_option("verbose","v",0)!=0;
598 zKeepFlag = find_option("keep",0,1);
599 zCleanFlag = find_option("clean",0,1);
 
600 db_must_be_within_tree();
601 if( zIgnoreFlag==0 ){
602 zIgnoreFlag = db_get("ignore-glob", 0);
603 }
604 if( zKeepFlag==0 ){
605
-1
--- src/file.c
+++ src/file.c
@@ -1102,11 +1102,10 @@
11021102
void cmd_test_tree_name(void){
11031103
int i;
11041104
Blob x;
11051105
db_find_and_open_repository(0,0);
11061106
blob_zero(&x);
1107
- capture_case_sensitive_option();
11081107
for(i=2; i<g.argc; i++){
11091108
if( file_tree_name(g.argv[i], &x, 1) ){
11101109
fossil_print("%s\n", blob_buffer(&x));
11111110
blob_reset(&x);
11121111
}
11131112
--- src/file.c
+++ src/file.c
@@ -1102,11 +1102,10 @@
1102 void cmd_test_tree_name(void){
1103 int i;
1104 Blob x;
1105 db_find_and_open_repository(0,0);
1106 blob_zero(&x);
1107 capture_case_sensitive_option();
1108 for(i=2; i<g.argc; i++){
1109 if( file_tree_name(g.argv[i], &x, 1) ){
1110 fossil_print("%s\n", blob_buffer(&x));
1111 blob_reset(&x);
1112 }
1113
--- src/file.c
+++ src/file.c
@@ -1102,11 +1102,10 @@
1102 void cmd_test_tree_name(void){
1103 int i;
1104 Blob x;
1105 db_find_and_open_repository(0,0);
1106 blob_zero(&x);
 
1107 for(i=2; i<g.argc; i++){
1108 if( file_tree_name(g.argv[i], &x, 1) ){
1109 fossil_print("%s\n", blob_buffer(&x));
1110 blob_reset(&x);
1111 }
1112
--- src/finfo.c
+++ src/finfo.c
@@ -56,11 +56,10 @@
5656
** entry).
5757
**
5858
** See also: artifact, cat, descendants, info, leaves
5959
*/
6060
void finfo_cmd(void){
61
- capture_case_sensitive_option();
6261
db_must_be_within_tree();
6362
if( find_option("status","s",0) ){
6463
Stmt q;
6564
Blob line;
6665
Blob fname;
6766
--- src/finfo.c
+++ src/finfo.c
@@ -56,11 +56,10 @@
56 ** entry).
57 **
58 ** See also: artifact, cat, descendants, info, leaves
59 */
60 void finfo_cmd(void){
61 capture_case_sensitive_option();
62 db_must_be_within_tree();
63 if( find_option("status","s",0) ){
64 Stmt q;
65 Blob line;
66 Blob fname;
67
--- src/finfo.c
+++ src/finfo.c
@@ -56,11 +56,10 @@
56 ** entry).
57 **
58 ** See also: artifact, cat, descendants, info, leaves
59 */
60 void finfo_cmd(void){
 
61 db_must_be_within_tree();
62 if( find_option("status","s",0) ){
63 Stmt q;
64 Blob line;
65 Blob fname;
66
+1 -1
--- src/info.c
+++ src/info.c
@@ -203,12 +203,12 @@
203203
/* We should be done with options.. */
204204
verify_all_options();
205205
206206
if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){
207207
db_open_config(0);
208
- db_record_repository_filename(g.argv[2]);
209208
db_open_repository(g.argv[2]);
209
+ db_record_repository_filename(g.argv[2]);
210210
fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
211211
fossil_print("project-code: %s\n", db_get("project-code", "<none>"));
212212
extraRepoInfo();
213213
return;
214214
}
215215
--- src/info.c
+++ src/info.c
@@ -203,12 +203,12 @@
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 fossil_print("project-code: %s\n", db_get("project-code", "<none>"));
212 extraRepoInfo();
213 return;
214 }
215
--- src/info.c
+++ src/info.c
@@ -203,12 +203,12 @@
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_open_repository(g.argv[2]);
209 db_record_repository_filename(g.argv[2]);
210 fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
211 fossil_print("project-code: %s\n", db_get("project-code", "<none>"));
212 extraRepoInfo();
213 return;
214 }
215
+1
--- src/main.c
+++ src/main.c
@@ -609,10 +609,11 @@
609609
memset(&g.tcl, 0, sizeof(TclContext));
610610
g.tcl.argc = g.argc;
611611
g.tcl.argv = copy_args(g.argc, g.argv); /* save full arguments */
612612
#endif
613613
g.mainTimerId = fossil_timer_start();
614
+ capture_case_sensitive_option();
614615
g.zVfsName = find_option("vfs",0,1);
615616
if( g.zVfsName==0 ){
616617
g.zVfsName = fossil_getenv("FOSSIL_VFS");
617618
}
618619
if( g.zVfsName ){
619620
--- src/main.c
+++ src/main.c
@@ -609,10 +609,11 @@
609 memset(&g.tcl, 0, sizeof(TclContext));
610 g.tcl.argc = g.argc;
611 g.tcl.argv = copy_args(g.argc, g.argv); /* save full arguments */
612 #endif
613 g.mainTimerId = fossil_timer_start();
 
614 g.zVfsName = find_option("vfs",0,1);
615 if( g.zVfsName==0 ){
616 g.zVfsName = fossil_getenv("FOSSIL_VFS");
617 }
618 if( g.zVfsName ){
619
--- src/main.c
+++ src/main.c
@@ -609,10 +609,11 @@
609 memset(&g.tcl, 0, sizeof(TclContext));
610 g.tcl.argc = g.argc;
611 g.tcl.argv = copy_args(g.argc, g.argv); /* save full arguments */
612 #endif
613 g.mainTimerId = fossil_timer_start();
614 capture_case_sensitive_option();
615 g.zVfsName = find_option("vfs",0,1);
616 if( g.zVfsName==0 ){
617 g.zVfsName = fossil_getenv("FOSSIL_VFS");
618 }
619 if( g.zVfsName ){
620
--- src/merge.c
+++ src/merge.c
@@ -145,11 +145,10 @@
145145
if( !dryRunFlag ){
146146
dryRunFlag = find_option("nochange",0,0)!=0; /* deprecated */
147147
}
148148
forceFlag = find_option("force","f",0)!=0;
149149
zPivot = find_option("baseline",0,1);
150
- capture_case_sensitive_option();
151150
verify_all_options();
152151
db_must_be_within_tree();
153152
if( zBinGlob==0 ) zBinGlob = db_get("binary-glob",0);
154153
vid = db_lget_int("checkout", 0);
155154
if( vid==0 ){
156155
--- src/merge.c
+++ src/merge.c
@@ -145,11 +145,10 @@
145 if( !dryRunFlag ){
146 dryRunFlag = find_option("nochange",0,0)!=0; /* deprecated */
147 }
148 forceFlag = find_option("force","f",0)!=0;
149 zPivot = find_option("baseline",0,1);
150 capture_case_sensitive_option();
151 verify_all_options();
152 db_must_be_within_tree();
153 if( zBinGlob==0 ) zBinGlob = db_get("binary-glob",0);
154 vid = db_lget_int("checkout", 0);
155 if( vid==0 ){
156
--- src/merge.c
+++ src/merge.c
@@ -145,11 +145,10 @@
145 if( !dryRunFlag ){
146 dryRunFlag = find_option("nochange",0,0)!=0; /* deprecated */
147 }
148 forceFlag = find_option("force","f",0)!=0;
149 zPivot = find_option("baseline",0,1);
 
150 verify_all_options();
151 db_must_be_within_tree();
152 if( zBinGlob==0 ) zBinGlob = db_get("binary-glob",0);
153 vid = db_lget_int("checkout", 0);
154 if( vid==0 ){
155
--- src/update.c
+++ src/update.c
@@ -144,11 +144,10 @@
144144
}
145145
verboseFlag = find_option("verbose","v",0)!=0;
146146
forceMissingFlag = find_option("force-missing",0,0)!=0;
147147
debugFlag = find_option("debug",0,0)!=0;
148148
setmtimeFlag = find_option("setmtime",0,0)!=0;
149
- capture_case_sensitive_option();
150149
151150
/* We should be done with options.. */
152151
verify_all_options();
153152
154153
db_must_be_within_tree();
155154
--- src/update.c
+++ src/update.c
@@ -144,11 +144,10 @@
144 }
145 verboseFlag = find_option("verbose","v",0)!=0;
146 forceMissingFlag = find_option("force-missing",0,0)!=0;
147 debugFlag = find_option("debug",0,0)!=0;
148 setmtimeFlag = find_option("setmtime",0,0)!=0;
149 capture_case_sensitive_option();
150
151 /* We should be done with options.. */
152 verify_all_options();
153
154 db_must_be_within_tree();
155
--- src/update.c
+++ src/update.c
@@ -144,11 +144,10 @@
144 }
145 verboseFlag = find_option("verbose","v",0)!=0;
146 forceMissingFlag = find_option("force-missing",0,0)!=0;
147 debugFlag = find_option("debug",0,0)!=0;
148 setmtimeFlag = find_option("setmtime",0,0)!=0;
 
149
150 /* We should be done with options.. */
151 verify_all_options();
152
153 db_must_be_within_tree();
154

Keyboard Shortcuts

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