Fossil SCM
Added ym=YYYY-MM parameter for the /timeline page to restrict the list to the given year and month. This is in preparation for a 'repo activity summary' view/report which includes links back to specific years/months.
Commit
c5ea75133aa6f26928146b9645a71db3db91842b
Parent
63443f920b06653…
1 file changed
+6
+6
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1006,10 +1006,11 @@ | ||
| 1006 | 1006 | ** nomerge ... avoid merge links on the path |
| 1007 | 1007 | ** uf=FUUID Show only checkins that use given file version |
| 1008 | 1008 | ** brbg Background color from branch name |
| 1009 | 1009 | ** ubg Background color from user |
| 1010 | 1010 | ** namechng Show only checkins that filename changes |
| 1011 | +** ym=YYYY-MM Shown only events for the given year/month. | |
| 1011 | 1012 | ** |
| 1012 | 1013 | ** p= and d= can appear individually or together. If either p= or d= |
| 1013 | 1014 | ** appear, then u=, y=, a=, and b= are ignored. |
| 1014 | 1015 | ** |
| 1015 | 1016 | ** If a= and b= appear, only a= is used. If neither appear, the most |
| @@ -1032,10 +1033,11 @@ | ||
| 1032 | 1033 | const char *zCirca = P("c"); /* Events near this time */ |
| 1033 | 1034 | const char *zTagName = P("t"); /* Show events with this tag */ |
| 1034 | 1035 | const char *zBrName = P("r"); /* Show events related to this tag */ |
| 1035 | 1036 | const char *zSearch = P("s"); /* Search string */ |
| 1036 | 1037 | const char *zUses = P("uf"); /* Only show checkins hold this file */ |
| 1038 | + const char *zYearMonth = P("ym"); /* Show checkins for the given YYYY-MM */ | |
| 1037 | 1039 | int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */ |
| 1038 | 1040 | int renameOnly = P("namechng")!=0; /* Show only checkins that rename files */ |
| 1039 | 1041 | int tagid; /* Tag ID */ |
| 1040 | 1042 | int tmFlags; /* Timeline flags */ |
| 1041 | 1043 | const char *zThisTag = 0; /* Suppress links to this tag */ |
| @@ -1214,10 +1216,14 @@ | ||
| 1214 | 1216 | blob_appendf(&sql, " AND event.objid IN usesfile "); |
| 1215 | 1217 | } |
| 1216 | 1218 | if( renameOnly ){ |
| 1217 | 1219 | blob_appendf(&sql, " AND event.objid IN rnfile "); |
| 1218 | 1220 | } |
| 1221 | + if( zYearMonth ){ | |
| 1222 | + blob_appendf(&sql, " AND %Q=strftime('%%Y-%%m',event.mtime) ", | |
| 1223 | + zYearMonth); | |
| 1224 | + } | |
| 1219 | 1225 | if( tagid>0 ){ |
| 1220 | 1226 | blob_appendf(&sql, |
| 1221 | 1227 | "AND (EXISTS(SELECT 1 FROM tagxref" |
| 1222 | 1228 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)", tagid); |
| 1223 | 1229 | |
| 1224 | 1230 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1006,10 +1006,11 @@ | |
| 1006 | ** nomerge ... avoid merge links on the path |
| 1007 | ** uf=FUUID Show only checkins that use given file version |
| 1008 | ** brbg Background color from branch name |
| 1009 | ** ubg Background color from user |
| 1010 | ** namechng Show only checkins that filename changes |
| 1011 | ** |
| 1012 | ** p= and d= can appear individually or together. If either p= or d= |
| 1013 | ** appear, then u=, y=, a=, and b= are ignored. |
| 1014 | ** |
| 1015 | ** If a= and b= appear, only a= is used. If neither appear, the most |
| @@ -1032,10 +1033,11 @@ | |
| 1032 | const char *zCirca = P("c"); /* Events near this time */ |
| 1033 | const char *zTagName = P("t"); /* Show events with this tag */ |
| 1034 | const char *zBrName = P("r"); /* Show events related to this tag */ |
| 1035 | const char *zSearch = P("s"); /* Search string */ |
| 1036 | const char *zUses = P("uf"); /* Only show checkins hold this file */ |
| 1037 | int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */ |
| 1038 | int renameOnly = P("namechng")!=0; /* Show only checkins that rename files */ |
| 1039 | int tagid; /* Tag ID */ |
| 1040 | int tmFlags; /* Timeline flags */ |
| 1041 | const char *zThisTag = 0; /* Suppress links to this tag */ |
| @@ -1214,10 +1216,14 @@ | |
| 1214 | blob_appendf(&sql, " AND event.objid IN usesfile "); |
| 1215 | } |
| 1216 | if( renameOnly ){ |
| 1217 | blob_appendf(&sql, " AND event.objid IN rnfile "); |
| 1218 | } |
| 1219 | if( tagid>0 ){ |
| 1220 | blob_appendf(&sql, |
| 1221 | "AND (EXISTS(SELECT 1 FROM tagxref" |
| 1222 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)", tagid); |
| 1223 | |
| 1224 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1006,10 +1006,11 @@ | |
| 1006 | ** nomerge ... avoid merge links on the path |
| 1007 | ** uf=FUUID Show only checkins that use given file version |
| 1008 | ** brbg Background color from branch name |
| 1009 | ** ubg Background color from user |
| 1010 | ** namechng Show only checkins that filename changes |
| 1011 | ** ym=YYYY-MM Shown only events for the given year/month. |
| 1012 | ** |
| 1013 | ** p= and d= can appear individually or together. If either p= or d= |
| 1014 | ** appear, then u=, y=, a=, and b= are ignored. |
| 1015 | ** |
| 1016 | ** If a= and b= appear, only a= is used. If neither appear, the most |
| @@ -1032,10 +1033,11 @@ | |
| 1033 | const char *zCirca = P("c"); /* Events near this time */ |
| 1034 | const char *zTagName = P("t"); /* Show events with this tag */ |
| 1035 | const char *zBrName = P("r"); /* Show events related to this tag */ |
| 1036 | const char *zSearch = P("s"); /* Search string */ |
| 1037 | const char *zUses = P("uf"); /* Only show checkins hold this file */ |
| 1038 | const char *zYearMonth = P("ym"); /* Show checkins for the given YYYY-MM */ |
| 1039 | int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */ |
| 1040 | int renameOnly = P("namechng")!=0; /* Show only checkins that rename files */ |
| 1041 | int tagid; /* Tag ID */ |
| 1042 | int tmFlags; /* Timeline flags */ |
| 1043 | const char *zThisTag = 0; /* Suppress links to this tag */ |
| @@ -1214,10 +1216,14 @@ | |
| 1216 | blob_appendf(&sql, " AND event.objid IN usesfile "); |
| 1217 | } |
| 1218 | if( renameOnly ){ |
| 1219 | blob_appendf(&sql, " AND event.objid IN rnfile "); |
| 1220 | } |
| 1221 | if( zYearMonth ){ |
| 1222 | blob_appendf(&sql, " AND %Q=strftime('%%Y-%%m',event.mtime) ", |
| 1223 | zYearMonth); |
| 1224 | } |
| 1225 | if( tagid>0 ){ |
| 1226 | blob_appendf(&sql, |
| 1227 | "AND (EXISTS(SELECT 1 FROM tagxref" |
| 1228 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)", tagid); |
| 1229 | |
| 1230 |