Fossil SCM
Add pEditNext field to permit walking forward as well as backward through the edit chain
Commit
a17f49557fc98660a91d6507f5c972acb504b1fa9053c981a9abdce0f09ea5b8
Parent
636f65968923067…
1 file changed
+2
+2
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -39,10 +39,11 @@ | ||
| 39 | 39 | int mfirt; /* Root in-reply-to */ |
| 40 | 40 | int nReply; /* Number of replies to this entry */ |
| 41 | 41 | int sid; /* Serial ID number */ |
| 42 | 42 | char *zUuid; /* Artifact hash */ |
| 43 | 43 | ForumEntry *pLeaf; /* Most recent edit for this entry */ |
| 44 | + ForumEntry *pEditNext; /* This entry is edited by pEditNext */ | |
| 44 | 45 | ForumEntry *pEditPrev; /* This entry is an edit of pEditPrev */ |
| 45 | 46 | ForumEntry *pNext; /* Next in chronological order */ |
| 46 | 47 | ForumEntry *pPrev; /* Previous in chronological order */ |
| 47 | 48 | ForumEntry *pDisplay; /* Next in display order */ |
| 48 | 49 | int nIndent; /* Number of levels of indentation for this entry */ |
| @@ -199,10 +200,11 @@ | ||
| 199 | 200 | */ |
| 200 | 201 | for(pEntry=pThread->pFirst; pEntry; pEntry=pEntry->pNext){ |
| 201 | 202 | if( pEntry->fprev ){ |
| 202 | 203 | ForumEntry *pBase = 0, *p; |
| 203 | 204 | p = forumentry_backward(pEntry->pPrev, pEntry->fprev); |
| 205 | + p->pEditNext = pEntry; | |
| 204 | 206 | pEntry->pEditPrev = p; |
| 205 | 207 | while( p ){ |
| 206 | 208 | pBase = p; |
| 207 | 209 | p->pLeaf = pEntry; |
| 208 | 210 | p = pBase->pEditPrev; |
| 209 | 211 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -39,10 +39,11 @@ | |
| 39 | int mfirt; /* Root in-reply-to */ |
| 40 | int nReply; /* Number of replies to this entry */ |
| 41 | int sid; /* Serial ID number */ |
| 42 | char *zUuid; /* Artifact hash */ |
| 43 | ForumEntry *pLeaf; /* Most recent edit for this entry */ |
| 44 | ForumEntry *pEditPrev; /* This entry is an edit of pEditPrev */ |
| 45 | ForumEntry *pNext; /* Next in chronological order */ |
| 46 | ForumEntry *pPrev; /* Previous in chronological order */ |
| 47 | ForumEntry *pDisplay; /* Next in display order */ |
| 48 | int nIndent; /* Number of levels of indentation for this entry */ |
| @@ -199,10 +200,11 @@ | |
| 199 | */ |
| 200 | for(pEntry=pThread->pFirst; pEntry; pEntry=pEntry->pNext){ |
| 201 | if( pEntry->fprev ){ |
| 202 | ForumEntry *pBase = 0, *p; |
| 203 | p = forumentry_backward(pEntry->pPrev, pEntry->fprev); |
| 204 | pEntry->pEditPrev = p; |
| 205 | while( p ){ |
| 206 | pBase = p; |
| 207 | p->pLeaf = pEntry; |
| 208 | p = pBase->pEditPrev; |
| 209 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -39,10 +39,11 @@ | |
| 39 | int mfirt; /* Root in-reply-to */ |
| 40 | int nReply; /* Number of replies to this entry */ |
| 41 | int sid; /* Serial ID number */ |
| 42 | char *zUuid; /* Artifact hash */ |
| 43 | ForumEntry *pLeaf; /* Most recent edit for this entry */ |
| 44 | ForumEntry *pEditNext; /* This entry is edited by pEditNext */ |
| 45 | ForumEntry *pEditPrev; /* This entry is an edit of pEditPrev */ |
| 46 | ForumEntry *pNext; /* Next in chronological order */ |
| 47 | ForumEntry *pPrev; /* Previous in chronological order */ |
| 48 | ForumEntry *pDisplay; /* Next in display order */ |
| 49 | int nIndent; /* Number of levels of indentation for this entry */ |
| @@ -199,10 +200,11 @@ | |
| 200 | */ |
| 201 | for(pEntry=pThread->pFirst; pEntry; pEntry=pEntry->pNext){ |
| 202 | if( pEntry->fprev ){ |
| 203 | ForumEntry *pBase = 0, *p; |
| 204 | p = forumentry_backward(pEntry->pPrev, pEntry->fprev); |
| 205 | p->pEditNext = pEntry; |
| 206 | pEntry->pEditPrev = p; |
| 207 | while( p ){ |
| 208 | pBase = p; |
| 209 | p->pLeaf = pEntry; |
| 210 | p = pBase->pEditPrev; |
| 211 |