Fossil SCM

Add new "allow-clean-x" boolean property, which enables a "fossil clean -x" without a warning.

jan.nijtmans 2014-12-05 12:42 cleanX
Commit 69491bb45ed3ffb34bc0ada3e700c539960c7a7d
+1 -1
--- src/checkin.c
+++ src/checkin.c
@@ -623,11 +623,11 @@
623623
}
624624
if( zCleanFlag==0 ){
625625
zCleanFlag = db_get("clean-glob", 0);
626626
}
627627
verify_all_options();
628
- if( extremeFlag ){
628
+ if( extremeFlag && !dryRunFlag && db_get_boolean("allow-clean-x", 0)==0){
629629
Blob extremeAnswer;
630630
char *extremePrompt =
631631
"\n\nWARNING: The --extreme option is enabled and all untracked files\n"
632632
"that would otherwise be left alone will be deleted (i.e. those\n"
633633
"matching the \"ignore-glob\" setting and the --ignore command line\n"
634634
--- 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
--- src/configure.c
+++ src/configure.c
@@ -122,10 +122,11 @@
122122
{ "ignore-glob", CONFIGSET_PROJ },
123123
{ "keep-glob", CONFIGSET_PROJ },
124124
{ "crnl-glob", CONFIGSET_PROJ },
125125
{ "encoding-glob", CONFIGSET_PROJ },
126126
{ "empty-dirs", CONFIGSET_PROJ },
127
+ { "allow-clean-x", CONFIGSET_PROJ },
127128
{ "allow-symlinks", CONFIGSET_PROJ },
128129
129130
{ "ticket-table", CONFIGSET_TKT },
130131
{ "ticket-common", CONFIGSET_TKT },
131132
{ "ticket-change", CONFIGSET_TKT },
132133
--- 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
+5
--- src/db.c
+++ src/db.c
@@ -2244,10 +2244,11 @@
22442244
};
22452245
#endif /* INTERFACE */
22462246
struct stControlSettings const ctrlSettings[] = {
22472247
{ "access-log", 0, 0, 0, 0, "off" },
22482248
{ "admin-log", 0, 0, 0, 0, "off" },
2249
+ { "allow-clean-x", 0, 0, 0, 0, "off" },
22492250
{ "allow-symlinks", 0, 0, 1, 0, "off" },
22502251
{ "auto-captcha", "autocaptcha", 0, 0, 0, "on" },
22512252
{ "auto-hyperlink", 0, 0, 0, 0, "on", },
22522253
{ "auto-shun", 0, 0, 0, 0, "on" },
22532254
{ "autosync", 0, 0, 0, 0, "on" },
@@ -2333,10 +2334,14 @@
23332334
** allow-symlinks If enabled, don't follow symlinks, and instead treat
23342335
** (versionable) them as symlinks on Unix. Has no effect on Windows
23352336
** (existing links in repository created on Unix become
23362337
** plain-text files with link destination path inside).
23372338
** Default: off
2339
+**
2340
+** allow-clean-x If enabled, allow the --extreme option to be used in
2341
+** the clean command.
2342
+** Default: off
23382343
**
23392344
** auto-captcha If enabled, the Login page provides a button to
23402345
** fill in the captcha password. Default: on
23412346
**
23422347
** auto-hyperlink Use javascript to enable hyperlinks on web pages
23432348
--- 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
--- src/json_config.c
+++ src/json_config.c
@@ -75,10 +75,11 @@
7575
{ "encoding-glob", CONFIGSET_PROJ },
7676
{ "ignore-glob", CONFIGSET_PROJ },
7777
{ "keep-glob", CONFIGSET_PROJ },
7878
{ "crnl-glob", CONFIGSET_PROJ },
7979
{ "empty-dirs", CONFIGSET_PROJ },
80
+{ "allow-clean-x", CONFIGSET_PROJ },
8081
{ "allow-symlinks", CONFIGSET_PROJ },
8182
8283
{ "ticket-table", CONFIGSET_TKT },
8384
{ "ticket-common", CONFIGSET_TKT },
8485
{ "ticket-change", CONFIGSET_TKT },
8586
--- 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

Keyboard Shortcuts

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