Fossil SCM
Fix the SQL for the command-line timeline so that it works for timeline items that are not associated with a particular branch.
Commit
1d462a683f082c66daffbe11885267e206ce8f2e
Parent
80bf94e0f7ea9eb…
1 file changed
+4
-4
+4
-4
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1507,16 +1507,16 @@ | ||
| 1507 | 1507 | @ (SELECT count(*) FROM plink WHERE pid=blob.rid AND isprim) |
| 1508 | 1508 | @ AS primPlinkCount, |
| 1509 | 1509 | @ (SELECT count(*) FROM plink WHERE cid=blob.rid) AS plinkCount, |
| 1510 | 1510 | @ event.mtime AS mtime, |
| 1511 | 1511 | @ tagxref.value AS branch |
| 1512 | - @ FROM tag CROSS JOIN event CROSS JOIN blob CROSS JOIN tagxref | |
| 1512 | + @ FROM tag CROSS JOIN event CROSS JOIN blob | |
| 1513 | + @ LEFT JOIN tagxref ON tagxref.tagid=tag.tagid | |
| 1514 | + @ AND tagxref.tagtype>0 | |
| 1515 | + @ AND tagxref.rid=blob.rid | |
| 1513 | 1516 | @ WHERE blob.rid=event.objid |
| 1514 | 1517 | @ AND tag.tagname='branch' |
| 1515 | - @ AND tagxref.tagid=tag.tagid | |
| 1516 | - @ AND tagxref.tagtype>0 | |
| 1517 | - @ AND tagxref.rid=blob.rid | |
| 1518 | 1518 | ; |
| 1519 | 1519 | return zBaseSql; |
| 1520 | 1520 | } |
| 1521 | 1521 | |
| 1522 | 1522 | /* |
| 1523 | 1523 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1507,16 +1507,16 @@ | |
| 1507 | @ (SELECT count(*) FROM plink WHERE pid=blob.rid AND isprim) |
| 1508 | @ AS primPlinkCount, |
| 1509 | @ (SELECT count(*) FROM plink WHERE cid=blob.rid) AS plinkCount, |
| 1510 | @ event.mtime AS mtime, |
| 1511 | @ tagxref.value AS branch |
| 1512 | @ FROM tag CROSS JOIN event CROSS JOIN blob CROSS JOIN tagxref |
| 1513 | @ WHERE blob.rid=event.objid |
| 1514 | @ AND tag.tagname='branch' |
| 1515 | @ AND tagxref.tagid=tag.tagid |
| 1516 | @ AND tagxref.tagtype>0 |
| 1517 | @ AND tagxref.rid=blob.rid |
| 1518 | ; |
| 1519 | return zBaseSql; |
| 1520 | } |
| 1521 | |
| 1522 | /* |
| 1523 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1507,16 +1507,16 @@ | |
| 1507 | @ (SELECT count(*) FROM plink WHERE pid=blob.rid AND isprim) |
| 1508 | @ AS primPlinkCount, |
| 1509 | @ (SELECT count(*) FROM plink WHERE cid=blob.rid) AS plinkCount, |
| 1510 | @ event.mtime AS mtime, |
| 1511 | @ tagxref.value AS branch |
| 1512 | @ FROM tag CROSS JOIN event CROSS JOIN blob |
| 1513 | @ LEFT JOIN tagxref ON tagxref.tagid=tag.tagid |
| 1514 | @ AND tagxref.tagtype>0 |
| 1515 | @ AND tagxref.rid=blob.rid |
| 1516 | @ WHERE blob.rid=event.objid |
| 1517 | @ AND tag.tagname='branch' |
| 1518 | ; |
| 1519 | return zBaseSql; |
| 1520 | } |
| 1521 | |
| 1522 | /* |
| 1523 |