Fossil SCM

Add the "forbid-delta-manifests" setting.

drh 2020-04-30 15:29 trunk
Commit 44ac944a981686f696a970bd146768ead33b251906593efded489cf38602ed2e
+11 -3
--- src/checkin.c
+++ src/checkin.c
@@ -2090,12 +2090,17 @@
20902090
useHash = find_option("hash",0,0)!=0 || find_option("sha1sum",0,0)!=0;
20912091
noSign = find_option("nosign",0,0)!=0;
20922092
privateFlag = find_option("private",0,0)!=0;
20932093
forceDelta = find_option("delta",0,0)!=0;
20942094
forceBaseline = find_option("baseline",0,0)!=0;
2095
- if( forceDelta && forceBaseline ){
2096
- fossil_fatal("cannot use --delta and --baseline together");
2095
+ if( forceDelta ){
2096
+ if( forceBaseline ){
2097
+ fossil_fatal("cannot use --delta and --baseline together");
2098
+ }
2099
+ if( db_get_boolean("forbid-delta-manifests",0) ){
2100
+ fossil_fatal("delta manifests are prohibited in this repository");
2101
+ }
20972102
}
20982103
dryRunFlag = find_option("dry-run","n",0)!=0;
20992104
if( !dryRunFlag ){
21002105
dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
21012106
}
@@ -2174,11 +2179,14 @@
21742179
** manifest) can continue to use this repository, do not create a new
21752180
** delta-manifest unless this repository already contains one or more
21762181
** delta-manifests, or unless the delta-manifest is explicitly requested
21772182
** by the --delta option.
21782183
*/
2179
- if( !forceDelta && !db_get_boolean("seen-delta-manifest",0) ){
2184
+ if( !forceDelta
2185
+ && !db_get_boolean("seen-delta-manifest",0)
2186
+ && !db_get_boolean("forbid-delta-manifests",0)
2187
+ ){
21802188
forceBaseline = 1;
21812189
}
21822190
21832191
/*
21842192
** Autosync if autosync is enabled and this is not a private check-in.
21852193
--- src/checkin.c
+++ src/checkin.c
@@ -2090,12 +2090,17 @@
2090 useHash = find_option("hash",0,0)!=0 || find_option("sha1sum",0,0)!=0;
2091 noSign = find_option("nosign",0,0)!=0;
2092 privateFlag = find_option("private",0,0)!=0;
2093 forceDelta = find_option("delta",0,0)!=0;
2094 forceBaseline = find_option("baseline",0,0)!=0;
2095 if( forceDelta && forceBaseline ){
2096 fossil_fatal("cannot use --delta and --baseline together");
 
 
 
 
 
2097 }
2098 dryRunFlag = find_option("dry-run","n",0)!=0;
2099 if( !dryRunFlag ){
2100 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
2101 }
@@ -2174,11 +2179,14 @@
2174 ** manifest) can continue to use this repository, do not create a new
2175 ** delta-manifest unless this repository already contains one or more
2176 ** delta-manifests, or unless the delta-manifest is explicitly requested
2177 ** by the --delta option.
2178 */
2179 if( !forceDelta && !db_get_boolean("seen-delta-manifest",0) ){
 
 
 
2180 forceBaseline = 1;
2181 }
2182
2183 /*
2184 ** Autosync if autosync is enabled and this is not a private check-in.
2185
--- src/checkin.c
+++ src/checkin.c
@@ -2090,12 +2090,17 @@
2090 useHash = find_option("hash",0,0)!=0 || find_option("sha1sum",0,0)!=0;
2091 noSign = find_option("nosign",0,0)!=0;
2092 privateFlag = find_option("private",0,0)!=0;
2093 forceDelta = find_option("delta",0,0)!=0;
2094 forceBaseline = find_option("baseline",0,0)!=0;
2095 if( forceDelta ){
2096 if( forceBaseline ){
2097 fossil_fatal("cannot use --delta and --baseline together");
2098 }
2099 if( db_get_boolean("forbid-delta-manifests",0) ){
2100 fossil_fatal("delta manifests are prohibited in this repository");
2101 }
2102 }
2103 dryRunFlag = find_option("dry-run","n",0)!=0;
2104 if( !dryRunFlag ){
2105 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
2106 }
@@ -2174,11 +2179,14 @@
2179 ** manifest) can continue to use this repository, do not create a new
2180 ** delta-manifest unless this repository already contains one or more
2181 ** delta-manifests, or unless the delta-manifest is explicitly requested
2182 ** by the --delta option.
2183 */
2184 if( !forceDelta
2185 && !db_get_boolean("seen-delta-manifest",0)
2186 && !db_get_boolean("forbid-delta-manifests",0)
2187 ){
2188 forceBaseline = 1;
2189 }
2190
2191 /*
2192 ** Autosync if autosync is enabled and this is not a private check-in.
2193
--- src/configure.c
+++ src/configure.c
@@ -147,10 +147,11 @@
147147
{ "parent-project-code", CONFIGSET_PROJ },
148148
{ "parent-project-name", CONFIGSET_PROJ },
149149
{ "hash-policy", CONFIGSET_PROJ },
150150
{ "comment-format", CONFIGSET_PROJ },
151151
{ "mimetypes", CONFIGSET_PROJ },
152
+ { "forbid-delta-manifests", CONFIGSET_PROJ },
152153
153154
#ifdef FOSSIL_ENABLE_LEGACY_MV_RM
154155
{ "mv-rm-files", CONFIGSET_PROJ },
155156
#endif
156157
157158
--- src/configure.c
+++ src/configure.c
@@ -147,10 +147,11 @@
147 { "parent-project-code", CONFIGSET_PROJ },
148 { "parent-project-name", CONFIGSET_PROJ },
149 { "hash-policy", CONFIGSET_PROJ },
150 { "comment-format", CONFIGSET_PROJ },
151 { "mimetypes", CONFIGSET_PROJ },
 
152
153 #ifdef FOSSIL_ENABLE_LEGACY_MV_RM
154 { "mv-rm-files", CONFIGSET_PROJ },
155 #endif
156
157
--- src/configure.c
+++ src/configure.c
@@ -147,10 +147,11 @@
147 { "parent-project-code", CONFIGSET_PROJ },
148 { "parent-project-name", CONFIGSET_PROJ },
149 { "hash-policy", CONFIGSET_PROJ },
150 { "comment-format", CONFIGSET_PROJ },
151 { "mimetypes", CONFIGSET_PROJ },
152 { "forbid-delta-manifests", CONFIGSET_PROJ },
153
154 #ifdef FOSSIL_ENABLE_LEGACY_MV_RM
155 { "mv-rm-files", CONFIGSET_PROJ },
156 #endif
157
158
+4
--- src/db.c
+++ src/db.c
@@ -3556,10 +3556,14 @@
35563556
/*
35573557
** SETTING: pgp-command width=40
35583558
** Command used to clear-sign manifests at check-in.
35593559
** Default value is "gpg --clearsign -o"
35603560
*/
3561
+/*
3562
+** SETTING: forbid-delta-manifests boolean default=off
3563
+** If enabled, new delta manifests are prohibited.
3564
+*/
35613565
/*
35623566
** SETTING: proxy width=32 default=off
35633567
** URL of the HTTP proxy. If undefined or "off" then
35643568
** the "http_proxy" environment variable is consulted.
35653569
** If the http_proxy environment variable is undefined
35663570
--- src/db.c
+++ src/db.c
@@ -3556,10 +3556,14 @@
3556 /*
3557 ** SETTING: pgp-command width=40
3558 ** Command used to clear-sign manifests at check-in.
3559 ** Default value is "gpg --clearsign -o"
3560 */
 
 
 
 
3561 /*
3562 ** SETTING: proxy width=32 default=off
3563 ** URL of the HTTP proxy. If undefined or "off" then
3564 ** the "http_proxy" environment variable is consulted.
3565 ** If the http_proxy environment variable is undefined
3566
--- src/db.c
+++ src/db.c
@@ -3556,10 +3556,14 @@
3556 /*
3557 ** SETTING: pgp-command width=40
3558 ** Command used to clear-sign manifests at check-in.
3559 ** Default value is "gpg --clearsign -o"
3560 */
3561 /*
3562 ** SETTING: forbid-delta-manifests boolean default=off
3563 ** If enabled, new delta manifests are prohibited.
3564 */
3565 /*
3566 ** SETTING: proxy width=32 default=off
3567 ** URL of the HTTP proxy. If undefined or "off" then
3568 ** the "http_proxy" environment variable is consulted.
3569 ** If the http_proxy environment variable is undefined
3570

Keyboard Shortcuts

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