Fossil

Timeline
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

About branch generated-tkt-mimetype

When a ticket is created or modified Fossil extends BACKLINK table with the links extracted from the J-cards of the ticket change artifact. That extraction requires the knowledge of which markup is used.

Previously Fossil derived this information solely from the value of J-card named "mimetype"1, which was considered only if a regular "mimetype" column was defined in TICKET or TICKETCHNG table.

This branch adds the ability to specify mimetypes using GENERATED "mimetype" columns.
It implements the following rules:

  1. If either TICKET or TICKETCHNG table has a regular (not generated) "mimetype" column, then traditional processing is applied (as schetched in the beginning).

  2. Otherwise: if just one of the above tables has generated "mimetype" column then the generated value in the corresponding row is used.

  3. Otherwise: if just one of two generated values is not NULL then that value is used for all fields.

  4. Otherwise (when both generated values are not NULL):

    • all fields that are defined in the TICKETCHNG table are processed using mimetype from the TICKETCHNG table;
    • the rest fields (that are specific to TICKET table) are processed using mimetype from the TICKET table.

If a NULL value has to be interpreted as mimetype it works as Fossil-Wiki. That also applies to the case when "mimetype" column is missing in both TICKET and TICKETCHNG.

See forum thread 40c1208a0f84 for rationale and discussion.


  1. ^ Here and further the naming "mimetype" is case-sensitive. Presumably due to performance considerations.
7 check-ins related to "generated-tkt-mimetype"
2022-05-24
20:32
If neither TICKET nor TICKETCHNG table has regular "mimetype" column then generated "mimetype" columns of these two tables are queried and used during the extraction of backlinks from ticket change artifacts. See forum post 40c1208a0f84 for rationale. ... (check-in: 6fb642c0 user: george tags: trunk)
2022-05-18
22:52
Fix a couple of invokations of backlink_extract() that were overlooked in the previous check-in. ... (Closed-Leaf check-in: 33c67c28 user: george tags: generated-tkt-mimetype)
20:21
Add support for generated "mimetype" column in the TICKET table. Introduce integer mimetype codes and refactor backlink_extract() accordingly. Make the overall handling of the generated "mimetype" columns a bit more clear. ... (check-in: e39f7790 user: george tags: generated-tkt-mimetype)
2022-05-14
19:12
A tiny optimization inside of ticket_insert(): rearrange two db_finalize() calls in order to avoid additional malloc() for zMimetype. ... (check-in: 563c6b9e user: george tags: generated-tkt-mimetype)
18:27
If "mimetype" column of the TICKETCHNG table is a generated column, than use these generated values for extraction of backlinks from the ticket-changes. ... (check-in: 5ab73ab8 user: george tags: generated-tkt-mimetype)
17:42
Fix a subtle bug in ticket_insert() which may lead to redundant rows in the BACKLINK table. The bug appeared in [7c13a57358ae]. ... (check-in: 3b42738e user: george tags: generated-tkt-mimetype)
14:38
Adds minor output to stash command to alert users when a stash is successful. See forum post fd2405eff30f4c73 for discussion. ... (check-in: 07d739b4 user: andybradford tags: trunk)