Mercurial
Overview
Section titled “Overview”A Mercurial source is identified by a repository URL and an optional revision. Terragrunt resolves that revision to a node hash and keys the cached tree by it.
The cheap probe
Section titled “The cheap probe”The probe Terragrunt uses to attempt to avoid fetching Mercurial sources is hg identify against the remote, which resolves the requested revision to its full node hash without cloning. The revision comes from the URL’s ?rev= query parameter; absent or empty means tip. The full 40-character node hash is used rather than the abbreviated short form so the key is collision-safe.
Cache key & deduplication
Section titled “Cache key & deduplication”The node hash is a content identifier, so the key is content-addressed and the same revision reached through different URLs deduplicates to one stored tree. File blobs are content-addressed.
Cache miss
Section titled “Cache miss”When the resolved node hash is not yet in the store, Terragrunt clones the revision, ingests it, and links it into the target.
Cache hit
Section titled “Cache hit”When the node hash is already present, Terragrunt links the cached tree without cloning.