Fossil SCM
Add new "allow-clean-x" boolean property, which enables a "fossil clean -x" without a warning.
Commit
69491bb45ed3ffb34bc0ada3e700c539960c7a7d
Parent
3b4a5d27684dff8…
4 files changed
+1
-1
+1
+5
+1
+1
-1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -623,11 +623,11 @@ | ||
| 623 | 623 | } |
| 624 | 624 | if( zCleanFlag==0 ){ |
| 625 | 625 | zCleanFlag = db_get("clean-glob", 0); |
| 626 | 626 | } |
| 627 | 627 | verify_all_options(); |
| 628 | - if( extremeFlag ){ | |
| 628 | + if( extremeFlag && !dryRunFlag && db_get_boolean("allow-clean-x", 0)==0){ | |
| 629 | 629 | Blob extremeAnswer; |
| 630 | 630 | char *extremePrompt = |
| 631 | 631 | "\n\nWARNING: The --extreme option is enabled and all untracked files\n" |
| 632 | 632 | "that would otherwise be left alone will be deleted (i.e. those\n" |
| 633 | 633 | "matching the \"ignore-glob\" setting and the --ignore command line\n" |
| 634 | 634 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -623,11 +623,11 @@ | |
| 623 | } |
| 624 | if( zCleanFlag==0 ){ |
| 625 | zCleanFlag = db_get("clean-glob", 0); |
| 626 | } |
| 627 | verify_all_options(); |
| 628 | if( extremeFlag ){ |
| 629 | Blob extremeAnswer; |
| 630 | char *extremePrompt = |
| 631 | "\n\nWARNING: The --extreme option is enabled and all untracked files\n" |
| 632 | "that would otherwise be left alone will be deleted (i.e. those\n" |
| 633 | "matching the \"ignore-glob\" setting and the --ignore command line\n" |
| 634 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -623,11 +623,11 @@ | |
| 623 | } |
| 624 | if( zCleanFlag==0 ){ |
| 625 | zCleanFlag = db_get("clean-glob", 0); |
| 626 | } |
| 627 | verify_all_options(); |
| 628 | if( extremeFlag && !dryRunFlag && db_get_boolean("allow-clean-x", 0)==0){ |
| 629 | Blob extremeAnswer; |
| 630 | char *extremePrompt = |
| 631 | "\n\nWARNING: The --extreme option is enabled and all untracked files\n" |
| 632 | "that would otherwise be left alone will be deleted (i.e. those\n" |
| 633 | "matching the \"ignore-glob\" setting and the --ignore command line\n" |
| 634 |
+1
| --- src/configure.c | ||
| +++ src/configure.c | ||
| @@ -122,10 +122,11 @@ | ||
| 122 | 122 | { "ignore-glob", CONFIGSET_PROJ }, |
| 123 | 123 | { "keep-glob", CONFIGSET_PROJ }, |
| 124 | 124 | { "crnl-glob", CONFIGSET_PROJ }, |
| 125 | 125 | { "encoding-glob", CONFIGSET_PROJ }, |
| 126 | 126 | { "empty-dirs", CONFIGSET_PROJ }, |
| 127 | + { "allow-clean-x", CONFIGSET_PROJ }, | |
| 127 | 128 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 128 | 129 | |
| 129 | 130 | { "ticket-table", CONFIGSET_TKT }, |
| 130 | 131 | { "ticket-common", CONFIGSET_TKT }, |
| 131 | 132 | { "ticket-change", CONFIGSET_TKT }, |
| 132 | 133 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -122,10 +122,11 @@ | |
| 122 | { "ignore-glob", CONFIGSET_PROJ }, |
| 123 | { "keep-glob", CONFIGSET_PROJ }, |
| 124 | { "crnl-glob", CONFIGSET_PROJ }, |
| 125 | { "encoding-glob", CONFIGSET_PROJ }, |
| 126 | { "empty-dirs", CONFIGSET_PROJ }, |
| 127 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 128 | |
| 129 | { "ticket-table", CONFIGSET_TKT }, |
| 130 | { "ticket-common", CONFIGSET_TKT }, |
| 131 | { "ticket-change", CONFIGSET_TKT }, |
| 132 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -122,10 +122,11 @@ | |
| 122 | { "ignore-glob", CONFIGSET_PROJ }, |
| 123 | { "keep-glob", CONFIGSET_PROJ }, |
| 124 | { "crnl-glob", CONFIGSET_PROJ }, |
| 125 | { "encoding-glob", CONFIGSET_PROJ }, |
| 126 | { "empty-dirs", CONFIGSET_PROJ }, |
| 127 | { "allow-clean-x", CONFIGSET_PROJ }, |
| 128 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 129 | |
| 130 | { "ticket-table", CONFIGSET_TKT }, |
| 131 | { "ticket-common", CONFIGSET_TKT }, |
| 132 | { "ticket-change", CONFIGSET_TKT }, |
| 133 |
M
src/db.c
+5
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -2244,10 +2244,11 @@ | ||
| 2244 | 2244 | }; |
| 2245 | 2245 | #endif /* INTERFACE */ |
| 2246 | 2246 | struct stControlSettings const ctrlSettings[] = { |
| 2247 | 2247 | { "access-log", 0, 0, 0, 0, "off" }, |
| 2248 | 2248 | { "admin-log", 0, 0, 0, 0, "off" }, |
| 2249 | + { "allow-clean-x", 0, 0, 0, 0, "off" }, | |
| 2249 | 2250 | { "allow-symlinks", 0, 0, 1, 0, "off" }, |
| 2250 | 2251 | { "auto-captcha", "autocaptcha", 0, 0, 0, "on" }, |
| 2251 | 2252 | { "auto-hyperlink", 0, 0, 0, 0, "on", }, |
| 2252 | 2253 | { "auto-shun", 0, 0, 0, 0, "on" }, |
| 2253 | 2254 | { "autosync", 0, 0, 0, 0, "on" }, |
| @@ -2333,10 +2334,14 @@ | ||
| 2333 | 2334 | ** allow-symlinks If enabled, don't follow symlinks, and instead treat |
| 2334 | 2335 | ** (versionable) them as symlinks on Unix. Has no effect on Windows |
| 2335 | 2336 | ** (existing links in repository created on Unix become |
| 2336 | 2337 | ** plain-text files with link destination path inside). |
| 2337 | 2338 | ** Default: off |
| 2339 | +** | |
| 2340 | +** allow-clean-x If enabled, allow the --extreme option to be used in | |
| 2341 | +** the clean command. | |
| 2342 | +** Default: off | |
| 2338 | 2343 | ** |
| 2339 | 2344 | ** auto-captcha If enabled, the Login page provides a button to |
| 2340 | 2345 | ** fill in the captcha password. Default: on |
| 2341 | 2346 | ** |
| 2342 | 2347 | ** auto-hyperlink Use javascript to enable hyperlinks on web pages |
| 2343 | 2348 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2244,10 +2244,11 @@ | |
| 2244 | }; |
| 2245 | #endif /* INTERFACE */ |
| 2246 | struct stControlSettings const ctrlSettings[] = { |
| 2247 | { "access-log", 0, 0, 0, 0, "off" }, |
| 2248 | { "admin-log", 0, 0, 0, 0, "off" }, |
| 2249 | { "allow-symlinks", 0, 0, 1, 0, "off" }, |
| 2250 | { "auto-captcha", "autocaptcha", 0, 0, 0, "on" }, |
| 2251 | { "auto-hyperlink", 0, 0, 0, 0, "on", }, |
| 2252 | { "auto-shun", 0, 0, 0, 0, "on" }, |
| 2253 | { "autosync", 0, 0, 0, 0, "on" }, |
| @@ -2333,10 +2334,14 @@ | |
| 2333 | ** allow-symlinks If enabled, don't follow symlinks, and instead treat |
| 2334 | ** (versionable) them as symlinks on Unix. Has no effect on Windows |
| 2335 | ** (existing links in repository created on Unix become |
| 2336 | ** plain-text files with link destination path inside). |
| 2337 | ** Default: off |
| 2338 | ** |
| 2339 | ** auto-captcha If enabled, the Login page provides a button to |
| 2340 | ** fill in the captcha password. Default: on |
| 2341 | ** |
| 2342 | ** auto-hyperlink Use javascript to enable hyperlinks on web pages |
| 2343 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2244,10 +2244,11 @@ | |
| 2244 | }; |
| 2245 | #endif /* INTERFACE */ |
| 2246 | struct stControlSettings const ctrlSettings[] = { |
| 2247 | { "access-log", 0, 0, 0, 0, "off" }, |
| 2248 | { "admin-log", 0, 0, 0, 0, "off" }, |
| 2249 | { "allow-clean-x", 0, 0, 0, 0, "off" }, |
| 2250 | { "allow-symlinks", 0, 0, 1, 0, "off" }, |
| 2251 | { "auto-captcha", "autocaptcha", 0, 0, 0, "on" }, |
| 2252 | { "auto-hyperlink", 0, 0, 0, 0, "on", }, |
| 2253 | { "auto-shun", 0, 0, 0, 0, "on" }, |
| 2254 | { "autosync", 0, 0, 0, 0, "on" }, |
| @@ -2333,10 +2334,14 @@ | |
| 2334 | ** allow-symlinks If enabled, don't follow symlinks, and instead treat |
| 2335 | ** (versionable) them as symlinks on Unix. Has no effect on Windows |
| 2336 | ** (existing links in repository created on Unix become |
| 2337 | ** plain-text files with link destination path inside). |
| 2338 | ** Default: off |
| 2339 | ** |
| 2340 | ** allow-clean-x If enabled, allow the --extreme option to be used in |
| 2341 | ** the clean command. |
| 2342 | ** Default: off |
| 2343 | ** |
| 2344 | ** auto-captcha If enabled, the Login page provides a button to |
| 2345 | ** fill in the captcha password. Default: on |
| 2346 | ** |
| 2347 | ** auto-hyperlink Use javascript to enable hyperlinks on web pages |
| 2348 |
+1
| --- src/json_config.c | ||
| +++ src/json_config.c | ||
| @@ -75,10 +75,11 @@ | ||
| 75 | 75 | { "encoding-glob", CONFIGSET_PROJ }, |
| 76 | 76 | { "ignore-glob", CONFIGSET_PROJ }, |
| 77 | 77 | { "keep-glob", CONFIGSET_PROJ }, |
| 78 | 78 | { "crnl-glob", CONFIGSET_PROJ }, |
| 79 | 79 | { "empty-dirs", CONFIGSET_PROJ }, |
| 80 | +{ "allow-clean-x", CONFIGSET_PROJ }, | |
| 80 | 81 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 81 | 82 | |
| 82 | 83 | { "ticket-table", CONFIGSET_TKT }, |
| 83 | 84 | { "ticket-common", CONFIGSET_TKT }, |
| 84 | 85 | { "ticket-change", CONFIGSET_TKT }, |
| 85 | 86 |
| --- src/json_config.c | |
| +++ src/json_config.c | |
| @@ -75,10 +75,11 @@ | |
| 75 | { "encoding-glob", CONFIGSET_PROJ }, |
| 76 | { "ignore-glob", CONFIGSET_PROJ }, |
| 77 | { "keep-glob", CONFIGSET_PROJ }, |
| 78 | { "crnl-glob", CONFIGSET_PROJ }, |
| 79 | { "empty-dirs", CONFIGSET_PROJ }, |
| 80 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 81 | |
| 82 | { "ticket-table", CONFIGSET_TKT }, |
| 83 | { "ticket-common", CONFIGSET_TKT }, |
| 84 | { "ticket-change", CONFIGSET_TKT }, |
| 85 |
| --- src/json_config.c | |
| +++ src/json_config.c | |
| @@ -75,10 +75,11 @@ | |
| 75 | { "encoding-glob", CONFIGSET_PROJ }, |
| 76 | { "ignore-glob", CONFIGSET_PROJ }, |
| 77 | { "keep-glob", CONFIGSET_PROJ }, |
| 78 | { "crnl-glob", CONFIGSET_PROJ }, |
| 79 | { "empty-dirs", CONFIGSET_PROJ }, |
| 80 | { "allow-clean-x", CONFIGSET_PROJ }, |
| 81 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 82 | |
| 83 | { "ticket-table", CONFIGSET_TKT }, |
| 84 | { "ticket-common", CONFIGSET_TKT }, |
| 85 | { "ticket-change", CONFIGSET_TKT }, |
| 86 |