Fossil SCM
Display ticket titles as plaintext on the timeline. Provide a hyperlink to attachments on the timeline.
Commit
c6a5efa12cc0edd5214baadb8c83d39b8219b8f8
Parent
ae63f485715c098…
2 files changed
+8
-6
+2
+8
-6
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -1552,11 +1552,11 @@ | ||
| 1552 | 1552 | if( fossil_strcmp(pManifest->aField[i].zName, zStatusColumn)==0 ){ |
| 1553 | 1553 | zNewStatus = pManifest->aField[i].zValue; |
| 1554 | 1554 | } |
| 1555 | 1555 | } |
| 1556 | 1556 | if( zNewStatus ){ |
| 1557 | - blob_appendf(&comment, "%h ticket [%.10s]: <i>%s</i>", | |
| 1557 | + blob_appendf(&comment, "%h ticket [%.10s]: <i>%h</i>", | |
| 1558 | 1558 | zNewStatus, pManifest->zTicketUuid, zTitle |
| 1559 | 1559 | ); |
| 1560 | 1560 | if( pManifest->nField>1 ){ |
| 1561 | 1561 | blob_appendf(&comment, " plus %d other change%s", |
| 1562 | 1562 | pManifest->nField-1, pManifest->nField==2 ? "" : "s"); |
| @@ -1566,11 +1566,11 @@ | ||
| 1566 | 1566 | }else{ |
| 1567 | 1567 | zNewStatus = db_text("unknown", |
| 1568 | 1568 | "SELECT %s FROM ticket WHERE tkt_uuid='%s'", |
| 1569 | 1569 | zStatusColumn, pManifest->zTicketUuid |
| 1570 | 1570 | ); |
| 1571 | - blob_appendf(&comment, "Ticket [%.10s] <i>%s</i> status still %h with " | |
| 1571 | + blob_appendf(&comment, "Ticket [%.10s] <i>%h</i> status still %h with " | |
| 1572 | 1572 | "%d other change%s", |
| 1573 | 1573 | pManifest->zTicketUuid, zTitle, zNewStatus, pManifest->nField, |
| 1574 | 1574 | pManifest->nField==1 ? "" : "s" |
| 1575 | 1575 | ); |
| 1576 | 1576 | free(zNewStatus); |
| @@ -1868,12 +1868,13 @@ | ||
| 1868 | 1868 | if( strlen(p->zAttachTarget)!=UUID_SIZE |
| 1869 | 1869 | || !validate16(p->zAttachTarget, UUID_SIZE) |
| 1870 | 1870 | ){ |
| 1871 | 1871 | char *zComment; |
| 1872 | 1872 | if( p->zAttachSrc && p->zAttachSrc[0] ){ |
| 1873 | - zComment = mprintf("Add attachment \"%h\" to wiki page [%h]", | |
| 1874 | - p->zAttachName, p->zAttachTarget); | |
| 1873 | + zComment = mprintf( | |
| 1874 | + "Add attachment [%R/artifact/%S|%h] to wiki page [%h]", | |
| 1875 | + p->zAttachSrc, p->zAttachName, p->zAttachTarget); | |
| 1875 | 1876 | }else{ |
| 1876 | 1877 | zComment = mprintf("Delete attachment \"%h\" from wiki page [%h]", |
| 1877 | 1878 | p->zAttachName, p->zAttachTarget); |
| 1878 | 1879 | } |
| 1879 | 1880 | db_multi_exec( |
| @@ -1883,12 +1884,13 @@ | ||
| 1883 | 1884 | ); |
| 1884 | 1885 | free(zComment); |
| 1885 | 1886 | }else{ |
| 1886 | 1887 | char *zComment; |
| 1887 | 1888 | if( p->zAttachSrc && p->zAttachSrc[0] ){ |
| 1888 | - zComment = mprintf("Add attachment \"%h\" to ticket [%.10s]", | |
| 1889 | - p->zAttachName, p->zAttachTarget); | |
| 1889 | + zComment = mprintf( | |
| 1890 | + "Add attachment [%R/artifact/%S|%h] to ticket [%S]", | |
| 1891 | + p->zAttachSrc, p->zAttachName, p->zAttachTarget); | |
| 1890 | 1892 | }else{ |
| 1891 | 1893 | zComment = mprintf("Delete attachment \"%h\" from ticket [%.10s]", |
| 1892 | 1894 | p->zAttachName, p->zAttachTarget); |
| 1893 | 1895 | } |
| 1894 | 1896 | db_multi_exec( |
| 1895 | 1897 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1552,11 +1552,11 @@ | |
| 1552 | if( fossil_strcmp(pManifest->aField[i].zName, zStatusColumn)==0 ){ |
| 1553 | zNewStatus = pManifest->aField[i].zValue; |
| 1554 | } |
| 1555 | } |
| 1556 | if( zNewStatus ){ |
| 1557 | blob_appendf(&comment, "%h ticket [%.10s]: <i>%s</i>", |
| 1558 | zNewStatus, pManifest->zTicketUuid, zTitle |
| 1559 | ); |
| 1560 | if( pManifest->nField>1 ){ |
| 1561 | blob_appendf(&comment, " plus %d other change%s", |
| 1562 | pManifest->nField-1, pManifest->nField==2 ? "" : "s"); |
| @@ -1566,11 +1566,11 @@ | |
| 1566 | }else{ |
| 1567 | zNewStatus = db_text("unknown", |
| 1568 | "SELECT %s FROM ticket WHERE tkt_uuid='%s'", |
| 1569 | zStatusColumn, pManifest->zTicketUuid |
| 1570 | ); |
| 1571 | blob_appendf(&comment, "Ticket [%.10s] <i>%s</i> status still %h with " |
| 1572 | "%d other change%s", |
| 1573 | pManifest->zTicketUuid, zTitle, zNewStatus, pManifest->nField, |
| 1574 | pManifest->nField==1 ? "" : "s" |
| 1575 | ); |
| 1576 | free(zNewStatus); |
| @@ -1868,12 +1868,13 @@ | |
| 1868 | if( strlen(p->zAttachTarget)!=UUID_SIZE |
| 1869 | || !validate16(p->zAttachTarget, UUID_SIZE) |
| 1870 | ){ |
| 1871 | char *zComment; |
| 1872 | if( p->zAttachSrc && p->zAttachSrc[0] ){ |
| 1873 | zComment = mprintf("Add attachment \"%h\" to wiki page [%h]", |
| 1874 | p->zAttachName, p->zAttachTarget); |
| 1875 | }else{ |
| 1876 | zComment = mprintf("Delete attachment \"%h\" from wiki page [%h]", |
| 1877 | p->zAttachName, p->zAttachTarget); |
| 1878 | } |
| 1879 | db_multi_exec( |
| @@ -1883,12 +1884,13 @@ | |
| 1883 | ); |
| 1884 | free(zComment); |
| 1885 | }else{ |
| 1886 | char *zComment; |
| 1887 | if( p->zAttachSrc && p->zAttachSrc[0] ){ |
| 1888 | zComment = mprintf("Add attachment \"%h\" to ticket [%.10s]", |
| 1889 | p->zAttachName, p->zAttachTarget); |
| 1890 | }else{ |
| 1891 | zComment = mprintf("Delete attachment \"%h\" from ticket [%.10s]", |
| 1892 | p->zAttachName, p->zAttachTarget); |
| 1893 | } |
| 1894 | db_multi_exec( |
| 1895 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1552,11 +1552,11 @@ | |
| 1552 | if( fossil_strcmp(pManifest->aField[i].zName, zStatusColumn)==0 ){ |
| 1553 | zNewStatus = pManifest->aField[i].zValue; |
| 1554 | } |
| 1555 | } |
| 1556 | if( zNewStatus ){ |
| 1557 | blob_appendf(&comment, "%h ticket [%.10s]: <i>%h</i>", |
| 1558 | zNewStatus, pManifest->zTicketUuid, zTitle |
| 1559 | ); |
| 1560 | if( pManifest->nField>1 ){ |
| 1561 | blob_appendf(&comment, " plus %d other change%s", |
| 1562 | pManifest->nField-1, pManifest->nField==2 ? "" : "s"); |
| @@ -1566,11 +1566,11 @@ | |
| 1566 | }else{ |
| 1567 | zNewStatus = db_text("unknown", |
| 1568 | "SELECT %s FROM ticket WHERE tkt_uuid='%s'", |
| 1569 | zStatusColumn, pManifest->zTicketUuid |
| 1570 | ); |
| 1571 | blob_appendf(&comment, "Ticket [%.10s] <i>%h</i> status still %h with " |
| 1572 | "%d other change%s", |
| 1573 | pManifest->zTicketUuid, zTitle, zNewStatus, pManifest->nField, |
| 1574 | pManifest->nField==1 ? "" : "s" |
| 1575 | ); |
| 1576 | free(zNewStatus); |
| @@ -1868,12 +1868,13 @@ | |
| 1868 | if( strlen(p->zAttachTarget)!=UUID_SIZE |
| 1869 | || !validate16(p->zAttachTarget, UUID_SIZE) |
| 1870 | ){ |
| 1871 | char *zComment; |
| 1872 | if( p->zAttachSrc && p->zAttachSrc[0] ){ |
| 1873 | zComment = mprintf( |
| 1874 | "Add attachment [%R/artifact/%S|%h] to wiki page [%h]", |
| 1875 | p->zAttachSrc, p->zAttachName, p->zAttachTarget); |
| 1876 | }else{ |
| 1877 | zComment = mprintf("Delete attachment \"%h\" from wiki page [%h]", |
| 1878 | p->zAttachName, p->zAttachTarget); |
| 1879 | } |
| 1880 | db_multi_exec( |
| @@ -1883,12 +1884,13 @@ | |
| 1884 | ); |
| 1885 | free(zComment); |
| 1886 | }else{ |
| 1887 | char *zComment; |
| 1888 | if( p->zAttachSrc && p->zAttachSrc[0] ){ |
| 1889 | zComment = mprintf( |
| 1890 | "Add attachment [%R/artifact/%S|%h] to ticket [%S]", |
| 1891 | p->zAttachSrc, p->zAttachName, p->zAttachTarget); |
| 1892 | }else{ |
| 1893 | zComment = mprintf("Delete attachment \"%h\" from ticket [%.10s]", |
| 1894 | p->zAttachName, p->zAttachTarget); |
| 1895 | } |
| 1896 | db_multi_exec( |
| 1897 |
+2
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -345,10 +345,12 @@ | ||
| 345 | 345 | }else if( (tmFlags & TIMELINE_ARTID)!=0 ){ |
| 346 | 346 | hyperlink_to_uuid(zUuid); |
| 347 | 347 | } |
| 348 | 348 | db_column_blob(pQuery, commentColumn, &comment); |
| 349 | 349 | if( zType[0]!='c' ){ |
| 350 | + /* Comments for anything other than a check-in are generated by | |
| 351 | + ** "fossil rebuild" and expect to be rendered as text/x-fossil-wiki */ | |
| 350 | 352 | wiki_convert(&comment, 0, WIKI_INLINE); |
| 351 | 353 | }else if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){ |
| 352 | 354 | Blob truncated; |
| 353 | 355 | blob_zero(&truncated); |
| 354 | 356 | blob_append(&truncated, blob_buffer(&comment), mxWikiLen); |
| 355 | 357 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -345,10 +345,12 @@ | |
| 345 | }else if( (tmFlags & TIMELINE_ARTID)!=0 ){ |
| 346 | hyperlink_to_uuid(zUuid); |
| 347 | } |
| 348 | db_column_blob(pQuery, commentColumn, &comment); |
| 349 | if( zType[0]!='c' ){ |
| 350 | wiki_convert(&comment, 0, WIKI_INLINE); |
| 351 | }else if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){ |
| 352 | Blob truncated; |
| 353 | blob_zero(&truncated); |
| 354 | blob_append(&truncated, blob_buffer(&comment), mxWikiLen); |
| 355 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -345,10 +345,12 @@ | |
| 345 | }else if( (tmFlags & TIMELINE_ARTID)!=0 ){ |
| 346 | hyperlink_to_uuid(zUuid); |
| 347 | } |
| 348 | db_column_blob(pQuery, commentColumn, &comment); |
| 349 | if( zType[0]!='c' ){ |
| 350 | /* Comments for anything other than a check-in are generated by |
| 351 | ** "fossil rebuild" and expect to be rendered as text/x-fossil-wiki */ |
| 352 | wiki_convert(&comment, 0, WIKI_INLINE); |
| 353 | }else if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){ |
| 354 | Blob truncated; |
| 355 | blob_zero(&truncated); |
| 356 | blob_append(&truncated, blob_buffer(&comment), mxWikiLen); |
| 357 |