Fossil SCM

make the version field a link, if it contains a valid checkin hash or tagname, see ticket [04ba0f70b816cebe]

jkosche 2025-04-08 22:05 tkt-improvements
Commit 44bd394f0a61826451180fb2b6afd27709ed5ee8570490b20660fdfcdd1e874c
1 file changed +12 -1
+12 -1
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -504,11 +504,22 @@
504504
@ </td>
505505
@ <th1>enable_output 1</th1>
506506
@ </tr>
507507
@ <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td>
508508
@ <td colspan="3" valign="top" class="tktDspValue">
509
-@ $<foundin>
509
+@ <th1>
510
+@ set versionlink ""
511
+@ query "SELECT count(*) AS match FROM tag WHERE tagname = 'sym-$foundin'" {
512
+@ if {$match} {set versionlink "/timeline?t=$foundin"}}
513
+@ query "SELECT count(*) AS match FROM blob WHERE uuid LIKE '$foundin%'" {
514
+@ if {$match} {set versionlink "/info/$foundin"}}
515
+@ if {$versionlink eq ""} {
516
+@ html "$foundin"
517
+@ } else {
518
+@ html "<a href=\"$versionlink\">$foundin</a>"
519
+@ }
520
+@ </th1>
510521
@ </td></tr>
511522
@ </table>
512523
@
513524
@ <th1>
514525
@ wiki_assoc "ticket" $tkt_uuid
515526
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -504,11 +504,22 @@
504 @ </td>
505 @ <th1>enable_output 1</th1>
506 @ </tr>
507 @ <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td>
508 @ <td colspan="3" valign="top" class="tktDspValue">
509 @ $<foundin>
 
 
 
 
 
 
 
 
 
 
 
510 @ </td></tr>
511 @ </table>
512 @
513 @ <th1>
514 @ wiki_assoc "ticket" $tkt_uuid
515
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -504,11 +504,22 @@
504 @ </td>
505 @ <th1>enable_output 1</th1>
506 @ </tr>
507 @ <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td>
508 @ <td colspan="3" valign="top" class="tktDspValue">
509 @ <th1>
510 @ set versionlink ""
511 @ query "SELECT count(*) AS match FROM tag WHERE tagname = 'sym-$foundin'" {
512 @ if {$match} {set versionlink "/timeline?t=$foundin"}}
513 @ query "SELECT count(*) AS match FROM blob WHERE uuid LIKE '$foundin%'" {
514 @ if {$match} {set versionlink "/info/$foundin"}}
515 @ if {$versionlink eq ""} {
516 @ html "$foundin"
517 @ } else {
518 @ html "<a href=\"$versionlink\">$foundin</a>"
519 @ }
520 @ </th1>
521 @ </td></tr>
522 @ </table>
523 @
524 @ <th1>
525 @ wiki_assoc "ticket" $tkt_uuid
526

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button