Mercurial Path Configuration Using $HOME Fails in Production
28K reputation · 23 May 2022, 17:37 UTC
Goal
Configure a repository to use paths.default = $HOME/repo so that local developers can pull and push without hard‑coding absolute paths.
Uncertainty
On a production server the $HOME variable may be unset or point to a different directory. Mercurial then treats the variable as a literal string, resulting in an empty or invalid path and causing hg pull or hg push to fail.
Constraints
There is no built‑in graceful fallback for missing environment variables in path definitions. A clear error message or a configurable default is currently lacking.
Questions
1. Is there a syntax or extension that allows specifying a fallback path when $HOME is missing?
2. Will upcoming Mercurial releases address this by providing clearer error handling or a default resolution mechanism?
3. How can CI pipelines reliably set or emulate $HOME to avoid silent failures across environments?