Fossil SCM
Improvements to settings: (1) add the --changed option to the "fossil settings" command to cause display of only settings whose value differs from the default. (2) omit the idea of settings that are only shown if their value is not the default. (3) For settings with multiple lines of text, show them indented after the setting name on the "fossil settings" output. (4) The /setup_settings page only shows changed settings by default, with a submenu option to show all settings.
Commit
74a5e10b9b281f1724f3b96572b3234719d583d5543c2903792dffcffdffd54c
Parent
e588ee26b152d95…
7 files changed
+1
+1
-1
+50
-16
+3
-3
+12
-8
+2
-2
+2
-7
+1
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -316,10 +316,11 @@ | ||
| 316 | 316 | zCmd = "repack"; |
| 317 | 317 | }else if( fossil_strcmp(zCmd, "set")==0 |
| 318 | 318 | || fossil_strcmp(zCmd, "setting")==0 |
| 319 | 319 | || fossil_strcmp(zCmd, "settings")==0 ){ |
| 320 | 320 | zCmd = "settings -R"; |
| 321 | + collect_argument(&extra, "changed", 0); | |
| 321 | 322 | collect_argv(&extra, 3); |
| 322 | 323 | }else if( fossil_strcmp(zCmd, "unset")==0 ){ |
| 323 | 324 | zCmd = "unset -R"; |
| 324 | 325 | collect_argv(&extra, 3); |
| 325 | 326 | }else if( fossil_strcmp(zCmd, "fts-config")==0 ){ |
| 326 | 327 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -316,10 +316,11 @@ | |
| 316 | zCmd = "repack"; |
| 317 | }else if( fossil_strcmp(zCmd, "set")==0 |
| 318 | || fossil_strcmp(zCmd, "setting")==0 |
| 319 | || fossil_strcmp(zCmd, "settings")==0 ){ |
| 320 | zCmd = "settings -R"; |
| 321 | collect_argv(&extra, 3); |
| 322 | }else if( fossil_strcmp(zCmd, "unset")==0 ){ |
| 323 | zCmd = "unset -R"; |
| 324 | collect_argv(&extra, 3); |
| 325 | }else if( fossil_strcmp(zCmd, "fts-config")==0 ){ |
| 326 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -316,10 +316,11 @@ | |
| 316 | zCmd = "repack"; |
| 317 | }else if( fossil_strcmp(zCmd, "set")==0 |
| 318 | || fossil_strcmp(zCmd, "setting")==0 |
| 319 | || fossil_strcmp(zCmd, "settings")==0 ){ |
| 320 | zCmd = "settings -R"; |
| 321 | collect_argument(&extra, "changed", 0); |
| 322 | collect_argv(&extra, 3); |
| 323 | }else if( fossil_strcmp(zCmd, "unset")==0 ){ |
| 324 | zCmd = "unset -R"; |
| 325 | collect_argv(&extra, 3); |
| 326 | }else if( fossil_strcmp(zCmd, "fts-config")==0 ){ |
| 327 |
+1
-1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -2283,11 +2283,11 @@ | ||
| 2283 | 2283 | char **pB = (char**)b; |
| 2284 | 2284 | return fossil_strcmp(pA[0], pB[0]); |
| 2285 | 2285 | } |
| 2286 | 2286 | |
| 2287 | 2287 | /* |
| 2288 | -** SETTING: verify-comments width=8 default=on if-chng | |
| 2288 | +** SETTING: verify-comments width=8 default=on | |
| 2289 | 2289 | ** |
| 2290 | 2290 | ** This setting determines how much sanity checking, if any, the |
| 2291 | 2291 | ** "fossil commit" and "fossil amend" commands do against check-in |
| 2292 | 2292 | ** comments. Recognized values: |
| 2293 | 2293 | ** |
| 2294 | 2294 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2283,11 +2283,11 @@ | |
| 2283 | char **pB = (char**)b; |
| 2284 | return fossil_strcmp(pA[0], pB[0]); |
| 2285 | } |
| 2286 | |
| 2287 | /* |
| 2288 | ** SETTING: verify-comments width=8 default=on if-chng |
| 2289 | ** |
| 2290 | ** This setting determines how much sanity checking, if any, the |
| 2291 | ** "fossil commit" and "fossil amend" commands do against check-in |
| 2292 | ** comments. Recognized values: |
| 2293 | ** |
| 2294 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2283,11 +2283,11 @@ | |
| 2283 | char **pB = (char**)b; |
| 2284 | return fossil_strcmp(pA[0], pB[0]); |
| 2285 | } |
| 2286 | |
| 2287 | /* |
| 2288 | ** SETTING: verify-comments width=8 default=on |
| 2289 | ** |
| 2290 | ** This setting determines how much sanity checking, if any, the |
| 2291 | ** "fossil commit" and "fossil amend" commands do against check-in |
| 2292 | ** comments. Recognized values: |
| 2293 | ** |
| 2294 |
M
src/db.c
+50
-16
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -4439,15 +4439,19 @@ | ||
| 4439 | 4439 | } |
| 4440 | 4440 | |
| 4441 | 4441 | /* |
| 4442 | 4442 | ** Print the current value of a setting identified by the pSetting |
| 4443 | 4443 | ** pointer. |
| 4444 | +** | |
| 4445 | +** Only show the value, not the setting name, if valueOnly is true. | |
| 4446 | +** | |
| 4447 | +** Show nothing if bIfChng is true and the setting is not currently set | |
| 4448 | +** or is set to its default value. | |
| 4444 | 4449 | */ |
| 4445 | -void print_setting(const Setting *pSetting, int valueOnly, int bAlways){ | |
| 4450 | +void print_setting(const Setting *pSetting, int valueOnly, int bIfChng){ | |
| 4446 | 4451 | Stmt q; |
| 4447 | 4452 | int versioned = 0; |
| 4448 | - if( !pSetting->bIfChng ) bAlways = 1; | |
| 4449 | 4453 | if( pSetting->versionable && g.localOpen ){ |
| 4450 | 4454 | /* Check to see if this is overridden by a versionable settings file */ |
| 4451 | 4455 | Blob versionedPathname; |
| 4452 | 4456 | blob_zero(&versionedPathname); |
| 4453 | 4457 | blob_appendf(&versionedPathname, "%s.fossil-settings/%s", |
| @@ -4457,11 +4461,11 @@ | ||
| 4457 | 4461 | } |
| 4458 | 4462 | blob_reset(&versionedPathname); |
| 4459 | 4463 | } |
| 4460 | 4464 | if( valueOnly && versioned ){ |
| 4461 | 4465 | const char *zVal = db_get_versioned(pSetting->name, NULL, NULL); |
| 4462 | - if( bAlways || (zVal!=0 && fossil_strcmp(zVal, pSetting->def)!=0) ){ | |
| 4466 | + if( !bIfChng || (zVal!=0 && fossil_strcmp(zVal, pSetting->def)!=0) ){ | |
| 4463 | 4467 | fossil_print("%s\n", db_get_versioned(pSetting->name, NULL, NULL)); |
| 4464 | 4468 | }else{ |
| 4465 | 4469 | versioned = 0; |
| 4466 | 4470 | } |
| 4467 | 4471 | return; |
| @@ -4479,24 +4483,57 @@ | ||
| 4479 | 4483 | pSetting->name |
| 4480 | 4484 | ); |
| 4481 | 4485 | } |
| 4482 | 4486 | if( db_step(&q)==SQLITE_ROW ){ |
| 4483 | 4487 | const char *zVal = db_column_text(&q,1); |
| 4484 | - if( !bAlways && (zVal==0 || fossil_strcmp(zVal, pSetting->def)==0) ){ | |
| 4485 | - /* Don't display because the value is equal to the default */ | |
| 4488 | + int noShow = 0; | |
| 4489 | + if( bIfChng ){ | |
| 4490 | + /* Don't display the value is equal to the default */ | |
| 4491 | + if( zVal==0 ){ | |
| 4492 | + noShow = 1; | |
| 4493 | + }else if( pSetting->def ){ | |
| 4494 | + if( pSetting->width==0 ){ | |
| 4495 | + if( is_false(zVal) && is_false(pSetting->def) ) noShow = 1; | |
| 4496 | + }else{ | |
| 4497 | + if( fossil_strcmp(zVal, pSetting->def)==0 ) noShow = 1; | |
| 4498 | + } | |
| 4499 | + } | |
| 4500 | + } | |
| 4501 | + if( noShow ){ | |
| 4502 | + fossil_print("%-24s (versioned)\n", pSetting->name); | |
| 4503 | + versioned = 0; | |
| 4486 | 4504 | }else if( valueOnly ){ |
| 4487 | 4505 | fossil_print("%s\n", db_column_text(&q, 1)); |
| 4488 | 4506 | }else{ |
| 4489 | - fossil_print("%-20s %-8s %s\n", pSetting->name, db_column_text(&q, 0), | |
| 4490 | - db_column_text(&q, 1)); | |
| 4507 | + const char *zVal = (const char*)db_column_text(&q,1); | |
| 4508 | + const char *zName = (const char*)db_column_text(&q,0); | |
| 4509 | + if( zVal==0 ) zVal = "NULL"; | |
| 4510 | + if( strchr(zVal,'\n')==0 ){ | |
| 4511 | + fossil_print("%-24s %-11s %s\n", pSetting->name, zName, zVal); | |
| 4512 | + }else{ | |
| 4513 | + fossil_print("%-24s %-11s\n", pSetting->name, zName); | |
| 4514 | + while( zVal[0] ){ | |
| 4515 | + char *zNL = strchr(zVal, '\n'); | |
| 4516 | + if( zNL==0 ){ | |
| 4517 | + fossil_print(" %s\n", zVal); | |
| 4518 | + break; | |
| 4519 | + }else{ | |
| 4520 | + int n = (int)(zNL - zVal); | |
| 4521 | + while( n>0 && fossil_isspace(zVal[n-1]) ){ n--; } | |
| 4522 | + fossil_print(" %.*s\n", n, zVal); | |
| 4523 | + zVal = zNL+1; | |
| 4524 | + } | |
| 4525 | + } | |
| 4526 | + } | |
| 4491 | 4527 | } |
| 4492 | - }else if( !bAlways ){ | |
| 4528 | + }else if( bIfChng ){ | |
| 4493 | 4529 | /* Display nothing */ |
| 4530 | + versioned = 0; | |
| 4494 | 4531 | }else if( valueOnly ){ |
| 4495 | 4532 | fossil_print("\n"); |
| 4496 | 4533 | }else{ |
| 4497 | - fossil_print("%-20s\n", pSetting->name); | |
| 4534 | + fossil_print("%-24s\n", pSetting->name); | |
| 4498 | 4535 | } |
| 4499 | 4536 | if( versioned ){ |
| 4500 | 4537 | fossil_print(" (overridden by contents of file .fossil-settings/%s)\n", |
| 4501 | 4538 | pSetting->name); |
| 4502 | 4539 | } |
| @@ -4527,11 +4564,10 @@ | ||
| 4527 | 4564 | ** negative for values which should not appear |
| 4528 | 4565 | ** on the /setup_settings page. */ |
| 4529 | 4566 | char versionable; /* Is this setting versionable? */ |
| 4530 | 4567 | char forceTextArea; /* Force using a text area for display? */ |
| 4531 | 4568 | char sensitive; /* True if this a security-sensitive setting */ |
| 4532 | - char bIfChng; /* Only display if value differs from default */ | |
| 4533 | 4569 | const char *def; /* Default value */ |
| 4534 | 4570 | }; |
| 4535 | 4571 | |
| 4536 | 4572 | #endif /* INTERFACE */ |
| 4537 | 4573 | |
| @@ -5238,24 +5274,23 @@ | ||
| 5238 | 5274 | ** configuration database. If both a local and a global value exists for a |
| 5239 | 5275 | ** setting, the local value takes precedence. This command normally operates |
| 5240 | 5276 | ** on the local settings. Use the --global option to change global settings. |
| 5241 | 5277 | ** |
| 5242 | 5278 | ** Options: |
| 5279 | +** --changed Only show settings if the value differs from the default | |
| 5243 | 5280 | ** --exact Only consider exact name matches |
| 5244 | -** --extra When listing settings, show them all, even those that are | |
| 5245 | -** normally only shown if there values are different from default | |
| 5246 | 5281 | ** --global Set or unset the given property globally instead of |
| 5247 | 5282 | ** setting or unsetting it for the open repository only |
| 5248 | 5283 | ** --value Only show the value of a given property (implies --exact) |
| 5249 | 5284 | ** |
| 5250 | 5285 | ** See also: [[configuration]] |
| 5251 | 5286 | */ |
| 5252 | 5287 | void setting_cmd(void){ |
| 5253 | 5288 | int i; |
| 5254 | 5289 | int globalFlag = find_option("global","g",0)!=0; |
| 5290 | + int bIfChng = find_option("changed",0,0)!=0; | |
| 5255 | 5291 | int exactFlag = find_option("exact",0,0)!=0; |
| 5256 | - int extraFlag = find_option("extra",0,0)!=0; | |
| 5257 | 5292 | int valueFlag = find_option("value",0,0)!=0; |
| 5258 | 5293 | /* Undocumented "--test-for-subsystem SUBSYS" option used to test |
| 5259 | 5294 | ** the db_get_for_subsystem() interface: */ |
| 5260 | 5295 | const char *zSubsys = find_option("test-for-subsystem",0,1); |
| 5261 | 5296 | int unsetFlag = g.argv[1][0]=='u'; |
| @@ -5275,16 +5310,15 @@ | ||
| 5275 | 5310 | } |
| 5276 | 5311 | if( valueFlag ){ |
| 5277 | 5312 | if( g.argc!=3 ){ |
| 5278 | 5313 | fossil_fatal("--value is only supported when qurying a given property"); |
| 5279 | 5314 | } |
| 5280 | - exactFlag = 1; | |
| 5281 | 5315 | } |
| 5282 | 5316 | |
| 5283 | 5317 | if( g.argc==2 ){ |
| 5284 | 5318 | for(i=0; i<nSetting; i++){ |
| 5285 | - print_setting(&aSetting[i], 0, extraFlag); | |
| 5319 | + print_setting(&aSetting[i], 0, bIfChng); | |
| 5286 | 5320 | } |
| 5287 | 5321 | }else if( g.argc==3 || g.argc==4 ){ |
| 5288 | 5322 | const char *zName = g.argv[2]; |
| 5289 | 5323 | int n = (int)strlen(zName); |
| 5290 | 5324 | const Setting *pSetting = db_find_setting(zName, !exactFlag); |
| @@ -5335,11 +5369,11 @@ | ||
| 5335 | 5369 | fossil_print(" [%s]", zValue); |
| 5336 | 5370 | fossil_free(zValue); |
| 5337 | 5371 | } |
| 5338 | 5372 | fossil_print("\n"); |
| 5339 | 5373 | }else{ |
| 5340 | - print_setting(pSetting, valueFlag, extraFlag); | |
| 5374 | + print_setting(pSetting, valueFlag, bIfChng); | |
| 5341 | 5375 | } |
| 5342 | 5376 | pSetting++; |
| 5343 | 5377 | } |
| 5344 | 5378 | } |
| 5345 | 5379 | }else{ |
| 5346 | 5380 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -4439,15 +4439,19 @@ | |
| 4439 | } |
| 4440 | |
| 4441 | /* |
| 4442 | ** Print the current value of a setting identified by the pSetting |
| 4443 | ** pointer. |
| 4444 | */ |
| 4445 | void print_setting(const Setting *pSetting, int valueOnly, int bAlways){ |
| 4446 | Stmt q; |
| 4447 | int versioned = 0; |
| 4448 | if( !pSetting->bIfChng ) bAlways = 1; |
| 4449 | if( pSetting->versionable && g.localOpen ){ |
| 4450 | /* Check to see if this is overridden by a versionable settings file */ |
| 4451 | Blob versionedPathname; |
| 4452 | blob_zero(&versionedPathname); |
| 4453 | blob_appendf(&versionedPathname, "%s.fossil-settings/%s", |
| @@ -4457,11 +4461,11 @@ | |
| 4457 | } |
| 4458 | blob_reset(&versionedPathname); |
| 4459 | } |
| 4460 | if( valueOnly && versioned ){ |
| 4461 | const char *zVal = db_get_versioned(pSetting->name, NULL, NULL); |
| 4462 | if( bAlways || (zVal!=0 && fossil_strcmp(zVal, pSetting->def)!=0) ){ |
| 4463 | fossil_print("%s\n", db_get_versioned(pSetting->name, NULL, NULL)); |
| 4464 | }else{ |
| 4465 | versioned = 0; |
| 4466 | } |
| 4467 | return; |
| @@ -4479,24 +4483,57 @@ | |
| 4479 | pSetting->name |
| 4480 | ); |
| 4481 | } |
| 4482 | if( db_step(&q)==SQLITE_ROW ){ |
| 4483 | const char *zVal = db_column_text(&q,1); |
| 4484 | if( !bAlways && (zVal==0 || fossil_strcmp(zVal, pSetting->def)==0) ){ |
| 4485 | /* Don't display because the value is equal to the default */ |
| 4486 | }else if( valueOnly ){ |
| 4487 | fossil_print("%s\n", db_column_text(&q, 1)); |
| 4488 | }else{ |
| 4489 | fossil_print("%-20s %-8s %s\n", pSetting->name, db_column_text(&q, 0), |
| 4490 | db_column_text(&q, 1)); |
| 4491 | } |
| 4492 | }else if( !bAlways ){ |
| 4493 | /* Display nothing */ |
| 4494 | }else if( valueOnly ){ |
| 4495 | fossil_print("\n"); |
| 4496 | }else{ |
| 4497 | fossil_print("%-20s\n", pSetting->name); |
| 4498 | } |
| 4499 | if( versioned ){ |
| 4500 | fossil_print(" (overridden by contents of file .fossil-settings/%s)\n", |
| 4501 | pSetting->name); |
| 4502 | } |
| @@ -4527,11 +4564,10 @@ | |
| 4527 | ** negative for values which should not appear |
| 4528 | ** on the /setup_settings page. */ |
| 4529 | char versionable; /* Is this setting versionable? */ |
| 4530 | char forceTextArea; /* Force using a text area for display? */ |
| 4531 | char sensitive; /* True if this a security-sensitive setting */ |
| 4532 | char bIfChng; /* Only display if value differs from default */ |
| 4533 | const char *def; /* Default value */ |
| 4534 | }; |
| 4535 | |
| 4536 | #endif /* INTERFACE */ |
| 4537 | |
| @@ -5238,24 +5274,23 @@ | |
| 5238 | ** configuration database. If both a local and a global value exists for a |
| 5239 | ** setting, the local value takes precedence. This command normally operates |
| 5240 | ** on the local settings. Use the --global option to change global settings. |
| 5241 | ** |
| 5242 | ** Options: |
| 5243 | ** --exact Only consider exact name matches |
| 5244 | ** --extra When listing settings, show them all, even those that are |
| 5245 | ** normally only shown if there values are different from default |
| 5246 | ** --global Set or unset the given property globally instead of |
| 5247 | ** setting or unsetting it for the open repository only |
| 5248 | ** --value Only show the value of a given property (implies --exact) |
| 5249 | ** |
| 5250 | ** See also: [[configuration]] |
| 5251 | */ |
| 5252 | void setting_cmd(void){ |
| 5253 | int i; |
| 5254 | int globalFlag = find_option("global","g",0)!=0; |
| 5255 | int exactFlag = find_option("exact",0,0)!=0; |
| 5256 | int extraFlag = find_option("extra",0,0)!=0; |
| 5257 | int valueFlag = find_option("value",0,0)!=0; |
| 5258 | /* Undocumented "--test-for-subsystem SUBSYS" option used to test |
| 5259 | ** the db_get_for_subsystem() interface: */ |
| 5260 | const char *zSubsys = find_option("test-for-subsystem",0,1); |
| 5261 | int unsetFlag = g.argv[1][0]=='u'; |
| @@ -5275,16 +5310,15 @@ | |
| 5275 | } |
| 5276 | if( valueFlag ){ |
| 5277 | if( g.argc!=3 ){ |
| 5278 | fossil_fatal("--value is only supported when qurying a given property"); |
| 5279 | } |
| 5280 | exactFlag = 1; |
| 5281 | } |
| 5282 | |
| 5283 | if( g.argc==2 ){ |
| 5284 | for(i=0; i<nSetting; i++){ |
| 5285 | print_setting(&aSetting[i], 0, extraFlag); |
| 5286 | } |
| 5287 | }else if( g.argc==3 || g.argc==4 ){ |
| 5288 | const char *zName = g.argv[2]; |
| 5289 | int n = (int)strlen(zName); |
| 5290 | const Setting *pSetting = db_find_setting(zName, !exactFlag); |
| @@ -5335,11 +5369,11 @@ | |
| 5335 | fossil_print(" [%s]", zValue); |
| 5336 | fossil_free(zValue); |
| 5337 | } |
| 5338 | fossil_print("\n"); |
| 5339 | }else{ |
| 5340 | print_setting(pSetting, valueFlag, extraFlag); |
| 5341 | } |
| 5342 | pSetting++; |
| 5343 | } |
| 5344 | } |
| 5345 | }else{ |
| 5346 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -4439,15 +4439,19 @@ | |
| 4439 | } |
| 4440 | |
| 4441 | /* |
| 4442 | ** Print the current value of a setting identified by the pSetting |
| 4443 | ** pointer. |
| 4444 | ** |
| 4445 | ** Only show the value, not the setting name, if valueOnly is true. |
| 4446 | ** |
| 4447 | ** Show nothing if bIfChng is true and the setting is not currently set |
| 4448 | ** or is set to its default value. |
| 4449 | */ |
| 4450 | void print_setting(const Setting *pSetting, int valueOnly, int bIfChng){ |
| 4451 | Stmt q; |
| 4452 | int versioned = 0; |
| 4453 | if( pSetting->versionable && g.localOpen ){ |
| 4454 | /* Check to see if this is overridden by a versionable settings file */ |
| 4455 | Blob versionedPathname; |
| 4456 | blob_zero(&versionedPathname); |
| 4457 | blob_appendf(&versionedPathname, "%s.fossil-settings/%s", |
| @@ -4457,11 +4461,11 @@ | |
| 4461 | } |
| 4462 | blob_reset(&versionedPathname); |
| 4463 | } |
| 4464 | if( valueOnly && versioned ){ |
| 4465 | const char *zVal = db_get_versioned(pSetting->name, NULL, NULL); |
| 4466 | if( !bIfChng || (zVal!=0 && fossil_strcmp(zVal, pSetting->def)!=0) ){ |
| 4467 | fossil_print("%s\n", db_get_versioned(pSetting->name, NULL, NULL)); |
| 4468 | }else{ |
| 4469 | versioned = 0; |
| 4470 | } |
| 4471 | return; |
| @@ -4479,24 +4483,57 @@ | |
| 4483 | pSetting->name |
| 4484 | ); |
| 4485 | } |
| 4486 | if( db_step(&q)==SQLITE_ROW ){ |
| 4487 | const char *zVal = db_column_text(&q,1); |
| 4488 | int noShow = 0; |
| 4489 | if( bIfChng ){ |
| 4490 | /* Don't display the value is equal to the default */ |
| 4491 | if( zVal==0 ){ |
| 4492 | noShow = 1; |
| 4493 | }else if( pSetting->def ){ |
| 4494 | if( pSetting->width==0 ){ |
| 4495 | if( is_false(zVal) && is_false(pSetting->def) ) noShow = 1; |
| 4496 | }else{ |
| 4497 | if( fossil_strcmp(zVal, pSetting->def)==0 ) noShow = 1; |
| 4498 | } |
| 4499 | } |
| 4500 | } |
| 4501 | if( noShow ){ |
| 4502 | fossil_print("%-24s (versioned)\n", pSetting->name); |
| 4503 | versioned = 0; |
| 4504 | }else if( valueOnly ){ |
| 4505 | fossil_print("%s\n", db_column_text(&q, 1)); |
| 4506 | }else{ |
| 4507 | const char *zVal = (const char*)db_column_text(&q,1); |
| 4508 | const char *zName = (const char*)db_column_text(&q,0); |
| 4509 | if( zVal==0 ) zVal = "NULL"; |
| 4510 | if( strchr(zVal,'\n')==0 ){ |
| 4511 | fossil_print("%-24s %-11s %s\n", pSetting->name, zName, zVal); |
| 4512 | }else{ |
| 4513 | fossil_print("%-24s %-11s\n", pSetting->name, zName); |
| 4514 | while( zVal[0] ){ |
| 4515 | char *zNL = strchr(zVal, '\n'); |
| 4516 | if( zNL==0 ){ |
| 4517 | fossil_print(" %s\n", zVal); |
| 4518 | break; |
| 4519 | }else{ |
| 4520 | int n = (int)(zNL - zVal); |
| 4521 | while( n>0 && fossil_isspace(zVal[n-1]) ){ n--; } |
| 4522 | fossil_print(" %.*s\n", n, zVal); |
| 4523 | zVal = zNL+1; |
| 4524 | } |
| 4525 | } |
| 4526 | } |
| 4527 | } |
| 4528 | }else if( bIfChng ){ |
| 4529 | /* Display nothing */ |
| 4530 | versioned = 0; |
| 4531 | }else if( valueOnly ){ |
| 4532 | fossil_print("\n"); |
| 4533 | }else{ |
| 4534 | fossil_print("%-24s\n", pSetting->name); |
| 4535 | } |
| 4536 | if( versioned ){ |
| 4537 | fossil_print(" (overridden by contents of file .fossil-settings/%s)\n", |
| 4538 | pSetting->name); |
| 4539 | } |
| @@ -4527,11 +4564,10 @@ | |
| 4564 | ** negative for values which should not appear |
| 4565 | ** on the /setup_settings page. */ |
| 4566 | char versionable; /* Is this setting versionable? */ |
| 4567 | char forceTextArea; /* Force using a text area for display? */ |
| 4568 | char sensitive; /* True if this a security-sensitive setting */ |
| 4569 | const char *def; /* Default value */ |
| 4570 | }; |
| 4571 | |
| 4572 | #endif /* INTERFACE */ |
| 4573 | |
| @@ -5238,24 +5274,23 @@ | |
| 5274 | ** configuration database. If both a local and a global value exists for a |
| 5275 | ** setting, the local value takes precedence. This command normally operates |
| 5276 | ** on the local settings. Use the --global option to change global settings. |
| 5277 | ** |
| 5278 | ** Options: |
| 5279 | ** --changed Only show settings if the value differs from the default |
| 5280 | ** --exact Only consider exact name matches |
| 5281 | ** --global Set or unset the given property globally instead of |
| 5282 | ** setting or unsetting it for the open repository only |
| 5283 | ** --value Only show the value of a given property (implies --exact) |
| 5284 | ** |
| 5285 | ** See also: [[configuration]] |
| 5286 | */ |
| 5287 | void setting_cmd(void){ |
| 5288 | int i; |
| 5289 | int globalFlag = find_option("global","g",0)!=0; |
| 5290 | int bIfChng = find_option("changed",0,0)!=0; |
| 5291 | int exactFlag = find_option("exact",0,0)!=0; |
| 5292 | int valueFlag = find_option("value",0,0)!=0; |
| 5293 | /* Undocumented "--test-for-subsystem SUBSYS" option used to test |
| 5294 | ** the db_get_for_subsystem() interface: */ |
| 5295 | const char *zSubsys = find_option("test-for-subsystem",0,1); |
| 5296 | int unsetFlag = g.argv[1][0]=='u'; |
| @@ -5275,16 +5310,15 @@ | |
| 5310 | } |
| 5311 | if( valueFlag ){ |
| 5312 | if( g.argc!=3 ){ |
| 5313 | fossil_fatal("--value is only supported when qurying a given property"); |
| 5314 | } |
| 5315 | } |
| 5316 | |
| 5317 | if( g.argc==2 ){ |
| 5318 | for(i=0; i<nSetting; i++){ |
| 5319 | print_setting(&aSetting[i], 0, bIfChng); |
| 5320 | } |
| 5321 | }else if( g.argc==3 || g.argc==4 ){ |
| 5322 | const char *zName = g.argv[2]; |
| 5323 | int n = (int)strlen(zName); |
| 5324 | const Setting *pSetting = db_find_setting(zName, !exactFlag); |
| @@ -5335,11 +5369,11 @@ | |
| 5369 | fossil_print(" [%s]", zValue); |
| 5370 | fossil_free(zValue); |
| 5371 | } |
| 5372 | fossil_print("\n"); |
| 5373 | }else{ |
| 5374 | print_setting(pSetting, valueFlag, bIfChng); |
| 5375 | } |
| 5376 | pSetting++; |
| 5377 | } |
| 5378 | } |
| 5379 | }else{ |
| 5380 |
+3
-3
| --- src/printf.c | ||
| +++ src/printf.c | ||
| @@ -241,27 +241,27 @@ | ||
| 241 | 241 | return n; |
| 242 | 242 | } |
| 243 | 243 | #endif |
| 244 | 244 | |
| 245 | 245 | /* |
| 246 | -** SETTING: timeline-plaintext boolean default=off if-chng | |
| 246 | +** SETTING: timeline-plaintext boolean default=off | |
| 247 | 247 | ** |
| 248 | 248 | ** If enabled, no wiki-formatting is done for timeline comment messages. |
| 249 | 249 | ** Hyperlinks are activated, but they show up on screen using the |
| 250 | 250 | ** complete input text, not just the display text. No other formatting |
| 251 | 251 | ** is done. |
| 252 | 252 | */ |
| 253 | 253 | /* |
| 254 | -** SETTING: timeline-block-markup boolean default=off if-chng | |
| 254 | +** SETTING: timeline-block-markup boolean default=off | |
| 255 | 255 | ** |
| 256 | 256 | ** If enabled, block markup (paragraph brakes, tables, lists, headings, etc) |
| 257 | 257 | ** is enabled while rendering check-in comment message on the timeline. |
| 258 | 258 | ** This is disabled by default, because the timeline works best if the |
| 259 | 259 | ** check-in comments are short and do not take up too much vertical space. |
| 260 | 260 | */ |
| 261 | 261 | /* |
| 262 | -** SETTING: timeline-hard-newlines boolean default=off if-chng | |
| 262 | +** SETTING: timeline-hard-newlines boolean default=off | |
| 263 | 263 | ** |
| 264 | 264 | ** If enabled, the timeline honors newline characters in check-in comments. |
| 265 | 265 | ** In other words, newlines are coverted into <br> for HTML display. |
| 266 | 266 | ** The default behavior, when this setting is off, is that newlines are |
| 267 | 267 | ** treated like any other whitespace character. |
| 268 | 268 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -241,27 +241,27 @@ | |
| 241 | return n; |
| 242 | } |
| 243 | #endif |
| 244 | |
| 245 | /* |
| 246 | ** SETTING: timeline-plaintext boolean default=off if-chng |
| 247 | ** |
| 248 | ** If enabled, no wiki-formatting is done for timeline comment messages. |
| 249 | ** Hyperlinks are activated, but they show up on screen using the |
| 250 | ** complete input text, not just the display text. No other formatting |
| 251 | ** is done. |
| 252 | */ |
| 253 | /* |
| 254 | ** SETTING: timeline-block-markup boolean default=off if-chng |
| 255 | ** |
| 256 | ** If enabled, block markup (paragraph brakes, tables, lists, headings, etc) |
| 257 | ** is enabled while rendering check-in comment message on the timeline. |
| 258 | ** This is disabled by default, because the timeline works best if the |
| 259 | ** check-in comments are short and do not take up too much vertical space. |
| 260 | */ |
| 261 | /* |
| 262 | ** SETTING: timeline-hard-newlines boolean default=off if-chng |
| 263 | ** |
| 264 | ** If enabled, the timeline honors newline characters in check-in comments. |
| 265 | ** In other words, newlines are coverted into <br> for HTML display. |
| 266 | ** The default behavior, when this setting is off, is that newlines are |
| 267 | ** treated like any other whitespace character. |
| 268 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -241,27 +241,27 @@ | |
| 241 | return n; |
| 242 | } |
| 243 | #endif |
| 244 | |
| 245 | /* |
| 246 | ** SETTING: timeline-plaintext boolean default=off |
| 247 | ** |
| 248 | ** If enabled, no wiki-formatting is done for timeline comment messages. |
| 249 | ** Hyperlinks are activated, but they show up on screen using the |
| 250 | ** complete input text, not just the display text. No other formatting |
| 251 | ** is done. |
| 252 | */ |
| 253 | /* |
| 254 | ** SETTING: timeline-block-markup boolean default=off |
| 255 | ** |
| 256 | ** If enabled, block markup (paragraph brakes, tables, lists, headings, etc) |
| 257 | ** is enabled while rendering check-in comment message on the timeline. |
| 258 | ** This is disabled by default, because the timeline works best if the |
| 259 | ** check-in comments are short and do not take up too much vertical space. |
| 260 | */ |
| 261 | /* |
| 262 | ** SETTING: timeline-hard-newlines boolean default=off |
| 263 | ** |
| 264 | ** If enabled, the timeline honors newline characters in check-in comments. |
| 265 | ** In other words, newlines are coverted into <br> for HTML display. |
| 266 | ** The default behavior, when this setting is off, is that newlines are |
| 267 | ** treated like any other whitespace character. |
| 268 |
+12
-8
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1109,11 +1109,11 @@ | ||
| 1109 | 1109 | */ |
| 1110 | 1110 | void setup_settings(void){ |
| 1111 | 1111 | int nSetting; |
| 1112 | 1112 | int i; |
| 1113 | 1113 | Setting const *pSet; |
| 1114 | - int bExtra = P("extra")!=0; | |
| 1114 | + int bIfChng = P("all")==0; | |
| 1115 | 1115 | const Setting *aSetting = setting_info(&nSetting); |
| 1116 | 1116 | |
| 1117 | 1117 | login_check_credentials(); |
| 1118 | 1118 | if( !g.perm.Setup ){ |
| 1119 | 1119 | login_needed(0); |
| @@ -1126,30 +1126,34 @@ | ||
| 1126 | 1126 | /* Provide read-only access to versioned settings, |
| 1127 | 1127 | but only if no repo file was explicitly provided. */ |
| 1128 | 1128 | db_open_local(0); |
| 1129 | 1129 | } |
| 1130 | 1130 | db_begin_transaction(); |
| 1131 | + if( bIfChng ){ | |
| 1132 | + @ <p>Only settings whose value is different from the default are shown. | |
| 1133 | + @ Click the "All" button above to set all settings. | |
| 1134 | + } | |
| 1131 | 1135 | @ <p>Settings marked with (v) are "versionable" and will be overridden |
| 1132 | 1136 | @ by the contents of managed files named |
| 1133 | 1137 | @ "<tt>.fossil-settings/</tt><i>SETTING-NAME</i>". |
| 1134 | 1138 | @ If the file for a versionable setting exists, the value cannot be |
| 1135 | 1139 | @ changed on this screen.</p><hr><p> |
| 1136 | 1140 | @ |
| 1137 | 1141 | @ <form action="%R/setup_settings" method="post"><div> |
| 1138 | - if( bExtra ){ | |
| 1139 | - @ <input type="hidden" name="extra" value="1"> | |
| 1140 | - style_submenu_element("No-Extras", "%R/setup_settings"); | |
| 1142 | + if( bIfChng ){ | |
| 1143 | + style_submenu_element("All", "%R/setup_settings?all"); | |
| 1141 | 1144 | }else{ |
| 1142 | - style_submenu_element("Extras", "%R/setup_settings?extra"); | |
| 1145 | + @ <input type="hidden" name="all" value="1"> | |
| 1146 | + style_submenu_element("Changes-Only", "%R/setup_settings"); | |
| 1143 | 1147 | } |
| 1144 | 1148 | @ <table border="0"><tr><td valign="top"> |
| 1145 | 1149 | login_insert_csrf_secret(); |
| 1146 | 1150 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1147 | 1151 | if( pSet->width==0 ){ |
| 1148 | 1152 | int hasVersionableValue = pSet->versionable && |
| 1149 | 1153 | (db_get_versioned(pSet->name, NULL, NULL)!=0); |
| 1150 | - if( pSet->bIfChng && !bExtra ){ | |
| 1154 | + if( bIfChng ){ | |
| 1151 | 1155 | const char *zVal = db_get(pSet->name, 0); |
| 1152 | 1156 | if( zVal==0 || is_false(zVal)==is_false(pSet->def) ) continue; |
| 1153 | 1157 | } |
| 1154 | 1158 | onoff_attribute("", pSet->name, |
| 1155 | 1159 | pSet->var!=0 ? pSet->var : pSet->name /*works-like:"x"*/, |
| @@ -1167,11 +1171,11 @@ | ||
| 1167 | 1171 | @ <table> |
| 1168 | 1172 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1169 | 1173 | if( pSet->width>0 && !pSet->forceTextArea ){ |
| 1170 | 1174 | int hasVersionableValue = pSet->versionable && |
| 1171 | 1175 | (db_get_versioned(pSet->name, NULL, NULL)!=0); |
| 1172 | - if( pSet->bIfChng && !bExtra ){ | |
| 1176 | + if( bIfChng ){ | |
| 1173 | 1177 | const char *zVal = db_get(pSet->name, 0); |
| 1174 | 1178 | if( zVal==0 || fossil_strcmp(zVal,pSet->def)==0 ) continue; |
| 1175 | 1179 | } |
| 1176 | 1180 | @ <tr><td> |
| 1177 | 1181 | @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a> |
| @@ -1190,11 +1194,11 @@ | ||
| 1190 | 1194 | @</table> |
| 1191 | 1195 | @ </td><td style="width:50px;"></td><td valign="top"> |
| 1192 | 1196 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1193 | 1197 | if( pSet->width>0 && pSet->forceTextArea ){ |
| 1194 | 1198 | int hasVersionableValue = db_get_versioned(pSet->name, NULL, NULL)!=0; |
| 1195 | - if( pSet->bIfChng && !bExtra ){ | |
| 1199 | + if( bIfChng ){ | |
| 1196 | 1200 | const char *zVal = db_get(pSet->name, 0); |
| 1197 | 1201 | if( zVal==0 || fossil_strcmp(zVal,pSet->def)==0 ) continue; |
| 1198 | 1202 | } |
| 1199 | 1203 | @ <a href='%R/help?cmd=%s(pSet->name)'>%s(pSet->name)</a> |
| 1200 | 1204 | if( pSet->versionable ){ |
| 1201 | 1205 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1109,11 +1109,11 @@ | |
| 1109 | */ |
| 1110 | void setup_settings(void){ |
| 1111 | int nSetting; |
| 1112 | int i; |
| 1113 | Setting const *pSet; |
| 1114 | int bExtra = P("extra")!=0; |
| 1115 | const Setting *aSetting = setting_info(&nSetting); |
| 1116 | |
| 1117 | login_check_credentials(); |
| 1118 | if( !g.perm.Setup ){ |
| 1119 | login_needed(0); |
| @@ -1126,30 +1126,34 @@ | |
| 1126 | /* Provide read-only access to versioned settings, |
| 1127 | but only if no repo file was explicitly provided. */ |
| 1128 | db_open_local(0); |
| 1129 | } |
| 1130 | db_begin_transaction(); |
| 1131 | @ <p>Settings marked with (v) are "versionable" and will be overridden |
| 1132 | @ by the contents of managed files named |
| 1133 | @ "<tt>.fossil-settings/</tt><i>SETTING-NAME</i>". |
| 1134 | @ If the file for a versionable setting exists, the value cannot be |
| 1135 | @ changed on this screen.</p><hr><p> |
| 1136 | @ |
| 1137 | @ <form action="%R/setup_settings" method="post"><div> |
| 1138 | if( bExtra ){ |
| 1139 | @ <input type="hidden" name="extra" value="1"> |
| 1140 | style_submenu_element("No-Extras", "%R/setup_settings"); |
| 1141 | }else{ |
| 1142 | style_submenu_element("Extras", "%R/setup_settings?extra"); |
| 1143 | } |
| 1144 | @ <table border="0"><tr><td valign="top"> |
| 1145 | login_insert_csrf_secret(); |
| 1146 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1147 | if( pSet->width==0 ){ |
| 1148 | int hasVersionableValue = pSet->versionable && |
| 1149 | (db_get_versioned(pSet->name, NULL, NULL)!=0); |
| 1150 | if( pSet->bIfChng && !bExtra ){ |
| 1151 | const char *zVal = db_get(pSet->name, 0); |
| 1152 | if( zVal==0 || is_false(zVal)==is_false(pSet->def) ) continue; |
| 1153 | } |
| 1154 | onoff_attribute("", pSet->name, |
| 1155 | pSet->var!=0 ? pSet->var : pSet->name /*works-like:"x"*/, |
| @@ -1167,11 +1171,11 @@ | |
| 1167 | @ <table> |
| 1168 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1169 | if( pSet->width>0 && !pSet->forceTextArea ){ |
| 1170 | int hasVersionableValue = pSet->versionable && |
| 1171 | (db_get_versioned(pSet->name, NULL, NULL)!=0); |
| 1172 | if( pSet->bIfChng && !bExtra ){ |
| 1173 | const char *zVal = db_get(pSet->name, 0); |
| 1174 | if( zVal==0 || fossil_strcmp(zVal,pSet->def)==0 ) continue; |
| 1175 | } |
| 1176 | @ <tr><td> |
| 1177 | @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a> |
| @@ -1190,11 +1194,11 @@ | |
| 1190 | @</table> |
| 1191 | @ </td><td style="width:50px;"></td><td valign="top"> |
| 1192 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1193 | if( pSet->width>0 && pSet->forceTextArea ){ |
| 1194 | int hasVersionableValue = db_get_versioned(pSet->name, NULL, NULL)!=0; |
| 1195 | if( pSet->bIfChng && !bExtra ){ |
| 1196 | const char *zVal = db_get(pSet->name, 0); |
| 1197 | if( zVal==0 || fossil_strcmp(zVal,pSet->def)==0 ) continue; |
| 1198 | } |
| 1199 | @ <a href='%R/help?cmd=%s(pSet->name)'>%s(pSet->name)</a> |
| 1200 | if( pSet->versionable ){ |
| 1201 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1109,11 +1109,11 @@ | |
| 1109 | */ |
| 1110 | void setup_settings(void){ |
| 1111 | int nSetting; |
| 1112 | int i; |
| 1113 | Setting const *pSet; |
| 1114 | int bIfChng = P("all")==0; |
| 1115 | const Setting *aSetting = setting_info(&nSetting); |
| 1116 | |
| 1117 | login_check_credentials(); |
| 1118 | if( !g.perm.Setup ){ |
| 1119 | login_needed(0); |
| @@ -1126,30 +1126,34 @@ | |
| 1126 | /* Provide read-only access to versioned settings, |
| 1127 | but only if no repo file was explicitly provided. */ |
| 1128 | db_open_local(0); |
| 1129 | } |
| 1130 | db_begin_transaction(); |
| 1131 | if( bIfChng ){ |
| 1132 | @ <p>Only settings whose value is different from the default are shown. |
| 1133 | @ Click the "All" button above to set all settings. |
| 1134 | } |
| 1135 | @ <p>Settings marked with (v) are "versionable" and will be overridden |
| 1136 | @ by the contents of managed files named |
| 1137 | @ "<tt>.fossil-settings/</tt><i>SETTING-NAME</i>". |
| 1138 | @ If the file for a versionable setting exists, the value cannot be |
| 1139 | @ changed on this screen.</p><hr><p> |
| 1140 | @ |
| 1141 | @ <form action="%R/setup_settings" method="post"><div> |
| 1142 | if( bIfChng ){ |
| 1143 | style_submenu_element("All", "%R/setup_settings?all"); |
| 1144 | }else{ |
| 1145 | @ <input type="hidden" name="all" value="1"> |
| 1146 | style_submenu_element("Changes-Only", "%R/setup_settings"); |
| 1147 | } |
| 1148 | @ <table border="0"><tr><td valign="top"> |
| 1149 | login_insert_csrf_secret(); |
| 1150 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1151 | if( pSet->width==0 ){ |
| 1152 | int hasVersionableValue = pSet->versionable && |
| 1153 | (db_get_versioned(pSet->name, NULL, NULL)!=0); |
| 1154 | if( bIfChng ){ |
| 1155 | const char *zVal = db_get(pSet->name, 0); |
| 1156 | if( zVal==0 || is_false(zVal)==is_false(pSet->def) ) continue; |
| 1157 | } |
| 1158 | onoff_attribute("", pSet->name, |
| 1159 | pSet->var!=0 ? pSet->var : pSet->name /*works-like:"x"*/, |
| @@ -1167,11 +1171,11 @@ | |
| 1171 | @ <table> |
| 1172 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1173 | if( pSet->width>0 && !pSet->forceTextArea ){ |
| 1174 | int hasVersionableValue = pSet->versionable && |
| 1175 | (db_get_versioned(pSet->name, NULL, NULL)!=0); |
| 1176 | if( bIfChng ){ |
| 1177 | const char *zVal = db_get(pSet->name, 0); |
| 1178 | if( zVal==0 || fossil_strcmp(zVal,pSet->def)==0 ) continue; |
| 1179 | } |
| 1180 | @ <tr><td> |
| 1181 | @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a> |
| @@ -1190,11 +1194,11 @@ | |
| 1194 | @</table> |
| 1195 | @ </td><td style="width:50px;"></td><td valign="top"> |
| 1196 | for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){ |
| 1197 | if( pSet->width>0 && pSet->forceTextArea ){ |
| 1198 | int hasVersionableValue = db_get_versioned(pSet->name, NULL, NULL)!=0; |
| 1199 | if( bIfChng ){ |
| 1200 | const char *zVal = db_get(pSet->name, 0); |
| 1201 | if( zVal==0 || fossil_strcmp(zVal,pSet->def)==0 ) continue; |
| 1202 | } |
| 1203 | @ <a href='%R/help?cmd=%s(pSet->name)'>%s(pSet->name)</a> |
| 1204 | if( pSet->versionable ){ |
| 1205 |
+2
-2
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -222,20 +222,20 @@ | ||
| 222 | 222 | } |
| 223 | 223 | zPrevDate[0] = 0; |
| 224 | 224 | mxWikiLen = db_get_int("timeline-max-comment", 0); |
| 225 | 225 | dateFormat = db_get_int("timeline-date-format", 0); |
| 226 | 226 | /* |
| 227 | - ** SETTING: timeline-truncate-at-blank boolean default=off if-chng | |
| 227 | + ** SETTING: timeline-truncate-at-blank boolean default=off | |
| 228 | 228 | ** |
| 229 | 229 | ** If enabled, check-in comments displayed on the timeline are truncated |
| 230 | 230 | ** at the first blank line of the comment text. The comment text after |
| 231 | 231 | ** the first blank line is only seen in the /info or similar pages that |
| 232 | 232 | ** show details about the check-in. |
| 233 | 233 | */ |
| 234 | 234 | bCommentGitStyle = db_get_int("timeline-truncate-at-blank", 0); |
| 235 | 235 | /* |
| 236 | - ** SETTING: timeline-tslink-info boolean default=off if-chng | |
| 236 | + ** SETTING: timeline-tslink-info boolean default=off | |
| 237 | 237 | ** |
| 238 | 238 | ** The hyperlink on the timestamp associated with each timeline entry, |
| 239 | 239 | ** on the far left-hand side of the screen, normally targets another |
| 240 | 240 | ** /timeline page that shows the entry in context. However, if this |
| 241 | 241 | ** option is turned on, that hyperlink targets the /info page showing |
| 242 | 242 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -222,20 +222,20 @@ | |
| 222 | } |
| 223 | zPrevDate[0] = 0; |
| 224 | mxWikiLen = db_get_int("timeline-max-comment", 0); |
| 225 | dateFormat = db_get_int("timeline-date-format", 0); |
| 226 | /* |
| 227 | ** SETTING: timeline-truncate-at-blank boolean default=off if-chng |
| 228 | ** |
| 229 | ** If enabled, check-in comments displayed on the timeline are truncated |
| 230 | ** at the first blank line of the comment text. The comment text after |
| 231 | ** the first blank line is only seen in the /info or similar pages that |
| 232 | ** show details about the check-in. |
| 233 | */ |
| 234 | bCommentGitStyle = db_get_int("timeline-truncate-at-blank", 0); |
| 235 | /* |
| 236 | ** SETTING: timeline-tslink-info boolean default=off if-chng |
| 237 | ** |
| 238 | ** The hyperlink on the timestamp associated with each timeline entry, |
| 239 | ** on the far left-hand side of the screen, normally targets another |
| 240 | ** /timeline page that shows the entry in context. However, if this |
| 241 | ** option is turned on, that hyperlink targets the /info page showing |
| 242 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -222,20 +222,20 @@ | |
| 222 | } |
| 223 | zPrevDate[0] = 0; |
| 224 | mxWikiLen = db_get_int("timeline-max-comment", 0); |
| 225 | dateFormat = db_get_int("timeline-date-format", 0); |
| 226 | /* |
| 227 | ** SETTING: timeline-truncate-at-blank boolean default=off |
| 228 | ** |
| 229 | ** If enabled, check-in comments displayed on the timeline are truncated |
| 230 | ** at the first blank line of the comment text. The comment text after |
| 231 | ** the first blank line is only seen in the /info or similar pages that |
| 232 | ** show details about the check-in. |
| 233 | */ |
| 234 | bCommentGitStyle = db_get_int("timeline-truncate-at-blank", 0); |
| 235 | /* |
| 236 | ** SETTING: timeline-tslink-info boolean default=off |
| 237 | ** |
| 238 | ** The hyperlink on the timestamp associated with each timeline entry, |
| 239 | ** on the far left-hand side of the screen, normally targets another |
| 240 | ** /timeline page that shows the entry in context. However, if this |
| 241 | ** option is turned on, that hyperlink targets the /info page showing |
| 242 |
+2
-7
| --- tools/mkindex.c | ||
| +++ tools/mkindex.c | ||
| @@ -101,11 +101,10 @@ | ||
| 101 | 101 | #define CMDFLAG_HIDDEN 0x00800 /* Elide from most listings */ |
| 102 | 102 | #define CMDFLAG_LDAVG_EXEMPT 0x01000 /* Exempt from load_control() */ |
| 103 | 103 | #define CMDFLAG_ALIAS 0x02000 /* Command aliases */ |
| 104 | 104 | #define CMDFLAG_KEEPEMPTY 0x04000 /* Do not unset empty settings */ |
| 105 | 105 | #define CMDFLAG_ABBREVSUBCMD 0x08000 /* Abbreviated subcmd in help text */ |
| 106 | -#define CMDFLAG_IFCHNG 0x10000 /* Show settting only if not default */ | |
| 107 | 106 | /**************************************************************************/ |
| 108 | 107 | |
| 109 | 108 | /* |
| 110 | 109 | ** Each entry looks like this: |
| 111 | 110 | */ |
| @@ -285,13 +284,10 @@ | ||
| 285 | 284 | }else if( j==14 && strncmp(&zLine[i], "loadavg-exempt", 14)==0 ){ |
| 286 | 285 | aEntry[nUsed].eType |= CMDFLAG_LDAVG_EXEMPT; |
| 287 | 286 | }else if( (j==23 && strncmp(&zLine[i], "abbreviated-subcommands", 23)==0) |
| 288 | 287 | || (j==12 && strncmp(&zLine[i], "abbrv-subcom", 12)==0) ){ |
| 289 | 288 | aEntry[nUsed].eType |= CMDFLAG_ABBREVSUBCMD; |
| 290 | - }else if( (j==20 && strncmp(&zLine[i], "show-only-if-changed", 20)==0) | |
| 291 | - || (j==7 && strncmp(&zLine[i], "if-chng", 7)==0) ){ | |
| 292 | - aEntry[nUsed].eType |= CMDFLAG_IFCHNG; | |
| 293 | 289 | }else{ |
| 294 | 290 | fprintf(stderr, "%s:%d: unknown option: '%.*s'\n", |
| 295 | 291 | zFile, nLine, j, &zLine[i]); |
| 296 | 292 | nErr++; |
| 297 | 293 | } |
| @@ -520,23 +516,22 @@ | ||
| 520 | 516 | if( zVar ){ |
| 521 | 517 | printf(" \"%s\",%*s", zVar, (int)(15-strlen(zVar)), ""); |
| 522 | 518 | }else{ |
| 523 | 519 | printf(" 0,%*s", 16, ""); |
| 524 | 520 | } |
| 525 | - printf(" %3d, %d, %d, %d, %d, \"%s\"%*s },\n", | |
| 521 | + printf(" %3d, %d, %d, %d, \"%s\"%*s },\n", | |
| 526 | 522 | aEntry[i].iWidth, |
| 527 | 523 | (aEntry[i].eType & CMDFLAG_VERSIONABLE)!=0, |
| 528 | 524 | (aEntry[i].eType & CMDFLAG_BLOCKTEXT)!=0, |
| 529 | 525 | (aEntry[i].eType & CMDFLAG_SENSITIVE)!=0, |
| 530 | - (aEntry[i].eType & CMDFLAG_IFCHNG)!=0, | |
| 531 | 526 | zDef, (int)(10-strlen(zDef)), "" |
| 532 | 527 | ); |
| 533 | 528 | if( aEntry[i].zIf ){ |
| 534 | 529 | printf("#endif\n"); |
| 535 | 530 | } |
| 536 | 531 | } |
| 537 | - printf("{0,0,0,0,0,0,0,0}};\n"); | |
| 532 | + printf("{0,0,0,0,0,0,0}};\n"); | |
| 538 | 533 | |
| 539 | 534 | } |
| 540 | 535 | |
| 541 | 536 | /* |
| 542 | 537 | ** Process a single file of input |
| 543 | 538 |
| --- tools/mkindex.c | |
| +++ tools/mkindex.c | |
| @@ -101,11 +101,10 @@ | |
| 101 | #define CMDFLAG_HIDDEN 0x00800 /* Elide from most listings */ |
| 102 | #define CMDFLAG_LDAVG_EXEMPT 0x01000 /* Exempt from load_control() */ |
| 103 | #define CMDFLAG_ALIAS 0x02000 /* Command aliases */ |
| 104 | #define CMDFLAG_KEEPEMPTY 0x04000 /* Do not unset empty settings */ |
| 105 | #define CMDFLAG_ABBREVSUBCMD 0x08000 /* Abbreviated subcmd in help text */ |
| 106 | #define CMDFLAG_IFCHNG 0x10000 /* Show settting only if not default */ |
| 107 | /**************************************************************************/ |
| 108 | |
| 109 | /* |
| 110 | ** Each entry looks like this: |
| 111 | */ |
| @@ -285,13 +284,10 @@ | |
| 285 | }else if( j==14 && strncmp(&zLine[i], "loadavg-exempt", 14)==0 ){ |
| 286 | aEntry[nUsed].eType |= CMDFLAG_LDAVG_EXEMPT; |
| 287 | }else if( (j==23 && strncmp(&zLine[i], "abbreviated-subcommands", 23)==0) |
| 288 | || (j==12 && strncmp(&zLine[i], "abbrv-subcom", 12)==0) ){ |
| 289 | aEntry[nUsed].eType |= CMDFLAG_ABBREVSUBCMD; |
| 290 | }else if( (j==20 && strncmp(&zLine[i], "show-only-if-changed", 20)==0) |
| 291 | || (j==7 && strncmp(&zLine[i], "if-chng", 7)==0) ){ |
| 292 | aEntry[nUsed].eType |= CMDFLAG_IFCHNG; |
| 293 | }else{ |
| 294 | fprintf(stderr, "%s:%d: unknown option: '%.*s'\n", |
| 295 | zFile, nLine, j, &zLine[i]); |
| 296 | nErr++; |
| 297 | } |
| @@ -520,23 +516,22 @@ | |
| 520 | if( zVar ){ |
| 521 | printf(" \"%s\",%*s", zVar, (int)(15-strlen(zVar)), ""); |
| 522 | }else{ |
| 523 | printf(" 0,%*s", 16, ""); |
| 524 | } |
| 525 | printf(" %3d, %d, %d, %d, %d, \"%s\"%*s },\n", |
| 526 | aEntry[i].iWidth, |
| 527 | (aEntry[i].eType & CMDFLAG_VERSIONABLE)!=0, |
| 528 | (aEntry[i].eType & CMDFLAG_BLOCKTEXT)!=0, |
| 529 | (aEntry[i].eType & CMDFLAG_SENSITIVE)!=0, |
| 530 | (aEntry[i].eType & CMDFLAG_IFCHNG)!=0, |
| 531 | zDef, (int)(10-strlen(zDef)), "" |
| 532 | ); |
| 533 | if( aEntry[i].zIf ){ |
| 534 | printf("#endif\n"); |
| 535 | } |
| 536 | } |
| 537 | printf("{0,0,0,0,0,0,0,0}};\n"); |
| 538 | |
| 539 | } |
| 540 | |
| 541 | /* |
| 542 | ** Process a single file of input |
| 543 |
| --- tools/mkindex.c | |
| +++ tools/mkindex.c | |
| @@ -101,11 +101,10 @@ | |
| 101 | #define CMDFLAG_HIDDEN 0x00800 /* Elide from most listings */ |
| 102 | #define CMDFLAG_LDAVG_EXEMPT 0x01000 /* Exempt from load_control() */ |
| 103 | #define CMDFLAG_ALIAS 0x02000 /* Command aliases */ |
| 104 | #define CMDFLAG_KEEPEMPTY 0x04000 /* Do not unset empty settings */ |
| 105 | #define CMDFLAG_ABBREVSUBCMD 0x08000 /* Abbreviated subcmd in help text */ |
| 106 | /**************************************************************************/ |
| 107 | |
| 108 | /* |
| 109 | ** Each entry looks like this: |
| 110 | */ |
| @@ -285,13 +284,10 @@ | |
| 284 | }else if( j==14 && strncmp(&zLine[i], "loadavg-exempt", 14)==0 ){ |
| 285 | aEntry[nUsed].eType |= CMDFLAG_LDAVG_EXEMPT; |
| 286 | }else if( (j==23 && strncmp(&zLine[i], "abbreviated-subcommands", 23)==0) |
| 287 | || (j==12 && strncmp(&zLine[i], "abbrv-subcom", 12)==0) ){ |
| 288 | aEntry[nUsed].eType |= CMDFLAG_ABBREVSUBCMD; |
| 289 | }else{ |
| 290 | fprintf(stderr, "%s:%d: unknown option: '%.*s'\n", |
| 291 | zFile, nLine, j, &zLine[i]); |
| 292 | nErr++; |
| 293 | } |
| @@ -520,23 +516,22 @@ | |
| 516 | if( zVar ){ |
| 517 | printf(" \"%s\",%*s", zVar, (int)(15-strlen(zVar)), ""); |
| 518 | }else{ |
| 519 | printf(" 0,%*s", 16, ""); |
| 520 | } |
| 521 | printf(" %3d, %d, %d, %d, \"%s\"%*s },\n", |
| 522 | aEntry[i].iWidth, |
| 523 | (aEntry[i].eType & CMDFLAG_VERSIONABLE)!=0, |
| 524 | (aEntry[i].eType & CMDFLAG_BLOCKTEXT)!=0, |
| 525 | (aEntry[i].eType & CMDFLAG_SENSITIVE)!=0, |
| 526 | zDef, (int)(10-strlen(zDef)), "" |
| 527 | ); |
| 528 | if( aEntry[i].zIf ){ |
| 529 | printf("#endif\n"); |
| 530 | } |
| 531 | } |
| 532 | printf("{0,0,0,0,0,0,0}};\n"); |
| 533 | |
| 534 | } |
| 535 | |
| 536 | /* |
| 537 | ** Process a single file of input |
| 538 |