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.

stephan 2013-05-04 19:40 trunk
Commit c5ea75133aa6f26928146b9645a71db3db91842b
1 file changed +6
--- src/timeline.c
+++ src/timeline.c
@@ -1006,10 +1006,11 @@
10061006
** nomerge ... avoid merge links on the path
10071007
** uf=FUUID Show only checkins that use given file version
10081008
** brbg Background color from branch name
10091009
** ubg Background color from user
10101010
** namechng Show only checkins that filename changes
1011
+** ym=YYYY-MM Shown only events for the given year/month.
10111012
**
10121013
** p= and d= can appear individually or together. If either p= or d=
10131014
** appear, then u=, y=, a=, and b= are ignored.
10141015
**
10151016
** If a= and b= appear, only a= is used. If neither appear, the most
@@ -1032,10 +1033,11 @@
10321033
const char *zCirca = P("c"); /* Events near this time */
10331034
const char *zTagName = P("t"); /* Show events with this tag */
10341035
const char *zBrName = P("r"); /* Show events related to this tag */
10351036
const char *zSearch = P("s"); /* Search string */
10361037
const char *zUses = P("uf"); /* Only show checkins hold this file */
1038
+ const char *zYearMonth = P("ym"); /* Show checkins for the given YYYY-MM */
10371039
int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */
10381040
int renameOnly = P("namechng")!=0; /* Show only checkins that rename files */
10391041
int tagid; /* Tag ID */
10401042
int tmFlags; /* Timeline flags */
10411043
const char *zThisTag = 0; /* Suppress links to this tag */
@@ -1214,10 +1216,14 @@
12141216
blob_appendf(&sql, " AND event.objid IN usesfile ");
12151217
}
12161218
if( renameOnly ){
12171219
blob_appendf(&sql, " AND event.objid IN rnfile ");
12181220
}
1221
+ if( zYearMonth ){
1222
+ blob_appendf(&sql, " AND %Q=strftime('%%Y-%%m',event.mtime) ",
1223
+ zYearMonth);
1224
+ }
12191225
if( tagid>0 ){
12201226
blob_appendf(&sql,
12211227
"AND (EXISTS(SELECT 1 FROM tagxref"
12221228
" WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)", tagid);
12231229
12241230
--- 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

Keyboard Shortcuts

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