Fossil SCM
Improved handling of timewarps in the graph layout.
Commit
628fc32dd3f594ac6669499a55c73193abbe740afc495d39842f5b34714d22e3
Parent
5399c5dacb808e4…
1 file changed
+3
-1
+3
-1
| --- src/graph.c | ||
| +++ src/graph.c | ||
| @@ -432,10 +432,11 @@ | ||
| 432 | 432 | u64 mask; |
| 433 | 433 | int hasDup = 0; /* True if one or more isDup entries */ |
| 434 | 434 | const char *zTrunk; |
| 435 | 435 | u8 *aMap; /* Copy of p->aiRailMap */ |
| 436 | 436 | int omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0; |
| 437 | + int nTimewarp = 0; | |
| 437 | 438 | |
| 438 | 439 | /* If mergeRiserFrom[X]==Y that means rail X holds a merge riser |
| 439 | 440 | ** coming up from the bottom of the graph from off-screen check-in Y |
| 440 | 441 | ** where Y is the RID. There is no riser on rail X if mergeRiserFrom[X]==0. |
| 441 | 442 | */ |
| @@ -524,10 +525,11 @@ | ||
| 524 | 525 | pParent = hashFind(p, pRow->aParent[0]); |
| 525 | 526 | if( pParent==0 ) continue; /* Parent off-screen */ |
| 526 | 527 | if( pParent->zBranch!=pRow->zBranch ) continue; /* Different branch */ |
| 527 | 528 | if( pParent->idx <= pRow->idx ){ |
| 528 | 529 | pParent->timeWarp = 1; |
| 530 | + nTimewarp++; | |
| 529 | 531 | }else if( pRow->idxTop < pParent->idxTop ){ |
| 530 | 532 | pParent->pChild = pRow; |
| 531 | 533 | pParent->idxTop = pRow->idxTop; |
| 532 | 534 | } |
| 533 | 535 | } |
| @@ -736,11 +738,11 @@ | ||
| 736 | 738 | /* |
| 737 | 739 | ** Compute the rail mapping. |
| 738 | 740 | */ |
| 739 | 741 | aMap = p->aiRailMap; |
| 740 | 742 | for(i=0; i<=p->mxRail; i++) aMap[i] = i; |
| 741 | - if( zLeftBranch ){ | |
| 743 | + if( zLeftBranch && nTimewarp==0 ){ | |
| 742 | 744 | char *zLeft = persistBranchName(p, zLeftBranch); |
| 743 | 745 | j = 0; |
| 744 | 746 | for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ |
| 745 | 747 | if( pRow->zBranch==zLeft && aMap[pRow->iRail]>=j ){ |
| 746 | 748 | for(i=0; i<=p->mxRail; i++){ |
| 747 | 749 |
| --- src/graph.c | |
| +++ src/graph.c | |
| @@ -432,10 +432,11 @@ | |
| 432 | u64 mask; |
| 433 | int hasDup = 0; /* True if one or more isDup entries */ |
| 434 | const char *zTrunk; |
| 435 | u8 *aMap; /* Copy of p->aiRailMap */ |
| 436 | int omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0; |
| 437 | |
| 438 | /* If mergeRiserFrom[X]==Y that means rail X holds a merge riser |
| 439 | ** coming up from the bottom of the graph from off-screen check-in Y |
| 440 | ** where Y is the RID. There is no riser on rail X if mergeRiserFrom[X]==0. |
| 441 | */ |
| @@ -524,10 +525,11 @@ | |
| 524 | pParent = hashFind(p, pRow->aParent[0]); |
| 525 | if( pParent==0 ) continue; /* Parent off-screen */ |
| 526 | if( pParent->zBranch!=pRow->zBranch ) continue; /* Different branch */ |
| 527 | if( pParent->idx <= pRow->idx ){ |
| 528 | pParent->timeWarp = 1; |
| 529 | }else if( pRow->idxTop < pParent->idxTop ){ |
| 530 | pParent->pChild = pRow; |
| 531 | pParent->idxTop = pRow->idxTop; |
| 532 | } |
| 533 | } |
| @@ -736,11 +738,11 @@ | |
| 736 | /* |
| 737 | ** Compute the rail mapping. |
| 738 | */ |
| 739 | aMap = p->aiRailMap; |
| 740 | for(i=0; i<=p->mxRail; i++) aMap[i] = i; |
| 741 | if( zLeftBranch ){ |
| 742 | char *zLeft = persistBranchName(p, zLeftBranch); |
| 743 | j = 0; |
| 744 | for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ |
| 745 | if( pRow->zBranch==zLeft && aMap[pRow->iRail]>=j ){ |
| 746 | for(i=0; i<=p->mxRail; i++){ |
| 747 |
| --- src/graph.c | |
| +++ src/graph.c | |
| @@ -432,10 +432,11 @@ | |
| 432 | u64 mask; |
| 433 | int hasDup = 0; /* True if one or more isDup entries */ |
| 434 | const char *zTrunk; |
| 435 | u8 *aMap; /* Copy of p->aiRailMap */ |
| 436 | int omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0; |
| 437 | int nTimewarp = 0; |
| 438 | |
| 439 | /* If mergeRiserFrom[X]==Y that means rail X holds a merge riser |
| 440 | ** coming up from the bottom of the graph from off-screen check-in Y |
| 441 | ** where Y is the RID. There is no riser on rail X if mergeRiserFrom[X]==0. |
| 442 | */ |
| @@ -524,10 +525,11 @@ | |
| 525 | pParent = hashFind(p, pRow->aParent[0]); |
| 526 | if( pParent==0 ) continue; /* Parent off-screen */ |
| 527 | if( pParent->zBranch!=pRow->zBranch ) continue; /* Different branch */ |
| 528 | if( pParent->idx <= pRow->idx ){ |
| 529 | pParent->timeWarp = 1; |
| 530 | nTimewarp++; |
| 531 | }else if( pRow->idxTop < pParent->idxTop ){ |
| 532 | pParent->pChild = pRow; |
| 533 | pParent->idxTop = pRow->idxTop; |
| 534 | } |
| 535 | } |
| @@ -736,11 +738,11 @@ | |
| 738 | /* |
| 739 | ** Compute the rail mapping. |
| 740 | */ |
| 741 | aMap = p->aiRailMap; |
| 742 | for(i=0; i<=p->mxRail; i++) aMap[i] = i; |
| 743 | if( zLeftBranch && nTimewarp==0 ){ |
| 744 | char *zLeft = persistBranchName(p, zLeftBranch); |
| 745 | j = 0; |
| 746 | for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ |
| 747 | if( pRow->zBranch==zLeft && aMap[pRow->iRail]>=j ){ |
| 748 | for(i=0; i<=p->mxRail; i++){ |
| 749 |