Fossil SCM
Improved subtitle for /timeline graphs that use "min": Now tells the total number of nodes on the path including those that were skipped.
Commit
2229b2f6f1bfe5adaf139a0d18d81dc9f596eadd4a541ddec2fcf52115cfd954
Parent
93269c9f8909c62…
2 files changed
+1
-1
+5
-4
+1
-1
| --- src/path.c | ||
| +++ src/path.c | ||
| @@ -181,11 +181,11 @@ | ||
| 181 | 181 | int iFrom, /* Path starts here */ |
| 182 | 182 | int iTo, /* Path ends here */ |
| 183 | 183 | int directOnly, /* No merge links if true */ |
| 184 | 184 | int oneWayOnly, /* Parent->child only if true */ |
| 185 | 185 | Bag *pHidden, /* Hidden nodes */ |
| 186 | - int branchCost /* Add extra codes to changing branches */ | |
| 186 | + int branchCost /* Add extra cost to changing branches */ | |
| 187 | 187 | ){ |
| 188 | 188 | Stmt s; |
| 189 | 189 | Bag seen; |
| 190 | 190 | PathNode *p; |
| 191 | 191 | |
| 192 | 192 |
| --- src/path.c | |
| +++ src/path.c | |
| @@ -181,11 +181,11 @@ | |
| 181 | int iFrom, /* Path starts here */ |
| 182 | int iTo, /* Path ends here */ |
| 183 | int directOnly, /* No merge links if true */ |
| 184 | int oneWayOnly, /* Parent->child only if true */ |
| 185 | Bag *pHidden, /* Hidden nodes */ |
| 186 | int branchCost /* Add extra codes to changing branches */ |
| 187 | ){ |
| 188 | Stmt s; |
| 189 | Bag seen; |
| 190 | PathNode *p; |
| 191 | |
| 192 |
| --- src/path.c | |
| +++ src/path.c | |
| @@ -181,11 +181,11 @@ | |
| 181 | int iFrom, /* Path starts here */ |
| 182 | int iTo, /* Path ends here */ |
| 183 | int directOnly, /* No merge links if true */ |
| 184 | int oneWayOnly, /* Parent->child only if true */ |
| 185 | Bag *pHidden, /* Hidden nodes */ |
| 186 | int branchCost /* Add extra cost to changing branches */ |
| 187 | ){ |
| 188 | Stmt s; |
| 189 | Bag seen; |
| 190 | PathNode *p; |
| 191 | |
| 192 |
+5
-4
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -2075,10 +2075,11 @@ | ||
| 2075 | 2075 | Blob ins; |
| 2076 | 2076 | int nNodeOnPath = 0; |
| 2077 | 2077 | int commonAncs = 0; /* Common ancestors of me_rid and you_rid. */ |
| 2078 | 2078 | int earlierRid = 0, laterRid = 0; |
| 2079 | 2079 | int cost = bShort ? 0 : 1; |
| 2080 | + int nSkip = 0; | |
| 2080 | 2081 | |
| 2081 | 2082 | if( from_rid && to_rid ){ |
| 2082 | 2083 | if( from_to_mode==0 ){ |
| 2083 | 2084 | p = path_shortest(from_rid, to_rid, 0, 0, 0, cost); |
| 2084 | 2085 | }else if( from_to_mode==1 ){ |
| @@ -2122,13 +2123,12 @@ | ||
| 2122 | 2123 | if( bMin |
| 2123 | 2124 | && p->u.pTo!=0 |
| 2124 | 2125 | && fossil_strcmp(path_branch(p->pFrom),path_branch(p))==0 |
| 2125 | 2126 | && fossil_strcmp(path_branch(p),path_branch(p->u.pTo))==0 |
| 2126 | 2127 | ){ |
| 2127 | - continue; | |
| 2128 | - } | |
| 2129 | - if( cnt==8 ){ | |
| 2128 | + nSkip++; | |
| 2129 | + }else if( cnt==8 ){ | |
| 2130 | 2130 | blob_append_sql(&ins, ",\n (%d)", p->rid); |
| 2131 | 2131 | cnt = 0; |
| 2132 | 2132 | }else{ |
| 2133 | 2133 | cnt++; |
| 2134 | 2134 | blob_append_sql(&ins, ",(%d)", p->rid); |
| @@ -2195,11 +2195,12 @@ | ||
| 2195 | 2195 | } |
| 2196 | 2196 | nNodeOnPath = db_int(0, "SELECT count(*) FROM temp.pathnode"); |
| 2197 | 2197 | if( nNodeOnPath==1 && from_to_mode>0 ){ |
| 2198 | 2198 | blob_appendf(&desc,"Check-in "); |
| 2199 | 2199 | }else if( bMin ){ |
| 2200 | - blob_appendf(&desc, "%d check-ins along the path from ", nNodeOnPath); | |
| 2200 | + blob_appendf(&desc, "%d of %d check-ins along the path from ", | |
| 2201 | + nNodeOnPath, nNodeOnPath+nSkip); | |
| 2201 | 2202 | }else{ |
| 2202 | 2203 | blob_appendf(&desc, "%d check-ins going from ", nNodeOnPath); |
| 2203 | 2204 | } |
| 2204 | 2205 | if( from_rid==selectedRid ){ |
| 2205 | 2206 | blob_appendf(&desc, "<span class='timelineSelected'>"); |
| 2206 | 2207 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2075,10 +2075,11 @@ | |
| 2075 | Blob ins; |
| 2076 | int nNodeOnPath = 0; |
| 2077 | int commonAncs = 0; /* Common ancestors of me_rid and you_rid. */ |
| 2078 | int earlierRid = 0, laterRid = 0; |
| 2079 | int cost = bShort ? 0 : 1; |
| 2080 | |
| 2081 | if( from_rid && to_rid ){ |
| 2082 | if( from_to_mode==0 ){ |
| 2083 | p = path_shortest(from_rid, to_rid, 0, 0, 0, cost); |
| 2084 | }else if( from_to_mode==1 ){ |
| @@ -2122,13 +2123,12 @@ | |
| 2122 | if( bMin |
| 2123 | && p->u.pTo!=0 |
| 2124 | && fossil_strcmp(path_branch(p->pFrom),path_branch(p))==0 |
| 2125 | && fossil_strcmp(path_branch(p),path_branch(p->u.pTo))==0 |
| 2126 | ){ |
| 2127 | continue; |
| 2128 | } |
| 2129 | if( cnt==8 ){ |
| 2130 | blob_append_sql(&ins, ",\n (%d)", p->rid); |
| 2131 | cnt = 0; |
| 2132 | }else{ |
| 2133 | cnt++; |
| 2134 | blob_append_sql(&ins, ",(%d)", p->rid); |
| @@ -2195,11 +2195,12 @@ | |
| 2195 | } |
| 2196 | nNodeOnPath = db_int(0, "SELECT count(*) FROM temp.pathnode"); |
| 2197 | if( nNodeOnPath==1 && from_to_mode>0 ){ |
| 2198 | blob_appendf(&desc,"Check-in "); |
| 2199 | }else if( bMin ){ |
| 2200 | blob_appendf(&desc, "%d check-ins along the path from ", nNodeOnPath); |
| 2201 | }else{ |
| 2202 | blob_appendf(&desc, "%d check-ins going from ", nNodeOnPath); |
| 2203 | } |
| 2204 | if( from_rid==selectedRid ){ |
| 2205 | blob_appendf(&desc, "<span class='timelineSelected'>"); |
| 2206 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2075,10 +2075,11 @@ | |
| 2075 | Blob ins; |
| 2076 | int nNodeOnPath = 0; |
| 2077 | int commonAncs = 0; /* Common ancestors of me_rid and you_rid. */ |
| 2078 | int earlierRid = 0, laterRid = 0; |
| 2079 | int cost = bShort ? 0 : 1; |
| 2080 | int nSkip = 0; |
| 2081 | |
| 2082 | if( from_rid && to_rid ){ |
| 2083 | if( from_to_mode==0 ){ |
| 2084 | p = path_shortest(from_rid, to_rid, 0, 0, 0, cost); |
| 2085 | }else if( from_to_mode==1 ){ |
| @@ -2122,13 +2123,12 @@ | |
| 2123 | if( bMin |
| 2124 | && p->u.pTo!=0 |
| 2125 | && fossil_strcmp(path_branch(p->pFrom),path_branch(p))==0 |
| 2126 | && fossil_strcmp(path_branch(p),path_branch(p->u.pTo))==0 |
| 2127 | ){ |
| 2128 | nSkip++; |
| 2129 | }else if( cnt==8 ){ |
| 2130 | blob_append_sql(&ins, ",\n (%d)", p->rid); |
| 2131 | cnt = 0; |
| 2132 | }else{ |
| 2133 | cnt++; |
| 2134 | blob_append_sql(&ins, ",(%d)", p->rid); |
| @@ -2195,11 +2195,12 @@ | |
| 2195 | } |
| 2196 | nNodeOnPath = db_int(0, "SELECT count(*) FROM temp.pathnode"); |
| 2197 | if( nNodeOnPath==1 && from_to_mode>0 ){ |
| 2198 | blob_appendf(&desc,"Check-in "); |
| 2199 | }else if( bMin ){ |
| 2200 | blob_appendf(&desc, "%d of %d check-ins along the path from ", |
| 2201 | nNodeOnPath, nNodeOnPath+nSkip); |
| 2202 | }else{ |
| 2203 | blob_appendf(&desc, "%d check-ins going from ", nNodeOnPath); |
| 2204 | } |
| 2205 | if( from_rid==selectedRid ){ |
| 2206 | blob_appendf(&desc, "<span class='timelineSelected'>"); |
| 2207 |