Fossil SCM

Merge in the most recent enhancements from trunk, and the new experimental feature that puts the select branch first in the timeline.

drh 2019-05-20 23:19 tooltip-experiments merge
Commit 274e95f547149fe52fd6b35d2a30e99e7509fb25361d520f9733ea6e1605f744
-1
--- auto.def
+++ auto.def
@@ -376,11 +376,10 @@
376376
if {[string match *-darwin* [get-define host]]} {
377377
if {[cctest -cflags {-Wdeprecated-declarations}]} {
378378
define-append EXTRA_CFLAGS -Wdeprecated-declarations
379379
}
380380
}
381
- cc-check-function-in-lib BIO_ADDR_hostname_string ssl
382381
} else {
383382
user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
384383
}
385384
} else {
386385
if {[info exists ::zlib_lib]} {
387386
--- auto.def
+++ auto.def
@@ -376,11 +376,10 @@
376 if {[string match *-darwin* [get-define host]]} {
377 if {[cctest -cflags {-Wdeprecated-declarations}]} {
378 define-append EXTRA_CFLAGS -Wdeprecated-declarations
379 }
380 }
381 cc-check-function-in-lib BIO_ADDR_hostname_string ssl
382 } else {
383 user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
384 }
385 } else {
386 if {[info exists ::zlib_lib]} {
387
--- auto.def
+++ auto.def
@@ -376,11 +376,10 @@
376 if {[string match *-darwin* [get-define host]]} {
377 if {[cctest -cflags {-Wdeprecated-declarations}]} {
378 define-append EXTRA_CFLAGS -Wdeprecated-declarations
379 }
380 }
 
381 } else {
382 user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
383 }
384 } else {
385 if {[info exists ::zlib_lib]} {
386
+1 -1
--- src/branch.c
+++ src/branch.c
@@ -657,9 +657,9 @@
657657
** many descenders to (off-screen) parents. */
658658
tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL;
659659
if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
660660
if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
661661
if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
662
- www_print_timeline(&q, tmFlags, 0, 0, 0, brtimeline_extra);
662
+ www_print_timeline(&q, tmFlags, 0, 0, 0, 0, brtimeline_extra);
663663
db_finalize(&q);
664664
style_footer();
665665
}
666666
--- src/branch.c
+++ src/branch.c
@@ -657,9 +657,9 @@
657 ** many descenders to (off-screen) parents. */
658 tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL;
659 if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
660 if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
661 if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
662 www_print_timeline(&q, tmFlags, 0, 0, 0, brtimeline_extra);
663 db_finalize(&q);
664 style_footer();
665 }
666
--- src/branch.c
+++ src/branch.c
@@ -657,9 +657,9 @@
657 ** many descenders to (off-screen) parents. */
658 tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL;
659 if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
660 if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
661 if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
662 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, brtimeline_extra);
663 db_finalize(&q);
664 style_footer();
665 }
666
--- src/descendants.c
+++ src/descendants.c
@@ -540,11 +540,11 @@
540540
** many descenders to (off-screen) parents. */
541541
tmFlags = TIMELINE_LEAFONLY | TIMELINE_DISJOINT | TIMELINE_NOSCROLL;
542542
if( fNg==0 ) tmFlags |= TIMELINE_GRAPH;
543543
if( fBrBg ) tmFlags |= TIMELINE_BRCOLOR;
544544
if( fUBg ) tmFlags |= TIMELINE_UCOLOR;
545
- www_print_timeline(&q, tmFlags, 0, 0, 0, 0);
545
+ www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0);
546546
db_finalize(&q);
547547
@ <br />
548548
style_footer();
549549
}
550550
551551
--- src/descendants.c
+++ src/descendants.c
@@ -540,11 +540,11 @@
540 ** many descenders to (off-screen) parents. */
541 tmFlags = TIMELINE_LEAFONLY | TIMELINE_DISJOINT | TIMELINE_NOSCROLL;
542 if( fNg==0 ) tmFlags |= TIMELINE_GRAPH;
543 if( fBrBg ) tmFlags |= TIMELINE_BRCOLOR;
544 if( fUBg ) tmFlags |= TIMELINE_UCOLOR;
545 www_print_timeline(&q, tmFlags, 0, 0, 0, 0);
546 db_finalize(&q);
547 @ <br />
548 style_footer();
549 }
550
551
--- src/descendants.c
+++ src/descendants.c
@@ -540,11 +540,11 @@
540 ** many descenders to (off-screen) parents. */
541 tmFlags = TIMELINE_LEAFONLY | TIMELINE_DISJOINT | TIMELINE_NOSCROLL;
542 if( fNg==0 ) tmFlags |= TIMELINE_GRAPH;
543 if( fBrBg ) tmFlags |= TIMELINE_BRCOLOR;
544 if( fUBg ) tmFlags |= TIMELINE_UCOLOR;
545 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0);
546 db_finalize(&q);
547 @ <br />
548 style_footer();
549 }
550
551
+1 -1
--- src/finfo.c
+++ src/finfo.c
@@ -645,11 +645,11 @@
645645
@ </td></tr>
646646
}
647647
db_finalize(&q);
648648
db_finalize(&qparent);
649649
if( pGraph ){
650
- graph_finish(pGraph, TIMELINE_DISJOINT);
650
+ graph_finish(pGraph, 0, TIMELINE_DISJOINT);
651651
if( pGraph->nErr ){
652652
graph_free(pGraph);
653653
pGraph = 0;
654654
}else{
655655
@ <tr class="timelineBottom" id="btm-%d(iTableId)">\
656656
--- src/finfo.c
+++ src/finfo.c
@@ -645,11 +645,11 @@
645 @ </td></tr>
646 }
647 db_finalize(&q);
648 db_finalize(&qparent);
649 if( pGraph ){
650 graph_finish(pGraph, TIMELINE_DISJOINT);
651 if( pGraph->nErr ){
652 graph_free(pGraph);
653 pGraph = 0;
654 }else{
655 @ <tr class="timelineBottom" id="btm-%d(iTableId)">\
656
--- src/finfo.c
+++ src/finfo.c
@@ -645,11 +645,11 @@
645 @ </td></tr>
646 }
647 db_finalize(&q);
648 db_finalize(&qparent);
649 if( pGraph ){
650 graph_finish(pGraph, 0, TIMELINE_DISJOINT);
651 if( pGraph->nErr ){
652 graph_free(pGraph);
653 pGraph = 0;
654 }else{
655 @ <tr class="timelineBottom" id="btm-%d(iTableId)">\
656
+28 -5
--- src/graph.c
+++ src/graph.c
@@ -96,10 +96,11 @@
9696
int nBranch; /* Number of distinct branches */
9797
char **azBranch; /* Names of the branches */
9898
int nRow; /* Number of rows */
9999
int nHash; /* Number of slots in apHash[] */
100100
GraphRow **apHash; /* Hash table of GraphRow objects. Key: rid */
101
+ u8 aiRailMap[GR_MAX_RAIL]; /* Mapping of rails to actually columns */
101102
};
102103
103104
#endif
104105
105106
/* The N-th bit */
@@ -417,11 +418,11 @@
417418
**
418419
** TIMELINE_DISJOINT: Omit descenders
419420
** TIMELINE_FILLGAPS: Use step-children
420421
** TIMELINE_XMERGE: Omit off-graph merge lines
421422
*/
422
-void graph_finish(GraphContext *p, u32 tmFlags){
423
+void graph_finish(GraphContext *p, const char *zLeftBranch, u32 tmFlags){
423424
GraphRow *pRow, *pDesc, *pDup, *pLoop, *pParent;
424425
int i, j;
425426
u64 mask;
426427
int hasDup = 0; /* True if one or more isDup entries */
427428
const char *zTrunk;
@@ -516,19 +517,20 @@
516517
pParent = hashFind(p, pRow->aParent[0]);
517518
if( pParent==0 ) continue; /* Parent off-screen */
518519
if( pParent->zBranch!=pRow->zBranch ) continue; /* Different branch */
519520
if( pParent->idx <= pRow->idx ){
520521
pParent->timeWarp = 1;
521
- }else if( pRow->idx < pParent->idx ){
522
+ }else if( pRow->idxTop < pParent->idxTop ){
522523
pParent->pChild = pRow;
524
+ pParent->idxTop = pRow->idxTop;
523525
}
524526
}
525527
526528
if( tmFlags & TIMELINE_FILLGAPS ){
527
- /* If a node has no pChild but there is a node higher up in the graph
528
- ** that is in the same branch and that other node has no parent in
529
- ** the graph, the lower node a step-child of the upper node. This will
529
+ /* If a node has no pChild and there is a node higher up in the graph
530
+ ** that is in the same branch and has no in-graph parent, then
531
+ ** make the lower node a step-child of the upper node. This will
530532
** be represented on the graph by a thick dotted line without an arrowhead.
531533
*/
532534
for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
533535
if( pRow->pChild ) continue;
534536
for(pLoop=pRow->pPrev; pLoop; pLoop=pLoop->pPrev){
@@ -713,7 +715,28 @@
713715
714716
/*
715717
** Find the maximum rail number.
716718
*/
717719
find_max_rail(p);
720
+
721
+ /*
722
+ ** Compute the rail mapping.
723
+ */
724
+ for(i=0; i<=p->mxRail; i++) p->aiRailMap[i] = i;
725
+ if( zLeftBranch ){
726
+ char *zLeft = persistBranchName(p, zLeftBranch);
727
+ for(pRow=p->pLast; pRow; pRow=pRow->pPrev){
728
+ if( pRow->zBranch==zLeft ){
729
+ int iLeftRail = pRow->iRail;
730
+ p->aiRailMap[iLeftRail] = 0;
731
+ for(i=0, j=1; i<=p->mxRail; i++){
732
+ if( i==iLeftRail ) continue;
733
+ p->aiRailMap[i] = j++;
734
+ }
735
+ assert( j==p->mxRail+1 );
736
+ break;
737
+ }
738
+ }
739
+ }
740
+
718741
p->nErr = 0;
719742
}
720743
--- src/graph.c
+++ src/graph.c
@@ -96,10 +96,11 @@
96 int nBranch; /* Number of distinct branches */
97 char **azBranch; /* Names of the branches */
98 int nRow; /* Number of rows */
99 int nHash; /* Number of slots in apHash[] */
100 GraphRow **apHash; /* Hash table of GraphRow objects. Key: rid */
 
101 };
102
103 #endif
104
105 /* The N-th bit */
@@ -417,11 +418,11 @@
417 **
418 ** TIMELINE_DISJOINT: Omit descenders
419 ** TIMELINE_FILLGAPS: Use step-children
420 ** TIMELINE_XMERGE: Omit off-graph merge lines
421 */
422 void graph_finish(GraphContext *p, u32 tmFlags){
423 GraphRow *pRow, *pDesc, *pDup, *pLoop, *pParent;
424 int i, j;
425 u64 mask;
426 int hasDup = 0; /* True if one or more isDup entries */
427 const char *zTrunk;
@@ -516,19 +517,20 @@
516 pParent = hashFind(p, pRow->aParent[0]);
517 if( pParent==0 ) continue; /* Parent off-screen */
518 if( pParent->zBranch!=pRow->zBranch ) continue; /* Different branch */
519 if( pParent->idx <= pRow->idx ){
520 pParent->timeWarp = 1;
521 }else if( pRow->idx < pParent->idx ){
522 pParent->pChild = pRow;
 
523 }
524 }
525
526 if( tmFlags & TIMELINE_FILLGAPS ){
527 /* If a node has no pChild but there is a node higher up in the graph
528 ** that is in the same branch and that other node has no parent in
529 ** the graph, the lower node a step-child of the upper node. This will
530 ** be represented on the graph by a thick dotted line without an arrowhead.
531 */
532 for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
533 if( pRow->pChild ) continue;
534 for(pLoop=pRow->pPrev; pLoop; pLoop=pLoop->pPrev){
@@ -713,7 +715,28 @@
713
714 /*
715 ** Find the maximum rail number.
716 */
717 find_max_rail(p);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
718 p->nErr = 0;
719 }
720
--- src/graph.c
+++ src/graph.c
@@ -96,10 +96,11 @@
96 int nBranch; /* Number of distinct branches */
97 char **azBranch; /* Names of the branches */
98 int nRow; /* Number of rows */
99 int nHash; /* Number of slots in apHash[] */
100 GraphRow **apHash; /* Hash table of GraphRow objects. Key: rid */
101 u8 aiRailMap[GR_MAX_RAIL]; /* Mapping of rails to actually columns */
102 };
103
104 #endif
105
106 /* The N-th bit */
@@ -417,11 +418,11 @@
418 **
419 ** TIMELINE_DISJOINT: Omit descenders
420 ** TIMELINE_FILLGAPS: Use step-children
421 ** TIMELINE_XMERGE: Omit off-graph merge lines
422 */
423 void graph_finish(GraphContext *p, const char *zLeftBranch, u32 tmFlags){
424 GraphRow *pRow, *pDesc, *pDup, *pLoop, *pParent;
425 int i, j;
426 u64 mask;
427 int hasDup = 0; /* True if one or more isDup entries */
428 const char *zTrunk;
@@ -516,19 +517,20 @@
517 pParent = hashFind(p, pRow->aParent[0]);
518 if( pParent==0 ) continue; /* Parent off-screen */
519 if( pParent->zBranch!=pRow->zBranch ) continue; /* Different branch */
520 if( pParent->idx <= pRow->idx ){
521 pParent->timeWarp = 1;
522 }else if( pRow->idxTop < pParent->idxTop ){
523 pParent->pChild = pRow;
524 pParent->idxTop = pRow->idxTop;
525 }
526 }
527
528 if( tmFlags & TIMELINE_FILLGAPS ){
529 /* If a node has no pChild and there is a node higher up in the graph
530 ** that is in the same branch and has no in-graph parent, then
531 ** make the lower node a step-child of the upper node. This will
532 ** be represented on the graph by a thick dotted line without an arrowhead.
533 */
534 for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
535 if( pRow->pChild ) continue;
536 for(pLoop=pRow->pPrev; pLoop; pLoop=pLoop->pPrev){
@@ -713,7 +715,28 @@
715
716 /*
717 ** Find the maximum rail number.
718 */
719 find_max_rail(p);
720
721 /*
722 ** Compute the rail mapping.
723 */
724 for(i=0; i<=p->mxRail; i++) p->aiRailMap[i] = i;
725 if( zLeftBranch ){
726 char *zLeft = persistBranchName(p, zLeftBranch);
727 for(pRow=p->pLast; pRow; pRow=pRow->pPrev){
728 if( pRow->zBranch==zLeft ){
729 int iLeftRail = pRow->iRail;
730 p->aiRailMap[iLeftRail] = 0;
731 for(i=0, j=1; i<=p->mxRail; i++){
732 if( i==iLeftRail ) continue;
733 p->aiRailMap[i] = j++;
734 }
735 assert( j==p->mxRail+1 );
736 break;
737 }
738 }
739 }
740
741 p->nErr = 0;
742 }
743
+1 -1
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -387,11 +387,11 @@
387387
/* Set the Global.zIpAddr variable to the server we are talking to.
388388
** This is used to populate the ipaddr column of the rcvfrom table,
389389
** if any files are received from the server.
390390
*/
391391
{
392
-#ifdef HAVE_BIO_ADDR_HOSTNAME_STRING
392
+#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
393393
char *ip = BIO_ADDR_hostname_string(BIO_get_conn_address(iBio),1);
394394
g.zIpAddr = mprintf("%s", ip);
395395
OPENSSL_free(ip);
396396
#else
397397
/* IPv4 only code */
398398
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -387,11 +387,11 @@
387 /* Set the Global.zIpAddr variable to the server we are talking to.
388 ** This is used to populate the ipaddr column of the rcvfrom table,
389 ** if any files are received from the server.
390 */
391 {
392 #ifdef HAVE_BIO_ADDR_HOSTNAME_STRING
393 char *ip = BIO_ADDR_hostname_string(BIO_get_conn_address(iBio),1);
394 g.zIpAddr = mprintf("%s", ip);
395 OPENSSL_free(ip);
396 #else
397 /* IPv4 only code */
398
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -387,11 +387,11 @@
387 /* Set the Global.zIpAddr variable to the server we are talking to.
388 ** This is used to populate the ipaddr column of the rcvfrom table,
389 ** if any files are received from the server.
390 */
391 {
392 #if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
393 char *ip = BIO_ADDR_hostname_string(BIO_get_conn_address(iBio),1);
394 g.zIpAddr = mprintf("%s", ip);
395 OPENSSL_free(ip);
396 #else
397 /* IPv4 only code */
398
+4 -4
--- src/info.c
+++ src/info.c
@@ -286,11 +286,11 @@
286286
TIMELINE_GRAPH
287287
|TIMELINE_FILLGAPS
288288
|TIMELINE_NOSCROLL
289289
|TIMELINE_XMERGE
290290
|TIMELINE_CHPICK,
291
- 0, 0, rid, 0);
291
+ 0, 0, 0, rid, 0);
292292
db_finalize(&q);
293293
}
294294
295295
/*
296296
** Show a graph all wiki, tickets, and check-ins that refer to object zUuid.
@@ -317,11 +317,11 @@
317317
blob_zero(&sql);
318318
blob_append(&sql, timeline_query_for_www(), -1);
319319
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
320320
db_prepare(&q, "%s", blob_sql_text(&sql));
321321
www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
322
- 0, 0, 0, 0);
322
+ 0, 0, 0, 0, 0);
323323
db_finalize(&q);
324324
}
325325
326326
/*
327327
** WEBPAGE: test-backlinks
@@ -350,11 +350,11 @@
350350
blob_zero(&sql);
351351
blob_append(&sql, timeline_query_for_www(), -1);
352352
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
353353
db_prepare(&q, "%s", blob_sql_text(&sql));
354354
www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
355
- 0, 0, 0, 0);
355
+ 0, 0, 0, 0, 0);
356356
db_finalize(&q);
357357
style_footer();
358358
}
359359
360360
@@ -619,11 +619,11 @@
619619
blob_zero(&sql);
620620
blob_append(&sql, timeline_query_for_www(), -1);
621621
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
622622
db_prepare(&q, "%s", blob_sql_text(&sql));
623623
www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
624
- 0, 0, rid, 0);
624
+ 0, 0, 0, rid, 0);
625625
db_finalize(&q);
626626
style_footer();
627627
}
628628
629629
/*
630630
--- src/info.c
+++ src/info.c
@@ -286,11 +286,11 @@
286 TIMELINE_GRAPH
287 |TIMELINE_FILLGAPS
288 |TIMELINE_NOSCROLL
289 |TIMELINE_XMERGE
290 |TIMELINE_CHPICK,
291 0, 0, rid, 0);
292 db_finalize(&q);
293 }
294
295 /*
296 ** Show a graph all wiki, tickets, and check-ins that refer to object zUuid.
@@ -317,11 +317,11 @@
317 blob_zero(&sql);
318 blob_append(&sql, timeline_query_for_www(), -1);
319 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
320 db_prepare(&q, "%s", blob_sql_text(&sql));
321 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
322 0, 0, 0, 0);
323 db_finalize(&q);
324 }
325
326 /*
327 ** WEBPAGE: test-backlinks
@@ -350,11 +350,11 @@
350 blob_zero(&sql);
351 blob_append(&sql, timeline_query_for_www(), -1);
352 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
353 db_prepare(&q, "%s", blob_sql_text(&sql));
354 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
355 0, 0, 0, 0);
356 db_finalize(&q);
357 style_footer();
358 }
359
360
@@ -619,11 +619,11 @@
619 blob_zero(&sql);
620 blob_append(&sql, timeline_query_for_www(), -1);
621 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
622 db_prepare(&q, "%s", blob_sql_text(&sql));
623 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
624 0, 0, rid, 0);
625 db_finalize(&q);
626 style_footer();
627 }
628
629 /*
630
--- src/info.c
+++ src/info.c
@@ -286,11 +286,11 @@
286 TIMELINE_GRAPH
287 |TIMELINE_FILLGAPS
288 |TIMELINE_NOSCROLL
289 |TIMELINE_XMERGE
290 |TIMELINE_CHPICK,
291 0, 0, 0, rid, 0);
292 db_finalize(&q);
293 }
294
295 /*
296 ** Show a graph all wiki, tickets, and check-ins that refer to object zUuid.
@@ -317,11 +317,11 @@
317 blob_zero(&sql);
318 blob_append(&sql, timeline_query_for_www(), -1);
319 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
320 db_prepare(&q, "%s", blob_sql_text(&sql));
321 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
322 0, 0, 0, 0, 0);
323 db_finalize(&q);
324 }
325
326 /*
327 ** WEBPAGE: test-backlinks
@@ -350,11 +350,11 @@
350 blob_zero(&sql);
351 blob_append(&sql, timeline_query_for_www(), -1);
352 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
353 db_prepare(&q, "%s", blob_sql_text(&sql));
354 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
355 0, 0, 0, 0, 0);
356 db_finalize(&q);
357 style_footer();
358 }
359
360
@@ -619,11 +619,11 @@
619 blob_zero(&sql);
620 blob_append(&sql, timeline_query_for_www(), -1);
621 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
622 db_prepare(&q, "%s", blob_sql_text(&sql));
623 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
624 0, 0, 0, rid, 0);
625 db_finalize(&q);
626 style_footer();
627 }
628
629 /*
630
+1 -1
--- src/moderate.c
+++ src/moderate.c
@@ -184,11 +184,11 @@
184184
blob_append_sql(&sql,
185185
" AND event.objid IN (SELECT objid FROM modreq)"
186186
" ORDER BY event.mtime DESC"
187187
);
188188
db_prepare(&q, "%s", blob_sql_text(&sql));
189
- www_print_timeline(&q, 0, 0, 0, 0, 0);
189
+ www_print_timeline(&q, 0, 0, 0, 0, 0, 0);
190190
db_finalize(&q);
191191
}
192192
style_footer();
193193
}
194194
195195
--- src/moderate.c
+++ src/moderate.c
@@ -184,11 +184,11 @@
184 blob_append_sql(&sql,
185 " AND event.objid IN (SELECT objid FROM modreq)"
186 " ORDER BY event.mtime DESC"
187 );
188 db_prepare(&q, "%s", blob_sql_text(&sql));
189 www_print_timeline(&q, 0, 0, 0, 0, 0);
190 db_finalize(&q);
191 }
192 style_footer();
193 }
194
195
--- src/moderate.c
+++ src/moderate.c
@@ -184,11 +184,11 @@
184 blob_append_sql(&sql,
185 " AND event.objid IN (SELECT objid FROM modreq)"
186 " ORDER BY event.mtime DESC"
187 );
188 db_prepare(&q, "%s", blob_sql_text(&sql));
189 www_print_timeline(&q, 0, 0, 0, 0, 0, 0);
190 db_finalize(&q);
191 }
192 style_footer();
193 }
194
195
+1 -1
--- src/tag.c
+++ src/tag.c
@@ -754,10 +754,10 @@
754754
** many descenders to (off-screen) parents. */
755755
tmFlags = TIMELINE_XMERGE | TIMELINE_FILLGAPS | TIMELINE_NOSCROLL;
756756
if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
757757
if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
758758
if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
759
- www_print_timeline(&q, tmFlags, 0, 0, 0, 0);
759
+ www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0);
760760
db_finalize(&q);
761761
@ <br />
762762
style_footer();
763763
}
764764
--- src/tag.c
+++ src/tag.c
@@ -754,10 +754,10 @@
754 ** many descenders to (off-screen) parents. */
755 tmFlags = TIMELINE_XMERGE | TIMELINE_FILLGAPS | TIMELINE_NOSCROLL;
756 if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
757 if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
758 if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
759 www_print_timeline(&q, tmFlags, 0, 0, 0, 0);
760 db_finalize(&q);
761 @ <br />
762 style_footer();
763 }
764
--- src/tag.c
+++ src/tag.c
@@ -754,10 +754,10 @@
754 ** many descenders to (off-screen) parents. */
755 tmFlags = TIMELINE_XMERGE | TIMELINE_FILLGAPS | TIMELINE_NOSCROLL;
756 if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
757 if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
758 if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
759 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0);
760 db_finalize(&q);
761 @ <br />
762 style_footer();
763 }
764
+18 -14
--- src/timeline.c
+++ src/timeline.c
@@ -238,16 +238,17 @@
238238
** 8. list of symbolic tags.
239239
** 9. tagid for ticket or wiki or event
240240
** 10. Short comment to user for repeated tickets and wiki
241241
*/
242242
void www_print_timeline(
243
- Stmt *pQuery, /* Query to implement the timeline */
244
- int tmFlags, /* Flags controlling display behavior */
245
- const char *zThisUser, /* Suppress links to this user */
246
- const char *zThisTag, /* Suppress links to this tag */
247
- int selectedRid, /* Highlight the line with this RID value */
248
- void (*xExtra)(int) /* Routine to call on each line of display */
243
+ Stmt *pQuery, /* Query to implement the timeline */
244
+ int tmFlags, /* Flags controlling display behavior */
245
+ const char *zThisUser, /* Suppress links to this user */
246
+ const char *zThisTag, /* Suppress links to this tag */
247
+ const char *zLeftBranch, /* Strive to put this branch on the left margin */
248
+ int selectedRid, /* Highlight the line with this RID value */
249
+ void (*xExtra)(int) /* Routine to call on each line of display */
249250
){
250251
int mxWikiLen;
251252
Blob comment;
252253
int prevTagid = 0;
253254
int suppressCnt = 0;
@@ -759,11 +760,11 @@
759760
}
760761
if( pendingEndTr ){
761762
@ </td></tr>
762763
}
763764
if( pGraph ){
764
- graph_finish(pGraph, tmFlags);
765
+ graph_finish(pGraph, zLeftBranch, tmFlags);
765766
if( pGraph->nErr ){
766767
graph_free(pGraph);
767768
pGraph = 0;
768769
}else{
769770
@ <tr class="timelineBottom" id="btm-%d(iTableId)">\
@@ -829,10 +830,11 @@
829830
int colorGraph; /* Use colors for graph lines */
830831
int iTopRow; /* Index of the top row of the graph */
831832
int fileDiff; /* True for file diff. False for check-in diff */
832833
int omitDescenders; /* True to omit descenders */
833834
int scrollToSelect; /* True to scroll to the selection */
835
+ u8 *aiMap; /* The rail map */
834836
835837
iRailPitch = atoi(PD("railpitch","0"));
836838
showArrowheads = skin_detail_boolean("timeline-arrowheads");
837839
circleNodes = skin_detail_boolean("timeline-circle-nodes");
838840
colorGraph = skin_detail_boolean("timeline-color-graph-lines");
@@ -904,20 +906,21 @@
904906
** ci: "cherrypick-in". Like "mi" except for cherrypick merges.
905907
** omitted if there are no cherrypick merges.
906908
** h: The artifact hash of the object being graphed
907909
* br: The branch to which the artifact belongs
908910
*/
911
+ aiMap = pGraph->aiRailMap;
909912
for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){
910913
int k = 0;
911914
cgi_printf("{\"id\":%d,", pRow->idx);
912915
cgi_printf("\"bg\":\"%s\",", pRow->zBgClr);
913
- cgi_printf("\"r\":%d,", pRow->iRail);
916
+ cgi_printf("\"r\":%d,", aiMap[pRow->iRail]);
914917
if( pRow->bDescender ){
915918
cgi_printf("\"d\":%d,", pRow->bDescender);
916919
}
917920
if( pRow->mergeOut>=0 ){
918
- cgi_printf("\"mo\":%d,", pRow->mergeOut);
921
+ cgi_printf("\"mo\":%d,", aiMap[pRow->mergeOut]);
919922
if( pRow->mergeUpto==0 ) pRow->mergeUpto = pRow->idx;
920923
cgi_printf("\"mu\":%d,", pRow->mergeUpto);
921924
if( pRow->cherrypickUpto>0 && pRow->cherrypickUpto<pRow->mergeUpto ){
922925
cgi_printf("\"cu\":%d,", pRow->cherrypickUpto);
923926
}
@@ -936,11 +939,11 @@
936939
if( k==0 ){
937940
cgi_printf("\"au\":");
938941
cSep = '[';
939942
}
940943
k++;
941
- cgi_printf("%c%d,%d", cSep, i, pRow->aiRiser[i]);
944
+ cgi_printf("%c%d,%d", cSep, aiMap[i], pRow->aiRiser[i]);
942945
cSep = ',';
943946
}
944947
}
945948
if( k ){
946949
cgi_printf("],");
@@ -949,11 +952,11 @@
949952
cgi_printf("\"fg\":\"%s\",", bg_to_fg(pRow->zBgClr));
950953
}
951954
/* mi */
952955
for(i=k=0; i<GR_MAX_RAIL; i++){
953956
if( pRow->mergeIn[i]==1 ){
954
- int mi = i;
957
+ int mi = aiMap[i];
955958
if( (pRow->mergeDown >> i) & 1 ) mi = -mi;
956959
if( k==0 ){
957960
cgi_printf("\"mi\":");
958961
cSep = '[';
959962
}
@@ -964,11 +967,11 @@
964967
}
965968
if( k ) cgi_printf("],");
966969
/* ci */
967970
for(i=k=0; i<GR_MAX_RAIL; i++){
968971
if( pRow->mergeIn[i]==2 ){
969
- int mi = i;
972
+ int mi = aiMap[i];
970973
if( (pRow->cherrypickDown >> i) & 1 ) mi = -mi;
971974
if( k==0 ){
972975
cgi_printf("\"ci\":");
973976
cSep = '[';
974977
}
@@ -2394,11 +2397,12 @@
23942397
}
23952398
23962399
if( zNewerButton ){
23972400
@ %z(chref("button","%z",zNewerButton))More&nbsp;&uarr;</a>
23982401
}
2399
- www_print_timeline(&q, tmFlags, zThisUser, zThisTag, selectedRid, 0);
2402
+ www_print_timeline(&q, tmFlags, zThisUser, zThisTag, zBrName,
2403
+ selectedRid, 0);
24002404
db_finalize(&q);
24012405
if( zOlderButton ){
24022406
@ %z(chref("button","%z",zOlderButton))More&nbsp;&darr;</a>
24032407
}
24042408
style_footer();
@@ -2887,11 +2891,11 @@
28872891
zId = db_text(0, "SELECT timestamp FROM timeline"
28882892
" ORDER BY sortby DESC LIMIT 1");
28892893
@ <h2>%d(iAgo) Year%s(iAgo>1?"s":"") Ago
28902894
@ <small>%z(href("%R/timeline?c=%t",zId))(more context)</a>\
28912895
@ </small></h2>
2892
- www_print_timeline(&q, TIMELINE_GRAPH, 0, 0, 0, 0);
2896
+ www_print_timeline(&q, TIMELINE_GRAPH, 0, 0, 0, 0, 0);
28932897
}
28942898
db_finalize(&q);
28952899
style_footer();
28962900
}
28972901
28982902
--- src/timeline.c
+++ src/timeline.c
@@ -238,16 +238,17 @@
238 ** 8. list of symbolic tags.
239 ** 9. tagid for ticket or wiki or event
240 ** 10. Short comment to user for repeated tickets and wiki
241 */
242 void www_print_timeline(
243 Stmt *pQuery, /* Query to implement the timeline */
244 int tmFlags, /* Flags controlling display behavior */
245 const char *zThisUser, /* Suppress links to this user */
246 const char *zThisTag, /* Suppress links to this tag */
247 int selectedRid, /* Highlight the line with this RID value */
248 void (*xExtra)(int) /* Routine to call on each line of display */
 
249 ){
250 int mxWikiLen;
251 Blob comment;
252 int prevTagid = 0;
253 int suppressCnt = 0;
@@ -759,11 +760,11 @@
759 }
760 if( pendingEndTr ){
761 @ </td></tr>
762 }
763 if( pGraph ){
764 graph_finish(pGraph, tmFlags);
765 if( pGraph->nErr ){
766 graph_free(pGraph);
767 pGraph = 0;
768 }else{
769 @ <tr class="timelineBottom" id="btm-%d(iTableId)">\
@@ -829,10 +830,11 @@
829 int colorGraph; /* Use colors for graph lines */
830 int iTopRow; /* Index of the top row of the graph */
831 int fileDiff; /* True for file diff. False for check-in diff */
832 int omitDescenders; /* True to omit descenders */
833 int scrollToSelect; /* True to scroll to the selection */
 
834
835 iRailPitch = atoi(PD("railpitch","0"));
836 showArrowheads = skin_detail_boolean("timeline-arrowheads");
837 circleNodes = skin_detail_boolean("timeline-circle-nodes");
838 colorGraph = skin_detail_boolean("timeline-color-graph-lines");
@@ -904,20 +906,21 @@
904 ** ci: "cherrypick-in". Like "mi" except for cherrypick merges.
905 ** omitted if there are no cherrypick merges.
906 ** h: The artifact hash of the object being graphed
907 * br: The branch to which the artifact belongs
908 */
 
909 for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){
910 int k = 0;
911 cgi_printf("{\"id\":%d,", pRow->idx);
912 cgi_printf("\"bg\":\"%s\",", pRow->zBgClr);
913 cgi_printf("\"r\":%d,", pRow->iRail);
914 if( pRow->bDescender ){
915 cgi_printf("\"d\":%d,", pRow->bDescender);
916 }
917 if( pRow->mergeOut>=0 ){
918 cgi_printf("\"mo\":%d,", pRow->mergeOut);
919 if( pRow->mergeUpto==0 ) pRow->mergeUpto = pRow->idx;
920 cgi_printf("\"mu\":%d,", pRow->mergeUpto);
921 if( pRow->cherrypickUpto>0 && pRow->cherrypickUpto<pRow->mergeUpto ){
922 cgi_printf("\"cu\":%d,", pRow->cherrypickUpto);
923 }
@@ -936,11 +939,11 @@
936 if( k==0 ){
937 cgi_printf("\"au\":");
938 cSep = '[';
939 }
940 k++;
941 cgi_printf("%c%d,%d", cSep, i, pRow->aiRiser[i]);
942 cSep = ',';
943 }
944 }
945 if( k ){
946 cgi_printf("],");
@@ -949,11 +952,11 @@
949 cgi_printf("\"fg\":\"%s\",", bg_to_fg(pRow->zBgClr));
950 }
951 /* mi */
952 for(i=k=0; i<GR_MAX_RAIL; i++){
953 if( pRow->mergeIn[i]==1 ){
954 int mi = i;
955 if( (pRow->mergeDown >> i) & 1 ) mi = -mi;
956 if( k==0 ){
957 cgi_printf("\"mi\":");
958 cSep = '[';
959 }
@@ -964,11 +967,11 @@
964 }
965 if( k ) cgi_printf("],");
966 /* ci */
967 for(i=k=0; i<GR_MAX_RAIL; i++){
968 if( pRow->mergeIn[i]==2 ){
969 int mi = i;
970 if( (pRow->cherrypickDown >> i) & 1 ) mi = -mi;
971 if( k==0 ){
972 cgi_printf("\"ci\":");
973 cSep = '[';
974 }
@@ -2394,11 +2397,12 @@
2394 }
2395
2396 if( zNewerButton ){
2397 @ %z(chref("button","%z",zNewerButton))More&nbsp;&uarr;</a>
2398 }
2399 www_print_timeline(&q, tmFlags, zThisUser, zThisTag, selectedRid, 0);
 
2400 db_finalize(&q);
2401 if( zOlderButton ){
2402 @ %z(chref("button","%z",zOlderButton))More&nbsp;&darr;</a>
2403 }
2404 style_footer();
@@ -2887,11 +2891,11 @@
2887 zId = db_text(0, "SELECT timestamp FROM timeline"
2888 " ORDER BY sortby DESC LIMIT 1");
2889 @ <h2>%d(iAgo) Year%s(iAgo>1?"s":"") Ago
2890 @ <small>%z(href("%R/timeline?c=%t",zId))(more context)</a>\
2891 @ </small></h2>
2892 www_print_timeline(&q, TIMELINE_GRAPH, 0, 0, 0, 0);
2893 }
2894 db_finalize(&q);
2895 style_footer();
2896 }
2897
2898
--- src/timeline.c
+++ src/timeline.c
@@ -238,16 +238,17 @@
238 ** 8. list of symbolic tags.
239 ** 9. tagid for ticket or wiki or event
240 ** 10. Short comment to user for repeated tickets and wiki
241 */
242 void www_print_timeline(
243 Stmt *pQuery, /* Query to implement the timeline */
244 int tmFlags, /* Flags controlling display behavior */
245 const char *zThisUser, /* Suppress links to this user */
246 const char *zThisTag, /* Suppress links to this tag */
247 const char *zLeftBranch, /* Strive to put this branch on the left margin */
248 int selectedRid, /* Highlight the line with this RID value */
249 void (*xExtra)(int) /* Routine to call on each line of display */
250 ){
251 int mxWikiLen;
252 Blob comment;
253 int prevTagid = 0;
254 int suppressCnt = 0;
@@ -759,11 +760,11 @@
760 }
761 if( pendingEndTr ){
762 @ </td></tr>
763 }
764 if( pGraph ){
765 graph_finish(pGraph, zLeftBranch, tmFlags);
766 if( pGraph->nErr ){
767 graph_free(pGraph);
768 pGraph = 0;
769 }else{
770 @ <tr class="timelineBottom" id="btm-%d(iTableId)">\
@@ -829,10 +830,11 @@
830 int colorGraph; /* Use colors for graph lines */
831 int iTopRow; /* Index of the top row of the graph */
832 int fileDiff; /* True for file diff. False for check-in diff */
833 int omitDescenders; /* True to omit descenders */
834 int scrollToSelect; /* True to scroll to the selection */
835 u8 *aiMap; /* The rail map */
836
837 iRailPitch = atoi(PD("railpitch","0"));
838 showArrowheads = skin_detail_boolean("timeline-arrowheads");
839 circleNodes = skin_detail_boolean("timeline-circle-nodes");
840 colorGraph = skin_detail_boolean("timeline-color-graph-lines");
@@ -904,20 +906,21 @@
906 ** ci: "cherrypick-in". Like "mi" except for cherrypick merges.
907 ** omitted if there are no cherrypick merges.
908 ** h: The artifact hash of the object being graphed
909 * br: The branch to which the artifact belongs
910 */
911 aiMap = pGraph->aiRailMap;
912 for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){
913 int k = 0;
914 cgi_printf("{\"id\":%d,", pRow->idx);
915 cgi_printf("\"bg\":\"%s\",", pRow->zBgClr);
916 cgi_printf("\"r\":%d,", aiMap[pRow->iRail]);
917 if( pRow->bDescender ){
918 cgi_printf("\"d\":%d,", pRow->bDescender);
919 }
920 if( pRow->mergeOut>=0 ){
921 cgi_printf("\"mo\":%d,", aiMap[pRow->mergeOut]);
922 if( pRow->mergeUpto==0 ) pRow->mergeUpto = pRow->idx;
923 cgi_printf("\"mu\":%d,", pRow->mergeUpto);
924 if( pRow->cherrypickUpto>0 && pRow->cherrypickUpto<pRow->mergeUpto ){
925 cgi_printf("\"cu\":%d,", pRow->cherrypickUpto);
926 }
@@ -936,11 +939,11 @@
939 if( k==0 ){
940 cgi_printf("\"au\":");
941 cSep = '[';
942 }
943 k++;
944 cgi_printf("%c%d,%d", cSep, aiMap[i], pRow->aiRiser[i]);
945 cSep = ',';
946 }
947 }
948 if( k ){
949 cgi_printf("],");
@@ -949,11 +952,11 @@
952 cgi_printf("\"fg\":\"%s\",", bg_to_fg(pRow->zBgClr));
953 }
954 /* mi */
955 for(i=k=0; i<GR_MAX_RAIL; i++){
956 if( pRow->mergeIn[i]==1 ){
957 int mi = aiMap[i];
958 if( (pRow->mergeDown >> i) & 1 ) mi = -mi;
959 if( k==0 ){
960 cgi_printf("\"mi\":");
961 cSep = '[';
962 }
@@ -964,11 +967,11 @@
967 }
968 if( k ) cgi_printf("],");
969 /* ci */
970 for(i=k=0; i<GR_MAX_RAIL; i++){
971 if( pRow->mergeIn[i]==2 ){
972 int mi = aiMap[i];
973 if( (pRow->cherrypickDown >> i) & 1 ) mi = -mi;
974 if( k==0 ){
975 cgi_printf("\"ci\":");
976 cSep = '[';
977 }
@@ -2394,11 +2397,12 @@
2397 }
2398
2399 if( zNewerButton ){
2400 @ %z(chref("button","%z",zNewerButton))More&nbsp;&uarr;</a>
2401 }
2402 www_print_timeline(&q, tmFlags, zThisUser, zThisTag, zBrName,
2403 selectedRid, 0);
2404 db_finalize(&q);
2405 if( zOlderButton ){
2406 @ %z(chref("button","%z",zOlderButton))More&nbsp;&darr;</a>
2407 }
2408 style_footer();
@@ -2887,11 +2891,11 @@
2891 zId = db_text(0, "SELECT timestamp FROM timeline"
2892 " ORDER BY sortby DESC LIMIT 1");
2893 @ <h2>%d(iAgo) Year%s(iAgo>1?"s":"") Ago
2894 @ <small>%z(href("%R/timeline?c=%t",zId))(more context)</a>\
2895 @ </small></h2>
2896 www_print_timeline(&q, TIMELINE_GRAPH, 0, 0, 0, 0, 0);
2897 }
2898 db_finalize(&q);
2899 style_footer();
2900 }
2901
2902
+18 -14
--- src/timeline.c
+++ src/timeline.c
@@ -238,16 +238,17 @@
238238
** 8. list of symbolic tags.
239239
** 9. tagid for ticket or wiki or event
240240
** 10. Short comment to user for repeated tickets and wiki
241241
*/
242242
void www_print_timeline(
243
- Stmt *pQuery, /* Query to implement the timeline */
244
- int tmFlags, /* Flags controlling display behavior */
245
- const char *zThisUser, /* Suppress links to this user */
246
- const char *zThisTag, /* Suppress links to this tag */
247
- int selectedRid, /* Highlight the line with this RID value */
248
- void (*xExtra)(int) /* Routine to call on each line of display */
243
+ Stmt *pQuery, /* Query to implement the timeline */
244
+ int tmFlags, /* Flags controlling display behavior */
245
+ const char *zThisUser, /* Suppress links to this user */
246
+ const char *zThisTag, /* Suppress links to this tag */
247
+ const char *zLeftBranch, /* Strive to put this branch on the left margin */
248
+ int selectedRid, /* Highlight the line with this RID value */
249
+ void (*xExtra)(int) /* Routine to call on each line of display */
249250
){
250251
int mxWikiLen;
251252
Blob comment;
252253
int prevTagid = 0;
253254
int suppressCnt = 0;
@@ -759,11 +760,11 @@
759760
}
760761
if( pendingEndTr ){
761762
@ </td></tr>
762763
}
763764
if( pGraph ){
764
- graph_finish(pGraph, tmFlags);
765
+ graph_finish(pGraph, zLeftBranch, tmFlags);
765766
if( pGraph->nErr ){
766767
graph_free(pGraph);
767768
pGraph = 0;
768769
}else{
769770
@ <tr class="timelineBottom" id="btm-%d(iTableId)">\
@@ -829,10 +830,11 @@
829830
int colorGraph; /* Use colors for graph lines */
830831
int iTopRow; /* Index of the top row of the graph */
831832
int fileDiff; /* True for file diff. False for check-in diff */
832833
int omitDescenders; /* True to omit descenders */
833834
int scrollToSelect; /* True to scroll to the selection */
835
+ u8 *aiMap; /* The rail map */
834836
835837
iRailPitch = atoi(PD("railpitch","0"));
836838
showArrowheads = skin_detail_boolean("timeline-arrowheads");
837839
circleNodes = skin_detail_boolean("timeline-circle-nodes");
838840
colorGraph = skin_detail_boolean("timeline-color-graph-lines");
@@ -904,20 +906,21 @@
904906
** ci: "cherrypick-in". Like "mi" except for cherrypick merges.
905907
** omitted if there are no cherrypick merges.
906908
** h: The artifact hash of the object being graphed
907909
* br: The branch to which the artifact belongs
908910
*/
911
+ aiMap = pGraph->aiRailMap;
909912
for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){
910913
int k = 0;
911914
cgi_printf("{\"id\":%d,", pRow->idx);
912915
cgi_printf("\"bg\":\"%s\",", pRow->zBgClr);
913
- cgi_printf("\"r\":%d,", pRow->iRail);
916
+ cgi_printf("\"r\":%d,", aiMap[pRow->iRail]);
914917
if( pRow->bDescender ){
915918
cgi_printf("\"d\":%d,", pRow->bDescender);
916919
}
917920
if( pRow->mergeOut>=0 ){
918
- cgi_printf("\"mo\":%d,", pRow->mergeOut);
921
+ cgi_printf("\"mo\":%d,", aiMap[pRow->mergeOut]);
919922
if( pRow->mergeUpto==0 ) pRow->mergeUpto = pRow->idx;
920923
cgi_printf("\"mu\":%d,", pRow->mergeUpto);
921924
if( pRow->cherrypickUpto>0 && pRow->cherrypickUpto<pRow->mergeUpto ){
922925
cgi_printf("\"cu\":%d,", pRow->cherrypickUpto);
923926
}
@@ -936,11 +939,11 @@
936939
if( k==0 ){
937940
cgi_printf("\"au\":");
938941
cSep = '[';
939942
}
940943
k++;
941
- cgi_printf("%c%d,%d", cSep, i, pRow->aiRiser[i]);
944
+ cgi_printf("%c%d,%d", cSep, aiMap[i], pRow->aiRiser[i]);
942945
cSep = ',';
943946
}
944947
}
945948
if( k ){
946949
cgi_printf("],");
@@ -949,11 +952,11 @@
949952
cgi_printf("\"fg\":\"%s\",", bg_to_fg(pRow->zBgClr));
950953
}
951954
/* mi */
952955
for(i=k=0; i<GR_MAX_RAIL; i++){
953956
if( pRow->mergeIn[i]==1 ){
954
- int mi = i;
957
+ int mi = aiMap[i];
955958
if( (pRow->mergeDown >> i) & 1 ) mi = -mi;
956959
if( k==0 ){
957960
cgi_printf("\"mi\":");
958961
cSep = '[';
959962
}
@@ -964,11 +967,11 @@
964967
}
965968
if( k ) cgi_printf("],");
966969
/* ci */
967970
for(i=k=0; i<GR_MAX_RAIL; i++){
968971
if( pRow->mergeIn[i]==2 ){
969
- int mi = i;
972
+ int mi = aiMap[i];
970973
if( (pRow->cherrypickDown >> i) & 1 ) mi = -mi;
971974
if( k==0 ){
972975
cgi_printf("\"ci\":");
973976
cSep = '[';
974977
}
@@ -2394,11 +2397,12 @@
23942397
}
23952398
23962399
if( zNewerButton ){
23972400
@ %z(chref("button","%z",zNewerButton))More&nbsp;&uarr;</a>
23982401
}
2399
- www_print_timeline(&q, tmFlags, zThisUser, zThisTag, selectedRid, 0);
2402
+ www_print_timeline(&q, tmFlags, zThisUser, zThisTag, zBrName,
2403
+ selectedRid, 0);
24002404
db_finalize(&q);
24012405
if( zOlderButton ){
24022406
@ %z(chref("button","%z",zOlderButton))More&nbsp;&darr;</a>
24032407
}
24042408
style_footer();
@@ -2887,11 +2891,11 @@
28872891
zId = db_text(0, "SELECT timestamp FROM timeline"
28882892
" ORDER BY sortby DESC LIMIT 1");
28892893
@ <h2>%d(iAgo) Year%s(iAgo>1?"s":"") Ago
28902894
@ <small>%z(href("%R/timeline?c=%t",zId))(more context)</a>\
28912895
@ </small></h2>
2892
- www_print_timeline(&q, TIMELINE_GRAPH, 0, 0, 0, 0);
2896
+ www_print_timeline(&q, TIMELINE_GRAPH, 0, 0, 0, 0, 0);
28932897
}
28942898
db_finalize(&q);
28952899
style_footer();
28962900
}
28972901
28982902
--- src/timeline.c
+++ src/timeline.c
@@ -238,16 +238,17 @@
238 ** 8. list of symbolic tags.
239 ** 9. tagid for ticket or wiki or event
240 ** 10. Short comment to user for repeated tickets and wiki
241 */
242 void www_print_timeline(
243 Stmt *pQuery, /* Query to implement the timeline */
244 int tmFlags, /* Flags controlling display behavior */
245 const char *zThisUser, /* Suppress links to this user */
246 const char *zThisTag, /* Suppress links to this tag */
247 int selectedRid, /* Highlight the line with this RID value */
248 void (*xExtra)(int) /* Routine to call on each line of display */
 
249 ){
250 int mxWikiLen;
251 Blob comment;
252 int prevTagid = 0;
253 int suppressCnt = 0;
@@ -759,11 +760,11 @@
759 }
760 if( pendingEndTr ){
761 @ </td></tr>
762 }
763 if( pGraph ){
764 graph_finish(pGraph, tmFlags);
765 if( pGraph->nErr ){
766 graph_free(pGraph);
767 pGraph = 0;
768 }else{
769 @ <tr class="timelineBottom" id="btm-%d(iTableId)">\
@@ -829,10 +830,11 @@
829 int colorGraph; /* Use colors for graph lines */
830 int iTopRow; /* Index of the top row of the graph */
831 int fileDiff; /* True for file diff. False for check-in diff */
832 int omitDescenders; /* True to omit descenders */
833 int scrollToSelect; /* True to scroll to the selection */
 
834
835 iRailPitch = atoi(PD("railpitch","0"));
836 showArrowheads = skin_detail_boolean("timeline-arrowheads");
837 circleNodes = skin_detail_boolean("timeline-circle-nodes");
838 colorGraph = skin_detail_boolean("timeline-color-graph-lines");
@@ -904,20 +906,21 @@
904 ** ci: "cherrypick-in". Like "mi" except for cherrypick merges.
905 ** omitted if there are no cherrypick merges.
906 ** h: The artifact hash of the object being graphed
907 * br: The branch to which the artifact belongs
908 */
 
909 for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){
910 int k = 0;
911 cgi_printf("{\"id\":%d,", pRow->idx);
912 cgi_printf("\"bg\":\"%s\",", pRow->zBgClr);
913 cgi_printf("\"r\":%d,", pRow->iRail);
914 if( pRow->bDescender ){
915 cgi_printf("\"d\":%d,", pRow->bDescender);
916 }
917 if( pRow->mergeOut>=0 ){
918 cgi_printf("\"mo\":%d,", pRow->mergeOut);
919 if( pRow->mergeUpto==0 ) pRow->mergeUpto = pRow->idx;
920 cgi_printf("\"mu\":%d,", pRow->mergeUpto);
921 if( pRow->cherrypickUpto>0 && pRow->cherrypickUpto<pRow->mergeUpto ){
922 cgi_printf("\"cu\":%d,", pRow->cherrypickUpto);
923 }
@@ -936,11 +939,11 @@
936 if( k==0 ){
937 cgi_printf("\"au\":");
938 cSep = '[';
939 }
940 k++;
941 cgi_printf("%c%d,%d", cSep, i, pRow->aiRiser[i]);
942 cSep = ',';
943 }
944 }
945 if( k ){
946 cgi_printf("],");
@@ -949,11 +952,11 @@
949 cgi_printf("\"fg\":\"%s\",", bg_to_fg(pRow->zBgClr));
950 }
951 /* mi */
952 for(i=k=0; i<GR_MAX_RAIL; i++){
953 if( pRow->mergeIn[i]==1 ){
954 int mi = i;
955 if( (pRow->mergeDown >> i) & 1 ) mi = -mi;
956 if( k==0 ){
957 cgi_printf("\"mi\":");
958 cSep = '[';
959 }
@@ -964,11 +967,11 @@
964 }
965 if( k ) cgi_printf("],");
966 /* ci */
967 for(i=k=0; i<GR_MAX_RAIL; i++){
968 if( pRow->mergeIn[i]==2 ){
969 int mi = i;
970 if( (pRow->cherrypickDown >> i) & 1 ) mi = -mi;
971 if( k==0 ){
972 cgi_printf("\"ci\":");
973 cSep = '[';
974 }
@@ -2394,11 +2397,12 @@
2394 }
2395
2396 if( zNewerButton ){
2397 @ %z(chref("button","%z",zNewerButton))More&nbsp;&uarr;</a>
2398 }
2399 www_print_timeline(&q, tmFlags, zThisUser, zThisTag, selectedRid, 0);
 
2400 db_finalize(&q);
2401 if( zOlderButton ){
2402 @ %z(chref("button","%z",zOlderButton))More&nbsp;&darr;</a>
2403 }
2404 style_footer();
@@ -2887,11 +2891,11 @@
2887 zId = db_text(0, "SELECT timestamp FROM timeline"
2888 " ORDER BY sortby DESC LIMIT 1");
2889 @ <h2>%d(iAgo) Year%s(iAgo>1?"s":"") Ago
2890 @ <small>%z(href("%R/timeline?c=%t",zId))(more context)</a>\
2891 @ </small></h2>
2892 www_print_timeline(&q, TIMELINE_GRAPH, 0, 0, 0, 0);
2893 }
2894 db_finalize(&q);
2895 style_footer();
2896 }
2897
2898
--- src/timeline.c
+++ src/timeline.c
@@ -238,16 +238,17 @@
238 ** 8. list of symbolic tags.
239 ** 9. tagid for ticket or wiki or event
240 ** 10. Short comment to user for repeated tickets and wiki
241 */
242 void www_print_timeline(
243 Stmt *pQuery, /* Query to implement the timeline */
244 int tmFlags, /* Flags controlling display behavior */
245 const char *zThisUser, /* Suppress links to this user */
246 const char *zThisTag, /* Suppress links to this tag */
247 const char *zLeftBranch, /* Strive to put this branch on the left margin */
248 int selectedRid, /* Highlight the line with this RID value */
249 void (*xExtra)(int) /* Routine to call on each line of display */
250 ){
251 int mxWikiLen;
252 Blob comment;
253 int prevTagid = 0;
254 int suppressCnt = 0;
@@ -759,11 +760,11 @@
760 }
761 if( pendingEndTr ){
762 @ </td></tr>
763 }
764 if( pGraph ){
765 graph_finish(pGraph, zLeftBranch, tmFlags);
766 if( pGraph->nErr ){
767 graph_free(pGraph);
768 pGraph = 0;
769 }else{
770 @ <tr class="timelineBottom" id="btm-%d(iTableId)">\
@@ -829,10 +830,11 @@
830 int colorGraph; /* Use colors for graph lines */
831 int iTopRow; /* Index of the top row of the graph */
832 int fileDiff; /* True for file diff. False for check-in diff */
833 int omitDescenders; /* True to omit descenders */
834 int scrollToSelect; /* True to scroll to the selection */
835 u8 *aiMap; /* The rail map */
836
837 iRailPitch = atoi(PD("railpitch","0"));
838 showArrowheads = skin_detail_boolean("timeline-arrowheads");
839 circleNodes = skin_detail_boolean("timeline-circle-nodes");
840 colorGraph = skin_detail_boolean("timeline-color-graph-lines");
@@ -904,20 +906,21 @@
906 ** ci: "cherrypick-in". Like "mi" except for cherrypick merges.
907 ** omitted if there are no cherrypick merges.
908 ** h: The artifact hash of the object being graphed
909 * br: The branch to which the artifact belongs
910 */
911 aiMap = pGraph->aiRailMap;
912 for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){
913 int k = 0;
914 cgi_printf("{\"id\":%d,", pRow->idx);
915 cgi_printf("\"bg\":\"%s\",", pRow->zBgClr);
916 cgi_printf("\"r\":%d,", aiMap[pRow->iRail]);
917 if( pRow->bDescender ){
918 cgi_printf("\"d\":%d,", pRow->bDescender);
919 }
920 if( pRow->mergeOut>=0 ){
921 cgi_printf("\"mo\":%d,", aiMap[pRow->mergeOut]);
922 if( pRow->mergeUpto==0 ) pRow->mergeUpto = pRow->idx;
923 cgi_printf("\"mu\":%d,", pRow->mergeUpto);
924 if( pRow->cherrypickUpto>0 && pRow->cherrypickUpto<pRow->mergeUpto ){
925 cgi_printf("\"cu\":%d,", pRow->cherrypickUpto);
926 }
@@ -936,11 +939,11 @@
939 if( k==0 ){
940 cgi_printf("\"au\":");
941 cSep = '[';
942 }
943 k++;
944 cgi_printf("%c%d,%d", cSep, aiMap[i], pRow->aiRiser[i]);
945 cSep = ',';
946 }
947 }
948 if( k ){
949 cgi_printf("],");
@@ -949,11 +952,11 @@
952 cgi_printf("\"fg\":\"%s\",", bg_to_fg(pRow->zBgClr));
953 }
954 /* mi */
955 for(i=k=0; i<GR_MAX_RAIL; i++){
956 if( pRow->mergeIn[i]==1 ){
957 int mi = aiMap[i];
958 if( (pRow->mergeDown >> i) & 1 ) mi = -mi;
959 if( k==0 ){
960 cgi_printf("\"mi\":");
961 cSep = '[';
962 }
@@ -964,11 +967,11 @@
967 }
968 if( k ) cgi_printf("],");
969 /* ci */
970 for(i=k=0; i<GR_MAX_RAIL; i++){
971 if( pRow->mergeIn[i]==2 ){
972 int mi = aiMap[i];
973 if( (pRow->cherrypickDown >> i) & 1 ) mi = -mi;
974 if( k==0 ){
975 cgi_printf("\"ci\":");
976 cSep = '[';
977 }
@@ -2394,11 +2397,12 @@
2397 }
2398
2399 if( zNewerButton ){
2400 @ %z(chref("button","%z",zNewerButton))More&nbsp;&uarr;</a>
2401 }
2402 www_print_timeline(&q, tmFlags, zThisUser, zThisTag, zBrName,
2403 selectedRid, 0);
2404 db_finalize(&q);
2405 if( zOlderButton ){
2406 @ %z(chref("button","%z",zOlderButton))More&nbsp;&darr;</a>
2407 }
2408 style_footer();
@@ -2887,11 +2891,11 @@
2891 zId = db_text(0, "SELECT timestamp FROM timeline"
2892 " ORDER BY sortby DESC LIMIT 1");
2893 @ <h2>%d(iAgo) Year%s(iAgo>1?"s":"") Ago
2894 @ <small>%z(href("%R/timeline?c=%t",zId))(more context)</a>\
2895 @ </small></h2>
2896 www_print_timeline(&q, TIMELINE_GRAPH, 0, 0, 0, 0, 0);
2897 }
2898 db_finalize(&q);
2899 style_footer();
2900 }
2901
2902
+1 -1
--- src/tkt.c
+++ src/tkt.c
@@ -896,11 +896,11 @@
896896
timeline_query_for_www(), tagid, zFullUuid, zFullUuid, zFullUuid
897897
);
898898
}
899899
db_prepare(&q, "%z", zSQL/*safe-for-%s*/);
900900
www_print_timeline(&q, TIMELINE_ARTID|TIMELINE_DISJOINT|TIMELINE_GRAPH,
901
- 0, 0, 0, 0);
901
+ 0, 0, 0, 0, 0);
902902
db_finalize(&q);
903903
style_footer();
904904
}
905905
906906
/*
907907
--- src/tkt.c
+++ src/tkt.c
@@ -896,11 +896,11 @@
896 timeline_query_for_www(), tagid, zFullUuid, zFullUuid, zFullUuid
897 );
898 }
899 db_prepare(&q, "%z", zSQL/*safe-for-%s*/);
900 www_print_timeline(&q, TIMELINE_ARTID|TIMELINE_DISJOINT|TIMELINE_GRAPH,
901 0, 0, 0, 0);
902 db_finalize(&q);
903 style_footer();
904 }
905
906 /*
907
--- src/tkt.c
+++ src/tkt.c
@@ -896,11 +896,11 @@
896 timeline_query_for_www(), tagid, zFullUuid, zFullUuid, zFullUuid
897 );
898 }
899 db_prepare(&q, "%z", zSQL/*safe-for-%s*/);
900 www_print_timeline(&q, TIMELINE_ARTID|TIMELINE_DISJOINT|TIMELINE_GRAPH,
901 0, 0, 0, 0, 0);
902 db_finalize(&q);
903 style_footer();
904 }
905
906 /*
907
--- test/graph-test-1.wiki
+++ test/graph-test-1.wiki
@@ -88,10 +88,19 @@
8888
Single check-in takes both a full merge and a cherrypick merge</a>
8989
* <a href="../../../timeline?b=dc81ac70&n=14" target="testwindow">
9090
Mixed merge arrow, partly fully and partly cherrypick</a>
9191
* <a href="../../../timeline?b=dc81ac70&n=13" target="testwindow">
9292
Mixed merge arrow to bottom of screen.</a>
93
+ * <a href="../../../timeline?b=4471e93c&n=12" target="testwindow">
94
+ A fork on trunk keeps the longest chain of child nodes directly
95
+ above the fork and the shorter chain off to the side.</a>
96
+ * <a href="../../../timeline?r=jan-manifest-tags&n=50" target="testwindow">
97
+ The "jan-manifest-tags" branch containing a non-trunk fork</a>
98
+ * <a href="../../../timeline?r=diff-eolws&n=50" target="testwindow">
99
+ The "diff-eolws" branch containing a non-trunk fork</a>
100
+ * <a href="../../../timeline?n=all&forks" target="testwindow">
101
+ All forks</a>
93102
94103
External:
95104
96105
* <a href="http://www.sqlite.org/src/timeline?c=2010-09-29&nd"
97106
target="testwindow">Timewarp due to a mis-configured system clock.</a>
@@ -102,5 +111,8 @@
102111
target='testwindow'>Merge arrows to the left and to the right</a>
103112
* <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=13'
104113
target='testwindow'>Previous, with a scrunched graph</a>
105114
* <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=11'
106115
target='testwindow'>Previous, with a severely scrunched graph</a>
116
+ * <a href="https://sqlite.org/src/timeline?r=wal&n=1000"
117
+ target='testwindow'>The "wal" branch SQLite repository, containing
118
+ multiple non-trunk forks.</a>
107119
--- test/graph-test-1.wiki
+++ test/graph-test-1.wiki
@@ -88,10 +88,19 @@
88 Single check-in takes both a full merge and a cherrypick merge</a>
89 * <a href="../../../timeline?b=dc81ac70&n=14" target="testwindow">
90 Mixed merge arrow, partly fully and partly cherrypick</a>
91 * <a href="../../../timeline?b=dc81ac70&n=13" target="testwindow">
92 Mixed merge arrow to bottom of screen.</a>
 
 
 
 
 
 
 
 
 
93
94 External:
95
96 * <a href="http://www.sqlite.org/src/timeline?c=2010-09-29&nd"
97 target="testwindow">Timewarp due to a mis-configured system clock.</a>
@@ -102,5 +111,8 @@
102 target='testwindow'>Merge arrows to the left and to the right</a>
103 * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=13'
104 target='testwindow'>Previous, with a scrunched graph</a>
105 * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=11'
106 target='testwindow'>Previous, with a severely scrunched graph</a>
 
 
 
107
--- test/graph-test-1.wiki
+++ test/graph-test-1.wiki
@@ -88,10 +88,19 @@
88 Single check-in takes both a full merge and a cherrypick merge</a>
89 * <a href="../../../timeline?b=dc81ac70&n=14" target="testwindow">
90 Mixed merge arrow, partly fully and partly cherrypick</a>
91 * <a href="../../../timeline?b=dc81ac70&n=13" target="testwindow">
92 Mixed merge arrow to bottom of screen.</a>
93 * <a href="../../../timeline?b=4471e93c&n=12" target="testwindow">
94 A fork on trunk keeps the longest chain of child nodes directly
95 above the fork and the shorter chain off to the side.</a>
96 * <a href="../../../timeline?r=jan-manifest-tags&n=50" target="testwindow">
97 The "jan-manifest-tags" branch containing a non-trunk fork</a>
98 * <a href="../../../timeline?r=diff-eolws&n=50" target="testwindow">
99 The "diff-eolws" branch containing a non-trunk fork</a>
100 * <a href="../../../timeline?n=all&forks" target="testwindow">
101 All forks</a>
102
103 External:
104
105 * <a href="http://www.sqlite.org/src/timeline?c=2010-09-29&nd"
106 target="testwindow">Timewarp due to a mis-configured system clock.</a>
@@ -102,5 +111,8 @@
111 target='testwindow'>Merge arrows to the left and to the right</a>
112 * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=13'
113 target='testwindow'>Previous, with a scrunched graph</a>
114 * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=11'
115 target='testwindow'>Previous, with a severely scrunched graph</a>
116 * <a href="https://sqlite.org/src/timeline?r=wal&n=1000"
117 target='testwindow'>The "wal" branch SQLite repository, containing
118 multiple non-trunk forks.</a>
119

Keyboard Shortcuts

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