Fossil SCM
Fix to the graph layout algorithm so that forks try to stay to the same rail, as they did in prior releases.
Commit
7193681a84017eaad1ab6138f8be3b5019663c43c28ea847b1a9e158b0563d67
Parent
cfadf71f9cf2ad9…
2 files changed
+5
-4
+10
-1
+5
-4
| --- src/graph.c | ||
| +++ src/graph.c | ||
| @@ -516,19 +516,20 @@ | ||
| 516 | 516 | pParent = hashFind(p, pRow->aParent[0]); |
| 517 | 517 | if( pParent==0 ) continue; /* Parent off-screen */ |
| 518 | 518 | if( pParent->zBranch!=pRow->zBranch ) continue; /* Different branch */ |
| 519 | 519 | if( pParent->idx <= pRow->idx ){ |
| 520 | 520 | pParent->timeWarp = 1; |
| 521 | - }else if( pRow->idx < pParent->idx ){ | |
| 521 | + }else if( pRow->idxTop < pParent->idxTop ){ | |
| 522 | 522 | pParent->pChild = pRow; |
| 523 | + pParent->idxTop = pRow->idxTop; | |
| 523 | 524 | } |
| 524 | 525 | } |
| 525 | 526 | |
| 526 | 527 | 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 | |
| 528 | + /* If a node has no pChild and there is a node higher up in the graph | |
| 529 | + ** that is in the same branch and has no in-graph parent, then | |
| 530 | + ** make the lower node a step-child of the upper node. This will | |
| 530 | 531 | ** be represented on the graph by a thick dotted line without an arrowhead. |
| 531 | 532 | */ |
| 532 | 533 | for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ |
| 533 | 534 | if( pRow->pChild ) continue; |
| 534 | 535 | for(pLoop=pRow->pPrev; pLoop; pLoop=pLoop->pPrev){ |
| 535 | 536 |
| --- src/graph.c | |
| +++ src/graph.c | |
| @@ -516,19 +516,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){ |
| 535 |
| --- src/graph.c | |
| +++ src/graph.c | |
| @@ -516,19 +516,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->idxTop < pParent->idxTop ){ |
| 522 | pParent->pChild = pRow; |
| 523 | pParent->idxTop = pRow->idxTop; |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | if( tmFlags & TIMELINE_FILLGAPS ){ |
| 528 | /* If a node has no pChild and there is a node higher up in the graph |
| 529 | ** that is in the same branch and has no in-graph parent, then |
| 530 | ** make the lower node a step-child of the upper node. This will |
| 531 | ** be represented on the graph by a thick dotted line without an arrowhead. |
| 532 | */ |
| 533 | for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ |
| 534 | if( pRow->pChild ) continue; |
| 535 | for(pLoop=pRow->pPrev; pLoop; pLoop=pLoop->pPrev){ |
| 536 |
+10
-1
| --- test/graph-test-1.wiki | ||
| +++ test/graph-test-1.wiki | ||
| @@ -90,11 +90,17 @@ | ||
| 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 | 93 | * <a href="../../../timeline?b=4471e93c&n=12" target="testwindow"> |
| 94 | 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. | |
| 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> | |
| 96 | 102 | |
| 97 | 103 | External: |
| 98 | 104 | |
| 99 | 105 | * <a href="http://www.sqlite.org/src/timeline?c=2010-09-29&nd" |
| 100 | 106 | target="testwindow">Timewarp due to a mis-configured system clock.</a> |
| @@ -105,5 +111,8 @@ | ||
| 105 | 111 | target='testwindow'>Merge arrows to the left and to the right</a> |
| 106 | 112 | * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=13' |
| 107 | 113 | target='testwindow'>Previous, with a scrunched graph</a> |
| 108 | 114 | * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=11' |
| 109 | 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> | |
| 110 | 119 |
| --- test/graph-test-1.wiki | |
| +++ test/graph-test-1.wiki | |
| @@ -90,11 +90,17 @@ | |
| 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. |
| 96 | |
| 97 | External: |
| 98 | |
| 99 | * <a href="http://www.sqlite.org/src/timeline?c=2010-09-29&nd" |
| 100 | target="testwindow">Timewarp due to a mis-configured system clock.</a> |
| @@ -105,5 +111,8 @@ | |
| 105 | target='testwindow'>Merge arrows to the left and to the right</a> |
| 106 | * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=13' |
| 107 | target='testwindow'>Previous, with a scrunched graph</a> |
| 108 | * <a href='http://core.tcl.tk/tk/timeline?y=ci&b=2015-03-07&railpitch=11' |
| 109 | target='testwindow'>Previous, with a severely scrunched graph</a> |
| 110 |
| --- test/graph-test-1.wiki | |
| +++ test/graph-test-1.wiki | |
| @@ -90,11 +90,17 @@ | |
| 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> |
| @@ -105,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 |