| | @@ -186,10 +186,122 @@ |
| 186 | 186 | close $out |
| 187 | 187 | } |
| 188 | 188 | proc write_file_indented {filename txt} { |
| 189 | 189 | write_file $filename [string trim [string map [list "\n " \n] $txt]]\n |
| 190 | 190 | } |
| 191 | + |
| 192 | +# Returns the list of all supported versionable settings. |
| 193 | +# |
| 194 | +proc get_versionable_settings {} { |
| 195 | + # |
| 196 | + # TODO: If the list of supported versionable settings in "db.c" is modified, |
| 197 | + # this list (and procedure) most likely needs to be modified as well. |
| 198 | + # |
| 199 | + set result [list \ |
| 200 | + allow-symlinks \ |
| 201 | + binary-glob \ |
| 202 | + clean-glob \ |
| 203 | + crnl-glob \ |
| 204 | + dotfiles \ |
| 205 | + empty-dirs \ |
| 206 | + encoding-glob \ |
| 207 | + ignore-glob \ |
| 208 | + keep-glob \ |
| 209 | + manifest \ |
| 210 | + th1-setup \ |
| 211 | + th1-uri-regexp] |
| 212 | + |
| 213 | + fossil test-th-eval "hasfeature tcl" |
| 214 | + |
| 215 | + if {$::RESULT eq "1"} { |
| 216 | + lappend result tcl-setup |
| 217 | + } |
| 218 | + |
| 219 | + return $result |
| 220 | +} |
| 221 | + |
| 222 | +# Returns the list of all supported settings. |
| 223 | +# |
| 224 | +proc get_all_settings {} { |
| 225 | + # |
| 226 | + # TODO: If the list of supported settings in "db.c" is modified, this list |
| 227 | + # (and procedure) most likely needs to be modified as well. |
| 228 | + # |
| 229 | + set result [list \ |
| 230 | + access-log \ |
| 231 | + admin-log \ |
| 232 | + allow-symlinks \ |
| 233 | + auto-captcha \ |
| 234 | + auto-hyperlink \ |
| 235 | + auto-shun \ |
| 236 | + autosync \ |
| 237 | + autosync-tries \ |
| 238 | + binary-glob \ |
| 239 | + case-sensitive \ |
| 240 | + clean-glob \ |
| 241 | + clearsign \ |
| 242 | + crnl-glob \ |
| 243 | + default-perms \ |
| 244 | + diff-binary \ |
| 245 | + diff-command \ |
| 246 | + dont-push \ |
| 247 | + dotfiles \ |
| 248 | + editor \ |
| 249 | + empty-dirs \ |
| 250 | + encoding-glob \ |
| 251 | + exec-rel-paths \ |
| 252 | + gdiff-command \ |
| 253 | + gmerge-command \ |
| 254 | + hash-digits \ |
| 255 | + http-port \ |
| 256 | + https-login \ |
| 257 | + ignore-glob \ |
| 258 | + keep-glob \ |
| 259 | + localauth \ |
| 260 | + main-branch \ |
| 261 | + manifest \ |
| 262 | + max-loadavg \ |
| 263 | + max-upload \ |
| 264 | + mtime-changes \ |
| 265 | + pgp-command \ |
| 266 | + proxy \ |
| 267 | + relative-paths \ |
| 268 | + repo-cksum \ |
| 269 | + self-register \ |
| 270 | + ssh-command \ |
| 271 | + ssl-ca-location \ |
| 272 | + ssl-identity \ |
| 273 | + th1-setup \ |
| 274 | + th1-uri-regexp \ |
| 275 | + web-browser] |
| 276 | + |
| 277 | + fossil test-th-eval "hasfeature legacyMvRm" |
| 278 | + |
| 279 | + if {$::RESULT eq "1"} { |
| 280 | + lappend result mv-rm-files |
| 281 | + } |
| 282 | + |
| 283 | + fossil test-th-eval "hasfeature tcl" |
| 284 | + |
| 285 | + if {$::RESULT eq "1"} { |
| 286 | + lappend result tcl tcl-setup |
| 287 | + } |
| 288 | + |
| 289 | + fossil test-th-eval "hasfeature th1Docs" |
| 290 | + |
| 291 | + if {$::RESULT eq "1"} { |
| 292 | + lappend result th1-docs |
| 293 | + } |
| 294 | + |
| 295 | + fossil test-th-eval "hasfeature th1Hooks" |
| 296 | + |
| 297 | + if {$::RESULT eq "1"} { |
| 298 | + lappend result th1-hooks |
| 299 | + } |
| 300 | + |
| 301 | + return [lsort -dictionary $result] |
| 302 | +} |
| 191 | 303 | |
| 192 | 304 | # Return true if two files are the same |
| 193 | 305 | # |
| 194 | 306 | proc same_file {a b} { |
| 195 | 307 | set x [read_file $a] |
| | @@ -655,10 +767,15 @@ |
| 655 | 767 | |
| 656 | 768 | # fixup the whitespace in the result to make it easier to compare. |
| 657 | 769 | proc normalize_result {} { |
| 658 | 770 | return [string map [list \r\n \n] [string trim $::RESULT]] |
| 659 | 771 | } |
| 772 | + |
| 773 | +# fixup the line-endings in the result to make it easier to compare. |
| 774 | +proc normalize_result_no_trim {} { |
| 775 | + return [string map [list \r\n \n] $::RESULT] |
| 776 | +} |
| 660 | 777 | |
| 661 | 778 | # returns the first line of the normalized result. |
| 662 | 779 | proc first_data_line {} { |
| 663 | 780 | return [lindex [split [normalize_result] \n] 0] |
| 664 | 781 | } |
| 665 | 782 | |