Fossil SCM

Comment improvements on the "fossil commit" code. Tighten the restrictions on creating delta manifests such that the --delta option will only override the absence of the seen-delta-manifest setting, but no longer overrides the forbid-delta-manifest setting either on the host or on the sync host.

drh 2025-03-18 13:15 trunk
Commit 52a2be128ca2fef170d7b689d12bf9e872df4b6f6442437a1e7a159d86d4ed9c
1 file changed +10 -8
+10 -8
--- src/checkin.c
+++ src/checkin.c
@@ -2668,33 +2668,35 @@
26682668
fossil_exit(1);
26692669
}
26702670
}
26712671
26722672
/* So that older versions of Fossil (that do not understand delta-
2673
- ** manifest) can continue to use this repository, do not create a new
2673
+ ** manifest) can continue to use this repository, and because
2674
+ ** delta manifests are usually a bad idea unless the repository
2675
+ ** as a really large number of files, do not create a new
26742676
** delta-manifest unless this repository already contains one or more
26752677
** delta-manifests, or unless the delta-manifest is explicitly requested
26762678
** by the --delta option.
26772679
**
2678
- ** The forbid-delta-manifests setting prevents new delta manifests.
2680
+ ** The forbid-delta-manifests setting prevents new delta manifests,
2681
+ ** even if the --delta option is used.
26792682
**
26802683
** If the remote repository sent an avoid-delta-manifests pragma on
2681
- ** the autosync above, then also try to avoid deltas, unless the
2684
+ ** the autosync above, then also forbid delta manifests, even if the
26822685
** --delta option is specified. The remote repo will send the
26832686
** avoid-delta-manifests pragma if it has its "forbid-delta-manifests"
2684
- ** setting enabled.
2687
+ ** setting is enabled.
26852688
*/
2686
- if( !db_get_boolean("seen-delta-manifest",0)
2689
+ if( !(forceDelta || db_get_boolean("seen-delta-manifest",0))
26872690
|| db_get_boolean("forbid-delta-manifests",0)
26882691
|| g.bAvoidDeltaManifests
26892692
){
2690
- if( !forceDelta ) forceBaseline = 1;
2693
+ forceBaseline = 1;
26912694
}
2692
-
26932695
26942696
/* Require confirmation to continue with the check-in if there is
2695
- ** clock skew
2697
+ ** clock skew. This helps to prevent timewarps.
26962698
*/
26972699
if( g.clockSkewSeen ){
26982700
if( bIgnoreSkew!=0 ){
26992701
cReply = 'y';
27002702
fossil_warning("Clock skew ignored due to --ignore-clock-skew.");
27012703
--- src/checkin.c
+++ src/checkin.c
@@ -2668,33 +2668,35 @@
2668 fossil_exit(1);
2669 }
2670 }
2671
2672 /* So that older versions of Fossil (that do not understand delta-
2673 ** manifest) can continue to use this repository, do not create a new
 
 
2674 ** delta-manifest unless this repository already contains one or more
2675 ** delta-manifests, or unless the delta-manifest is explicitly requested
2676 ** by the --delta option.
2677 **
2678 ** The forbid-delta-manifests setting prevents new delta manifests.
 
2679 **
2680 ** If the remote repository sent an avoid-delta-manifests pragma on
2681 ** the autosync above, then also try to avoid deltas, unless the
2682 ** --delta option is specified. The remote repo will send the
2683 ** avoid-delta-manifests pragma if it has its "forbid-delta-manifests"
2684 ** setting enabled.
2685 */
2686 if( !db_get_boolean("seen-delta-manifest",0)
2687 || db_get_boolean("forbid-delta-manifests",0)
2688 || g.bAvoidDeltaManifests
2689 ){
2690 if( !forceDelta ) forceBaseline = 1;
2691 }
2692
2693
2694 /* Require confirmation to continue with the check-in if there is
2695 ** clock skew
2696 */
2697 if( g.clockSkewSeen ){
2698 if( bIgnoreSkew!=0 ){
2699 cReply = 'y';
2700 fossil_warning("Clock skew ignored due to --ignore-clock-skew.");
2701
--- src/checkin.c
+++ src/checkin.c
@@ -2668,33 +2668,35 @@
2668 fossil_exit(1);
2669 }
2670 }
2671
2672 /* So that older versions of Fossil (that do not understand delta-
2673 ** manifest) can continue to use this repository, and because
2674 ** delta manifests are usually a bad idea unless the repository
2675 ** as a really large number of files, do not create a new
2676 ** delta-manifest unless this repository already contains one or more
2677 ** delta-manifests, or unless the delta-manifest is explicitly requested
2678 ** by the --delta option.
2679 **
2680 ** The forbid-delta-manifests setting prevents new delta manifests,
2681 ** even if the --delta option is used.
2682 **
2683 ** If the remote repository sent an avoid-delta-manifests pragma on
2684 ** the autosync above, then also forbid delta manifests, even if the
2685 ** --delta option is specified. The remote repo will send the
2686 ** avoid-delta-manifests pragma if it has its "forbid-delta-manifests"
2687 ** setting is enabled.
2688 */
2689 if( !(forceDelta || db_get_boolean("seen-delta-manifest",0))
2690 || db_get_boolean("forbid-delta-manifests",0)
2691 || g.bAvoidDeltaManifests
2692 ){
2693 forceBaseline = 1;
2694 }
 
2695
2696 /* Require confirmation to continue with the check-in if there is
2697 ** clock skew. This helps to prevent timewarps.
2698 */
2699 if( g.clockSkewSeen ){
2700 if( bIgnoreSkew!=0 ){
2701 cReply = 'y';
2702 fossil_warning("Clock skew ignored due to --ignore-clock-skew.");
2703

Keyboard Shortcuts

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