The logs never lie. When every commit, every push, every change matters, you need a record that cannot be altered or erased. Immutable audit logs in Mercurial offer that guarantee—persistence beyond human error, beyond malicious intent.
Mercurial is built for distributed version control, but by default, logs can be rewritten. Bookmarks, branches, and even history can be reshaped under certain conditions. That flexibility is useful until it becomes a liability. For compliance, security, and trust between teams, the answer is immutable audit logs: a cryptographically strong, append-only trail of all repository activities.
An immutable log in Mercurial is more than a history view. It captures author identity, timestamps, commit hashes, and changesets in a chain where each record is linked to the one before it. Any attempt to alter history breaks the chain. This makes tampering detectable and provable. Storing these logs with hash validation and external storage ensures the repository history is both verifiable and permanent.