Got a bluescreen in windows while cloning a mercurial repository.
After reboot, I now get this message for almost all hg commands:
c:\\src\\>hg commit wai
I am very familiar with Mercurial's locking code (as of 1.9.1). The above advice is good, but I'd add that:
(For the curious: I haven't yet been able to catch the cause of this problem, but suspect it's either an older version of Mercurial accessing the repository or a problem in Python's socket.gethostname() call on certain versions of Windows.)