Things in Darcs that are or that resemble hashes:

  1. Patch hash: hash of patch info (name, author name, timestamp, log, random seed)

    • Used as an identifier for patches independently of their context (because patch internals change during commutation)
    • You can see this in the darcs log output
    • This never changes, even if you commute the patch
    • It changes if you amend the patch (the random seed is changed)
  2. File contents hash (sha256) - used for identifying/verifying hashed patch/pristine/inventory files

    • For patches, it can change depending on what the context of the patch is, since it is a hash on patch info (which never changes unless patch is amended) + actual contents (which may change depending on context).
    • All files of the recorded state (pristine) of a repository are hashed. In particular, the pristine hash is a hash of the entire recorded state of a repository. It can be found as the first line of _darcs/hashed_inventory (pristine:...).
    • See HashedPristine for details
  3. Patch bundle hash

    • Found at the end of .dpatch files (Patch bundle hash: ...)
    • Used to verify that patch bundle was not corrupted (eg. by a mail client)
    • Darcs doesn’t mind if you remove this.
    • You probably should NOT remove it, but there are rare occasions where you might do so for Forensics or some sort of manual rebase operation. Get in touch with other darcs users first to make sure this is good idea.

See also