Mercurial stuck "waiting for lock"

jm. picture jm. · Aug 16, 2008 · Viewed 108.2k times · Source

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
waiting for lock on repository c:\src\McVrsServer held by '\x00\x00\x00\x00\x00\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
interrupted!

Google is no help.

Any tips?

Answer

jm. picture jm. · Aug 16, 2008

When "waiting for lock on repository", delete the repository file: .hg/wlock (or it may be in .hg/store/lock)

When deleting the lock file, you must make sure nothing else is accessing the repository. (If the lock is a string of zeros or blank, this is almost certainly true).