Mercurial stuck “waiting for lock”

前端 未结 11 1622
天命终不由人
天命终不由人 2020-12-02 04:14

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         


        
11条回答
  •  失恋的感觉
    2020-12-02 04:32

    I am very familiar with Mercurial's locking code (as of 1.9.1). The above advice is good, but I'd add that:

    1. I've seen this in the wild, but rarely, and only on Windows machines.
    2. Deleting lock files is the easiest fix, BUT you have to make sure nothing else is accessing the repository. (If the lock is a string of zeros, this is almost certainly true).

    (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.)

提交回复
热议问题