Fossil SCM

Suppress the display of the artificate ID on the timeline which showing changes to wiki or tickets.

drh 2009-01-21 01:23 trunk
Commit 580d6ad8c747c7fed75fd390c670c657c3359e21
+1 -1
--- src/branch.c
+++ src/branch.c
@@ -231,11 +231,11 @@
231231
db_prepare(&q,
232232
"%s AND blob.rid IN (SELECT rid FROM tagxref WHERE tagtype>0 AND tagid=%d)"
233233
" ORDER BY event.mtime DESC",
234234
timeline_query_for_www(), TAG_NEWBRANCH
235235
);
236
- www_print_timeline(&q);
236
+ www_print_timeline(&q, 0, 0);
237237
db_finalize(&q);
238238
@ <br clear="both">
239239
@ <script>
240240
@ function xin(id){
241241
@ }
242242
--- src/branch.c
+++ src/branch.c
@@ -231,11 +231,11 @@
231 db_prepare(&q,
232 "%s AND blob.rid IN (SELECT rid FROM tagxref WHERE tagtype>0 AND tagid=%d)"
233 " ORDER BY event.mtime DESC",
234 timeline_query_for_www(), TAG_NEWBRANCH
235 );
236 www_print_timeline(&q);
237 db_finalize(&q);
238 @ <br clear="both">
239 @ <script>
240 @ function xin(id){
241 @ }
242
--- src/branch.c
+++ src/branch.c
@@ -231,11 +231,11 @@
231 db_prepare(&q,
232 "%s AND blob.rid IN (SELECT rid FROM tagxref WHERE tagtype>0 AND tagid=%d)"
233 " ORDER BY event.mtime DESC",
234 timeline_query_for_www(), TAG_NEWBRANCH
235 );
236 www_print_timeline(&q, 0, 0);
237 db_finalize(&q);
238 @ <br clear="both">
239 @ <script>
240 @ function xin(id){
241 @ }
242
--- src/descendants.c
+++ src/descendants.c
@@ -297,11 +297,11 @@
297297
"%s"
298298
" AND blob.rid IN leaves"
299299
" ORDER BY event.mtime DESC",
300300
timeline_query_for_www()
301301
);
302
- www_print_timeline(&q);
302
+ www_print_timeline(&q, 0, 0);
303303
db_finalize(&q);
304304
@ <br clear="both">
305305
@ <script>
306306
@ function xin(id){
307307
@ }
308308
--- src/descendants.c
+++ src/descendants.c
@@ -297,11 +297,11 @@
297 "%s"
298 " AND blob.rid IN leaves"
299 " ORDER BY event.mtime DESC",
300 timeline_query_for_www()
301 );
302 www_print_timeline(&q);
303 db_finalize(&q);
304 @ <br clear="both">
305 @ <script>
306 @ function xin(id){
307 @ }
308
--- src/descendants.c
+++ src/descendants.c
@@ -297,11 +297,11 @@
297 "%s"
298 " AND blob.rid IN leaves"
299 " ORDER BY event.mtime DESC",
300 timeline_query_for_www()
301 );
302 www_print_timeline(&q, 0, 0);
303 db_finalize(&q);
304 @ <br clear="both">
305 @ <script>
306 @ function xin(id){
307 @ }
308
+1 -1
--- src/tagview.c
+++ src/tagview.c
@@ -183,11 +183,11 @@
183183
" ORDER BY 3 desc",
184184
timeline_query_for_www(), tagid
185185
);
186186
db_prepare(&q, zSql);
187187
free(zSql);
188
- www_print_timeline(&q);
188
+ www_print_timeline(&q, 0, 0);
189189
db_finalize(&q);
190190
}
191191
192192
/*
193193
** WEBPAGE: /tagview
194194
--- src/tagview.c
+++ src/tagview.c
@@ -183,11 +183,11 @@
183 " ORDER BY 3 desc",
184 timeline_query_for_www(), tagid
185 );
186 db_prepare(&q, zSql);
187 free(zSql);
188 www_print_timeline(&q);
189 db_finalize(&q);
190 }
191
192 /*
193 ** WEBPAGE: /tagview
194
--- src/tagview.c
+++ src/tagview.c
@@ -183,11 +183,11 @@
183 " ORDER BY 3 desc",
184 timeline_query_for_www(), tagid
185 );
186 db_prepare(&q, zSql);
187 free(zSql);
188 www_print_timeline(&q, 0, 0);
189 db_finalize(&q);
190 }
191
192 /*
193 ** WEBPAGE: /tagview
194
+12 -3
--- src/timeline.c
+++ src/timeline.c
@@ -94,10 +94,17 @@
9494
pid, TAG_NEWBRANCH
9595
);
9696
return nNonBranch;
9797
}
9898
99
+/*
100
+** Allowed flags for the tmFlags argument to www_print_timeline
101
+*/
102
+#if INTERFACE
103
+#define TIMELINE_ARTID 0x0001 /* Show artifact IDs on non-check-in lines */
104
+#endif
105
+
99106
/*
100107
** Output a timeline in the web format given a query. The query
101108
** should return these columns:
102109
**
103110
** 0. rid
@@ -111,11 +118,13 @@
111118
** 8. background color
112119
** 9. type ("ci", "w")
113120
** 10. list of symbolic tags.
114121
*/
115122
void www_print_timeline(
116
- Stmt *pQuery /* Query to implement the timeline */
123
+ Stmt *pQuery, /* Query to implement the timeline */
124
+ int tmFlags, /* Flags controlling display behavior */
125
+ void (*xExtra)(int) /* Routine to call on each line of display */
117126
){
118127
int wikiFlags;
119128
int mxWikiLen;
120129
Blob comment;
121130
char zPrevDate[20];
@@ -174,11 +183,11 @@
174183
}
175184
}
176185
if( isLeaf ){
177186
@ <b>Leaf</b>
178187
}
179
- }else{
188
+ }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
180189
hyperlink_to_uuid(zUuid);
181190
}
182191
db_column_blob(pQuery, 3, &comment);
183192
if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
184193
Blob truncated;
@@ -463,11 +472,11 @@
463472
}
464473
blob_zero(&sql);
465474
db_prepare(&q, "SELECT * FROM timeline ORDER BY timestamp DESC");
466475
@ <h2>%b(&desc)</h2>
467476
blob_reset(&desc);
468
- www_print_timeline(&q);
477
+ www_print_timeline(&q, 0, 0);
469478
db_finalize(&q);
470479
471480
@ <script>
472481
@ var parentof = new Object();
473482
@ var childof = new Object();
474483
--- src/timeline.c
+++ src/timeline.c
@@ -94,10 +94,17 @@
94 pid, TAG_NEWBRANCH
95 );
96 return nNonBranch;
97 }
98
 
 
 
 
 
 
 
