Fossil SCM

Enhancements to the /setup_settings web page. Provide hyperlinks to documentation for all settings.

drh 2017-08-30 23:03 UTC improved-setting-help
Commit 5068f23d3ef32d529c99a235535da2ce2fc122464c8c6e91471c54ee7e496174
3 files changed +9 -9 +44 -4 +28 -28
+9 -9
--- src/db.c
+++ src/db.c
@@ -2819,11 +2819,11 @@
28192819
** If autosync is enabled setting this to a value greater
28202820
** than zero will cause autosync to try no more than this
28212821
** number of attempts if there is a sync failure.
28222822
*/
28232823
/*
2824
-** SETTING: binary-glob width=40 versionable
2824
+** SETTING: binary-glob width=40 versionable block-text
28252825
** The VALUE of this setting is a comma or newline-separated list of
28262826
** GLOB patterns that should be treated as binary files
28272827
** for committing and merging purposes. Example: *.jpg
28282828
*/
28292829
#if defined(_WIN32)||defined(__CYGWIN__)||defined(__DARWIN__)
@@ -2843,11 +2843,11 @@
28432843
** differ only in case are the same file. Defaults to
28442844
** TRUE for unix and FALSE for Cygwin, Mac and Windows.
28452845
*/
28462846
#endif
28472847
/*
2848
-** STTING: clean-glob width=40 versionable
2848
+** STTING: clean-glob width=40 versionable block-text
28492849
** The VALUE of this setting is a comma or newline-separated list of GLOB
28502850
** patterns specifying files that the "clean" command will
28512851
** delete without prompting or allowing undo.
28522852
** Example: *.a,*.lib,*.o
28532853
*/
@@ -2855,18 +2855,18 @@
28552855
** SETTING: clearsign boolean default=off
28562856
** When enabled, fossil will attempt to sign all commits
28572857
** with gpg. When disabled, commits will be unsigned.
28582858
*/
28592859
/*
2860
-** SETTING: crlf-glob width=40 versionable
2860
+** SETTING: crlf-glob width=40 versionable block-text
28612861
** The value is a comma or newline-separated list of GLOB patterns for
28622862
** text files in which it is ok to have CR, CR+LF or mixed
28632863
** line endings. Set to "*" to disable CR+LF checking.
28642864
** The crnl-glob setting is a compatibility alias.
28652865
*/
28662866
/*
2867
-** SETTING: crnl-glob width=40 versionable
2867
+** SETTING: crnl-glob width=40 versionable block-text
28682868
** This is an alias for the crlf-glob setting
28692869
*/
28702870
/*
28712871
** SETTING: default-perms width=16 default=u
28722872
** Permissions given automatically to new users. For more
@@ -2897,18 +2897,18 @@
28972897
** SETTING: editor width=32
28982898
** The value is an external command that will launch the
28992899
** text editor command used for check-in comments.
29002900
*/
29012901
/*
2902
-** SETTING: empty-dirs width=40 versionable
2902
+** SETTING: empty-dirs width=40 versionable block-text
29032903
** The value is a comma or newline-separated list of pathnames. On
29042904
** update and checkout commands, if no file or directory
29052905
** exists with that name, an empty directory will be
29062906
** created.
29072907
*/
29082908
/*
2909
-** SETTING: encoding-glob width=40 versionable
2909
+** SETTING: encoding-glob width=40 versionable block-text
29102910
** The value is a comma or newline-separated list of GLOB
29112911
** patterns specifying files that the "commit" command will
29122912
** ignore when issuing warnings about text files that may
29132913
** use another encoding than ASCII or UTF-8. Set to "*"
29142914
** to disable encoding checking.
@@ -2954,19 +2954,19 @@
29542954
** SETTING: https-login boolean default=off
29552955
** If true, then the Fossil web server will redirect unencrypted
29562956
** login screeen requests to HTTPS.
29572957
*/
29582958
/*
2959
-** SETTING: ignore-glob width=40 versionable
2959
+** SETTING: ignore-glob width=40 versionable block-text
29602960
** The value is a comma or newline-separated list of GLOB
29612961
** patterns specifying files that the "add", "addremove",
29622962
** "clean", and "extra" commands will ignore.
29632963
**
29642964
** Example: *.log customCode.c notes.txt
29652965
*/
29662966
/*
2967
-** SETTING: keep-glob width=40 versionable
2967
+** SETTING: keep-glob width=40 versionable block-text
29682968
** The value is a comma or newline-separated list of GLOB
29692969
** patterns specifying files that the "clean" command will keep
29702970
*/
29712971
/*
29722972
** SETTING: localauth boolean default=off
@@ -3116,11 +3116,11 @@
31163116
** This is the setup script to be evaluated after creating
31173117
** and initializing the TH1 interpreter. By default, this
31183118
** is empty and no extra setup is performed.
31193119
*/
31203120
/*
3121
-** SETTING: th1-uri-regexp width=40 versionable
3121
+** SETTING: th1-uri-regexp width=40 versionable block-text
31223122
** Specify which URI's are allowed in HTTP requests from
31233123
** TH1 scripts. If empty, no HTTP requests are allowed
31243124
** whatsoever.
31253125
*/
31263126
/*
31273127
--- src/db.c
+++ src/db.c
@@ -2819,11 +2819,11 @@
2819 ** If autosync is enabled setting this to a value greater
2820 ** than zero will cause autosync to try no more than this
2821 ** number of attempts if there is a sync failure.
2822 */
2823 /*
2824 ** SETTING: binary-glob width=40 versionable
2825 ** The VALUE of this setting is a comma or newline-separated list of
2826 ** GLOB patterns that should be treated as binary files
2827 ** for committing and merging purposes. Example: *.jpg
2828 */
2829 #if defined(_WIN32)||defined(__CYGWIN__)||defined(__DARWIN__)
@@ -2843,11 +2843,11 @@
2843 ** differ only in case are the same file. Defaults to
2844 ** TRUE for unix and FALSE for Cygwin, Mac and Windows.
2845 */
2846 #endif
2847 /*
2848 ** STTING: clean-glob width=40 versionable
2849 ** The VALUE of this setting is a comma or newline-separated list of GLOB
2850 ** patterns specifying files that the "clean" command will
2851 ** delete without prompting or allowing undo.
2852 ** Example: *.a,*.lib,*.o
2853 */
@@ -2855,18 +2855,18 @@
2855 ** SETTING: clearsign boolean default=off
2856 ** When enabled, fossil will attempt to sign all commits
2857 ** with gpg. When disabled, commits will be unsigned.
2858 */
2859 /*
2860 ** SETTING: crlf-glob width=40 versionable
2861 ** The value is a comma or newline-separated list of GLOB patterns for
2862 ** text files in which it is ok to have CR, CR+LF or mixed
2863 ** line endings. Set to "*" to disable CR+LF checking.
2864 ** The crnl-glob setting is a compatibility alias.
2865 */
2866 /*
2867 ** SETTING: crnl-glob width=40 versionable
2868 ** This is an alias for the crlf-glob setting
2869 */
2870 /*
2871 ** SETTING: default-perms width=16 default=u
2872 ** Permissions given automatically to new users. For more
@@ -2897,18 +2897,18 @@
2897 ** SETTING: editor width=32
2898 ** The value is an external command that will launch the
2899 ** text editor command used for check-in comments.
2900 */
2901 /*
2902 ** SETTING: empty-dirs width=40 versionable
2903 ** The value is a comma or newline-separated list of pathnames. On
2904 ** update and checkout commands, if no file or directory
2905 ** exists with that name, an empty directory will be
2906 ** created.
2907 */
2908 /*
2909 ** SETTING: encoding-glob width=40 versionable
2910 ** The value is a comma or newline-separated list of GLOB
2911 ** patterns specifying files that the "commit" command will
2912 ** ignore when issuing warnings about text files that may
2913 ** use another encoding than ASCII or UTF-8. Set to "*"
2914 ** to disable encoding checking.
@@ -2954,19 +2954,19 @@
2954 ** SETTING: https-login boolean default=off
2955 ** If true, then the Fossil web server will redirect unencrypted
2956 ** login screeen requests to HTTPS.
2957 */
2958 /*
2959 ** SETTING: ignore-glob width=40 versionable
2960 ** The value is a comma or newline-separated list of GLOB
2961 ** patterns specifying files that the "add", "addremove",
2962 ** "clean", and "extra" commands will ignore.
2963 **
2964 ** Example: *.log customCode.c notes.txt
2965 */
2966 /*
2967 ** SETTING: keep-glob width=40 versionable
2968 ** The value is a comma or newline-separated list of GLOB
2969 ** patterns specifying files that the "clean" command will keep
2970 */
2971 /*
2972 ** SETTING: localauth boolean default=off
@@ -3116,11 +3116,11 @@
3116 ** This is the setup script to be evaluated after creating
3117 ** and initializing the TH1 interpreter. By default, this
3118 ** is empty and no extra setup is performed.
3119 */
3120 /*
3121 ** SETTING: th1-uri-regexp width=40 versionable
3122 ** Specify which URI's are allowed in HTTP requests from
3123 ** TH1 scripts. If empty, no HTTP requests are allowed
3124 ** whatsoever.
3125 */
3126 /*
3127
--- src/db.c
+++ src/db.c
@@ -2819,11 +2819,11 @@
2819 ** If autosync is enabled setting this to a value greater
2820 ** than zero will cause autosync to try no more than this
2821 ** number of attempts if there is a sync failure.
2822 */
2823 /*
2824 ** SETTING: binary-glob width=40 versionable block-text
2825 ** The VALUE of this setting is a comma or newline-separated list of
2826 ** GLOB patterns that should be treated as binary files
2827 ** for committing and merging purposes. Example: *.jpg
2828 */
2829 #if defined(_WIN32)||defined(__CYGWIN__)||defined(__DARWIN__)
@@ -2843,11 +2843,11 @@
2843 ** differ only in case are the same file. Defaults to
2844 ** TRUE for unix and FALSE for Cygwin, Mac and Windows.
2845 */
2846 #endif
2847 /*
2848 ** STTING: clean-glob width=40 versionable block-text
2849 ** The VALUE of this setting is a comma or newline-separated list of GLOB
2850 ** patterns specifying files that the "clean" command will
2851 ** delete without prompting or allowing undo.
2852 ** Example: *.a,*.lib,*.o
2853 */
@@ -2855,18 +2855,18 @@
2855 ** SETTING: clearsign boolean default=off
2856 ** When enabled, fossil will attempt to sign all commits
2857 ** with gpg. When disabled, commits will be unsigned.
2858 */
2859 /*
2860 ** SETTING: crlf-glob width=40 versionable block-text
2861 ** The value is a comma or newline-separated list of GLOB patterns for
2862 ** text files in which it is ok to have CR, CR+LF or mixed
2863 ** line endings. Set to "*" to disable CR+LF checking.
2864 ** The crnl-glob setting is a compatibility alias.
2865 */
2866 /*
2867 ** SETTING: crnl-glob width=40 versionable block-text
2868 ** This is an alias for the crlf-glob setting
2869 */
2870 /*
2871 ** SETTING: default-perms width=16 default=u
2872 ** Permissions given automatically to new users. For more
@@ -2897,18 +2897,18 @@
2897 ** SETTING: editor width=32
2898 ** The value is an external command that will launch the
2899 ** text editor command used for check-in comments.
2900 */
2901 /*
2902 ** SETTING: empty-dirs width=40 versionable block-text
2903 ** The value is a comma or newline-separated list of pathnames. On
2904 ** update and checkout commands, if no file or directory
2905 ** exists with that name, an empty directory will be
2906 ** created.
2907 */
2908 /*
2909 ** SETTING: encoding-glob width=40 versionable block-text
2910 ** The value is a comma or newline-separated list of GLOB
2911 ** patterns specifying files that the "commit" command will
2912 ** ignore when issuing warnings about text files that may
2913 ** use another encoding than ASCII or UTF-8. Set to "*"
2914 ** to disable encoding checking.
@@ -2954,19 +2954,19 @@
2954 ** SETTING: https-login boolean default=off
2955 ** If true, then the Fossil web server will redirect unencrypted
2956 ** login screeen requests to HTTPS.
2957 */
2958 /*
2959 ** SETTING: ignore-glob width=40 versionable block-text
2960 ** The value is a comma or newline-separated list of GLOB
2961 ** patterns specifying files that the "add", "addremove",
2962 ** "clean", and "extra" commands will ignore.
2963 **
2964 ** Example: *.log customCode.c notes.txt
2965 */
2966 /*
2967 ** SETTING: keep-glob width=40 versionable block-text
2968 ** The value is a comma or newline-separated list of GLOB
2969 ** patterns specifying files that the "clean" command will keep
2970 */
2971 /*
2972 ** SETTING: localauth boolean default=off
@@ -3116,11 +3116,11 @@
3116 ** This is the setup script to be evaluated after creating
3117 ** and initializing the TH1 interpreter. By default, this
3118 ** is empty and no extra setup is performed.
3119 */
3120 /*
3121 ** SETTING: th1-uri-regexp width=40 versionable block-text
3122 ** Specify which URI's are allowed in HTTP requests from
3123 ** TH1 scripts. If empty, no HTTP requests are allowed
3124 ** whatsoever.
3125 */
3126 /*
3127
+44 -4
--- src/dispatch.c
+++ src/dispatch.c
@@ -177,10 +177,11 @@
177177
**
178178
** Options:
179179
** -e|--everything Show all commands and pages.
180180
** -t|--test Include test- commands
181181
** -w|--www Show WWW pages.
182
+** -w|--settings Show settings.
182183
** -h|--html Transform output to HTML.
183184
*/
184185
void test_all_help_cmd(void){
185186
int i;
186187
int mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER;
@@ -189,10 +190,13 @@
189190
if( find_option("www","w",0) ){
190191
mask = CMDFLAG_WEBPAGE;
191192
}
192193
if( find_option("everything","e",0) ){
193194
mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER | CMDFLAG_WEBPAGE;
195
+ }
196
+ if( find_option("settings","s",0) ){
197
+ mask = CMDFLAG_SETTING;
194198
}
195199
if( find_option("test","t",0) ){
196200
mask |= CMDFLAG_TEST;
197201
}
198202
if( useHtml ) fossil_print("<!--\n");
@@ -199,10 +203,11 @@
199203
fossil_print("Help text for:\n");
200204
if( mask & CMDFLAG_1ST_TIER ) fossil_print(" * Commands\n");
201205
if( mask & CMDFLAG_2ND_TIER ) fossil_print(" * Auxiliary commands\n");
202206
if( mask & CMDFLAG_TEST ) fossil_print(" * Test commands\n");
203207
if( mask & CMDFLAG_WEBPAGE ) fossil_print(" * Web pages\n");
208
+ if( mask & CMDFLAG_SETTING ) fossil_print(" * Settings\n");
204209
if( useHtml ){
205210
fossil_print("-->\n");
206211
fossil_print("<!-- start_all_help -->\n");
207212
}else{
208213
fossil_print("---\n");
@@ -231,11 +236,11 @@
231236
/*
232237
** WEBPAGE: help
233238
** URL: /help?name=CMD
234239
**
235240
** Show the built-in help text for CMD. CMD can be a command-line interface
236
-** command or a page name from the web interface.
241
+** command or a page name from the web interface or a setting.
237242
*/
238243
void help_page(void){
239244
const char *zCmd = P("cmd");
240245
241246
if( zCmd==0 ) zCmd = P("name");
@@ -244,25 +249,27 @@
244249
const CmdOrPage *pCmd = 0;
245250
246251
style_header("Help: %s", zCmd);
247252
248253
style_submenu_element("Command-List", "%s/help", g.zTop);
254
+ rc = dispatch_name_search(zCmd, CMDFLAG_ANY, &pCmd);
249255
if( *zCmd=='/' ){
250256
/* Some of the webpages require query parameters in order to work.
251257
** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
252258
@ <h1>The "%h(zCmd)" page:</h1>
259
+ }else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){
260
+ @ <h1>The "%h(pCmd->zName)" setting:</h1>
253261
}else{
254262
@ <h1>The "%h(zCmd)" command:</h1>
255263
}
256
- rc = dispatch_name_search(zCmd, CMDFLAG_ANY, &pCmd);
257264
if( rc==1 ){
258265
@ unknown command: %h(zCmd)
259266
}else if( rc==2 ){
260267
@ ambiguous command prefix: %h(zCmd)
261268
}else{
262269
if( pCmd->zHelp[0]==0 ){
263
- @ no help available for the %h(pCmd->zName) command
270
+ @ No help available for "%h(pCmd->zName)"
264271
}else{
265272
@ <blockquote>
266273
help_to_html(pCmd->zHelp, cgi_output_blob());
267274
@ </blockquote>
268275
}
@@ -341,10 +348,40 @@
341348
for(i=j=0; i<MX_COMMAND; i++){
342349
const char *z = aCommand[i].zName;
343350
if( strncmp(z,"test",4)!=0 ) continue;
344351
if( j==0 ){
345352
@ <td valign="top"><ul>
353
+ }
354
+ if( aCommand[i].zHelp[0] ){
355
+ @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
356
+ }else{
357
+ @ <li>%s(z)</li>
358
+ }
359
+ j++;
360
+ if( j>=n ){
361
+ @ </ul></td>
362
+ j = 0;
363
+ }
364
+ }
365
+ if( j>0 ){
366
+ @ </ul></td>
367
+ }
368
+ @ </tr></table>
369
+
370
+ @ <h1>Settings:</h1>
371
+ @ <table border="0"><tr>
372
+ for(i=j=0; i<MX_COMMAND; i++){
373
+ const char *z = aCommand[i].zName;
374
+ if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue;
375
+ j++;
376
+ }
377
+ n = (j+4)/5;
378
+ for(i=j=0; i<MX_COMMAND; i++){
379
+ const char *z = aCommand[i].zName;
380
+ if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue;
381
+ if( j==0 ){
382
+ @ <td valign="top"><ul>
346383
}
347384
if( aCommand[i].zHelp[0] ){
348385
@ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
349386
}else{
350387
@ <li>%s(z)</li>
@@ -515,11 +552,14 @@
515552
if( z==0 ){
516553
fossil_fatal("no help available for the %s %s",
517554
pCmd->zName, zCmdOrPage);
518555
}
519556
if( pCmd->eCmdFlags & CMDFLAG_SETTING ){
520
- fossil_print("Setting: \"%s\"\n\n", pCmd->zName);
557
+ fossil_print("Setting: \"%s\"%s\n\n",
558
+ pCmd->zName,
559
+ (pCmd->eCmdFlags & CMDFLAG_VERSIONABLE)!=0 ? " (versionable)" : ""
560
+ );
521561
}
522562
while( *z ){
523563
if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){
524564
fossil_print("%s", g.argv[0]);
525565
z += 7;
526566
--- src/dispatch.c
+++ src/dispatch.c
@@ -177,10 +177,11 @@
177 **
178 ** Options:
179 ** -e|--everything Show all commands and pages.
180 ** -t|--test Include test- commands
181 ** -w|--www Show WWW pages.
 
182 ** -h|--html Transform output to HTML.
183 */
184 void test_all_help_cmd(void){
185 int i;
186 int mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER;
@@ -189,10 +190,13 @@
189 if( find_option("www","w",0) ){
190 mask = CMDFLAG_WEBPAGE;
191 }
192 if( find_option("everything","e",0) ){
193 mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER | CMDFLAG_WEBPAGE;
 
 
 
194 }
195 if( find_option("test","t",0) ){
196 mask |= CMDFLAG_TEST;
197 }
198 if( useHtml ) fossil_print("<!--\n");
@@ -199,10 +203,11 @@
199 fossil_print("Help text for:\n");
200 if( mask & CMDFLAG_1ST_TIER ) fossil_print(" * Commands\n");
201 if( mask & CMDFLAG_2ND_TIER ) fossil_print(" * Auxiliary commands\n");
202 if( mask & CMDFLAG_TEST ) fossil_print(" * Test commands\n");
203 if( mask & CMDFLAG_WEBPAGE ) fossil_print(" * Web pages\n");
 
204 if( useHtml ){
205 fossil_print("-->\n");
206 fossil_print("<!-- start_all_help -->\n");
207 }else{
208 fossil_print("---\n");
@@ -231,11 +236,11 @@
231 /*
232 ** WEBPAGE: help
233 ** URL: /help?name=CMD
234 **
235 ** Show the built-in help text for CMD. CMD can be a command-line interface
236 ** command or a page name from the web interface.
237 */
238 void help_page(void){
239 const char *zCmd = P("cmd");
240
241 if( zCmd==0 ) zCmd = P("name");
@@ -244,25 +249,27 @@
244 const CmdOrPage *pCmd = 0;
245
246 style_header("Help: %s", zCmd);
247
248 style_submenu_element("Command-List", "%s/help", g.zTop);
 
249 if( *zCmd=='/' ){
250 /* Some of the webpages require query parameters in order to work.
251 ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
252 @ <h1>The "%h(zCmd)" page:</h1>
 
 
253 }else{
254 @ <h1>The "%h(zCmd)" command:</h1>
255 }
256 rc = dispatch_name_search(zCmd, CMDFLAG_ANY, &pCmd);
257 if( rc==1 ){
258 @ unknown command: %h(zCmd)
259 }else if( rc==2 ){
260 @ ambiguous command prefix: %h(zCmd)
261 }else{
262 if( pCmd->zHelp[0]==0 ){
263 @ no help available for the %h(pCmd->zName) command
264 }else{
265 @ <blockquote>
266 help_to_html(pCmd->zHelp, cgi_output_blob());
267 @ </blockquote>
268 }
@@ -341,10 +348,40 @@
341 for(i=j=0; i<MX_COMMAND; i++){
342 const char *z = aCommand[i].zName;
343 if( strncmp(z,"test",4)!=0 ) continue;
344 if( j==0 ){
345 @ <td valign="top"><ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346 }
347 if( aCommand[i].zHelp[0] ){
348 @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
349 }else{
350 @ <li>%s(z)</li>
@@ -515,11 +552,14 @@
515 if( z==0 ){
516 fossil_fatal("no help available for the %s %s",
517 pCmd->zName, zCmdOrPage);
518 }
519 if( pCmd->eCmdFlags & CMDFLAG_SETTING ){
520 fossil_print("Setting: \"%s\"\n\n", pCmd->zName);
 
 
 
521 }
522 while( *z ){
523 if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){
524 fossil_print("%s", g.argv[0]);
525 z += 7;
526
--- src/dispatch.c
+++ src/dispatch.c
@@ -177,10 +177,11 @@
177 **
178 ** Options:
179 ** -e|--everything Show all commands and pages.
180 ** -t|--test Include test- commands
181 ** -w|--www Show WWW pages.
182 ** -w|--settings Show settings.
183 ** -h|--html Transform output to HTML.
184 */
185 void test_all_help_cmd(void){
186 int i;
187 int mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER;
@@ -189,10 +190,13 @@
190 if( find_option("www","w",0) ){
191 mask = CMDFLAG_WEBPAGE;
192 }
193 if( find_option("everything","e",0) ){
194 mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER | CMDFLAG_WEBPAGE;
195 }
196 if( find_option("settings","s",0) ){
197 mask = CMDFLAG_SETTING;
198 }
199 if( find_option("test","t",0) ){
200 mask |= CMDFLAG_TEST;
201 }
202 if( useHtml ) fossil_print("<!--\n");
@@ -199,10 +203,11 @@
203 fossil_print("Help text for:\n");
204 if( mask & CMDFLAG_1ST_TIER ) fossil_print(" * Commands\n");
205 if( mask & CMDFLAG_2ND_TIER ) fossil_print(" * Auxiliary commands\n");
206 if( mask & CMDFLAG_TEST ) fossil_print(" * Test commands\n");
207 if( mask & CMDFLAG_WEBPAGE ) fossil_print(" * Web pages\n");
208 if( mask & CMDFLAG_SETTING ) fossil_print(" * Settings\n");
209 if( useHtml ){
210 fossil_print("-->\n");
211 fossil_print("<!-- start_all_help -->\n");
212 }else{
213 fossil_print("---\n");
@@ -231,11 +236,11 @@
236 /*
237 ** WEBPAGE: help
238 ** URL: /help?name=CMD
239 **
240 ** Show the built-in help text for CMD. CMD can be a command-line interface
241 ** command or a page name from the web interface or a setting.
242 */
243 void help_page(void){
244 const char *zCmd = P("cmd");
245
246 if( zCmd==0 ) zCmd = P("name");
@@ -244,25 +249,27 @@
249 const CmdOrPage *pCmd = 0;
250
251 style_header("Help: %s", zCmd);
252
253 style_submenu_element("Command-List", "%s/help", g.zTop);
254 rc = dispatch_name_search(zCmd, CMDFLAG_ANY, &pCmd);
255 if( *zCmd=='/' ){
256 /* Some of the webpages require query parameters in order to work.
257 ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
258 @ <h1>The "%h(zCmd)" page:</h1>
259 }else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){
260 @ <h1>The "%h(pCmd->zName)" setting:</h1>
261 }else{
262 @ <h1>The "%h(zCmd)" command:</h1>
263 }
 
264 if( rc==1 ){
265 @ unknown command: %h(zCmd)
266 }else if( rc==2 ){
267 @ ambiguous command prefix: %h(zCmd)
268 }else{
269 if( pCmd->zHelp[0]==0 ){
270 @ No help available for "%h(pCmd->zName)"
271 }else{
272 @ <blockquote>
273 help_to_html(pCmd->zHelp, cgi_output_blob());
274 @ </blockquote>
275 }
@@ -341,10 +348,40 @@
348 for(i=j=0; i<MX_COMMAND; i++){
349 const char *z = aCommand[i].zName;
350 if( strncmp(z,"test",4)!=0 ) continue;
351 if( j==0 ){
352 @ <td valign="top"><ul>
353 }
354 if( aCommand[i].zHelp[0] ){
355 @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
356 }else{
357 @ <li>%s(z)</li>
358 }
359 j++;
360 if( j>=n ){
361 @ </ul></td>
362 j = 0;
363 }
364 }
365 if( j>0 ){
366 @ </ul></td>
367 }
368 @ </tr></table>
369
370 @ <h1>Settings:</h1>
371 @ <table border="0"><tr>
372 for(i=j=0; i<MX_COMMAND; i++){
373 const char *z = aCommand[i].zName;
374 if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue;
375 j++;
376 }
377 n = (j+4)/5;
378 for(i=j=0; i<MX_COMMAND; i++){
379 const char *z = aCommand[i].zName;
380 if( (aCommand[i].eCmdFlags & CMDFLAG_SETTING)==0 ) continue;
381 if( j==0 ){
382 @ <td valign="top"><ul>
383 }
384 if( aCommand[i].zHelp[0] ){
385 @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
386 }else{
387 @ <li>%s(z)</li>
@@ -515,11 +552,14 @@
552 if( z==0 ){
553 fossil_fatal("no help available for the %s %s",
554 pCmd->zName, zCmdOrPage);
555 }
556 if( pCmd->eCmdFlags & CMDFLAG_SETTING ){
557 fossil_print("Setting: \"%s\"%s\n\n",
558 pCmd->zName,
559 (pCmd->eCmdFlags & CMDFLAG_VERSIONABLE)!=0 ? " (versionable)" : ""
560 );
561 }
562 while( *z ){
563 if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){
564 fossil_print("%s", g.argv[0]);
565 z += 7;
566
+28 -28
--- src/setup.c
+++ src/setup.c
@@ -1552,23 +1552,27 @@
15521552
/* Provide read-only access to versioned settings,
15531553
but only if no repo file was explicitly provided. */
15541554
db_open_local(0);
15551555
}
15561556
db_begin_transaction();
1557
- @ <p>This page provides a simple interface to the "fossil setting" command.
1558
- @ See the "fossil help setting" output below for further information on
1559
- @ the meaning of each setting.</p><hr />
1557
+ @ <p>Settings marked with (v) are "versionable" and will be overridden
1558
+ @ by the contents of managed files named
1559
+ @ "<tt>.fossil-settings/</tt><i>SETTING-NAME</i>".
1560
+ @ If the file for a versionable setting exists, the value cannot be
1561
+ @ changed on this screen.</p><hr /><p>
1562
+ @
15601563
@ <form action="%s(g.zTop)/setup_settings" method="post"><div>
15611564
@ <table border="0"><tr><td valign="top">
15621565
login_insert_csrf_secret();
15631566
for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
15641567
if( pSet->width==0 ){
15651568
int hasVersionableValue = pSet->versionable &&
15661569
(db_get_versioned(pSet->name, NULL)!=0);
1567
- onoff_attribute(pSet->name, pSet->name,
1570
+ onoff_attribute("", pSet->name,
15681571
pSet->var!=0 ? pSet->var : pSet->name,
15691572
is_truth(pSet->def), hasVersionableValue);
1573
+ @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a>
15701574
if( pSet->versionable ){
15711575
@ (v)<br />
15721576
} else {
15731577
@ <br />
15741578
}
@@ -1575,46 +1579,42 @@
15751579
}
15761580
}
15771581
@ <br /><input type="submit" name="submit" value="Apply Changes" />
15781582
@ </td><td style="width:50px;"></td><td valign="top">
15791583
for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
1580
- if( pSet->width!=0 && !pSet->versionable && !pSet->forceTextArea ){
1581
- entry_attribute(pSet->name, /*pSet->width*/ 25, pSet->name,
1582
- pSet->var!=0 ? pSet->var : pSet->name,
1583
- (char*)pSet->def, 0);
1584
- @ <br />
1585
- }
1586
- }
1587
- for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
1588
- if( pSet->width!=0 && !pSet->versionable && pSet->forceTextArea ){
1589
- @<b>%s(pSet->name)</b><br />
1590
- textarea_attribute("", /*rows*/ 3, /*cols*/ 50, pSet->name,
1591
- pSet->var!=0 ? pSet->var : pSet->name,
1592
- (char*)pSet->def, 0);
1593
- @ <br />
1584
+ if( pSet->width!=0 && !pSet->forceTextArea ){
1585
+ int hasVersionableValue = pSet->versionable &&
1586
+ (db_get_versioned(pSet->name, NULL)!=0);
1587
+ entry_attribute("", /*pSet->width*/ 25, pSet->name,
1588
+ pSet->var!=0 ? pSet->var : pSet->name,
1589
+ (char*)pSet->def, hasVersionableValue);
1590
+ @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a>
1591
+ if( pSet->versionable ){
1592
+ @ (v)<br />
1593
+ } else {
1594
+ @ <br />
1595
+ }
15941596
}
15951597
}
15961598
@ </td><td style="width:50px;"></td><td valign="top">
15971599
for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
1598
- if( pSet->width!=0 && pSet->versionable ){
1600
+ if( pSet->width!=0 && pSet->forceTextArea ){
15991601
int hasVersionableValue = db_get_versioned(pSet->name, NULL)!=0;
1600
- @<b>%s(pSet->name)</b> (v)<br />
1601
- textarea_attribute("", /*rows*/ 3, /*cols*/ 20, pSet->name,
1602
+ @ <a href='%R/help?cmd=%s(pSet->name)'>%s(pSet->name)</a>
1603
+ if( pSet->versionable ){
1604
+ @ (v)<br />
1605
+ } else {
1606
+ @ <br />
1607
+ }
1608
+ textarea_attribute("", /*rows*/ 2, /*cols*/ 35, pSet->name,
16021609
pSet->var!=0 ? pSet->var : pSet->name,
16031610
(char*)pSet->def, hasVersionableValue);
16041611
@<br />
16051612
}
16061613
}
16071614
@ </td></tr></table>
16081615
@ </div></form>
1609
- @ <p>Settings marked with (v) are 'versionable' and will be overridden
1610
- @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt>
1611
- @ in the check-out root.
1612
- @ If such a file is present, the corresponding field above is not
1613
- @ editable.</p><hr /><p>
1614
- @ These settings work the same as the
1615
- @ <a href='%R/help?cmd=settings'>fossil set</a> command.
16161616
db_end_transaction(0);
16171617
style_footer();
16181618
}
16191619
16201620
/*
16211621
--- src/setup.c
+++ src/setup.c
@@ -1552,23 +1552,27 @@
1552 /* Provide read-only access to versioned settings,
1553 but only if no repo file was explicitly provided. */
1554 db_open_local(0);
1555 }
1556 db_begin_transaction();
1557 @ <p>This page provides a simple interface to the "fossil setting" command.
1558 @ See the "fossil help setting" output below for further information on
1559 @ the meaning of each setting.</p><hr />
 
 
 
1560 @ <form action="%s(g.zTop)/setup_settings" method="post"><div>
1561 @ <table border="0"><tr><td valign="top">
1562 login_insert_csrf_secret();
1563 for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
1564 if( pSet->width==0 ){
1565 int hasVersionableValue = pSet->versionable &&
1566 (db_get_versioned(pSet->name, NULL)!=0);
1567 onoff_attribute(pSet->name, pSet->name,
1568 pSet->var!=0 ? pSet->var : pSet->name,
1569 is_truth(pSet->def), hasVersionableValue);
 
1570 if( pSet->versionable ){
1571 @ (v)<br />
1572 } else {
1573 @ <br />
1574 }
@@ -1575,46 +1579,42 @@
1575 }
1576 }
1577 @ <br /><input type="submit" name="submit" value="Apply Changes" />
1578 @ </td><td style="width:50px;"></td><td valign="top">
1579 for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
1580 if( pSet->width!=0 && !pSet->versionable && !pSet->forceTextArea ){
1581 entry_attribute(pSet->name, /*pSet->width*/ 25, pSet->name,
1582 pSet->var!=0 ? pSet->var : pSet->name,
1583 (char*)pSet->def, 0);
1584 @ <br />
1585 }
1586 }
1587 for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
1588 if( pSet->width!=0 && !pSet->versionable && pSet->forceTextArea ){
1589 @<b>%s(pSet->name)</b><br />
1590 textarea_attribute("", /*rows*/ 3, /*cols*/ 50, pSet->name,
1591 pSet->var!=0 ? pSet->var : pSet->name,
1592 (char*)pSet->def, 0);
1593 @ <br />
1594 }
1595 }
1596 @ </td><td style="width:50px;"></td><td valign="top">
1597 for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
1598 if( pSet->width!=0 && pSet->versionable ){
1599 int hasVersionableValue = db_get_versioned(pSet->name, NULL)!=0;
1600 @<b>%s(pSet->name)</b> (v)<br />
1601 textarea_attribute("", /*rows*/ 3, /*cols*/ 20, pSet->name,
 
 
 
 
 
1602 pSet->var!=0 ? pSet->var : pSet->name,
1603 (char*)pSet->def, hasVersionableValue);
1604 @<br />
1605 }
1606 }
1607 @ </td></tr></table>
1608 @ </div></form>
1609 @ <p>Settings marked with (v) are 'versionable' and will be overridden
1610 @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt>
1611 @ in the check-out root.
1612 @ If such a file is present, the corresponding field above is not
1613 @ editable.</p><hr /><p>
1614 @ These settings work the same as the
1615 @ <a href='%R/help?cmd=settings'>fossil set</a> command.
1616 db_end_transaction(0);
1617 style_footer();
1618 }
1619
1620 /*
1621
--- src/setup.c
+++ src/setup.c
@@ -1552,23 +1552,27 @@
1552 /* Provide read-only access to versioned settings,
1553 but only if no repo file was explicitly provided. */
1554 db_open_local(0);
1555 }
1556 db_begin_transaction();
1557 @ <p>Settings marked with (v) are "versionable" and will be overridden
1558 @ by the contents of managed files named
1559 @ "<tt>.fossil-settings/</tt><i>SETTING-NAME</i>".
1560 @ If the file for a versionable setting exists, the value cannot be
1561 @ changed on this screen.</p><hr /><p>
1562 @
1563 @ <form action="%s(g.zTop)/setup_settings" method="post"><div>
1564 @ <table border="0"><tr><td valign="top">
1565 login_insert_csrf_secret();
1566 for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
1567 if( pSet->width==0 ){
1568 int hasVersionableValue = pSet->versionable &&
1569 (db_get_versioned(pSet->name, NULL)!=0);
1570 onoff_attribute("", pSet->name,
1571 pSet->var!=0 ? pSet->var : pSet->name,
1572 is_truth(pSet->def), hasVersionableValue);
1573 @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a>
1574 if( pSet->versionable ){
1575 @ (v)<br />
1576 } else {
1577 @ <br />
1578 }
@@ -1575,46 +1579,42 @@
1579 }
1580 }
1581 @ <br /><input type="submit" name="submit" value="Apply Changes" />
1582 @ </td><td style="width:50px;"></td><td valign="top">
1583 for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
1584 if( pSet->width!=0 && !pSet->forceTextArea ){
1585 int hasVersionableValue = pSet->versionable &&
1586 (db_get_versioned(pSet->name, NULL)!=0);
1587 entry_attribute("", /*pSet->width*/ 25, pSet->name,
1588 pSet->var!=0 ? pSet->var : pSet->name,
1589 (char*)pSet->def, hasVersionableValue);
1590 @ <a href='%R/help?cmd=%s(pSet->name)'>%h(pSet->name)</a>
1591 if( pSet->versionable ){
1592 @ (v)<br />
1593 } else {
1594 @ <br />
1595 }
 
 
1596 }
1597 }
1598 @ </td><td style="width:50px;"></td><td valign="top">
1599 for(i=0, pSet=aSetting; i<nSetting; i++, pSet++){
1600 if( pSet->width!=0 && pSet->forceTextArea ){
1601 int hasVersionableValue = db_get_versioned(pSet->name, NULL)!=0;
1602 @ <a href='%R/help?cmd=%s(pSet->name)'>%s(pSet->name)</a>
1603 if( pSet->versionable ){
1604 @ (v)<br />
1605 } else {
1606 @ <br />
1607 }
1608 textarea_attribute("", /*rows*/ 2, /*cols*/ 35, pSet->name,
1609 pSet->var!=0 ? pSet->var : pSet->name,
1610 (char*)pSet->def, hasVersionableValue);
1611 @<br />
1612 }
1613 }
1614 @ </td></tr></table>
1615 @ </div></form>
 
 
 
 
 
 
 
1616 db_end_transaction(0);
1617 style_footer();
1618 }
1619
1620 /*
1621

Keyboard Shortcuts

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