Fossil SCM
Add the ymd= query parameter to the /timeline page.
Commit
16ce7ef0c5e8aa9d3c57a887d5452303c0ec816d
Parent
9eb222c1a8a58f1…
1 file changed
+9
-1
+9
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1191,11 +1191,12 @@ | ||
| 1191 | 1191 | ** uf=FUUID Show only check-ins that use given file version |
| 1192 | 1192 | ** brbg Background color from branch name |
| 1193 | 1193 | ** ubg Background color from user |
| 1194 | 1194 | ** namechng Show only check-ins that filename changes |
| 1195 | 1195 | ** forks Show only forks and their children |
| 1196 | -** ym=YYYY-MM Shown only events for the given year/month. | |
| 1196 | +** ym=YYYY-MM Show only events for the given year/month. | |
| 1197 | +** ymd=YYYY-MM-DD Show only events on the given day | |
| 1197 | 1198 | ** datefmt=N Override the date format |
| 1198 | 1199 | ** |
| 1199 | 1200 | ** p= and d= can appear individually or together. If either p= or d= |
| 1200 | 1201 | ** appear, then u=, y=, a=, and b= are ignored. |
| 1201 | 1202 | ** |
| @@ -1222,10 +1223,11 @@ | ||
| 1222 | 1223 | const char *zBrName = P("r"); /* Show events related to this tag */ |
| 1223 | 1224 | const char *zSearch = P("s"); /* Search string */ |
| 1224 | 1225 | const char *zUses = P("uf"); /* Only show check-ins hold this file */ |
| 1225 | 1226 | const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */ |
| 1226 | 1227 | const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ |
| 1228 | + const char *zDay = P("ymd"); /* Check-ins for the day YYYY-MM-DD */ | |
| 1227 | 1229 | int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */ |
| 1228 | 1230 | int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */ |
| 1229 | 1231 | int forkOnly = PB("forks"); /* Show only forks and their children */ |
| 1230 | 1232 | int tagid; /* Tag ID */ |
| 1231 | 1233 | int tmFlags = 0; /* Timeline flags */ |
| @@ -1492,10 +1494,14 @@ | ||
| 1492 | 1494 | } |
| 1493 | 1495 | else if( zYearWeek ){ |
| 1494 | 1496 | blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%W',event.mtime) ", |
| 1495 | 1497 | zYearWeek); |
| 1496 | 1498 | } |
| 1499 | + else if( zDay ){ | |
| 1500 | + blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%m-%%d',event.mtime) ", | |
| 1501 | + zDay); | |
| 1502 | + } | |
| 1497 | 1503 | if( tagid ){ |
| 1498 | 1504 | blob_append_sql(&sql, |
| 1499 | 1505 | " AND (EXISTS(SELECT 1 FROM tagxref" |
| 1500 | 1506 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", tagid); |
| 1501 | 1507 | |
| @@ -1641,10 +1647,12 @@ | ||
| 1641 | 1647 | n = db_int(0, "SELECT count(*) FROM timeline WHERE etype!='div' /*scan*/"); |
| 1642 | 1648 | if( zYearMonth ){ |
| 1643 | 1649 | blob_appendf(&desc, "%s events for %h", zEType, zYearMonth); |
| 1644 | 1650 | }else if( zYearWeek ){ |
| 1645 | 1651 | blob_appendf(&desc, "%s events for year/week %h", zEType, zYearWeek); |
| 1652 | + }else if( zDay ){ | |
| 1653 | + blob_appendf(&desc, "%s events occurring on %h", zEType, zDay); | |
| 1646 | 1654 | }else if( zBefore==0 && zCirca==0 && n>=nEntry && nEntry>0 ){ |
| 1647 | 1655 | blob_appendf(&desc, "%d most recent %ss", n, zEType); |
| 1648 | 1656 | }else{ |
| 1649 | 1657 | blob_appendf(&desc, "%d %ss", n, zEType); |
| 1650 | 1658 | } |
| 1651 | 1659 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1191,11 +1191,12 @@ | |
| 1191 | ** uf=FUUID Show only check-ins that use given file version |
| 1192 | ** brbg Background color from branch name |
| 1193 | ** ubg Background color from user |
| 1194 | ** namechng Show only check-ins that filename changes |
| 1195 | ** forks Show only forks and their children |
| 1196 | ** ym=YYYY-MM Shown only events for the given year/month. |
| 1197 | ** datefmt=N Override the date format |
| 1198 | ** |
| 1199 | ** p= and d= can appear individually or together. If either p= or d= |
| 1200 | ** appear, then u=, y=, a=, and b= are ignored. |
| 1201 | ** |
| @@ -1222,10 +1223,11 @@ | |
| 1222 | const char *zBrName = P("r"); /* Show events related to this tag */ |
| 1223 | const char *zSearch = P("s"); /* Search string */ |
| 1224 | const char *zUses = P("uf"); /* Only show check-ins hold this file */ |
| 1225 | const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */ |
| 1226 | const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ |
| 1227 | int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */ |
| 1228 | int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */ |
| 1229 | int forkOnly = PB("forks"); /* Show only forks and their children */ |
| 1230 | int tagid; /* Tag ID */ |
| 1231 | int tmFlags = 0; /* Timeline flags */ |
| @@ -1492,10 +1494,14 @@ | |
| 1492 | } |
| 1493 | else if( zYearWeek ){ |
| 1494 | blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%W',event.mtime) ", |
| 1495 | zYearWeek); |
| 1496 | } |
| 1497 | if( tagid ){ |
| 1498 | blob_append_sql(&sql, |
| 1499 | " AND (EXISTS(SELECT 1 FROM tagxref" |
| 1500 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", tagid); |
| 1501 | |
| @@ -1641,10 +1647,12 @@ | |
| 1641 | n = db_int(0, "SELECT count(*) FROM timeline WHERE etype!='div' /*scan*/"); |
| 1642 | if( zYearMonth ){ |
| 1643 | blob_appendf(&desc, "%s events for %h", zEType, zYearMonth); |
| 1644 | }else if( zYearWeek ){ |
| 1645 | blob_appendf(&desc, "%s events for year/week %h", zEType, zYearWeek); |
| 1646 | }else if( zBefore==0 && zCirca==0 && n>=nEntry && nEntry>0 ){ |
| 1647 | blob_appendf(&desc, "%d most recent %ss", n, zEType); |
| 1648 | }else{ |
| 1649 | blob_appendf(&desc, "%d %ss", n, zEType); |
| 1650 | } |
| 1651 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1191,11 +1191,12 @@ | |
| 1191 | ** uf=FUUID Show only check-ins that use given file version |
| 1192 | ** brbg Background color from branch name |
| 1193 | ** ubg Background color from user |
| 1194 | ** namechng Show only check-ins that filename changes |
| 1195 | ** forks Show only forks and their children |
| 1196 | ** ym=YYYY-MM Show only events for the given year/month. |
| 1197 | ** ymd=YYYY-MM-DD Show only events on the given day |
| 1198 | ** datefmt=N Override the date format |
| 1199 | ** |
| 1200 | ** p= and d= can appear individually or together. If either p= or d= |
| 1201 | ** appear, then u=, y=, a=, and b= are ignored. |
| 1202 | ** |
| @@ -1222,10 +1223,11 @@ | |
| 1223 | const char *zBrName = P("r"); /* Show events related to this tag */ |
| 1224 | const char *zSearch = P("s"); /* Search string */ |
| 1225 | const char *zUses = P("uf"); /* Only show check-ins hold this file */ |
| 1226 | const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */ |
| 1227 | const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ |
| 1228 | const char *zDay = P("ymd"); /* Check-ins for the day YYYY-MM-DD */ |
| 1229 | int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */ |
| 1230 | int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */ |
| 1231 | int forkOnly = PB("forks"); /* Show only forks and their children */ |
| 1232 | int tagid; /* Tag ID */ |
| 1233 | int tmFlags = 0; /* Timeline flags */ |
| @@ -1492,10 +1494,14 @@ | |
| 1494 | } |
| 1495 | else if( zYearWeek ){ |
| 1496 | blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%W',event.mtime) ", |
| 1497 | zYearWeek); |
| 1498 | } |
| 1499 | else if( zDay ){ |
| 1500 | blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%m-%%d',event.mtime) ", |
| 1501 | zDay); |
| 1502 | } |
| 1503 | if( tagid ){ |
| 1504 | blob_append_sql(&sql, |
| 1505 | " AND (EXISTS(SELECT 1 FROM tagxref" |
| 1506 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", tagid); |
| 1507 | |
| @@ -1641,10 +1647,12 @@ | |
| 1647 | n = db_int(0, "SELECT count(*) FROM timeline WHERE etype!='div' /*scan*/"); |
| 1648 | if( zYearMonth ){ |
| 1649 | blob_appendf(&desc, "%s events for %h", zEType, zYearMonth); |
| 1650 | }else if( zYearWeek ){ |
| 1651 | blob_appendf(&desc, "%s events for year/week %h", zEType, zYearWeek); |
| 1652 | }else if( zDay ){ |
| 1653 | blob_appendf(&desc, "%s events occurring on %h", zEType, zDay); |
| 1654 | }else if( zBefore==0 && zCirca==0 && n>=nEntry && nEntry>0 ){ |
| 1655 | blob_appendf(&desc, "%d most recent %ss", n, zEType); |
| 1656 | }else{ |
| 1657 | blob_appendf(&desc, "%d %ss", n, zEType); |
| 1658 | } |
| 1659 |