Fossil SCM
Simplify timeline processing. No longer show branch and merge points since those are now obvious from the graph.
Commit
5568603e5700e69bdb3b86cbd9b450b28794b110
Parent
af8a8979c679ca8…
1 file changed
+14
-42
+14
-42
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -166,18 +166,16 @@ | ||
| 166 | 166 | ** 0. rid |
| 167 | 167 | ** 1. UUID |
| 168 | 168 | ** 2. Date/Time |
| 169 | 169 | ** 3. Comment string |
| 170 | 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 | |
| 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 | |
| 179 | 177 | */ |
| 180 | 178 | void www_print_timeline( |
| 181 | 179 | Stmt *pQuery, /* Query to implement the timeline */ |
| 182 | 180 | int tmFlags, /* Flags controlling display behavior */ |
| 183 | 181 | void (*xExtra)(int) /* Routine to call on each line of display */ |
| @@ -205,28 +203,26 @@ | ||
| 205 | 203 | @ <table cellspacing=0 border=0 cellpadding=0> |
| 206 | 204 | blob_zero(&comment); |
| 207 | 205 | while( db_step(pQuery)==SQLITE_ROW ){ |
| 208 | 206 | int rid = db_column_int(pQuery, 0); |
| 209 | 207 | 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); | |
| 214 | 210 | 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); | |
| 216 | 212 | 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); | |
| 219 | 215 | int commentColumn = 3; /* Column containing comment text */ |
| 220 | 216 | char zTime[8]; |
| 221 | 217 | if( tagid ){ |
| 222 | 218 | if( tagid==prevTagid ){ |
| 223 | 219 | if( tmFlags & TIMELINE_BRIEF ){ |
| 224 | 220 | suppressCnt++; |
| 225 | 221 | continue; |
| 226 | 222 | }else{ |
| 227 | - commentColumn = 12; | |
| 223 | + commentColumn = 10; | |
| 228 | 224 | } |
| 229 | 225 | } |
| 230 | 226 | } |
| 231 | 227 | prevTagid = tagid; |
| 232 | 228 | if( suppressCnt ){ |
| @@ -283,38 +279,18 @@ | ||
| 283 | 279 | @ <td valign="top" align="left" bgcolor="%h(zBgClr)"> |
| 284 | 280 | }else{ |
| 285 | 281 | @ <td valign="top" align="left"> |
| 286 | 282 | } |
| 287 | 283 | if( zType[0]=='c' ){ |
| 288 | - const char *azTag[5]; | |
| 289 | - int nTag = 0; | |
| 290 | 284 | 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 | 285 | if( isLeaf ){ |
| 304 | 286 | if( db_exists("SELECT 1 FROM tagxref" |
| 305 | 287 | " WHERE rid=%d AND tagid=%d AND tagtype>0", |
| 306 | 288 | rid, TAG_CLOSED) ){ |
| 307 | - azTag[nTag++] = "Closed-Leaf"; | |
| 289 | + @ <b>Closed-Leaf:</b> | |
| 308 | 290 | }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> | |
| 316 | 292 | } |
| 317 | 293 | } |
| 318 | 294 | }else if( (tmFlags & TIMELINE_ARTID)!=0 ){ |
| 319 | 295 | hyperlink_to_uuid(zUuid); |
| 320 | 296 | } |
| @@ -563,12 +539,10 @@ | ||
| 563 | 539 | @ rid INTEGER PRIMARY KEY, |
| 564 | 540 | @ uuid TEXT, |
| 565 | 541 | @ timestamp TEXT, |
| 566 | 542 | @ comment TEXT, |
| 567 | 543 | @ user TEXT, |
| 568 | - @ nchild INTEGER, | |
| 569 | - @ nparent INTEGER, | |
| 570 | 544 | @ isleaf BOOLEAN, |
| 571 | 545 | @ bgcolor TEXT, |
| 572 | 546 | @ etype TEXT, |
| 573 | 547 | @ taglist TEXT, |
| 574 | 548 | @ tagid INTEGER, |
| @@ -589,12 +563,10 @@ | ||
| 589 | 563 | @ blob.rid, |
| 590 | 564 | @ uuid, |
| 591 | 565 | @ datetime(event.mtime,'localtime') AS timestamp, |
| 592 | 566 | @ coalesce(ecomment, comment), |
| 593 | 567 | @ 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 | 568 | @ NOT EXISTS(SELECT 1 FROM plink |
| 597 | 569 | @ WHERE pid=blob.rid |
| 598 | 570 | @ AND coalesce((SELECT value FROM tagxref |
| 599 | 571 | @ WHERE tagid=%d AND rid=plink.pid), 'trunk') |
| 600 | 572 | @ = coalesce((SELECT value FROM tagxref |
| 601 | 573 |
| --- 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 |