Fossil

Notes About Branch generated-tkt-mimetype
Login

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.