Fossil SCM

Change the "filechng" query parameter for timeline to "fc". Add "Show Files" and "Hide Files" submenus.

drh 2011-03-31 11:41 trunk
Commit 0208b7fc43e54d9cb7f38dc231286c773043bb51
2 files changed +10 -4 +4 -2
+10 -4
--- src/timeline.c
+++ src/timeline.c
@@ -777,11 +777,11 @@
777777
** u=USER only if belonging to this user
778778
** y=TYPE 'ci', 'w', 't', 'e'
779779
** s=TEXT string search (comment and brief)
780780
** ng Suppress the graph if present
781781
** nd Suppress "divider" lines
782
-** filechng Show details of files changed
782
+** fc Show details of files changed
783783
** f=RID Show family (immediate parents and children) of RID
784784
** from=RID Path from...
785785
** to=RID ... to this
786786
** nomerge ... avoid merge links on the path
787787
**
@@ -849,14 +849,13 @@
849849
blob_zero(&sql);
850850
blob_zero(&desc);
851851
blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1);
852852
blob_append(&sql, timeline_query_for_www(), -1);
853853
url_initialize(&url, "timeline");
854
- if( P("filechng")!=0 ){
854
+ if( P("fc")!=0 || P("detail")!=0 ){
855855
tmFlags |= TIMELINE_FCHANGES;
856
- url_add_parameter(&url, "filechng", 0);
857
-
856
+ url_add_parameter(&url, "fc", 0);
858857
}
859858
if( !useDividers ) url_add_parameter(&url, "nd", 0);
860859
if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.okRead ){
861860
/* If from= and to= are present, display all nodes on a path connecting
862861
** the two */
@@ -1148,10 +1147,17 @@
11481147
if( nEntry>20 ){
11491148
timeline_submenu(&url, "20 Entries", "n", "20", 0);
11501149
}
11511150
if( nEntry<200 ){
11521151
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
+ }
11531159
}
11541160
}
11551161
}
11561162
if( P("showsql") ){
11571163
@ <blockquote>%h(blob_str(&sql))</blockquote>
11581164
--- 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 @@
355355
blob_appendf(&p->url, "%s%s", zSep, p->azName[i]);
356356
if( z && z[0] ) blob_appendf(&p->url, "=%T", z);
357357
zSep = "&amp;";
358358
}
359359
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);
361362
}
362363
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);
364366
}
365367
return blob_str(&p->url);
366368
}
367369
368370
/*
369371
--- 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 = "&amp;";
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 = "&amp;";
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

Keyboard Shortcuts

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