Previously repack use the standard Mercurial symlink based locking mechanism. This caused
problems on our laptop users because the symlink locking relies on the host name
and sometimes sometimes their hostname changes due to weird IT issues, which
resulted in locks existing forever and repack never running. The symlink based
locking scheme was also a problem in chroots, where two processes in different
chroots may attempt to repack the same shared cache at the same time.
Switching to an flock based scheme will solve these issues.
I don't think the fcntl module is available for Windows. @ikostia @dsp
There are portable locking libraries, but not sure if that is overkill
https://github.com/WoLpH/portalocker