'abort: cannot lock repository' error in Mercurial lock implementation
When running concurrent hg commands, the repository’s lockfile can cause the error “abort: cannot lock repository”. The lock implementation resides in mercurial/lock.py and uses platform‑specific primitives to serialize access. While this protects data integrity, it can become a bottleneck for short‑lived commands such as hg status under heavy concurrency. T