Fossil SCM

Remove the seperate versionable version of db_get(), which now uses ctrlSettings to determine whether a setting is versionable or not.

ben 2011-08-14 17:54 ben-testing
Commit 3113f7b18f672ee31cdeef429809b9de375f1438
+3 -3
--- src/add.c
+++ src/add.c
@@ -60,11 +60,11 @@
6060
"manifest.uuid",
6161
};
6262
6363
if( N>=0 && N<count(azName) ) return azName[N];
6464
if( N>=count(azName) && N<count(azName)+count(azManifest)
65
- && db_get_versionable_setting_boolean("manifest",0) ){
65
+ && db_get_boolean("manifest",0) ){
6666
return azManifest[N-count(azName)];
6767
}
6868
return 0;
6969
}
7070
@@ -198,11 +198,11 @@
198198
includeDotFiles = find_option("dotfiles",0,0)!=0;
199199
capture_case_sensitive_option();
200200
db_must_be_within_tree();
201201
caseSensitive = filenames_are_case_sensitive();
202202
if( zIgnoreFlag==0 ){
203
- zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
203
+ zIgnoreFlag = db_get("ignore-glob", 0);
204204
}
205205
vid = db_lget_int("checkout",0);
206206
if( vid==0 ){
207207
fossil_panic("no checkout to add to");
208208
}
@@ -390,11 +390,11 @@
390390
391391
capture_case_sensitive_option();
392392
db_must_be_within_tree();
393393
caseSensitive = filenames_are_case_sensitive();
394394
if( zIgnoreFlag==0 ){
395
- zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
395
+ zIgnoreFlag = db_get("ignore-glob", 0);
396396
}
397397
vid = db_lget_int("checkout",0);
398398
if( vid==0 ){
399399
fossil_panic("no checkout to add to");
400400
}
401401
--- src/add.c
+++ src/add.c
@@ -60,11 +60,11 @@
60 "manifest.uuid",
61 };
62
63 if( N>=0 && N<count(azName) ) return azName[N];
64 if( N>=count(azName) && N<count(azName)+count(azManifest)
65 && db_get_versionable_setting_boolean("manifest",0) ){
66 return azManifest[N-count(azName)];
67 }
68 return 0;
69 }
70
@@ -198,11 +198,11 @@
198 includeDotFiles = find_option("dotfiles",0,0)!=0;
199 capture_case_sensitive_option();
200 db_must_be_within_tree();
201 caseSensitive = filenames_are_case_sensitive();
202 if( zIgnoreFlag==0 ){
203 zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
204 }
205 vid = db_lget_int("checkout",0);
206 if( vid==0 ){
207 fossil_panic("no checkout to add to");
208 }
@@ -390,11 +390,11 @@
390
391 capture_case_sensitive_option();
392 db_must_be_within_tree();
393 caseSensitive = filenames_are_case_sensitive();
394 if( zIgnoreFlag==0 ){
395 zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
396 }
397 vid = db_lget_int("checkout",0);
398 if( vid==0 ){
399 fossil_panic("no checkout to add to");
400 }
401
--- src/add.c
+++ src/add.c
@@ -60,11 +60,11 @@
60 "manifest.uuid",
61 };
62
63 if( N>=0 && N<count(azName) ) return azName[N];
64 if( N>=count(azName) && N<count(azName)+count(azManifest)
65 && db_get_boolean("manifest",0) ){
66 return azManifest[N-count(azName)];
67 }
68 return 0;
69 }
70
@@ -198,11 +198,11 @@
198 includeDotFiles = find_option("dotfiles",0,0)!=0;
199 capture_case_sensitive_option();
200 db_must_be_within_tree();
201 caseSensitive = filenames_are_case_sensitive();
202 if( zIgnoreFlag==0 ){
203 zIgnoreFlag = db_get("ignore-glob", 0);
204 }
205 vid = db_lget_int("checkout",0);
206 if( vid==0 ){
207 fossil_panic("no checkout to add to");
208 }
@@ -390,11 +390,11 @@
390
391 capture_case_sensitive_option();
392 db_must_be_within_tree();
393 caseSensitive = filenames_are_case_sensitive();
394 if( zIgnoreFlag==0 ){
395 zIgnoreFlag = db_get("ignore-glob", 0);
396 }
397 vid = db_lget_int("checkout",0);
398 if( vid==0 ){
399 fossil_panic("no checkout to add to");
400 }
401
+5 -5
--- src/checkin.c
+++ src/checkin.c
@@ -289,16 +289,16 @@
289289
Blob rewrittenPathname;
290290
const char *zPathname, *zDisplayName;
291291
292292
db_must_be_within_tree();
293293
cwdRelative = determine_cwd_relative_option();
294
- outputManifest = db_get_versionable_setting_boolean("manifest",0);
294
+ outputManifest = db_get_boolean("manifest",0);
295295
db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
296296
n = strlen(g.zLocalRoot);
297297
blob_init(&path, g.zLocalRoot, n-1);
298298
if( zIgnoreFlag==0 ){
299
- zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
299
+ zIgnoreFlag = db_get("ignore-glob", 0);
300300
}
301301
pIgnore = glob_create(zIgnoreFlag);
302302
vfile_scan(&path, blob_size(&path), allFlag, pIgnore);
303303
glob_free(pIgnore);
304304
db_prepare(&q,
@@ -360,11 +360,11 @@
360360
allFlag = find_option("force","f",0)!=0;
361361
dotfilesFlag = find_option("dotfiles",0,0)!=0;
362362
zIgnoreFlag = find_option("ignore",0,1);
363363
db_must_be_within_tree();
364364
if( zIgnoreFlag==0 ){
365
- zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
365
+ zIgnoreFlag = db_get("ignore-glob", 0);
366366
}
367367
db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
368368
n = strlen(g.zLocalRoot);
369369
blob_init(&path, g.zLocalRoot, n-1);
370370
pIgnore = glob_create(zIgnoreFlag);
@@ -908,11 +908,11 @@
908908
zUserOvrd = find_option("user-override",0,1);
909909
db_must_be_within_tree();
910910
noSign = db_get_boolean("omitsign", 0)|noSign;
911911
if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
912912
useCksum = db_get_boolean("repo-cksum", 1);
913
- outputManifest = db_get_versionable_setting_boolean("manifest", 0);
913
+ outputManifest = db_get_boolean("manifest", 0);
914914
verify_all_options();
915915
916916
/* So that older versions of Fossil (that do not understand delta-
917917
** manifest) can continue to use this repository, do not create a new
918918
** delta-manifest unless this repository already contains one or more
@@ -1049,11 +1049,11 @@
10491049
** the identified fils are inserted (if they have been modified).
10501050
*/
10511051
db_prepare(&q,
10521052
"SELECT id, %Q || pathname, mrid, %s FROM vfile "
10531053
"WHERE chnged==1 AND NOT deleted AND file_is_selected(id)",
1054
- g.zLocalRoot, glob_expr("pathname", db_get_versionable_setting("crnl-glob",""))
1054
+ g.zLocalRoot, glob_expr("pathname", db_get("crnl-glob",""))
10551055
);
10561056
while( db_step(&q)==SQLITE_ROW ){
10571057
int id, rid;
10581058
const char *zFullname;
10591059
Blob content;
10601060
--- src/checkin.c
+++ src/checkin.c
@@ -289,16 +289,16 @@
289 Blob rewrittenPathname;
290 const char *zPathname, *zDisplayName;
291
292 db_must_be_within_tree();
293 cwdRelative = determine_cwd_relative_option();
294 outputManifest = db_get_versionable_setting_boolean("manifest",0);
295 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
296 n = strlen(g.zLocalRoot);
297 blob_init(&path, g.zLocalRoot, n-1);
298 if( zIgnoreFlag==0 ){
299 zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
300 }
301 pIgnore = glob_create(zIgnoreFlag);
302 vfile_scan(&path, blob_size(&path), allFlag, pIgnore);
303 glob_free(pIgnore);
304 db_prepare(&q,
@@ -360,11 +360,11 @@
360 allFlag = find_option("force","f",0)!=0;
361 dotfilesFlag = find_option("dotfiles",0,0)!=0;
362 zIgnoreFlag = find_option("ignore",0,1);
363 db_must_be_within_tree();
364 if( zIgnoreFlag==0 ){
365 zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
366 }
367 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
368 n = strlen(g.zLocalRoot);
369 blob_init(&path, g.zLocalRoot, n-1);
370 pIgnore = glob_create(zIgnoreFlag);
@@ -908,11 +908,11 @@
908 zUserOvrd = find_option("user-override",0,1);
909 db_must_be_within_tree();
910 noSign = db_get_boolean("omitsign", 0)|noSign;
911 if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
912 useCksum = db_get_boolean("repo-cksum", 1);
913 outputManifest = db_get_versionable_setting_boolean("manifest", 0);
914 verify_all_options();
915
916 /* So that older versions of Fossil (that do not understand delta-
917 ** manifest) can continue to use this repository, do not create a new
918 ** delta-manifest unless this repository already contains one or more
@@ -1049,11 +1049,11 @@
1049 ** the identified fils are inserted (if they have been modified).
1050 */
1051 db_prepare(&q,
1052 "SELECT id, %Q || pathname, mrid, %s FROM vfile "
1053 "WHERE chnged==1 AND NOT deleted AND file_is_selected(id)",
1054 g.zLocalRoot, glob_expr("pathname", db_get_versionable_setting("crnl-glob",""))
1055 );
1056 while( db_step(&q)==SQLITE_ROW ){
1057 int id, rid;
1058 const char *zFullname;
1059 Blob content;
1060
--- src/checkin.c
+++ src/checkin.c
@@ -289,16 +289,16 @@
289 Blob rewrittenPathname;
290 const char *zPathname, *zDisplayName;
291
292 db_must_be_within_tree();
293 cwdRelative = determine_cwd_relative_option();
294 outputManifest = db_get_boolean("manifest",0);
295 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
296 n = strlen(g.zLocalRoot);
297 blob_init(&path, g.zLocalRoot, n-1);
298 if( zIgnoreFlag==0 ){
299 zIgnoreFlag = db_get("ignore-glob", 0);
300 }
301 pIgnore = glob_create(zIgnoreFlag);
302 vfile_scan(&path, blob_size(&path), allFlag, pIgnore);
303 glob_free(pIgnore);
304 db_prepare(&q,
@@ -360,11 +360,11 @@
360 allFlag = find_option("force","f",0)!=0;
361 dotfilesFlag = find_option("dotfiles",0,0)!=0;
362 zIgnoreFlag = find_option("ignore",0,1);
363 db_must_be_within_tree();
364 if( zIgnoreFlag==0 ){
365 zIgnoreFlag = db_get("ignore-glob", 0);
366 }
367 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
368 n = strlen(g.zLocalRoot);
369 blob_init(&path, g.zLocalRoot, n-1);
370 pIgnore = glob_create(zIgnoreFlag);
@@ -908,11 +908,11 @@
908 zUserOvrd = find_option("user-override",0,1);
909 db_must_be_within_tree();
910 noSign = db_get_boolean("omitsign", 0)|noSign;
911 if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
912 useCksum = db_get_boolean("repo-cksum", 1);
913 outputManifest = db_get_boolean("manifest", 0);
914 verify_all_options();
915
916 /* So that older versions of Fossil (that do not understand delta-
917 ** manifest) can continue to use this repository, do not create a new
918 ** delta-manifest unless this repository already contains one or more
@@ -1049,11 +1049,11 @@
1049 ** the identified fils are inserted (if they have been modified).
1050 */
1051 db_prepare(&q,
1052 "SELECT id, %Q || pathname, mrid, %s FROM vfile "
1053 "WHERE chnged==1 AND NOT deleted AND file_is_selected(id)",
1054 g.zLocalRoot, glob_expr("pathname", db_get("crnl-glob",""))
1055 );
1056 while( db_step(&q)==SQLITE_ROW ){
1057 int id, rid;
1058 const char *zFullname;
1059 Blob content;
1060
+1 -1
--- src/checkout.c
+++ src/checkout.c
@@ -131,11 +131,11 @@
131131
void manifest_to_disk(int vid){
132132
char *zManFile;
133133
Blob manifest;
134134
Blob hash;
135135
136
- if( db_get_versionable_setting_boolean("manifest",0) ){
136
+ if( db_get_boolean("manifest",0) ){
137137
blob_zero(&manifest);
138138
content_get(vid, &manifest);
139139
zManFile = mprintf("%smanifest", g.zLocalRoot);
140140
blob_write_to_file(&manifest, zManFile);
141141
free(zManFile);
142142
--- src/checkout.c
+++ src/checkout.c
@@ -131,11 +131,11 @@
131 void manifest_to_disk(int vid){
132 char *zManFile;
133 Blob manifest;
134 Blob hash;
135
136 if( db_get_versionable_setting_boolean("manifest",0) ){
137 blob_zero(&manifest);
138 content_get(vid, &manifest);
139 zManFile = mprintf("%smanifest", g.zLocalRoot);
140 blob_write_to_file(&manifest, zManFile);
141 free(zManFile);
142
--- src/checkout.c
+++ src/checkout.c
@@ -131,11 +131,11 @@
131 void manifest_to_disk(int vid){
132 char *zManFile;
133 Blob manifest;
134 Blob hash;
135
136 if( db_get_boolean("manifest",0) ){
137 blob_zero(&manifest);
138 content_get(vid, &manifest);
139 zManFile = mprintf("%smanifest", g.zLocalRoot);
140 blob_write_to_file(&manifest, zManFile);
141 free(zManFile);
142
+21 -17
--- src/db.c
+++ src/db.c
@@ -1401,20 +1401,19 @@
14011401
g.dbConfig = dbTemp;
14021402
}
14031403
}
14041404
14051405
/*
1406
-** Get a potentially versioned setting - either from .fossil-settings/<name>
1407
-** if we have a local checkout and that file exists, or from the
1408
-** CONFIG or GLOBAL_CONFIG tables if we are running in server mode
1409
-** (without a local checkout) or if the file does not exist.
1406
+** Logic for reading potentially versioned settings from
1407
+** .fossil-settings/<name> , and emits warnings if necessary.
1408
+** Returns the non-versioned value without modification if there is no
1409
+** versioned value.
14101410
*/
1411
-char *db_get_versionable_setting(const char *zName, char *zDefault){
1411
+static char *db_get_do_versionable(const char *zName, char *zNonVersionedSetting){
14121412
/* Attempt to load the versioned setting from a checked out file */
14131413
char *zVersionedSetting = 0;
14141414
int noWarn = 0;
1415
- char *zSetting = 0;
14161415
14171416
if( db_open_local() ){
14181417
Blob versionedPathname;
14191418
char *zVersionedPathname;
14201419
blob_zero(&versionedPathname);
@@ -1438,15 +1437,13 @@
14381437
noWarn = 1;
14391438
}
14401439
}
14411440
blob_reset(&versionedPathname);
14421441
}
1443
- /* Load the normal, non-versioned setting */
1444
- zSetting = db_get(zName, zDefault);
14451442
/* Display a warning? */
1446
- if( zVersionedSetting!=0 && zSetting!=0 && zSetting[0]!='\0'
1447
- && zSetting!=zDefault && !noWarn
1443
+ if( zVersionedSetting!=0 && zNonVersionedSetting!=0
1444
+ && zNonVersionedSetting[0]!='\0' && !noWarn
14481445
){
14491446
/* There's a versioned setting, and a non-versioned setting. Tell
14501447
** the user about the conflict */
14511448
fossil_warning(
14521449
"setting %s has both versioned and non-versioned values: using "
@@ -1455,33 +1452,40 @@
14551452
".fossil-settings/%s.no-warn or delete the non-versioned setting "
14561453
" with \"fossil unset %s\")", zName, zName, zName, zName
14571454
);
14581455
}
14591456
/* Prefer the versioned setting */
1460
- return ( zVersionedSetting!=0 ) ? zVersionedSetting : zSetting;
1461
-}
1462
-int db_get_versionable_setting_boolean(const char *zName, int dflt){
1463
- char *zVal = db_get_versionable_setting(zName, dflt ? "on" : "off");
1464
- if( is_truth(zVal) ) return 1;
1465
- if( is_false(zVal) ) return 0;
1466
- return dflt;
1457
+ return ( zVersionedSetting!=0 ) ? zVersionedSetting : zNonVersionedSetting;
14671458
}
14681459
14691460
14701461
/*
14711462
** Get and set values from the CONFIG, GLOBAL_CONFIG and VVAR table in the
14721463
** repository and local databases.
14731464
*/
14741465
char *db_get(const char *zName, char *zDefault){
14751466
char *z = 0;
1467
+ int i;
1468
+ const struct stControlSettings *ctrlSetting = 0;
1469
+ /* Is this a setting? */
1470
+ for(i=0; ctrlSettings[i].name; i++){
1471
+ if( strcmp(ctrlSettings[i].name, zName)==0 ){
1472
+ ctrlSetting = &(ctrlSettings[i]);
1473
+ break;
1474
+ }
1475
+ }
14761476
if( g.repositoryOpen ){
14771477
z = db_text(0, "SELECT value FROM config WHERE name=%Q", zName);
14781478
}
14791479
if( z==0 && g.configOpen ){
14801480
db_swap_connections();
14811481
z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName);
14821482
db_swap_connections();
1483
+ }
1484
+ if( ctrlSetting!=0 && ctrlSetting->versionable ){
1485
+ /* This is a versionable setting, try and get the info from a checked out file */
1486
+ z = db_get_do_versionable(zName, z);
14831487
}
14841488
if( z==0 ){
14851489
z = zDefault;
14861490
}
14871491
return z;
14881492
--- src/db.c
+++ src/db.c
@@ -1401,20 +1401,19 @@
1401 g.dbConfig = dbTemp;
1402 }
1403 }
1404
1405 /*
1406 ** Get a potentially versioned setting - either from .fossil-settings/<name>
1407 ** if we have a local checkout and that file exists, or from the
1408 ** CONFIG or GLOBAL_CONFIG tables if we are running in server mode
1409 ** (without a local checkout) or if the file does not exist.
1410 */
1411 char *db_get_versionable_setting(const char *zName, char *zDefault){
1412 /* Attempt to load the versioned setting from a checked out file */
1413 char *zVersionedSetting = 0;
1414 int noWarn = 0;
1415 char *zSetting = 0;
1416
1417 if( db_open_local() ){
1418 Blob versionedPathname;
1419 char *zVersionedPathname;
1420 blob_zero(&versionedPathname);
@@ -1438,15 +1437,13 @@
1438 noWarn = 1;
1439 }
1440 }
1441 blob_reset(&versionedPathname);
1442 }
1443 /* Load the normal, non-versioned setting */
1444 zSetting = db_get(zName, zDefault);
1445 /* Display a warning? */
1446 if( zVersionedSetting!=0 && zSetting!=0 && zSetting[0]!='\0'
1447 && zSetting!=zDefault && !noWarn
1448 ){
1449 /* There's a versioned setting, and a non-versioned setting. Tell
1450 ** the user about the conflict */
1451 fossil_warning(
1452 "setting %s has both versioned and non-versioned values: using "
@@ -1455,33 +1452,40 @@
1455 ".fossil-settings/%s.no-warn or delete the non-versioned setting "
1456 " with \"fossil unset %s\")", zName, zName, zName, zName
1457 );
1458 }
1459 /* Prefer the versioned setting */
1460 return ( zVersionedSetting!=0 ) ? zVersionedSetting : zSetting;
1461 }
1462 int db_get_versionable_setting_boolean(const char *zName, int dflt){
1463 char *zVal = db_get_versionable_setting(zName, dflt ? "on" : "off");
1464 if( is_truth(zVal) ) return 1;
1465 if( is_false(zVal) ) return 0;
1466 return dflt;
1467 }
1468
1469
1470 /*
1471 ** Get and set values from the CONFIG, GLOBAL_CONFIG and VVAR table in the
1472 ** repository and local databases.
1473 */
1474 char *db_get(const char *zName, char *zDefault){
1475 char *z = 0;
 
 
 
 
 
 
 
 
 
1476 if( g.repositoryOpen ){
1477 z = db_text(0, "SELECT value FROM config WHERE name=%Q", zName);
1478 }
1479 if( z==0 && g.configOpen ){
1480 db_swap_connections();
1481 z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName);
1482 db_swap_connections();
 
 
 
 
1483 }
1484 if( z==0 ){
1485 z = zDefault;
1486 }
1487 return z;
1488
--- src/db.c
+++ src/db.c
@@ -1401,20 +1401,19 @@
1401 g.dbConfig = dbTemp;
1402 }
1403 }
1404
1405 /*
1406 ** Logic for reading potentially versioned settings from
1407 ** .fossil-settings/<name> , and emits warnings if necessary.
1408 ** Returns the non-versioned value without modification if there is no
1409 ** versioned value.
1410 */
1411 static char *db_get_do_versionable(const char *zName, char *zNonVersionedSetting){
1412 /* Attempt to load the versioned setting from a checked out file */
1413 char *zVersionedSetting = 0;
1414 int noWarn = 0;
 
1415
1416 if( db_open_local() ){
1417 Blob versionedPathname;
1418 char *zVersionedPathname;
1419 blob_zero(&versionedPathname);
@@ -1438,15 +1437,13 @@
1437 noWarn = 1;
1438 }
1439 }
1440 blob_reset(&versionedPathname);
1441 }
 
 
1442 /* Display a warning? */
1443 if( zVersionedSetting!=0 && zNonVersionedSetting!=0
1444 && zNonVersionedSetting[0]!='\0' && !noWarn
1445 ){
1446 /* There's a versioned setting, and a non-versioned setting. Tell
1447 ** the user about the conflict */
1448 fossil_warning(
1449 "setting %s has both versioned and non-versioned values: using "
@@ -1455,33 +1452,40 @@
1452 ".fossil-settings/%s.no-warn or delete the non-versioned setting "
1453 " with \"fossil unset %s\")", zName, zName, zName, zName
1454 );
1455 }
1456 /* Prefer the versioned setting */
1457 return ( zVersionedSetting!=0 ) ? zVersionedSetting : zNonVersionedSetting;
 
 
 
 
 
 
1458 }
1459
1460
1461 /*
1462 ** Get and set values from the CONFIG, GLOBAL_CONFIG and VVAR table in the
1463 ** repository and local databases.
1464 */
1465 char *db_get(const char *zName, char *zDefault){
1466 char *z = 0;
1467 int i;
1468 const struct stControlSettings *ctrlSetting = 0;
1469 /* Is this a setting? */
1470 for(i=0; ctrlSettings[i].name; i++){
1471 if( strcmp(ctrlSettings[i].name, zName)==0 ){
1472 ctrlSetting = &(ctrlSettings[i]);
1473 break;
1474 }
1475 }
1476 if( g.repositoryOpen ){
1477 z = db_text(0, "SELECT value FROM config WHERE name=%Q", zName);
1478 }
1479 if( z==0 && g.configOpen ){
1480 db_swap_connections();
1481 z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName);
1482 db_swap_connections();
1483 }
1484 if( ctrlSetting!=0 && ctrlSetting->versionable ){
1485 /* This is a versionable setting, try and get the info from a checked out file */
1486 z = db_get_do_versionable(zName, z);
1487 }
1488 if( z==0 ){
1489 z = zDefault;
1490 }
1491 return z;
1492
+1 -1
--- src/merge.c
+++ src/merge.c
@@ -98,11 +98,11 @@
9898
if( g.argc!=3 ){
9999
usage("VERSION");
100100
}
101101
db_must_be_within_tree();
102102
caseSensitive = filenames_are_case_sensitive();
103
- if( zBinGlob==0 ) zBinGlob = db_get_versionable_setting("binary-glob",0);
103
+ if( zBinGlob==0 ) zBinGlob = db_get("binary-glob",0);
104104
vid = db_lget_int("checkout", 0);
105105
if( vid==0 ){
106106
fossil_fatal("nothing is checked out");
107107
}
108108
mid = name_to_typed_rid(g.argv[2], "ci");
109109
--- src/merge.c
+++ src/merge.c
@@ -98,11 +98,11 @@
98 if( g.argc!=3 ){
99 usage("VERSION");
100 }
101 db_must_be_within_tree();
102 caseSensitive = filenames_are_case_sensitive();
103 if( zBinGlob==0 ) zBinGlob = db_get_versionable_setting("binary-glob",0);
104 vid = db_lget_int("checkout", 0);
105 if( vid==0 ){
106 fossil_fatal("nothing is checked out");
107 }
108 mid = name_to_typed_rid(g.argv[2], "ci");
109
--- src/merge.c
+++ src/merge.c
@@ -98,11 +98,11 @@
98 if( g.argc!=3 ){
99 usage("VERSION");
100 }
101 db_must_be_within_tree();
102 caseSensitive = filenames_are_case_sensitive();
103 if( zBinGlob==0 ) zBinGlob = db_get("binary-glob",0);
104 vid = db_lget_int("checkout", 0);
105 if( vid==0 ){
106 fossil_fatal("nothing is checked out");
107 }
108 mid = name_to_typed_rid(g.argv[2], "ci");
109
+1 -1
--- src/tar.c
+++ src/tar.c
@@ -466,11 +466,11 @@
466466
nPrefix = blob_size(&filename);
467467
468468
pManifest = manifest_get(rid, CFTYPE_MANIFEST);
469469
if( pManifest ){
470470
mTime = (pManifest->rDate - 2440587.5)*86400.0;
471
- if( db_get_versionable_setting_boolean("manifest", 0) ){
471
+ if( db_get_boolean("manifest", 0) ){
472472
blob_append(&filename, "manifest", -1);
473473
zName = blob_str(&filename);
474474
tar_add_file(zName, &mfile, 0, mTime);
475475
sha1sum_blob(&mfile, &hash);
476476
blob_reset(&mfile);
477477
--- src/tar.c
+++ src/tar.c
@@ -466,11 +466,11 @@
466 nPrefix = blob_size(&filename);
467
468 pManifest = manifest_get(rid, CFTYPE_MANIFEST);
469 if( pManifest ){
470 mTime = (pManifest->rDate - 2440587.5)*86400.0;
471 if( db_get_versionable_setting_boolean("manifest", 0) ){
472 blob_append(&filename, "manifest", -1);
473 zName = blob_str(&filename);
474 tar_add_file(zName, &mfile, 0, mTime);
475 sha1sum_blob(&mfile, &hash);
476 blob_reset(&mfile);
477
--- src/tar.c
+++ src/tar.c
@@ -466,11 +466,11 @@
466 nPrefix = blob_size(&filename);
467
468 pManifest = manifest_get(rid, CFTYPE_MANIFEST);
469 if( pManifest ){
470 mTime = (pManifest->rDate - 2440587.5)*86400.0;
471 if( db_get_boolean("manifest", 0) ){
472 blob_append(&filename, "manifest", -1);
473 zName = blob_str(&filename);
474 tar_add_file(zName, &mfile, 0, mTime);
475 sha1sum_blob(&mfile, &hash);
476 blob_reset(&mfile);
477
+1 -1
--- src/update.c
+++ src/update.c
@@ -466,11 +466,11 @@
466466
/*
467467
** Make sure empty directories are created
468468
*/
469469
void ensure_empty_dirs_created(void){
470470
/* Make empty directories? */
471
- char *zEmptyDirs = db_get_versionable_setting("empty-dirs", 0);
471
+ char *zEmptyDirs = db_get("empty-dirs", 0);
472472
if( zEmptyDirs!=0 ){
473473
char *bc;
474474
Blob dirName;
475475
Blob dirsList;
476476
477477
--- src/update.c
+++ src/update.c
@@ -466,11 +466,11 @@
466 /*
467 ** Make sure empty directories are created
468 */
469 void ensure_empty_dirs_created(void){
470 /* Make empty directories? */
471 char *zEmptyDirs = db_get_versionable_setting("empty-dirs", 0);
472 if( zEmptyDirs!=0 ){
473 char *bc;
474 Blob dirName;
475 Blob dirsList;
476
477
--- src/update.c
+++ src/update.c
@@ -466,11 +466,11 @@
466 /*
467 ** Make sure empty directories are created
468 */
469 void ensure_empty_dirs_created(void){
470 /* Make empty directories? */
471 char *zEmptyDirs = db_get("empty-dirs", 0);
472 if( zEmptyDirs!=0 ){
473 char *bc;
474 Blob dirName;
475 Blob dirsList;
476
477
+1 -1
--- src/zip.c
+++ src/zip.c
@@ -337,11 +337,11 @@
337337
338338
pManifest = manifest_get(rid, CFTYPE_MANIFEST);
339339
if( pManifest ){
340340
char *zName;
341341
zip_set_timedate(pManifest->rDate);
342
- if( db_get_versionable_setting_boolean("manifest", 0) ){
342
+ if( db_get_boolean("manifest", 0) ){
343343
blob_append(&filename, "manifest", -1);
344344
zName = blob_str(&filename);
345345
zip_add_folders(zName);
346346
zip_add_file(zName, &mfile, 0);
347347
sha1sum_blob(&mfile, &hash);
348348
--- src/zip.c
+++ src/zip.c
@@ -337,11 +337,11 @@
337
338 pManifest = manifest_get(rid, CFTYPE_MANIFEST);
339 if( pManifest ){
340 char *zName;
341 zip_set_timedate(pManifest->rDate);
342 if( db_get_versionable_setting_boolean("manifest", 0) ){
343 blob_append(&filename, "manifest", -1);
344 zName = blob_str(&filename);
345 zip_add_folders(zName);
346 zip_add_file(zName, &mfile, 0);
347 sha1sum_blob(&mfile, &hash);
348
--- src/zip.c
+++ src/zip.c
@@ -337,11 +337,11 @@
337
338 pManifest = manifest_get(rid, CFTYPE_MANIFEST);
339 if( pManifest ){
340 char *zName;
341 zip_set_timedate(pManifest->rDate);
342 if( db_get_boolean("manifest", 0) ){
343 blob_append(&filename, "manifest", -1);
344 zName = blob_str(&filename);
345 zip_add_folders(zName);
346 zip_add_file(zName, &mfile, 0);
347 sha1sum_blob(&mfile, &hash);
348

Keyboard Shortcuts

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