The file manifest.uuid
contains the checksum of the commit, and the file manifest
contains a list of the files in that commit and their individual checksums. (manifest.uuid
is just the SHA1 of manifest). Both files are plain text and easy to parse.
The build for fossil itself shows one use. When building, the file manifest.uuid is converted with awk) to a C string literal of the form "[1234567890]"
and used to form the text of the revision name that appears in all html page footers.
Do note that recent versions of fossil don't leave those files behind unless the "manifest" setting is enabled with a command like fossil setting manifest 1
.
Alternatively, you can parse the output of fossil info
or fossil status
, both of which include the value of the current checkout's id.
For a single file, fossil finfo
will report the file's complete change history, which does include the artifact id for that file at each point in time. It could be parsed for the artifact id of that file. Better, fossil sha1sum
will report the SHA1 sum of any file (or files, or stdin). The SHA1 sum of a file is its artifact id.
Since the id of an entire checkin is just the SHA1 of its manifest which includes the SHA1's of each checked in file, it is effectively impossible to include the id of the checkin inside a file checked in.