Fossil SCM
Merge in the most recent enhancements from trunk, and the new experimental feature that puts the select branch first in the timeline.
Commit
274e95f547149fe52fd6b35d2a30e99e7509fb25361d520f9733ea6e1605f744
Parent
b4f1eb9043692a2…
13 files changed
-1
+1
-1
+1
-1
+1
-1
+28
-5
+1
-1
+4
-4
+1
-1
+1
-1
+18
-14
+18
-14
+1
-1
+12
M
auto.def
-1
| --- auto.def | ||
| +++ auto.def | ||
| @@ -376,11 +376,10 @@ | ||
| 376 | 376 | if {[string match *-darwin* [get-define host]]} { |
| 377 | 377 | if {[cctest -cflags {-Wdeprecated-declarations}]} { |
| 378 | 378 | define-append EXTRA_CFLAGS -Wdeprecated-declarations |
| 379 | 379 | } |
| 380 | 380 | } |
| 381 | - cc-check-function-in-lib BIO_ADDR_hostname_string ssl | |
| 382 | 381 | } else { |
| 383 | 382 | user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support" |
| 384 | 383 | } |
| 385 | 384 | } else { |
| 386 | 385 | if {[info exists ::zlib_lib]} { |
| 387 | 386 |
| --- 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 @@ | ||
| 657 | 657 | ** many descenders to (off-screen) parents. */ |
| 658 | 658 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 659 | 659 | if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 660 | 660 | if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 661 | 661 | 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); | |
| 663 | 663 | db_finalize(&q); |
| 664 | 664 | style_footer(); |
| 665 | 665 | } |
| 666 | 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, 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 |
+1
-1
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -540,11 +540,11 @@ | ||
| 540 | 540 | ** many descenders to (off-screen) parents. */ |
| 541 | 541 | tmFlags = TIMELINE_LEAFONLY | TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 542 | 542 | if( fNg==0 ) tmFlags |= TIMELINE_GRAPH; |
| 543 | 543 | if( fBrBg ) tmFlags |= TIMELINE_BRCOLOR; |
| 544 | 544 | 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); | |
| 546 | 546 | db_finalize(&q); |
| 547 | 547 | @ <br /> |
| 548 | 548 | style_footer(); |
| 549 | 549 | } |
| 550 | 550 | |
| 551 | 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); |
| 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 @@ | ||
| 645 | 645 | @ </td></tr> |
| 646 | 646 | } |
| 647 | 647 | db_finalize(&q); |
| 648 | 648 | db_finalize(&qparent); |
| 649 | 649 | if( pGraph ){ |
| 650 | - graph_finish(pGraph, TIMELINE_DISJOINT); | |
| 650 | + graph_finish(pGraph, 0, TIMELINE_DISJOINT); | |
| 651 | 651 | if( pGraph->nErr ){ |
| 652 | 652 | graph_free(pGraph); |
| 653 | 653 | pGraph = 0; |
| 654 | 654 | }else{ |
| 655 | 655 | @ <tr class="timelineBottom" id="btm-%d(iTableId)">\ |
| 656 | 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, 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 @@ | ||
| 96 | 96 | int nBranch; /* Number of distinct branches */ |
| 97 | 97 | char **azBranch; /* Names of the branches */ |
| 98 | 98 | int nRow; /* Number of rows */ |
| 99 | 99 | int nHash; /* Number of slots in apHash[] */ |
| 100 | 100 | GraphRow **apHash; /* Hash table of GraphRow objects. Key: rid */ |
| 101 | + u8 aiRailMap[GR_MAX_RAIL]; /* Mapping of rails to actually columns */ | |
| 101 | 102 | }; |
| 102 | 103 | |
| 103 | 104 | #endif |
| 104 | 105 | |
| 105 | 106 | /* The N-th bit */ |
| @@ -417,11 +418,11 @@ | ||
| 417 | 418 | ** |
| 418 | 419 | ** TIMELINE_DISJOINT: Omit descenders |
| 419 | 420 | ** TIMELINE_FILLGAPS: Use step-children |
| 420 | 421 | ** TIMELINE_XMERGE: Omit off-graph merge lines |
| 421 | 422 | */ |
| 422 | -void graph_finish(GraphContext *p, u32 tmFlags){ | |
| 423 | +void graph_finish(GraphContext *p, const char *zLeftBranch, u32 tmFlags){ | |
| 423 | 424 | GraphRow *pRow, *pDesc, *pDup, *pLoop, *pParent; |
| 424 | 425 | int i, j; |
| 425 | 426 | u64 mask; |
| 426 | 427 | int hasDup = 0; /* True if one or more isDup entries */ |
| 427 | 428 | const char *zTrunk; |
| @@ -516,19 +517,20 @@ | ||
| 516 | 517 | pParent = hashFind(p, pRow->aParent[0]); |
| 517 | 518 | if( pParent==0 ) continue; /* Parent off-screen */ |
| 518 | 519 | if( pParent->zBranch!=pRow->zBranch ) continue; /* Different branch */ |
| 519 | 520 | if( pParent->idx <= pRow->idx ){ |
| 520 | 521 | pParent->timeWarp = 1; |
| 521 | - }else if( pRow->idx < pParent->idx ){ | |
| 522 | + }else if( pRow->idxTop < pParent->idxTop ){ | |
| 522 | 523 | pParent->pChild = pRow; |
| 524 | + pParent->idxTop = pRow->idxTop; | |
| 523 | 525 | } |
| 524 | 526 | } |
| 525 | 527 | |
| 526 | 528 | 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 | |
| 530 | 532 | ** be represented on the graph by a thick dotted line without an arrowhead. |
| 531 | 533 | */ |
| 532 | 534 | for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ |
| 533 | 535 | if( pRow->pChild ) continue; |
| 534 | 536 | for(pLoop=pRow->pPrev; pLoop; pLoop=pLoop->pPrev){ |
| @@ -713,7 +715,28 @@ | ||
| 713 | 715 | |
| 714 | 716 | /* |
| 715 | 717 | ** Find the maximum rail number. |
| 716 | 718 | */ |
| 717 | 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 | + | |
| 718 | 741 | p->nErr = 0; |
| 719 | 742 | } |
| 720 | 743 |
| --- 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 @@ | ||
| 387 | 387 | /* Set the Global.zIpAddr variable to the server we are talking to. |
| 388 | 388 | ** This is used to populate the ipaddr column of the rcvfrom table, |
| 389 | 389 | ** if any files are received from the server. |
| 390 | 390 | */ |
| 391 | 391 | { |
| 392 | -#ifdef HAVE_BIO_ADDR_HOSTNAME_STRING | |
| 392 | +#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L | |
| 393 | 393 | char *ip = BIO_ADDR_hostname_string(BIO_get_conn_address(iBio),1); |
| 394 | 394 | g.zIpAddr = mprintf("%s", ip); |
| 395 | 395 | OPENSSL_free(ip); |
| 396 | 396 | #else |
| 397 | 397 | /* IPv4 only code */ |
| 398 | 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 | #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 @@ | ||
| 286 | 286 | TIMELINE_GRAPH |
| 287 | 287 | |TIMELINE_FILLGAPS |
| 288 | 288 | |TIMELINE_NOSCROLL |
| 289 | 289 | |TIMELINE_XMERGE |
| 290 | 290 | |TIMELINE_CHPICK, |
| 291 | - 0, 0, rid, 0); | |
| 291 | + 0, 0, 0, rid, 0); | |
| 292 | 292 | db_finalize(&q); |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | /* |
| 296 | 296 | ** Show a graph all wiki, tickets, and check-ins that refer to object zUuid. |
| @@ -317,11 +317,11 @@ | ||
| 317 | 317 | blob_zero(&sql); |
| 318 | 318 | blob_append(&sql, timeline_query_for_www(), -1); |
| 319 | 319 | blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC"); |
| 320 | 320 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 321 | 321 | www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL, |
| 322 | - 0, 0, 0, 0); | |
| 322 | + 0, 0, 0, 0, 0); | |
| 323 | 323 | db_finalize(&q); |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | /* |
| 327 | 327 | ** WEBPAGE: test-backlinks |
| @@ -350,11 +350,11 @@ | ||
| 350 | 350 | blob_zero(&sql); |
| 351 | 351 | blob_append(&sql, timeline_query_for_www(), -1); |
| 352 | 352 | blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC"); |
| 353 | 353 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 354 | 354 | www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL, |
| 355 | - 0, 0, 0, 0); | |
| 355 | + 0, 0, 0, 0, 0); | |
| 356 | 356 | db_finalize(&q); |
| 357 | 357 | style_footer(); |
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | |
| @@ -619,11 +619,11 @@ | ||
| 619 | 619 | blob_zero(&sql); |
| 620 | 620 | blob_append(&sql, timeline_query_for_www(), -1); |
| 621 | 621 | blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC"); |
| 622 | 622 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 623 | 623 | www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL, |
| 624 | - 0, 0, rid, 0); | |
| 624 | + 0, 0, 0, rid, 0); | |
| 625 | 625 | db_finalize(&q); |
| 626 | 626 | style_footer(); |
| 627 | 627 | } |
| 628 | 628 | |
| 629 | 629 | /* |
| 630 | 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, 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 @@ | ||
| 184 | 184 | blob_append_sql(&sql, |
| 185 | 185 | " AND event.objid IN (SELECT objid FROM modreq)" |
| 186 | 186 | " ORDER BY event.mtime DESC" |
| 187 | 187 | ); |
| 188 | 188 | 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); | |
| 190 | 190 | db_finalize(&q); |
| 191 | 191 | } |
| 192 | 192 | style_footer(); |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 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); |
| 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 @@ | ||
| 754 | 754 | ** many descenders to (off-screen) parents. */ |
| 755 | 755 | tmFlags = TIMELINE_XMERGE | TIMELINE_FILLGAPS | TIMELINE_NOSCROLL; |
| 756 | 756 | if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 757 | 757 | if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 758 | 758 | 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); | |
| 760 | 760 | db_finalize(&q); |
| 761 | 761 | @ <br /> |
| 762 | 762 | style_footer(); |
| 763 | 763 | } |
| 764 | 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); |
| 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 @@ | ||
| 238 | 238 | ** 8. list of symbolic tags. |
| 239 | 239 | ** 9. tagid for ticket or wiki or event |
| 240 | 240 | ** 10. Short comment to user for repeated tickets and wiki |
| 241 | 241 | */ |
| 242 | 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 */ | |
| 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 */ | |
| 249 | 250 | ){ |
| 250 | 251 | int mxWikiLen; |
| 251 | 252 | Blob comment; |
| 252 | 253 | int prevTagid = 0; |
| 253 | 254 | int suppressCnt = 0; |
| @@ -759,11 +760,11 @@ | ||
| 759 | 760 | } |
| 760 | 761 | if( pendingEndTr ){ |
| 761 | 762 | @ </td></tr> |
| 762 | 763 | } |
| 763 | 764 | if( pGraph ){ |
| 764 | - graph_finish(pGraph, tmFlags); | |
| 765 | + graph_finish(pGraph, zLeftBranch, tmFlags); | |
| 765 | 766 | if( pGraph->nErr ){ |
| 766 | 767 | graph_free(pGraph); |
| 767 | 768 | pGraph = 0; |
| 768 | 769 | }else{ |
| 769 | 770 | @ <tr class="timelineBottom" id="btm-%d(iTableId)">\ |
| @@ -829,10 +830,11 @@ | ||
| 829 | 830 | int colorGraph; /* Use colors for graph lines */ |
| 830 | 831 | int iTopRow; /* Index of the top row of the graph */ |
| 831 | 832 | int fileDiff; /* True for file diff. False for check-in diff */ |
| 832 | 833 | int omitDescenders; /* True to omit descenders */ |
| 833 | 834 | int scrollToSelect; /* True to scroll to the selection */ |
| 835 | + u8 *aiMap; /* The rail map */ | |
| 834 | 836 | |
| 835 | 837 | iRailPitch = atoi(PD("railpitch","0")); |
| 836 | 838 | showArrowheads = skin_detail_boolean("timeline-arrowheads"); |
| 837 | 839 | circleNodes = skin_detail_boolean("timeline-circle-nodes"); |
| 838 | 840 | colorGraph = skin_detail_boolean("timeline-color-graph-lines"); |
| @@ -904,20 +906,21 @@ | ||
| 904 | 906 | ** ci: "cherrypick-in". Like "mi" except for cherrypick merges. |
| 905 | 907 | ** omitted if there are no cherrypick merges. |
| 906 | 908 | ** h: The artifact hash of the object being graphed |
| 907 | 909 | * br: The branch to which the artifact belongs |
| 908 | 910 | */ |
| 911 | + aiMap = pGraph->aiRailMap; | |
| 909 | 912 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 910 | 913 | int k = 0; |
| 911 | 914 | cgi_printf("{\"id\":%d,", pRow->idx); |
| 912 | 915 | cgi_printf("\"bg\":\"%s\",", pRow->zBgClr); |
| 913 | - cgi_printf("\"r\":%d,", pRow->iRail); | |
| 916 | + cgi_printf("\"r\":%d,", aiMap[pRow->iRail]); | |
| 914 | 917 | if( pRow->bDescender ){ |
| 915 | 918 | cgi_printf("\"d\":%d,", pRow->bDescender); |
| 916 | 919 | } |
| 917 | 920 | if( pRow->mergeOut>=0 ){ |
| 918 | - cgi_printf("\"mo\":%d,", pRow->mergeOut); | |
| 921 | + cgi_printf("\"mo\":%d,", aiMap[pRow->mergeOut]); | |
| 919 | 922 | if( pRow->mergeUpto==0 ) pRow->mergeUpto = pRow->idx; |
| 920 | 923 | cgi_printf("\"mu\":%d,", pRow->mergeUpto); |
| 921 | 924 | if( pRow->cherrypickUpto>0 && pRow->cherrypickUpto<pRow->mergeUpto ){ |
| 922 | 925 | cgi_printf("\"cu\":%d,", pRow->cherrypickUpto); |
| 923 | 926 | } |
| @@ -936,11 +939,11 @@ | ||
| 936 | 939 | if( k==0 ){ |
| 937 | 940 | cgi_printf("\"au\":"); |
| 938 | 941 | cSep = '['; |
| 939 | 942 | } |
| 940 | 943 | k++; |
| 941 | - cgi_printf("%c%d,%d", cSep, i, pRow->aiRiser[i]); | |
| 944 | + cgi_printf("%c%d,%d", cSep, aiMap[i], pRow->aiRiser[i]); | |
| 942 | 945 | cSep = ','; |
| 943 | 946 | } |
| 944 | 947 | } |
| 945 | 948 | if( k ){ |
| 946 | 949 | cgi_printf("],"); |
| @@ -949,11 +952,11 @@ | ||
| 949 | 952 | cgi_printf("\"fg\":\"%s\",", bg_to_fg(pRow->zBgClr)); |
| 950 | 953 | } |
| 951 | 954 | /* mi */ |
| 952 | 955 | for(i=k=0; i<GR_MAX_RAIL; i++){ |
| 953 | 956 | if( pRow->mergeIn[i]==1 ){ |
| 954 | - int mi = i; | |
| 957 | + int mi = aiMap[i]; | |
| 955 | 958 | if( (pRow->mergeDown >> i) & 1 ) mi = -mi; |
| 956 | 959 | if( k==0 ){ |
| 957 | 960 | cgi_printf("\"mi\":"); |
| 958 | 961 | cSep = '['; |
| 959 | 962 | } |
| @@ -964,11 +967,11 @@ | ||
| 964 | 967 | } |
| 965 | 968 | if( k ) cgi_printf("],"); |
| 966 | 969 | /* ci */ |
| 967 | 970 | for(i=k=0; i<GR_MAX_RAIL; i++){ |
| 968 | 971 | if( pRow->mergeIn[i]==2 ){ |
| 969 | - int mi = i; | |
| 972 | + int mi = aiMap[i]; | |
| 970 | 973 | if( (pRow->cherrypickDown >> i) & 1 ) mi = -mi; |
| 971 | 974 | if( k==0 ){ |
| 972 | 975 | cgi_printf("\"ci\":"); |
| 973 | 976 | cSep = '['; |
| 974 | 977 | } |
| @@ -2394,11 +2397,12 @@ | ||
| 2394 | 2397 | } |
| 2395 | 2398 | |
| 2396 | 2399 | if( zNewerButton ){ |
| 2397 | 2400 | @ %z(chref("button","%z",zNewerButton))More ↑</a> |
| 2398 | 2401 | } |
| 2399 | - www_print_timeline(&q, tmFlags, zThisUser, zThisTag, selectedRid, 0); | |
| 2402 | + www_print_timeline(&q, tmFlags, zThisUser, zThisTag, zBrName, | |
| 2403 | + selectedRid, 0); | |
| 2400 | 2404 | db_finalize(&q); |
| 2401 | 2405 | if( zOlderButton ){ |
| 2402 | 2406 | @ %z(chref("button","%z",zOlderButton))More ↓</a> |
| 2403 | 2407 | } |
| 2404 | 2408 | style_footer(); |
| @@ -2887,11 +2891,11 @@ | ||
| 2887 | 2891 | zId = db_text(0, "SELECT timestamp FROM timeline" |
| 2888 | 2892 | " ORDER BY sortby DESC LIMIT 1"); |
| 2889 | 2893 | @ <h2>%d(iAgo) Year%s(iAgo>1?"s":"") Ago |
| 2890 | 2894 | @ <small>%z(href("%R/timeline?c=%t",zId))(more context)</a>\ |
| 2891 | 2895 | @ </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); | |
| 2893 | 2897 | } |
| 2894 | 2898 | db_finalize(&q); |
| 2895 | 2899 | style_footer(); |
| 2896 | 2900 | } |
| 2897 | 2901 | |
| 2898 | 2902 |
| --- 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 ↑</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 ↓</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 ↑</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 ↓</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 @@ | ||
| 238 | 238 | ** 8. list of symbolic tags. |
| 239 | 239 | ** 9. tagid for ticket or wiki or event |
| 240 | 240 | ** 10. Short comment to user for repeated tickets and wiki |
| 241 | 241 | */ |
| 242 | 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 */ | |
| 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 */ | |
| 249 | 250 | ){ |
| 250 | 251 | int mxWikiLen; |
| 251 | 252 | Blob comment; |
| 252 | 253 | int prevTagid = 0; |
| 253 | 254 | int suppressCnt = 0; |
| @@ -759,11 +760,11 @@ | ||
| 759 | 760 | } |
| 760 | 761 | if( pendingEndTr ){ |
| 761 | 762 | @ </td></tr> |
| 762 | 763 | } |
| 763 | 764 | if( pGraph ){ |
| 764 | - graph_finish(pGraph, tmFlags); | |
| 765 | + graph_finish(pGraph, zLeftBranch, tmFlags); | |
| 765 | 766 | if( pGraph->nErr ){ |
| 766 | 767 | graph_free(pGraph); |
| 767 | 768 | pGraph = 0; |
| 768 | 769 | }else{ |
| 769 | 770 | @ <tr class="timelineBottom" id="btm-%d(iTableId)">\ |
| @@ -829,10 +830,11 @@ | ||
| 829 | 830 | int colorGraph; /* Use colors for graph lines */ |
| 830 | 831 | int iTopRow; /* Index of the top row of the graph */ |
| 831 | 832 | int fileDiff; /* True for file diff. False for check-in diff */ |
| 832 | 833 | int omitDescenders; /* True to omit descenders */ |
| 833 | 834 | int scrollToSelect; /* True to scroll to the selection */ |
| 835 | + u8 *aiMap; /* The rail map */ | |
| 834 | 836 | |
| 835 | 837 | iRailPitch = atoi(PD("railpitch","0")); |
| 836 | 838 | showArrowheads = skin_detail_boolean("timeline-arrowheads"); |
| 837 | 839 | circleNodes = skin_detail_boolean("timeline-circle-nodes"); |
| 838 | 840 | colorGraph = skin_detail_boolean("timeline-color-graph-lines"); |
| @@ -904,20 +906,21 @@ | ||
| 904 | 906 | ** ci: "cherrypick-in". Like "mi" except for cherrypick merges. |
| 905 | 907 | ** omitted if there are no cherrypick merges. |
| 906 | 908 | ** h: The artifact hash of the object being graphed |
| 907 | 909 | * br: The branch to which the artifact belongs |
| 908 | 910 | */ |
| 911 | + aiMap = pGraph->aiRailMap; | |
| 909 | 912 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 910 | 913 | int k = 0; |
| 911 | 914 | cgi_printf("{\"id\":%d,", pRow->idx); |
| 912 | 915 | cgi_printf("\"bg\":\"%s\",", pRow->zBgClr); |
| 913 | - cgi_printf("\"r\":%d,", pRow->iRail); | |
| 916 | + cgi_printf("\"r\":%d,", aiMap[pRow->iRail]); | |
| 914 | 917 | if( pRow->bDescender ){ |
| 915 | 918 | cgi_printf("\"d\":%d,", pRow->bDescender); |
| 916 | 919 | } |
| 917 | 920 | if( pRow->mergeOut>=0 ){ |
| 918 | - cgi_printf("\"mo\":%d,", pRow->mergeOut); | |
| 921 | + cgi_printf("\"mo\":%d,", aiMap[pRow->mergeOut]); | |
| 919 | 922 | if( pRow->mergeUpto==0 ) pRow->mergeUpto = pRow->idx; |
| 920 | 923 | cgi_printf("\"mu\":%d,", pRow->mergeUpto); |
| 921 | 924 | if( pRow->cherrypickUpto>0 && pRow->cherrypickUpto<pRow->mergeUpto ){ |
| 922 | 925 | cgi_printf("\"cu\":%d,", pRow->cherrypickUpto); |
| 923 | 926 | } |
| @@ -936,11 +939,11 @@ | ||
| 936 | 939 | if( k==0 ){ |
| 937 | 940 | cgi_printf("\"au\":"); |
| 938 | 941 | cSep = '['; |
| 939 | 942 | } |
| 940 | 943 | k++; |
| 941 | - cgi_printf("%c%d,%d", cSep, i, pRow->aiRiser[i]); | |
| 944 | + cgi_printf("%c%d,%d", cSep, aiMap[i], pRow->aiRiser[i]); | |
| 942 | 945 | cSep = ','; |
| 943 | 946 | } |
| 944 | 947 | } |
| 945 | 948 | if( k ){ |
| 946 | 949 | cgi_printf("],"); |
| @@ -949,11 +952,11 @@ | ||
| 949 | 952 | cgi_printf("\"fg\":\"%s\",", bg_to_fg(pRow->zBgClr)); |
| 950 | 953 | } |
| 951 | 954 | /* mi */ |
| 952 | 955 | for(i=k=0; i<GR_MAX_RAIL; i++){ |
| 953 | 956 | if( pRow->mergeIn[i]==1 ){ |
| 954 | - int mi = i; | |
| 957 | + int mi = aiMap[i]; | |
| 955 | 958 | if( (pRow->mergeDown >> i) & 1 ) mi = -mi; |
| 956 | 959 | if( k==0 ){ |
| 957 | 960 | cgi_printf("\"mi\":"); |
| 958 | 961 | cSep = '['; |
| 959 | 962 | } |
| @@ -964,11 +967,11 @@ | ||
| 964 | 967 | } |
| 965 | 968 | if( k ) cgi_printf("],"); |
| 966 | 969 | /* ci */ |
| 967 | 970 | for(i=k=0; i<GR_MAX_RAIL; i++){ |
| 968 | 971 | if( pRow->mergeIn[i]==2 ){ |
| 969 | - int mi = i; | |
| 972 | + int mi = aiMap[i]; | |
| 970 | 973 | if( (pRow->cherrypickDown >> i) & 1 ) mi = -mi; |
| 971 | 974 | if( k==0 ){ |
| 972 | 975 | cgi_printf("\"ci\":"); |
| 973 | 976 | cSep = '['; |
| 974 | 977 | } |
| @@ -2394,11 +2397,12 @@ | ||
| 2394 | 2397 | } |
| 2395 | 2398 | |
| 2396 | 2399 | if( zNewerButton ){ |
| 2397 | 2400 | @ %z(chref("button","%z",zNewerButton))More ↑</a> |
| 2398 | 2401 | } |
| 2399 | - www_print_timeline(&q, tmFlags, zThisUser, zThisTag, selectedRid, 0); | |
| 2402 | + www_print_timeline(&q, tmFlags, zThisUser, zThisTag, zBrName, | |
| 2403 | + selectedRid, 0); | |
| 2400 | 2404 | db_finalize(&q); |
| 2401 | 2405 | if( zOlderButton ){ |
| 2402 | 2406 | @ %z(chref("button","%z",zOlderButton))More ↓</a> |
| 2403 | 2407 | } |
| 2404 | 2408 | style_footer(); |
| @@ -2887,11 +2891,11 @@ | ||
| 2887 | 2891 | zId = db_text(0, "SELECT timestamp FROM timeline" |
| 2888 | 2892 | " ORDER BY sortby DESC LIMIT 1"); |
| 2889 | 2893 | @ <h2>%d(iAgo) Year%s(iAgo>1?"s":"") Ago |
| 2890 | 2894 | @ <small>%z(href("%R/timeline?c=%t",zId))(more context)</a>\ |
| 2891 | 2895 | @ </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); | |
| 2893 | 2897 | } |
| 2894 | 2898 | db_finalize(&q); |
| 2895 | 2899 | style_footer(); |
| 2896 | 2900 | } |
| 2897 | 2901 | |
| 2898 | 2902 |
| --- 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 ↑</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 ↓</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 ↑</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 ↓</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 @@ | ||
| 896 | 896 | timeline_query_for_www(), tagid, zFullUuid, zFullUuid, zFullUuid |
| 897 | 897 | ); |
| 898 | 898 | } |
| 899 | 899 | db_prepare(&q, "%z", zSQL/*safe-for-%s*/); |
| 900 | 900 | www_print_timeline(&q, TIMELINE_ARTID|TIMELINE_DISJOINT|TIMELINE_GRAPH, |
| 901 | - 0, 0, 0, 0); | |
| 901 | + 0, 0, 0, 0, 0); | |
| 902 | 902 | db_finalize(&q); |
| 903 | 903 | style_footer(); |
| 904 | 904 | } |
| 905 | 905 | |
| 906 | 906 | /* |
| 907 | 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); |
| 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 |
+12
| --- test/graph-test-1.wiki | ||
| +++ test/graph-test-1.wiki | ||
| @@ -88,10 +88,19 @@ | ||
| 88 | 88 | Single check-in takes both a full merge and a cherrypick merge</a> |
| 89 | 89 | * <a href="../../../timeline?b=dc81ac70&n=14" target="testwindow"> |
| 90 | 90 | Mixed merge arrow, partly fully and partly cherrypick</a> |
| 91 | 91 | * <a href="../../../timeline?b=dc81ac70&n=13" target="testwindow"> |
| 92 | 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> | |
| 93 | 102 | |
| 94 | 103 | External: |
| 95 | 104 | |
| 96 | 105 | * <a href="http://www.sqlite.org/src/timeline?c=2010-09-29&nd" |
| 97 | 106 | target="testwindow">Timewarp due to a mis-configured system clock.</a> |
| @@ -102,5 +111,8 @@ | ||
| 102 | 111 | target='testwindow'>Merge arrows to the left and to the right</a> |
| 103 | 112 | * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=13' |
| 104 | 113 | target='testwindow'>Previous, with a scrunched graph</a> |
| 105 | 114 | * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=11' |
| 106 | 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> | |
| 107 | 119 |
| --- 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 |