Fossil SCM
Update the timeline so that it's use of "Leaf" conforms to the definition given in the documentation.
Commit
cb31e908681bce686566953fc0745cca15555c02
Parent
dc1a5cf739b0b1e…
1 file changed
+19
-8
+19
-8
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -172,25 +172,39 @@ | ||
| 172 | 172 | @ <td valign="top" align="left" bgcolor="%h(zBgClr)"> |
| 173 | 173 | }else{ |
| 174 | 174 | @ <td valign="top" align="left"> |
| 175 | 175 | } |
| 176 | 176 | if( zType[0]=='c' ){ |
| 177 | + const char *azTag[5]; | |
| 178 | + int nTag = 0; | |
| 177 | 179 | hyperlink_to_uuid_with_mouseover(zUuid, "xin", "xout", rid); |
| 178 | 180 | if( (tmFlags & TIMELINE_LEAFONLY)==0 ){ |
| 179 | 181 | if( nParent>1 ){ |
| 180 | - @ <b>Merge</b> | |
| 182 | + azTag[nTag++] = "Merge"; | |
| 181 | 183 | } |
| 182 | 184 | if( nPChild>1 ){ |
| 183 | 185 | if( count_nonbranch_children(rid)>1 ){ |
| 184 | - @ <b>Fork</b> | |
| 186 | + azTag[nTag++] = "Fork"; | |
| 185 | 187 | }else{ |
| 186 | - @ <b>Branch</b> | |
| 188 | + azTag[nTag++] = "Branch-Point"; | |
| 187 | 189 | } |
| 188 | 190 | } |
| 189 | 191 | } |
| 190 | 192 | if( isLeaf ){ |
| 191 | - @ <b>Leaf</b> | |
| 193 | + if( db_exists("SELECT 1 FROM tagxref" | |
| 194 | + " WHERE rid=%d AND tagid=%d AND tagtype>0", | |
| 195 | + rid, TAG_CLOSED) ){ | |
| 196 | + azTag[nTag++] = "Closed-Leaf"; | |
| 197 | + }else{ | |
| 198 | + azTag[nTag++] = "Leaf"; | |
| 199 | + } | |
| 200 | + } | |
| 201 | + if( nTag>0 ){ | |
| 202 | + int i; | |
| 203 | + for(i=0; i<nTag; i++){ | |
| 204 | + @ <b>%s(azTag[i])%s(i==nTag-1?"":",")</b> | |
| 205 | + } | |
| 192 | 206 | } |
| 193 | 207 | }else if( (tmFlags & TIMELINE_ARTID)!=0 ){ |
| 194 | 208 | hyperlink_to_uuid(zUuid); |
| 195 | 209 | } |
| 196 | 210 | db_column_blob(pQuery, 3, &comment); |
| @@ -253,13 +267,10 @@ | ||
| 253 | 267 | @ datetime(event.mtime,'localtime') AS timestamp, |
| 254 | 268 | @ coalesce(ecomment, comment), |
| 255 | 269 | @ coalesce(euser, user), |
| 256 | 270 | @ (SELECT count(*) FROM plink WHERE pid=blob.rid AND isprim=1), |
| 257 | 271 | @ (SELECT count(*) FROM plink WHERE cid=blob.rid), |
| 258 | - @ NOT EXISTS(SELECT 1 FROM tagxref | |
| 259 | - @ WHERE tagid=%d AND tagtype>0 AND rid=blob.rid) | |
| 260 | - @ AND | |
| 261 | 272 | @ NOT EXISTS(SELECT 1 FROM plink |
| 262 | 273 | @ WHERE pid=blob.rid |
| 263 | 274 | @ AND coalesce((SELECT value FROM tagxref |
| 264 | 275 | @ WHERE tagid=%d AND rid=plink.pid), 'trunk') |
| 265 | 276 | @ = coalesce((SELECT value FROM tagxref |
| @@ -271,11 +282,11 @@ | ||
| 271 | 282 | @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0) |
| 272 | 283 | @ FROM event JOIN blob |
| 273 | 284 | @ WHERE blob.rid=event.objid |
| 274 | 285 | ; |
| 275 | 286 | if( zBase==0 ){ |
| 276 | - zBase = mprintf(zBaseSql, TAG_CLOSED, TAG_BRANCH, TAG_BRANCH); | |
| 287 | + zBase = mprintf(zBaseSql, TAG_BRANCH, TAG_BRANCH); | |
| 277 | 288 | } |
| 278 | 289 | return zBase; |
| 279 | 290 | } |
| 280 | 291 | |
| 281 | 292 | /* |
| 282 | 293 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -172,25 +172,39 @@ | |
| 172 | @ <td valign="top" align="left" bgcolor="%h(zBgClr)"> |
| 173 | }else{ |
| 174 | @ <td valign="top" align="left"> |
| 175 | } |
| 176 | if( zType[0]=='c' ){ |
| 177 | hyperlink_to_uuid_with_mouseover(zUuid, "xin", "xout", rid); |
| 178 | if( (tmFlags & TIMELINE_LEAFONLY)==0 ){ |
| 179 | if( nParent>1 ){ |
| 180 | @ <b>Merge</b> |
| 181 | } |
| 182 | if( nPChild>1 ){ |
| 183 | if( count_nonbranch_children(rid)>1 ){ |
| 184 | @ <b>Fork</b> |
| 185 | }else{ |
| 186 | @ <b>Branch</b> |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | if( isLeaf ){ |
| 191 | @ <b>Leaf</b> |
| 192 | } |
| 193 | }else if( (tmFlags & TIMELINE_ARTID)!=0 ){ |
| 194 | hyperlink_to_uuid(zUuid); |
| 195 | } |
| 196 | db_column_blob(pQuery, 3, &comment); |
| @@ -253,13 +267,10 @@ | |
| 253 | @ datetime(event.mtime,'localtime') AS timestamp, |
| 254 | @ coalesce(ecomment, comment), |
| 255 | @ coalesce(euser, user), |
| 256 | @ (SELECT count(*) FROM plink WHERE pid=blob.rid AND isprim=1), |
| 257 | @ (SELECT count(*) FROM plink WHERE cid=blob.rid), |
| 258 | @ NOT EXISTS(SELECT 1 FROM tagxref |
| 259 | @ WHERE tagid=%d AND tagtype>0 AND rid=blob.rid) |
| 260 | @ AND |
| 261 | @ NOT EXISTS(SELECT 1 FROM plink |
| 262 | @ WHERE pid=blob.rid |
| 263 | @ AND coalesce((SELECT value FROM tagxref |
| 264 | @ WHERE tagid=%d AND rid=plink.pid), 'trunk') |
| 265 | @ = coalesce((SELECT value FROM tagxref |
| @@ -271,11 +282,11 @@ | |
| 271 | @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0) |
| 272 | @ FROM event JOIN blob |
| 273 | @ WHERE blob.rid=event.objid |
| 274 | ; |
| 275 | if( zBase==0 ){ |
| 276 | zBase = mprintf(zBaseSql, TAG_CLOSED, TAG_BRANCH, TAG_BRANCH); |
| 277 | } |
| 278 | return zBase; |
| 279 | } |
| 280 | |
| 281 | /* |
| 282 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -172,25 +172,39 @@ | |
| 172 | @ <td valign="top" align="left" bgcolor="%h(zBgClr)"> |
| 173 | }else{ |
| 174 | @ <td valign="top" align="left"> |
| 175 | } |
| 176 | if( zType[0]=='c' ){ |
| 177 | const char *azTag[5]; |
| 178 | int nTag = 0; |
| 179 | hyperlink_to_uuid_with_mouseover(zUuid, "xin", "xout", rid); |
| 180 | if( (tmFlags & TIMELINE_LEAFONLY)==0 ){ |
| 181 | if( nParent>1 ){ |
| 182 | azTag[nTag++] = "Merge"; |
| 183 | } |
| 184 | if( nPChild>1 ){ |
| 185 | if( count_nonbranch_children(rid)>1 ){ |
| 186 | azTag[nTag++] = "Fork"; |
| 187 | }else{ |
| 188 | azTag[nTag++] = "Branch-Point"; |
| 189 | } |
| 190 | } |
| 191 | } |
| 192 | if( isLeaf ){ |
| 193 | if( db_exists("SELECT 1 FROM tagxref" |
| 194 | " WHERE rid=%d AND tagid=%d AND tagtype>0", |
| 195 | rid, TAG_CLOSED) ){ |
| 196 | azTag[nTag++] = "Closed-Leaf"; |
| 197 | }else{ |
| 198 | azTag[nTag++] = "Leaf"; |
| 199 | } |
| 200 | } |
| 201 | if( nTag>0 ){ |
| 202 | int i; |
| 203 | for(i=0; i<nTag; i++){ |
| 204 | @ <b>%s(azTag[i])%s(i==nTag-1?"":",")</b> |
| 205 | } |
| 206 | } |
| 207 | }else if( (tmFlags & TIMELINE_ARTID)!=0 ){ |
| 208 | hyperlink_to_uuid(zUuid); |
| 209 | } |
| 210 | db_column_blob(pQuery, 3, &comment); |
| @@ -253,13 +267,10 @@ | |
| 267 | @ datetime(event.mtime,'localtime') AS timestamp, |
| 268 | @ coalesce(ecomment, comment), |
| 269 | @ coalesce(euser, user), |
| 270 | @ (SELECT count(*) FROM plink WHERE pid=blob.rid AND isprim=1), |
| 271 | @ (SELECT count(*) FROM plink WHERE cid=blob.rid), |
| 272 | @ NOT EXISTS(SELECT 1 FROM plink |
| 273 | @ WHERE pid=blob.rid |
| 274 | @ AND coalesce((SELECT value FROM tagxref |
| 275 | @ WHERE tagid=%d AND rid=plink.pid), 'trunk') |
| 276 | @ = coalesce((SELECT value FROM tagxref |
| @@ -271,11 +282,11 @@ | |
| 282 | @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0) |
| 283 | @ FROM event JOIN blob |
| 284 | @ WHERE blob.rid=event.objid |
| 285 | ; |
| 286 | if( zBase==0 ){ |
| 287 | zBase = mprintf(zBaseSql, TAG_BRANCH, TAG_BRANCH); |
| 288 | } |
| 289 | return zBase; |
| 290 | } |
| 291 | |
| 292 | /* |
| 293 |