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.
Commit
52a2be128ca2fef170d7b689d12bf9e872df4b6f6442437a1e7a159d86d4ed9c
Parent
1ec8deef8a77050…
1 file changed
+10
-8
+10
-8
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -2668,33 +2668,35 @@ | ||
| 2668 | 2668 | fossil_exit(1); |
| 2669 | 2669 | } |
| 2670 | 2670 | } |
| 2671 | 2671 | |
| 2672 | 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 | |
| 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 | |
| 2674 | 2676 | ** delta-manifest unless this repository already contains one or more |
| 2675 | 2677 | ** delta-manifests, or unless the delta-manifest is explicitly requested |
| 2676 | 2678 | ** by the --delta option. |
| 2677 | 2679 | ** |
| 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. | |
| 2679 | 2682 | ** |
| 2680 | 2683 | ** 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 | |
| 2682 | 2685 | ** --delta option is specified. The remote repo will send the |
| 2683 | 2686 | ** avoid-delta-manifests pragma if it has its "forbid-delta-manifests" |
| 2684 | - ** setting enabled. | |
| 2687 | + ** setting is enabled. | |
| 2685 | 2688 | */ |
| 2686 | - if( !db_get_boolean("seen-delta-manifest",0) | |
| 2689 | + if( !(forceDelta || db_get_boolean("seen-delta-manifest",0)) | |
| 2687 | 2690 | || db_get_boolean("forbid-delta-manifests",0) |
| 2688 | 2691 | || g.bAvoidDeltaManifests |
| 2689 | 2692 | ){ |
| 2690 | - if( !forceDelta ) forceBaseline = 1; | |
| 2693 | + forceBaseline = 1; | |
| 2691 | 2694 | } |
| 2692 | - | |
| 2693 | 2695 | |
| 2694 | 2696 | /* Require confirmation to continue with the check-in if there is |
| 2695 | - ** clock skew | |
| 2697 | + ** clock skew. This helps to prevent timewarps. | |
| 2696 | 2698 | */ |
| 2697 | 2699 | if( g.clockSkewSeen ){ |
| 2698 | 2700 | if( bIgnoreSkew!=0 ){ |
| 2699 | 2701 | cReply = 'y'; |
| 2700 | 2702 | fossil_warning("Clock skew ignored due to --ignore-clock-skew."); |
| 2701 | 2703 |
| --- 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 |