Rapid Repository Sharing with Mercurial's hg serve
Stop wasting time on server setup for quick collaborations. Learn how to use Mercurial's hg serve to instantly share repositories over HTTP for cloning and browsing.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Stop wasting time on server setup for quick collaborations. Learn how to use Mercurial's hg serve to instantly share repositories over HTTP for cloning and browsing.
Goal Reduce I/O and CPU costs for a Mercurial repository that receives very few requests per day. Constraint Mercurial protects its store with a lockfile located at .hg/store/lock . When hg serve spawns multiple worker threads, each thread may attempt to acquire this lock even for read‑only operations, potentially triggering the documented error abort: canno
Goal Ensure that anonymous users cannot pull or clone a repository served by Mercurial’s built‑in hg serve unless explicit permission is granted. Constraints and uncertainty By default hg serve allows anonymous read access when no [web] section defines allow_read or deny_read . The server itself does not perform authentication; it expects the front‑end to se
The goal is to prevent Mercurial’s built‑in web server from unintentionally serving repositories on non‑loopback interfaces. By default, `hg serve` listens on 0.0.0.0:8000, making the repository reachable to any host on the network without emitting a warning when the bind address is not localhost. Although the documentation highlights this exposure risk, the