99 /*
100 ** Output a timeline in the web format given a query. The query
101 ** should return these columns:
102 **
103 ** 0. rid
@@ -111,11 +118,13 @@
111 ** 8. background color
112 ** 9. type ("ci", "w")
113 ** 10. list of symbolic tags.
114 */
115 void www_print_timeline(
116 Stmt *pQuery /* Query to implement the timeline */
 
 
117 ){
118 int wikiFlags;
119 int mxWikiLen;
120 Blob comment;
121 char zPrevDate[20];
@@ -174,11 +183,11 @@
174 }
175 }
176 if( isLeaf ){
177 @ <b>Leaf</b>
178 }
179 }else{
180 hyperlink_to_uuid(zUuid);
181 }
182 db_column_blob(pQuery, 3, &comment);
183 if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
184 Blob truncated;
@@ -463,11 +472,11 @@
463 }
464 blob_zero(&sql);
465 db_prepare(&q, "SELECT * FROM timeline ORDER BY timestamp DESC");
466 @ <h2>%b(&desc)</h2>
467 blob_reset(&desc);
468 www_print_timeline(&q);
469 db_finalize(&q);
470
471 @ <script>
472 @ var parentof = new Object();
473 @ var childof = new Object();
474
--- src/timeline.c
+++ src/timeline.c
@@ -94,10 +94,17 @@
94 pid, TAG_NEWBRANCH
95 );
96 return nNonBranch;
97 }
98
99 /*
100 ** Allowed flags for the tmFlags argument to www_print_timeline
101 */
102 #if INTERFACE
103 #define TIMELINE_ARTID 0x0001 /* Show artifact IDs on non-check-in lines */
104 #endif
105
106 /*
107 ** Output a timeline in the web format given a query. The query
108 ** should return these columns:
109 **
110 ** 0. rid
@@ -111,11 +118,13 @@
118 ** 8. background color
119 ** 9. type ("ci", "w")
120 ** 10. list of symbolic tags.
121 */
122 void www_print_timeline(
123 Stmt *pQuery, /* Query to implement the timeline */
124 int tmFlags, /* Flags controlling display behavior */
125 void (*xExtra)(int) /* Routine to call on each line of display */
126 ){
127 int wikiFlags;
128 int mxWikiLen;
129 Blob comment;
130 char zPrevDate[20];
@@ -174,11 +183,11 @@
183 }
184 }
185 if( isLeaf ){
186 @ <b>Leaf</b>
187 }
188 }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
189 hyperlink_to_uuid(zUuid);
190 }
191 db_column_blob(pQuery, 3, &comment);
192 if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
193 Blob truncated;
@@ -463,11 +472,11 @@
472 }
473 blob_zero(&sql);
474 db_prepare(&q, "SELECT * FROM timeline ORDER BY timestamp DESC");
475 @ <h2>%b(&desc)</h2>
476 blob_reset(&desc);
477 www_print_timeline(&q, 0, 0);
478 db_finalize(&q);
479
480 @ <script>
481 @ var parentof = new Object();
482 @ var childof = new Object();
483
+1 -1
--- src/tkt.c
+++ src/tkt.c
@@ -636,11 +636,11 @@
636636
" (SELECT rid FROM tagxref WHERE tagid=%d) "
637637
"ORDER BY mtime DESC",
638638
timeline_query_for_www(), tagid);
639639
db_prepare(&q, zSQL);
640640
free(zSQL);
641
- www_print_timeline(&q);
641
+ www_print_timeline(&q, TIMELINE_ARTID, 0);
642642
db_finalize(&q);
643643
style_footer();
644644
}
645645
646646
/*
647647
--- src/tkt.c
+++ src/tkt.c
@@ -636,11 +636,11 @@
636 " (SELECT rid FROM tagxref WHERE tagid=%d) "
637 "ORDER BY mtime DESC",
638 timeline_query_for_www(), tagid);
639 db_prepare(&q, zSQL);
640 free(zSQL);
641 www_print_timeline(&q);
642 db_finalize(&q);
643 style_footer();
644 }
645
646 /*
647
--- src/tkt.c
+++ src/tkt.c
@@ -636,11 +636,11 @@
636 " (SELECT rid FROM tagxref WHERE tagid=%d) "
637 "ORDER BY mtime DESC",
638 timeline_query_for_www(), tagid);
639 db_prepare(&q, zSQL);
640 free(zSQL);
641 www_print_timeline(&q, TIMELINE_ARTID, 0);
642 db_finalize(&q);
643 style_footer();
644 }
645
646 /*
647
+1 -1
--- src/wiki.c
+++ src/wiki.c
@@ -484,11 +484,11 @@
484484
"(SELECT tagid FROM tag WHERE tagname='wiki-%q'))"
485485
"ORDER BY mtime DESC",
486486
timeline_query_for_www(), zPageName);
487487
db_prepare(&q, zSQL);
488488
free(zSQL);
489
- www_print_timeline(&q);
489
+ www_print_timeline(&q, TIMELINE_ARTID, 0);
490490
db_finalize(&q);
491491
style_footer();
492492
}
493493
494494
/*
495495
--- src/wiki.c
+++ src/wiki.c
@@ -484,11 +484,11 @@
484 "(SELECT tagid FROM tag WHERE tagname='wiki-%q'))"
485 "ORDER BY mtime DESC",
486 timeline_query_for_www(), zPageName);
487 db_prepare(&q, zSQL);
488 free(zSQL);
489 www_print_timeline(&q);
490 db_finalize(&q);
491 style_footer();
492 }
493
494 /*
495
--- src/wiki.c
+++ src/wiki.c
@@ -484,11 +484,11 @@
484 "(SELECT tagid FROM tag WHERE tagname='wiki-%q'))"
485 "ORDER BY mtime DESC",
486 timeline_query_for_www(), zPageName);
487 db_prepare(&q, zSQL);
488 free(zSQL);
489 www_print_timeline(&q, TIMELINE_ARTID, 0);
490 db_finalize(&q);
491 style_footer();
492 }
493
494 /*
495

Keyboard Shortcuts

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