Skip to content
🎉 Terragrunt v1.0 is here! Read the announcement to learn more.

Mercurial

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 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.

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.

When the resolved node hash is not yet in the store, Terragrunt clones the revision, ingests it, and links it into the target.

When the node hash is already present, Terragrunt links the cached tree without cloning.