Fossil SCM

Remove the show-repolist-desc and show-repolist-lg settings. Control of which columns of a repository list to show is now only by the FOSSIL_REPOLIST_SHOW environment variable.

drh 2025-04-25 12:53 trunk
Commit d9bd156aadd696cec4fa9dab8c5f973cc8f94f444474b57df60dbc50e49da936
+1 -22
--- src/repolist.c
+++ src/repolist.c
@@ -101,25 +101,10 @@
101101
finish_repo_list:
102102
g.dbIgnoreErrors--;
103103
sqlite3_close(db);
104104
}
105105
106
-/*
107
-** SETTING: show-repolist-desc boolean default=off
108
-**
109
-** If the value of this setting is "1" globally, then the repository-list
110
-** page will show the description of each repository. This setting only
111
-** has effect when it is in the global setting database.
112
-*/
113
-/*
114
-** SETTING: show-repolist-lg boolean default=off
115
-**
116
-** If the value of this setting is "1" globally, then the repository-list
117
-** page will show the login-group for each repository. This setting only
118
-** has effect when it is in the global setting database.
119
-*/
120
-
121106
/*
122107
** Generate a web-page that lists all repositories located under the
123108
** g.zRepositoryName directory and return non-zero.
124109
**
125110
** For the special case when g.zRepositoryName is a non-chroot-jail "/",
@@ -150,17 +135,10 @@
150135
assert( g.db==0 );
151136
zShow = P("FOSSIL_REPOLIST_SHOW");
152137
if( zShow ){
153138
bShowDesc = strstr(zShow,"description")!=0;
154139
bShowLg = strstr(zShow,"login-group")!=0;
155
- }else if( db_open_config(1, 1)
156
- && db_table_exists("configdb", "global_config")
157
- ){
158
- bShowDesc = db_int(bShowDesc, "SELECT value FROM global_config"
159
- " WHERE name='show-repolist-desc'");
160
- bShowLg = db_int(bShowLg, "SELECT value FROM global_config"
161
- " WHERE name='show-repolist-lg'");
162140
}
163141
blob_init(&html, 0, 0);
164142
if( fossil_strcmp(g.zRepositoryName,"/")==0 && !g.fJail ){
165143
/* For the special case of the "repository directory" being "/",
166144
** show all of the repositories named in the ~/.fossil database.
@@ -168,10 +146,11 @@
168146
** On unix systems, then entries are of the form "repo:/home/..."
169147
** and on Windows systems they are like on unix, starting with a "/"
170148
** or they can begin with a drive letter: "repo:C:/Users/...". In either
171149
** case, we want returned path to omit any initial "/".
172150
*/
151
+ db_open_config(1, 0);
173152
db_multi_exec(
174153
"CREATE TEMP VIEW sfile AS"
175154
" SELECT ltrim(substr(name,6),'/') AS 'pathname' FROM global_config"
176155
" WHERE name GLOB 'repo:*'"
177156
);
178157
--- src/repolist.c
+++ src/repolist.c
@@ -101,25 +101,10 @@
101 finish_repo_list:
102 g.dbIgnoreErrors--;
103 sqlite3_close(db);
104 }
105
106 /*
107 ** SETTING: show-repolist-desc boolean default=off
108 **
109 ** If the value of this setting is "1" globally, then the repository-list
110 ** page will show the description of each repository. This setting only
111 ** has effect when it is in the global setting database.
112 */
113 /*
114 ** SETTING: show-repolist-lg boolean default=off
115 **
116 ** If the value of this setting is "1" globally, then the repository-list
117 ** page will show the login-group for each repository. This setting only
118 ** has effect when it is in the global setting database.
119 */
120
121 /*
122 ** Generate a web-page that lists all repositories located under the
123 ** g.zRepositoryName directory and return non-zero.
124 **
125 ** For the special case when g.zRepositoryName is a non-chroot-jail "/",
@@ -150,17 +135,10 @@
150 assert( g.db==0 );
151 zShow = P("FOSSIL_REPOLIST_SHOW");
152 if( zShow ){
153 bShowDesc = strstr(zShow,"description")!=0;
154 bShowLg = strstr(zShow,"login-group")!=0;
155 }else if( db_open_config(1, 1)
156 && db_table_exists("configdb", "global_config")
157 ){
158 bShowDesc = db_int(bShowDesc, "SELECT value FROM global_config"
159 " WHERE name='show-repolist-desc'");
160 bShowLg = db_int(bShowLg, "SELECT value FROM global_config"
161 " WHERE name='show-repolist-lg'");
162 }
163 blob_init(&html, 0, 0);
164 if( fossil_strcmp(g.zRepositoryName,"/")==0 && !g.fJail ){
165 /* For the special case of the "repository directory" being "/",
166 ** show all of the repositories named in the ~/.fossil database.
@@ -168,10 +146,11 @@
168 ** On unix systems, then entries are of the form "repo:/home/..."
169 ** and on Windows systems they are like on unix, starting with a "/"
170 ** or they can begin with a drive letter: "repo:C:/Users/...". In either
171 ** case, we want returned path to omit any initial "/".
172 */
 
