Fossil SCM
Change the "filechng" query parameter for timeline to "fc". Add "Show Files" and "Hide Files" submenus.
Commit
0208b7fc43e54d9cb7f38dc231286c773043bb51
Parent
53e8ad527dc2ccd…
2 files changed
+10
-4
+4
-2
+10
-4
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -777,11 +777,11 @@ | ||
| 777 | 777 | ** u=USER only if belonging to this user |
| 778 | 778 | ** y=TYPE 'ci', 'w', 't', 'e' |
| 779 | 779 | ** s=TEXT string search (comment and brief) |
| 780 | 780 | ** ng Suppress the graph if present |
| 781 | 781 | ** nd Suppress "divider" lines |
| 782 | -** filechng Show details of files changed | |
| 782 | +** fc Show details of files changed | |
| 783 | 783 | ** f=RID Show family (immediate parents and children) of RID |
| 784 | 784 | ** from=RID Path from... |
| 785 | 785 | ** to=RID ... to this |
| 786 | 786 | ** nomerge ... avoid merge links on the path |
| 787 | 787 | ** |
| @@ -849,14 +849,13 @@ | ||
| 849 | 849 | blob_zero(&sql); |
| 850 | 850 | blob_zero(&desc); |
| 851 | 851 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 852 | 852 | blob_append(&sql, timeline_query_for_www(), -1); |
| 853 | 853 | url_initialize(&url, "timeline"); |
| 854 | - if( P("filechng")!=0 ){ | |
| 854 | + if( P("fc")!=0 || P("detail")!=0 ){ | |
| 855 | 855 | tmFlags |= TIMELINE_FCHANGES; |
| 856 | - url_add_parameter(&url, "filechng", 0); | |
| 857 | - | |
| 856 | + url_add_parameter(&url, "fc", 0); | |
| 858 | 857 | } |
| 859 | 858 | if( !useDividers ) url_add_parameter(&url, "nd", 0); |
| 860 | 859 | if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.okRead ){ |
| 861 | 860 | /* If from= and to= are present, display all nodes on a path connecting |
| 862 | 861 | ** the two */ |
| @@ -1148,10 +1147,17 @@ | ||
| 1148 | 1147 | if( nEntry>20 ){ |
| 1149 | 1148 | timeline_submenu(&url, "20 Entries", "n", "20", 0); |
| 1150 | 1149 | } |
| 1151 | 1150 | if( nEntry<200 ){ |
| 1152 | 1151 | timeline_submenu(&url, "200 Entries", "n", "200", 0); |
| 1152 | + } | |
| 1153 | + if( zType[0]=='a' || zType[0]=='c' ){ | |
| 1154 | + if( tmFlags & TIMELINE_FCHANGES ){ | |
| 1155 | + timeline_submenu(&url, "Hide Files", "fc", 0, 0); | |
| 1156 | + }else{ | |
| 1157 | + timeline_submenu(&url, "Show Files", "fc", "", 0); | |
| 1158 | + } | |
| 1153 | 1159 | } |
| 1154 | 1160 | } |
| 1155 | 1161 | } |
| 1156 | 1162 | if( P("showsql") ){ |
| 1157 | 1163 | @ <blockquote>%h(blob_str(&sql))</blockquote> |
| 1158 | 1164 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -777,11 +777,11 @@ | |
| 777 | ** u=USER only if belonging to this user |
| 778 | ** y=TYPE 'ci', 'w', 't', 'e' |
| 779 | ** s=TEXT string search (comment and brief) |
| 780 | ** ng Suppress the graph if present |
| 781 | ** nd Suppress "divider" lines |
| 782 | ** filechng Show details of files changed |
| 783 | ** f=RID Show family (immediate parents and children) of RID |
| 784 | ** from=RID Path from... |
| 785 | ** to=RID ... to this |
| 786 | ** nomerge ... avoid merge links on the path |
| 787 | ** |
| @@ -849,14 +849,13 @@ | |
| 849 | blob_zero(&sql); |
| 850 | blob_zero(&desc); |
| 851 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 852 | blob_append(&sql, timeline_query_for_www(), -1); |
| 853 | url_initialize(&url, "timeline"); |
| 854 | if( P("filechng")!=0 ){ |
| 855 | tmFlags |= TIMELINE_FCHANGES; |
| 856 | url_add_parameter(&url, "filechng", 0); |
| 857 | |
| 858 | } |
| 859 | if( !useDividers ) url_add_parameter(&url, "nd", 0); |
| 860 | if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.okRead ){ |
| 861 | /* If from= and to= are present, display all nodes on a path connecting |
| 862 | ** the two */ |
| @@ -1148,10 +1147,17 @@ | |
| 1148 | if( nEntry>20 ){ |
| 1149 | timeline_submenu(&url, "20 Entries", "n", "20", 0); |
| 1150 | } |
| 1151 | if( nEntry<200 ){ |
| 1152 | timeline_submenu(&url, "200 Entries", "n", "200", 0); |
| 1153 | } |
| 1154 | } |
| 1155 | } |
| 1156 | if( P("showsql") ){ |
| 1157 | @ <blockquote>%h(blob_str(&sql))</blockquote> |
| 1158 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -777,11 +777,11 @@ | |
| 777 | ** u=USER only if belonging to this user |
| 778 | ** y=TYPE 'ci', 'w', 't', 'e' |
| 779 | ** s=TEXT string search (comment and brief) |
| 780 | ** ng Suppress the graph if present |
| 781 | ** nd Suppress "divider" lines |
| 782 | ** fc Show details of files changed |
| 783 | ** f=RID Show family (immediate parents and children) of RID |
| 784 | ** from=RID Path from... |
| 785 | ** to=RID ... to this |
| 786 | ** nomerge ... avoid merge links on the path |
| 787 | ** |
| @@ -849,14 +849,13 @@ | |
| 849 | blob_zero(&sql); |
| 850 | blob_zero(&desc); |
| 851 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 852 | blob_append(&sql, timeline_query_for_www(), -1); |
| 853 | url_initialize(&url, "timeline"); |
| 854 | if( P("fc")!=0 || P("detail")!=0 ){ |
| 855 | tmFlags |= TIMELINE_FCHANGES; |
| 856 | url_add_parameter(&url, "fc", 0); |
| 857 | } |
| 858 | if( !useDividers ) url_add_parameter(&url, "nd", 0); |
| 859 | if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.okRead ){ |
| 860 | /* If from= and to= are present, display all nodes on a path connecting |
| 861 | ** the two */ |
| @@ -1148,10 +1147,17 @@ | |
| 1147 | if( nEntry>20 ){ |
| 1148 | timeline_submenu(&url, "20 Entries", "n", "20", 0); |
| 1149 | } |
| 1150 | if( nEntry<200 ){ |
| 1151 | timeline_submenu(&url, "200 Entries", "n", "200", 0); |
| 1152 | } |
| 1153 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 1154 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1155 | timeline_submenu(&url, "Hide Files", "fc", 0, 0); |
| 1156 | }else{ |
| 1157 | timeline_submenu(&url, "Show Files", "fc", "", 0); |
| 1158 | } |
| 1159 | } |
| 1160 | } |
| 1161 | } |
| 1162 | if( P("showsql") ){ |
| 1163 | @ <blockquote>%h(blob_str(&sql))</blockquote> |
| 1164 |
+4
-2
| --- src/url.c | ||
| +++ src/url.c | ||
| @@ -355,14 +355,16 @@ | ||
| 355 | 355 | blob_appendf(&p->url, "%s%s", zSep, p->azName[i]); |
| 356 | 356 | if( z && z[0] ) blob_appendf(&p->url, "=%T", z); |
| 357 | 357 | zSep = "&"; |
| 358 | 358 | } |
| 359 | 359 | if( zName1 && zValue1 ){ |
| 360 | - blob_appendf(&p->url, "%s%s=%T", zSep, zName1, zValue1); | |
| 360 | + blob_appendf(&p->url, "%s%s", zSep, zName1); | |
| 361 | + if( zValue1[0] ) blob_appendf(&p->url, "=%T", zValue1); | |
| 361 | 362 | } |
| 362 | 363 | if( zName2 && zValue2 ){ |
| 363 | - blob_appendf(&p->url, "%s%s=%T", zSep, zName2, zValue2); | |
| 364 | + blob_appendf(&p->url, "%s%s", zSep, zName2); | |
| 365 | + if( zValue2[0] ) blob_appendf(&p->url, "=%T", zValue2); | |
| 364 | 366 | } |
| 365 | 367 | return blob_str(&p->url); |
| 366 | 368 | } |
| 367 | 369 | |
| 368 | 370 | /* |
| 369 | 371 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -355,14 +355,16 @@ | |
| 355 | blob_appendf(&p->url, "%s%s", zSep, p->azName[i]); |
| 356 | if( z && z[0] ) blob_appendf(&p->url, "=%T", z); |
| 357 | zSep = "&"; |
| 358 | } |
| 359 | if( zName1 && zValue1 ){ |
| 360 | blob_appendf(&p->url, "%s%s=%T", zSep, zName1, zValue1); |
| 361 | } |
| 362 | if( zName2 && zValue2 ){ |
| 363 | blob_appendf(&p->url, "%s%s=%T", zSep, zName2, zValue2); |
| 364 | } |
| 365 | return blob_str(&p->url); |
| 366 | } |
| 367 | |
| 368 | /* |
| 369 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -355,14 +355,16 @@ | |
| 355 | blob_appendf(&p->url, "%s%s", zSep, p->azName[i]); |
| 356 | if( z && z[0] ) blob_appendf(&p->url, "=%T", z); |
| 357 | zSep = "&"; |
| 358 | } |
| 359 | if( zName1 && zValue1 ){ |
| 360 | blob_appendf(&p->url, "%s%s", zSep, zName1); |
| 361 | if( zValue1[0] ) blob_appendf(&p->url, "=%T", zValue1); |
| 362 | } |
| 363 | if( zName2 && zValue2 ){ |
| 364 | blob_appendf(&p->url, "%s%s", zSep, zName2); |
| 365 | if( zValue2[0] ) blob_appendf(&p->url, "=%T", zValue2); |
| 366 | } |
| 367 | return blob_str(&p->url); |
| 368 | } |
| 369 | |
| 370 | /* |
| 371 |