Fossil SCM
Expand the allowed date/time format for the "a=" and "b=" query parameters to the /finfo page, so that it is compatible with /timeline.
Commit
04ef2df613c2126e1eb2091ab061a2fe313d45e4b682eaa65c0326c8f9f513d4
Parent
9bdc9ca40b4f006…
1 file changed
+15
-15
+15
-15
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -277,25 +277,23 @@ | ||
| 277 | 277 | ** |
| 278 | 278 | ** Show the change history for a single file. |
| 279 | 279 | ** |
| 280 | 280 | ** Additional query parameters: |
| 281 | 281 | ** |
| 282 | -** a=DATETIME Only show changes after DATETIME | |
| 283 | -** b=DATETIME Only show changes before DATETIME | |
| 284 | -** m=HASH Mark this particular file version | |
| 285 | -** n=NUM Show the first NUM changes only | |
| 286 | -** brbg Background color by branch name | |
| 287 | -** ubg Background color by user name | |
| 288 | -** ci=HASH Ancestors of a particular check-in | |
| 289 | -** orig=HASH If both ci and orig are supplied, only show those | |
| 282 | +** a=DATETIME Only show changes after DATETIME | |
| 283 | +** b=DATETIME Only show changes before DATETIME | |
| 284 | +** m=HASH Mark this particular file version | |
| 285 | +** n=NUM Show the first NUM changes only | |
| 286 | +** brbg Background color by branch name | |
| 287 | +** ubg Background color by user name | |
| 288 | +** ci=HASH Ancestors of a particular check-in | |
| 289 | +** orig=HASH If both ci and orig are supplied, only show those | |
| 290 | 290 | ** changes on a direct path from orig to ci. |
| 291 | -** showid Show RID values for debugging | |
| 291 | +** showid Show RID values for debugging | |
| 292 | 292 | ** |
| 293 | -** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in | |
| 294 | -** year-month-day form, it may be truncated, and it may also name a | |
| 295 | -** timezone offset from UTC as "-HH:MM" (westward) or "+HH:MM" | |
| 296 | -** (eastward). Either no timezone suffix or "Z" means UTC. | |
| 293 | +** DATETIME may be in any of usual formats, including "now", | |
| 294 | +** "YYYY-MM-DDTHH:MM:SS.SSS", "YYYYMMDDHHMM", and others. | |
| 297 | 295 | */ |
| 298 | 296 | void finfo_page(void){ |
| 299 | 297 | Stmt q; |
| 300 | 298 | const char *zFilename = PD("name",""); |
| 301 | 299 | char zPrevDate[20]; |
| @@ -386,15 +384,17 @@ | ||
| 386 | 384 | " AND event.objid=mlink.mid" |
| 387 | 385 | " AND mlink.fid=blob.rid", |
| 388 | 386 | TAG_BRANCH, fnid |
| 389 | 387 | ); |
| 390 | 388 | if( (zA = P("a"))!=0 ){ |
| 391 | - blob_append_sql(&sql, " AND event.mtime>=julianday('%q')", zA); | |
| 389 | + blob_append_sql(&sql, " AND event.mtime>=%.16g", | |
| 390 | + symbolic_name_to_mtime(zA,0)); | |
| 392 | 391 | url_add_parameter(&url, "a", zA); |
| 393 | 392 | } |
| 394 | 393 | if( (zB = P("b"))!=0 ){ |
| 395 | - blob_append_sql(&sql, " AND event.mtime<=julianday('%q')", zB); | |
| 394 | + blob_append_sql(&sql, " AND event.mtime<=%.16g", | |
| 395 | + symbolic_name_to_mtime(zB,0)); | |
| 396 | 396 | url_add_parameter(&url, "b", zB); |
| 397 | 397 | } |
| 398 | 398 | if( baseCheckin ){ |
| 399 | 399 | blob_append_sql(&sql, |
| 400 | 400 | " AND mlink.mid IN (SELECT rid FROM ancestor)" |
| 401 | 401 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -277,25 +277,23 @@ | |
| 277 | ** |
| 278 | ** Show the change history for a single file. |
| 279 | ** |
| 280 | ** Additional query parameters: |
| 281 | ** |
| 282 | ** a=DATETIME Only show changes after DATETIME |
| 283 | ** b=DATETIME Only show changes before DATETIME |
| 284 | ** m=HASH Mark this particular file version |
| 285 | ** n=NUM Show the first NUM changes only |
| 286 | ** brbg Background color by branch name |
| 287 | ** ubg Background color by user name |
| 288 | ** ci=HASH Ancestors of a particular check-in |
| 289 | ** orig=HASH If both ci and orig are supplied, only show those |
| 290 | ** changes on a direct path from orig to ci. |
| 291 | ** showid Show RID values for debugging |
| 292 | ** |
| 293 | ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in |
| 294 | ** year-month-day form, it may be truncated, and it may also name a |
| 295 | ** timezone offset from UTC as "-HH:MM" (westward) or "+HH:MM" |
| 296 | ** (eastward). Either no timezone suffix or "Z" means UTC. |
| 297 | */ |
| 298 | void finfo_page(void){ |
| 299 | Stmt q; |
| 300 | const char *zFilename = PD("name",""); |
| 301 | char zPrevDate[20]; |
| @@ -386,15 +384,17 @@ | |
| 386 | " AND event.objid=mlink.mid" |
| 387 | " AND mlink.fid=blob.rid", |
| 388 | TAG_BRANCH, fnid |
| 389 | ); |
| 390 | if( (zA = P("a"))!=0 ){ |
| 391 | blob_append_sql(&sql, " AND event.mtime>=julianday('%q')", zA); |
| 392 | url_add_parameter(&url, "a", zA); |
| 393 | } |
| 394 | if( (zB = P("b"))!=0 ){ |
| 395 | blob_append_sql(&sql, " AND event.mtime<=julianday('%q')", zB); |
| 396 | url_add_parameter(&url, "b", zB); |
| 397 | } |
| 398 | if( baseCheckin ){ |
| 399 | blob_append_sql(&sql, |
| 400 | " AND mlink.mid IN (SELECT rid FROM ancestor)" |
| 401 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -277,25 +277,23 @@ | |
| 277 | ** |
| 278 | ** Show the change history for a single file. |
| 279 | ** |
| 280 | ** Additional query parameters: |
| 281 | ** |
| 282 | ** a=DATETIME Only show changes after DATETIME |
| 283 | ** b=DATETIME Only show changes before DATETIME |
| 284 | ** m=HASH Mark this particular file version |
| 285 | ** n=NUM Show the first NUM changes only |
| 286 | ** brbg Background color by branch name |
| 287 | ** ubg Background color by user name |
| 288 | ** ci=HASH Ancestors of a particular check-in |
| 289 | ** orig=HASH If both ci and orig are supplied, only show those |
| 290 | ** changes on a direct path from orig to ci. |
| 291 | ** showid Show RID values for debugging |
| 292 | ** |
| 293 | ** DATETIME may be in any of usual formats, including "now", |
| 294 | ** "YYYY-MM-DDTHH:MM:SS.SSS", "YYYYMMDDHHMM", and others. |
| 295 | */ |
| 296 | void finfo_page(void){ |
| 297 | Stmt q; |
| 298 | const char *zFilename = PD("name",""); |
| 299 | char zPrevDate[20]; |
| @@ -386,15 +384,17 @@ | |
| 384 | " AND event.objid=mlink.mid" |
| 385 | " AND mlink.fid=blob.rid", |
| 386 | TAG_BRANCH, fnid |
| 387 | ); |
| 388 | if( (zA = P("a"))!=0 ){ |
| 389 | blob_append_sql(&sql, " AND event.mtime>=%.16g", |
| 390 | symbolic_name_to_mtime(zA,0)); |
| 391 | url_add_parameter(&url, "a", zA); |
| 392 | } |
| 393 | if( (zB = P("b"))!=0 ){ |
| 394 | blob_append_sql(&sql, " AND event.mtime<=%.16g", |
| 395 | symbolic_name_to_mtime(zB,0)); |
| 396 | url_add_parameter(&url, "b", zB); |
| 397 | } |
| 398 | if( baseCheckin ){ |
| 399 | blob_append_sql(&sql, |
| 400 | " AND mlink.mid IN (SELECT rid FROM ancestor)" |
| 401 |