Fossil SCM

Simplify timeline processing. No longer show branch and merge points since those are now obvious from the graph.

drh 2010-04-27 17:17 trunk
Commit 5568603e5700e69bdb3b86cbd9b450b28794b110
1 file changed +14 -42
+14 -42
--- src/timeline.c
+++ src/timeline.c
@@ -166,18 +166,16 @@
166166
** 0. rid
167167
** 1. UUID
168168
** 2. Date/Time
169169
** 3. Comment string
170170
** 4. User
171
-** 5. Number of non-merge children
172
-** 6. Number of parents
173
-** 7. True if is a leaf
174
-** 8. background color
175
-** 9. type ("ci", "w", "t")
176
-** 10. list of symbolic tags.
177
-** 11. tagid for ticket or wiki
178
-** 12. Short comment to user for repeated tickets and wiki
171
+** 5. True if is a leaf
172
+** 6. background color
173
+** 7. type ("ci", "w", "t")
174
+** 8. list of symbolic tags.
175
+** 9. tagid for ticket or wiki
176
+** 10. Short comment to user for repeated tickets and wiki
179177
*/
180178
void www_print_timeline(
181179
Stmt *pQuery, /* Query to implement the timeline */
182180
int tmFlags, /* Flags controlling display behavior */
183181
void (*xExtra)(int) /* Routine to call on each line of display */
@@ -205,28 +203,26 @@
205203
@ <table cellspacing=0 border=0 cellpadding=0>
206204
blob_zero(&comment);
207205
while( db_step(pQuery)==SQLITE_ROW ){
208206
int rid = db_column_int(pQuery, 0);
209207
const char *zUuid = db_column_text(pQuery, 1);
210
- int nPChild = db_column_int(pQuery, 5);
211
- int nParent = db_column_int(pQuery, 6);
212
- int isLeaf = db_column_int(pQuery, 7);
213
- const char *zBgClr = db_column_text(pQuery, 8);
208
+ int isLeaf = db_column_int(pQuery, 5);
209
+ const char *zBgClr = db_column_text(pQuery, 6);
214210
const char *zDate = db_column_text(pQuery, 2);
215
- const char *zType = db_column_text(pQuery, 9);
211
+ const char *zType = db_column_text(pQuery, 7);
216212
const char *zUser = db_column_text(pQuery, 4);
217
- const char *zTagList = db_column_text(pQuery, 10);
218
- int tagid = db_column_int(pQuery, 11);
213
+ const char *zTagList = db_column_text(pQuery, 8);
214
+ int tagid = db_column_int(pQuery, 9);
219215
int commentColumn = 3; /* Column containing comment text */
220216
char zTime[8];
221217
if( tagid ){
222218
if( tagid==prevTagid ){
223219
if( tmFlags & TIMELINE_BRIEF ){
224220
suppressCnt++;
225221
continue;
226222
}else{
227
- commentColumn = 12;
223
+ commentColumn = 10;
228224
}
229225
}
230226
}
231227
prevTagid = tagid;
232228
if( suppressCnt ){
@@ -283,38 +279,18 @@
283279
@ <td valign="top" align="left" bgcolor="%h(zBgClr)">
284280
}else{
285281
@ <td valign="top" align="left">
286282
}
287283
if( zType[0]=='c' ){
288
- const char *azTag[5];
289
- int nTag = 0;
290284
hyperlink_to_uuid(zUuid);
291
- if( (tmFlags & TIMELINE_LEAFONLY)==0 ){
292
- if( nParent>1 ){
293
- azTag[nTag++] = "Merge";
294
- }
295
- if( nPChild>1 ){
296
- if( count_nonbranch_children(rid)>1 ){
297
- azTag[nTag++] = "Fork";
298
- }else{
299
- azTag[nTag++] = "Branch-Point";
300
- }
301
- }
302
- }
303285
if( isLeaf ){
304286
if( db_exists("SELECT 1 FROM tagxref"
305287
" WHERE rid=%d AND tagid=%d AND tagtype>0",
306288
rid, TAG_CLOSED) ){
307
- azTag[nTag++] = "Closed-Leaf";
289
+ @ <b>Closed-Leaf:</b>
308290
}else{
309
- azTag[nTag++] = "Leaf";
310
- }
311
- }
312
- if( nTag>0 ){
313
- int i;
314
- for(i=0; i<nTag; i++){
315
- @ <b>%s(azTag[i])%s(i==nTag-1?"":",")</b>
291
+ @ <b>Leaf:</b>
316292
}
317293
}
318294
}else if( (tmFlags & TIMELINE_ARTID)!=0 ){
319295
hyperlink_to_uuid(zUuid);
320296
}
@@ -563,12 +539,10 @@
563539
@ rid INTEGER PRIMARY KEY,
564540
@ uuid TEXT,
565541
@ timestamp TEXT,
566542
@ comment TEXT,
567543
@ user TEXT,
568
- @ nchild INTEGER,
569
- @ nparent INTEGER,
570544
@ isleaf BOOLEAN,
571545
@ bgcolor TEXT,
572546
@ etype TEXT,
573547
@ taglist TEXT,
574548
@ tagid INTEGER,
@@ -589,12 +563,10 @@
589563
@ blob.rid,
590564
@ uuid,
591565
@ datetime(event.mtime,'localtime') AS timestamp,
592566
@ coalesce(ecomment, comment),
593567
@ coalesce(euser, user),
594
- @ (SELECT count(*) FROM plink WHERE pid=blob.rid AND isprim=1),
595
- @ (SELECT count(*) FROM plink WHERE cid=blob.rid),
596568
@ NOT EXISTS(SELECT 1 FROM plink
597569
@ WHERE pid=blob.rid
598570
@ AND coalesce((SELECT value FROM tagxref
599571
@ WHERE tagid=%d AND rid=plink.pid), 'trunk')
600572
@ = coalesce((SELECT value FROM tagxref
601573
--- src/timeline.c
+++ src/timeline.c
@@ -166,18 +166,16 @@
166 ** 0. rid
167 ** 1. UUID
168 ** 2. Date/Time
169 ** 3. Comment string
170 ** 4. User
171 ** 5. Number of non-merge children
172 ** 6. Number of parents
173 ** 7. True if is a leaf
174 ** 8. background color
175 ** 9. type ("ci", "w", "t")
176 ** 10. list of symbolic tags.
177 ** 11. tagid for ticket or wiki
178 ** 12. Short comment to user for repeated tickets and wiki
179 */
180 void www_print_timeline(
181 Stmt *pQuery, /* Query to implement the timeline */
182 int tmFlags, /* Flags controlling display behavior */
183 void (*xExtra)(int) /* Routine to call on each line of display */
@@ -205,28 +203,26 @@
205 @ <table cellspacing=0 border=0 cellpadding=0>
206 blob_zero(&comment);
207 while( db_step(pQuery)==SQLITE_ROW ){
208 int rid = db_column_int(pQuery, 0);
209 const char *zUuid = db_column_text(pQuery, 1);
210 int nPChild = db_column_int(pQuery, 5);
211 int nParent = db_column_int(pQuery, 6);
212 int isLeaf = db_column_int(pQuery, 7);
213 const char *zBgClr = db_column_text(pQuery, 8);
214 const char *zDate = db_column_text(pQuery, 2);
215 const char *zType = db_column_text(pQuery, 9);
216 const char *zUser = db_column_text(pQuery, 4);
217 const char *zTagList = db_column_text(pQuery, 10);
218 int tagid = db_column_int(pQuery, 11);
219 int commentColumn = 3; /* Column containing comment text */
220 char zTime[8];
221 if( tagid ){
222 if( tagid==prevTagid ){
223 if( tmFlags & TIMELINE_BRIEF ){
224 suppressCnt++;
225 continue;
226 }else{
227 commentColumn = 12;
228 }
229 }
230 }
231 prevTagid = tagid;
232 if( suppressCnt ){
@@ -283,38 +279,18 @@
283 @ <td valign="top" align="left" bgcolor="%h(zBgClr)">
284 }else{
285 @ <td valign="top" align="left">
286 }
287 if( zType[0]=='c' ){
288 const char *azTag[5];
289 int nTag = 0;
290 hyperlink_to_uuid(zUuid);
291 if( (tmFlags & TIMELINE_LEAFONLY)==0 ){
292 if( nParent>1 ){
293 azTag[nTag++] = "Merge";
294 }
295 if( nPChild>1 ){
296 if( count_nonbranch_children(rid)>1 ){
297 azTag[nTag++] = "Fork";
298 }else{
299 azTag[nTag++] = "Branch-Point";
300 }
301 }
302 }
303 if( isLeaf ){
304 if( db_exists("SELECT 1 FROM tagxref"
305 " WHERE rid=%d AND tagid=%d AND tagtype>0",
306 rid, TAG_CLOSED) ){
307 azTag[nTag++] = "Closed-Leaf";
308 }else{
309 azTag[nTag++] = "Leaf";
310 }
311 }
312 if( nTag>0 ){
313 int i;
314 for(i=0; i<nTag; i++){
315 @ <b>%s(azTag[i])%s(i==nTag-1?"":",")</b>
316 }
317 }
318 }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
319 hyperlink_to_uuid(zUuid);
320 }
@@ -563,12 +539,10 @@
563 @ rid INTEGER PRIMARY KEY,
564 @ uuid TEXT,
565 @ timestamp TEXT,
566 @ comment TEXT,
567 @ user TEXT,
568 @ nchild INTEGER,
569 @ nparent INTEGER,
570 @ isleaf BOOLEAN,
571 @ bgcolor TEXT,
572 @ etype TEXT,
573 @ taglist TEXT,
574 @ tagid INTEGER,
@@ -589,12 +563,10 @@
589 @ blob.rid,
590 @ uuid,
591 @ datetime(event.mtime,'localtime') AS timestamp,
592 @ coalesce(ecomment, comment),
593 @ coalesce(euser, user),
594 @ (SELECT count(*) FROM plink WHERE pid=blob.rid AND isprim=1),
595 @ (SELECT count(*) FROM plink WHERE cid=blob.rid),
596 @ NOT EXISTS(SELECT 1 FROM plink
597 @ WHERE pid=blob.rid
598 @ AND coalesce((SELECT value FROM tagxref
599 @ WHERE tagid=%d AND rid=plink.pid), 'trunk')
600 @ = coalesce((SELECT value FROM tagxref
601
--- src/timeline.c
+++ src/timeline.c
@@ -166,18 +166,16 @@
166 ** 0. rid
167 ** 1. UUID
168 ** 2. Date/Time
169 ** 3. Comment string
170 ** 4. User
171 ** 5. True if is a leaf
172 ** 6. background color
173 ** 7. type ("ci", "w", "t")
174 ** 8. list of symbolic tags.
175 ** 9. tagid for ticket or wiki
176 ** 10. Short comment to user for repeated tickets and wiki
 
 
177 */
178 void www_print_timeline(
179 Stmt *pQuery, /* Query to implement the timeline */
180 int tmFlags, /* Flags controlling display behavior */
181 void (*xExtra)(int) /* Routine to call on each line of display */
@@ -205,28 +203,26 @@
203 @ <table cellspacing=0 border=0 cellpadding=0>
204 blob_zero(&comment);
205 while( db_step(pQuery)==SQLITE_ROW ){
206 int rid = db_column_int(pQuery, 0);
207 const char *zUuid = db_column_text(pQuery, 1);
208 int isLeaf = db_column_int(pQuery, 5);
209 const char *zBgClr = db_column_text(pQuery, 6);
 
 
210 const char *zDate = db_column_text(pQuery, 2);
211 const char *zType = db_column_text(pQuery, 7);
212 const char *zUser = db_column_text(pQuery, 4);
213 const char *zTagList = db_column_text(pQuery, 8);
214 int tagid = db_column_int(pQuery, 9);
215 int commentColumn = 3; /* Column containing comment text */
216 char zTime[8];
217 if( tagid ){
218 if( tagid==prevTagid ){
219 if( tmFlags & TIMELINE_BRIEF ){
220 suppressCnt++;
221 continue;
222 }else{
223 commentColumn = 10;
224 }
225 }
226 }
227 prevTagid = tagid;
228 if( suppressCnt ){
@@ -283,38 +279,18 @@
279 @ <td valign="top" align="left" bgcolor="%h(zBgClr)">
280 }else{
281 @ <td valign="top" align="left">
282 }
283 if( zType[0]=='c' ){
 
 
284 hyperlink_to_uuid(zUuid);
 
 
 
 
 
 
 
 
 
 
 
 
285 if( isLeaf ){
286 if( db_exists("SELECT 1 FROM tagxref"
287 " WHERE rid=%d AND tagid=%d AND tagtype>0",
288 rid, TAG_CLOSED) ){
289 @ <b>Closed-Leaf:</b>
290 }else{
291 @ <b>Leaf:</b>
 
 
 
 
 
 
292 }
293 }
294 }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
295 hyperlink_to_uuid(zUuid);
296 }
@@ -563,12 +539,10 @@
539 @ rid INTEGER PRIMARY KEY,
540 @ uuid TEXT,
541 @ timestamp TEXT,
542 @ comment TEXT,
543 @ user TEXT,
 
 
544 @ isleaf BOOLEAN,
545 @ bgcolor TEXT,
546 @ etype TEXT,
547 @ taglist TEXT,
548 @ tagid INTEGER,
@@ -589,12 +563,10 @@
563 @ blob.rid,
564 @ uuid,
565 @ datetime(event.mtime,'localtime') AS timestamp,
566 @ coalesce(ecomment, comment),
567 @ coalesce(euser, user),
 
 
568 @ NOT EXISTS(SELECT 1 FROM plink
569 @ WHERE pid=blob.rid
570 @ AND coalesce((SELECT value FROM tagxref
571 @ WHERE tagid=%d AND rid=plink.pid), 'trunk')
572 @ = coalesce((SELECT value FROM tagxref
573

Keyboard Shortcuts

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