Limits of Mercurial Share Extension on Filesystems Without Hard-Link Support
0 reputation · 07 Jun 2023, 06:17 UTC
Share Extension Behavior on Unsupported Filesystems
The Mercurial share extension creates a clone that hard‑links the source repository’s store directory, reducing disk usage for low‑traffic workloads. On filesystems that do not support hard links (e.g., FAT or certain network shares), the extension silently falls back to a full copy, producing a share that occupies the same space as a normal clone. This fallback occurs without warning, which can surprise users who assume the share is lightweight.
Because the share shares the same .hg/store directory, any operation that modifies the store (such as a strip or rollback in the source) can affect all shares. Concurrent writes are serialized by Mercurial’s locking, but heavy simultaneous activity may still impact performance.
Given these behaviors, the following questions remain unanswered:
- Does Mercurial detect hard‑link support during share creation, and how is the result reported?
- Is there an intention to emit a warning or error when the filesystem cannot hard‑link, to avoid silent fallback?
- Could a configuration option be added to force a full clone or to enable an explicit fallback mode?