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.
Commit
62b4df4ea445656befa5c29742b18768fa657af1
Parent
879a030e1cea356…
1 file changed
+2
+2
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -442,10 +442,11 @@ | ||
| 442 | 442 | static void checkin_verify_younger( |
| 443 | 443 | int rid, /* The record ID of the ancestor */ |
| 444 | 444 | const char *zUuid, /* The artifact ID of the ancestor */ |
| 445 | 445 | const char *zDate /* Date & time of the current check-in */ |
| 446 | 446 | ){ |
| 447 | +#ifndef FOSSIL_ALLOW_OUT_OF_ORDER_DATES | |
| 447 | 448 | int b; |
| 448 | 449 | b = db_exists( |
| 449 | 450 | "SELECT 1 FROM event" |
| 450 | 451 | " WHERE datetime(mtime)>=%Q" |
| 451 | 452 | " AND type='ci' AND objid=%d", |
| @@ -453,10 +454,11 @@ | ||
| 453 | 454 | ); |
| 454 | 455 | if( b ){ |
| 455 | 456 | fossil_fatal("ancestor check-in [%.10s] (%s) is younger (clock skew?)", |
| 456 | 457 | zUuid, zDate); |
| 457 | 458 | } |
| 459 | +#endif | |
| 458 | 460 | } |
| 459 | 461 | |
| 460 | 462 | /* |
| 461 | 463 | ** COMMAND: ci |
| 462 | 464 | ** COMMAND: commit |
| 463 | 465 |
| --- 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 |