Based on various conversations in the past I have been working on a semi-interesting features: using mnemonic encoding to turn ticket hashes into something that humans can remember.
This uses a built-in dictionary to convert a hex hash (e.g. '74a95e62') into a series of words ('TOAST MOZART TULIP'). There are actually several standard algorithms; the one I like best is mnemonic encoding, and there's a sample implementation here: https://github.com/singpolyma/mnemonicode A four-byte hash can be stored as three words, which is just the right size to fit in the human brain. However, the algorithm copes fine with longer or shorter hashes (you get more or fewer words). I've done a basic implementation of this, which is now in the dg-codenames branch; the algorithm itself and its dictionary is in src/mnemonic.c. You can now do: ./fossil ticket history 'TOAST MOZART TULIP' ...to see an individual ticket. If you want to list the memorable names in a ticket report, add this line to the report's query statement: mnemonic_encode(substr(tkt_uuid,1,8)) AS 'Id', To play with the algorithm, do: echo "select mnemonic_encode('12345678');" | ./fossil sqlite3 or echo "select mnemonic_decode('CRASH CHAPTER CASINO');" | ./fossil sqlite3 ...to encode and decode. Right now the only thing I've changed to accept mnemonic encodings as well as hashes is the "fossil ticket" command; I haven't touched the web UI as it's rather complicated. So right now the only way to get the mnemonic for a bug is to change the ticket report as described above or to manually get the encoding. Here are a few from the Fossil ticket database to get you started. This lets you see what sort of codename is produced: 74a95e62cf TOAST MOZART TULIP Visual indicator for which code check in being viewed 0c657fd35f ARNOLD COMMON BORIS Allow aliases on commands 93c266d3ee SUMMER SIMPLE MILK Difficulty to correctly add/list files/directories with accended characters in name/path and see them listed in "Files" menu. 263b45306c PILGRIM PUMP ELITE Add configuration to adjust length of version UUID 04a259be40 PEACE SHERIFF AMBER operations upon all files 7636b10ddf CITIZEN ELASTIC VAMPIRE option to abort checkin if comment is empty 2a34de01fc SOCIETY FELIX FASHION "wiki unlist" as a possible solution to deleting wiki pages. I'd appreciate any comments --- including any suggestions as to whether this is actually a useful feature. I, personally, find these things vastly easier to handle than 8-character hex strings. However I hear rumours that other peoples' opinions are valid too... -- ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── │ │ "Ripley's Law: Never go further for the cat than the cat would go for │ you." --- Vexxarr Bleen (trans. Hunter Cressall)
signature.asc
Description: OpenPGP digital signature
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users