Fossil SCM

Enable client to control how much time skew is allowed before warning. This can be useful if one is not in control of the time on the remote server.

andybradford 2019-10-01 07:09 mistake
Commit 526b0c29979ce4fe898b9a60a10669481450c686366f083aa29bffcab06a3b13
2 files changed +6 +2 -2
+6
--- src/db.c
+++ src/db.c
@@ -3586,10 +3586,16 @@
35863586
** SETTING: th1-uri-regexp width=40 block-text
35873587
** Specify which URI's are allowed in HTTP requests from
35883588
** TH1 scripts. If empty, no HTTP requests are allowed
35893589
** whatsoever.
35903590
*/
3591
+/*
3592
+** SETTING: time-skew-tolerance width=25 default=10
3593
+** The number of seconds of skew against server time that
3594
+** the client will tolerate before issuing a warning.
3595
+** The default is 10 seconds.
3596
+*/
35913597
/*
35923598
** SETTING: uv-sync boolean default=off
35933599
** If true, automatically send unversioned files as part
35943600
** of a "fossil clone" or "fossil sync" command. The
35953601
** default is false, in which case the -u option is
35963602
--- src/db.c
+++ src/db.c
@@ -3586,10 +3586,16 @@
3586 ** SETTING: th1-uri-regexp width=40 block-text
3587 ** Specify which URI's are allowed in HTTP requests from
3588 ** TH1 scripts. If empty, no HTTP requests are allowed
3589 ** whatsoever.
3590 */
 
 
 
 
 
 
3591 /*
3592 ** SETTING: uv-sync boolean default=off
3593 ** If true, automatically send unversioned files as part
3594 ** of a "fossil clone" or "fossil sync" command. The
3595 ** default is false, in which case the -u option is
3596
--- src/db.c
+++ src/db.c
@@ -3586,10 +3586,16 @@
3586 ** SETTING: th1-uri-regexp width=40 block-text
3587 ** Specify which URI's are allowed in HTTP requests from
3588 ** TH1 scripts. If empty, no HTTP requests are allowed
3589 ** whatsoever.
3590 */
3591 /*
3592 ** SETTING: time-skew-tolerance width=25 default=10
3593 ** The number of seconds of skew against server time that
3594 ** the client will tolerate before issuing a warning.
3595 ** The default is 10 seconds.
3596 */
3597 /*
3598 ** SETTING: uv-sync boolean default=off
3599 ** If true, automatically send unversioned files as part
3600 ** of a "fossil clone" or "fossil sync" command. The
3601 ** default is false, in which case the -u option is
3602
+2 -2
--- src/xfer.c
+++ src/xfer.c
@@ -2508,15 +2508,15 @@
25082508
content_enable_dephantomize(1);
25092509
}
25102510
db_end_transaction(0);
25112511
};
25122512
transport_stats(&nSent, &nRcvd, 1);
2513
- if( (rSkew*24.0*3600.0) > 10.0 ){
2513
+ if( (rSkew*24.0*3600.0) > 1.0*db_get_int("time-skew-tolerance", 10) ){
25142514
fossil_warning("*** time skew *** server is fast by %s",
25152515
db_timespan_name(rSkew));
25162516
g.clockSkewSeen = 1;
2517
- }else if( rSkew*24.0*3600.0 < -10.0 ){
2517
+ }else if( rSkew*24.0*3600.0 < -1.0*db_get_int("time-skew-tolerance", 10) ){
25182518
fossil_warning("*** time skew *** server is slow by %s",
25192519
db_timespan_name(-rSkew));
25202520
g.clockSkewSeen = 1;
25212521
}
25222522
25232523
--- src/xfer.c
+++ src/xfer.c
@@ -2508,15 +2508,15 @@
2508 content_enable_dephantomize(1);
2509 }
2510 db_end_transaction(0);
2511 };
2512 transport_stats(&nSent, &nRcvd, 1);
2513 if( (rSkew*24.0*3600.0) > 10.0 ){
2514 fossil_warning("*** time skew *** server is fast by %s",
2515 db_timespan_name(rSkew));
2516 g.clockSkewSeen = 1;
2517 }else if( rSkew*24.0*3600.0 < -10.0 ){
2518 fossil_warning("*** time skew *** server is slow by %s",
2519 db_timespan_name(-rSkew));
2520 g.clockSkewSeen = 1;
2521 }
2522
2523
--- src/xfer.c
+++ src/xfer.c
@@ -2508,15 +2508,15 @@
2508 content_enable_dephantomize(1);
2509 }
2510 db_end_transaction(0);
2511 };
2512 transport_stats(&nSent, &nRcvd, 1);
2513 if( (rSkew*24.0*3600.0) > 1.0*db_get_int("time-skew-tolerance", 10) ){
2514 fossil_warning("*** time skew *** server is fast by %s",
2515 db_timespan_name(rSkew));
2516 g.clockSkewSeen = 1;
2517 }else if( rSkew*24.0*3600.0 < -1.0*db_get_int("time-skew-tolerance", 10) ){
2518 fossil_warning("*** time skew *** server is slow by %s",
2519 db_timespan_name(-rSkew));
2520 g.clockSkewSeen = 1;
2521 }
2522
2523

Keyboard Shortcuts

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