173 db_multi_exec(
174 "CREATE TEMP VIEW sfile AS"
175 " SELECT ltrim(substr(name,6),'/') AS 'pathname' FROM global_config"
176 " WHERE name GLOB 'repo:*'"
177 );
178
--- src/repolist.c
+++ src/repolist.c
@@ -101,25 +101,10 @@
101 finish_repo_list:
102 g.dbIgnoreErrors--;
103 sqlite3_close(db);
104 }
105
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106 /*
107 ** Generate a web-page that lists all repositories located under the
108 ** g.zRepositoryName directory and return non-zero.
109 **
110 ** For the special case when g.zRepositoryName is a non-chroot-jail "/",
@@ -150,17 +135,10 @@
135 assert( g.db==0 );
136 zShow = P("FOSSIL_REPOLIST_SHOW");
137 if( zShow ){
138 bShowDesc = strstr(zShow,"description")!=0;
139 bShowLg = strstr(zShow,"login-group")!=0;
 
 
 
 
 
 
 
140 }
141 blob_init(&html, 0, 0);
142 if( fossil_strcmp(g.zRepositoryName,"/")==0 && !g.fJail ){
143 /* For the special case of the "repository directory" being "/",
144 ** show all of the repositories named in the ~/.fossil database.
@@ -168,10 +146,11 @@
146 ** On unix systems, then entries are of the form "repo:/home/..."
147 ** and on Windows systems they are like on unix, starting with a "/"
148 ** or they can begin with a drive letter: "repo:C:/Users/...". In either
149 ** case, we want returned path to omit any initial "/".
150 */
151 db_open_config(1, 0);
152 db_multi_exec(
153 "CREATE TEMP VIEW sfile AS"
154 " SELECT ltrim(substr(name,6),'/') AS 'pathname' FROM global_config"
155 " WHERE name GLOB 'repo:*'"
156 );
157
--- test/tester.tcl
+++ test/tester.tcl
@@ -366,12 +366,10 @@
366366
robot-restrict \
367367
robots-txt \
368368
safe-html \
369369
self-pw-reset \
370370
self-register \
371
- show-repolist-desc \
372
- show-repolist-lg \
373371
sitemap-extra \
374372
ssh-command \
375373
ssl-ca-location \
376374
ssl-identity \
377375
tclsh \
378376
--- test/tester.tcl
+++ test/tester.tcl
@@ -366,12 +366,10 @@
366 robot-restrict \
367 robots-txt \
368 safe-html \
369 self-pw-reset \
370 self-register \
371 show-repolist-desc \
372 show-repolist-lg \
373 sitemap-extra \
374 ssh-command \
375 ssl-ca-location \
376 ssl-identity \
377 tclsh \
378
--- test/tester.tcl
+++ test/tester.tcl
@@ -366,12 +366,10 @@
366 robot-restrict \
367 robots-txt \
368 safe-html \
369 self-pw-reset \
370 self-register \
 
 
371 sitemap-extra \
372 ssh-command \
373 ssl-ca-location \
374 ssl-identity \
375 tclsh \
376
+2 -3
--- www/cgi.wiki
+++ www/cgi.wiki
@@ -81,13 +81,12 @@
8181
the page title taken from the <tt>FOSSIL_REPOLIST_TITLE</tt>
8282
environment variable. The variable can be defined in the CGI
8383
control file using the [#setenv|<tt>setenv:</tt>] statement.
8484
8585
The "Project Description" and "Login-Group" columns on the repolist page
86
-are optional. They are hidden by default. Show them by putting value "1"
87
-in the global settings "show-repolist-desc" and "show-repolist-lg", or
88
-by setting the <tt>FOSSIL_REPOLIST_SHOW</tt> environment variable to
86
+are optional. They are hidden by default. Show them by
87
+etting the <tt>FOSSIL_REPOLIST_SHOW</tt> environment variable to
8988
a string that contains substrings "description" and/or "login-group".
9089
9190
The repolist-generated page recurses into subdirectories and will list
9291
all <tt>*.fossil</tt> files found, with the following exceptions:
9392
9493
--- www/cgi.wiki
+++ www/cgi.wiki
@@ -81,13 +81,12 @@
81 the page title taken from the <tt>FOSSIL_REPOLIST_TITLE</tt>
82 environment variable. The variable can be defined in the CGI
83 control file using the [#setenv|<tt>setenv:</tt>] statement.
84
85 The "Project Description" and "Login-Group" columns on the repolist page
86 are optional. They are hidden by default. Show them by putting value "1"
87 in the global settings "show-repolist-desc" and "show-repolist-lg", or
88 by setting the <tt>FOSSIL_REPOLIST_SHOW</tt> environment variable to
89 a string that contains substrings "description" and/or "login-group".
90
91 The repolist-generated page recurses into subdirectories and will list
92 all <tt>*.fossil</tt> files found, with the following exceptions:
93
94
--- www/cgi.wiki
+++ www/cgi.wiki
@@ -81,13 +81,12 @@
81 the page title taken from the <tt>FOSSIL_REPOLIST_TITLE</tt>
82 environment variable. The variable can be defined in the CGI
83 control file using the [#setenv|<tt>setenv:</tt>] statement.
84
85 The "Project Description" and "Login-Group" columns on the repolist page
86 are optional. They are hidden by default. Show them by
87 etting the <tt>FOSSIL_REPOLIST_SHOW</tt> environment variable to
 
88 a string that contains substrings "description" and/or "login-group".
89
90 The repolist-generated page recurses into subdirectories and will list
91 all <tt>*.fossil</tt> files found, with the following exceptions:
92
93

Keyboard Shortcuts

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