Fossil Forum

Integrating Check-In ID and Timestamp into Fossil SCM Version Display
Login

Integrating Check-In ID and Timestamp into Fossil SCM Version Display

Integrating Check-In ID and Timestamp into Fossil SCM Version Display

(1) By ALX (alex) on 2024-03-25 14:58:15 [link] [source]

How is it done that Fossil displays the hash and the check-in time in the version, for example: "This is fossil version 2.23 [47362306a7] 2023-11-01 18:56:47 UTC"?

(2) By Richard Hipp (drh) on 2024-03-25 15:08:45 in reply to 1 [source]

The "manifest" setting is set to "on". That causes Fossil to update the home directory with two files containing version information:

  • manifest
  • manifest.uuid

The Makefile uses the "mkversion.c" utility to read these two files plus "VERSION" file and generate the "VERSION.h" header file as part of the build process. Information about the hash and check-in time are contained in the VERSION.h header file. For the most recent Fossil check-in, the generated VERSION.h header file will be this:

#define MANIFEST_UUID "38dad38b6d87e0fa08194d3e46b07a6b0da685f0d9c416d482e99cec72b06370"
#define MANIFEST_VERSION "[38dad38b6d]"
#define FOSSIL_BUILD_HASH "9981f83be77fc0b0c44db065c10d2d42"
#define MANIFEST_DATE "2024-03-22 12:30:01"
#define MANIFEST_YEAR "2024"
#define MANIFEST_NUMERIC_DATE 20240322
#define MANIFEST_NUMERIC_TIME 123001
#define RELEASE_VERSION "2.24"
#define RELEASE_VERSION_NUMBER 22400
#define RELEASE_RESOURCE_VERSION 2,24,0,0

(3) By ALX (alex) on 2024-03-25 17:20:26 in reply to 2 [link] [source]

Perfect. Thank you for the quick response. I tried it out and it works great.