Fossil SCM

Add the FOSSIL_ALLOW_OUT_OF_ORDER_DATES compile-time option to disable the check that forces new check-ins to be younger than their parents.

drh 2010-03-04 23:51 UTC trunk
Commit 62b4df4ea445656befa5c29742b18768fa657af1
1 file changed +2
--- src/checkin.c
+++ src/checkin.c
@@ -442,10 +442,11 @@
442442
static void checkin_verify_younger(
443443
int rid, /* The record ID of the ancestor */
444444
const char *zUuid, /* The artifact ID of the ancestor */
445445
const char *zDate /* Date & time of the current check-in */
446446
){
447
+#ifndef FOSSIL_ALLOW_OUT_OF_ORDER_DATES
447448
int b;
448449
b = db_exists(
449450
"SELECT 1 FROM event"
450451
" WHERE datetime(mtime)>=%Q"
451452
" AND type='ci' AND objid=%d",
@@ -453,10 +454,11 @@
453454
);
454455
if( b ){
455456
fossil_fatal("ancestor check-in [%.10s] (%s) is younger (clock skew?)",
456457
zUuid, zDate);
457458
}
459
+#endif
458460
}
459461
460462
/*
461463
** COMMAND: ci
462464
** COMMAND: commit
463465
--- src/checkin.c
+++ src/checkin.c
@@ -442,10 +442,11 @@
442 static void checkin_verify_younger(
443 int rid, /* The record ID of the ancestor */
444 const char *zUuid, /* The artifact ID of the ancestor */
445 const char *zDate /* Date & time of the current check-in */
446 ){
 
447 int b;
448 b = db_exists(
449 "SELECT 1 FROM event"
450 " WHERE datetime(mtime)>=%Q"
451 " AND type='ci' AND objid=%d",
@@ -453,10 +454,11 @@
453 );
454 if( b ){
455 fossil_fatal("ancestor check-in [%.10s] (%s) is younger (clock skew?)",
456 zUuid, zDate);
457 }
 
458 }
459
460 /*
461 ** COMMAND: ci
462 ** COMMAND: commit
463
--- src/checkin.c
+++ src/checkin.c
@@ -442,10 +442,11 @@
442 static void checkin_verify_younger(
443 int rid, /* The record ID of the ancestor */
444 const char *zUuid, /* The artifact ID of the ancestor */
445 const char *zDate /* Date & time of the current check-in */
446 ){
447 #ifndef FOSSIL_ALLOW_OUT_OF_ORDER_DATES
448 int b;
449 b = db_exists(
450 "SELECT 1 FROM event"
451 " WHERE datetime(mtime)>=%Q"
452 " AND type='ci' AND objid=%d",
@@ -453,10 +454,11 @@
454 );
455 if( b ){
456 fossil_fatal("ancestor check-in [%.10s] (%s) is younger (clock skew?)",
457 zUuid, zDate);
458 }
459 #endif
460 }
461
462 /*
463 ** COMMAND: ci
464 ** COMMAND: commit
465

Keyboard Shortcuts

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