Mercurial stuck “waiting for lock”

前端 未结 11 1624
天命终不由人
天命终不由人 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:47

    I encountered this problem on Mac OS X 10.7.5 and Mercurial 2.6.2 when trying to push. After upgrading to Mercurial 3.2.1, I got "no changes found" instead of "waiting for lock on repository". I found out that somehow the default path had gotten set to point to the same repository, so it's not too surprising that Mercurial would get confused.

    0 讨论(0)
  • 2020-12-02 04:48

    If it only happens on mapped drives it might be bug https://bitbucket.org/tortoisehg/thg/issue/889/cant-commit-file-over-network-share. Using UNC path instead of drive letter seems to sidestep the issue.

    0 讨论(0)
  • 2020-12-02 04:51

    When waiting for lock on working directory, delete .hg/wlock.

    0 讨论(0)
  • 2020-12-02 04:52

    I had the same problem on Win 7. The solution was to remove following files:

    1. .hg/store/phaseroots
    2. .hg/wlock

    As for .hg/store/lock - there was no such file.

    0 讨论(0)
  • 2020-12-02 04:57

    Coworker had this exact problem today, after a BSoD while trying to push. He had to:

    • delete the file .hg/store/lock (as per the accepted answer)
    • delete the file .hg/store/phaseroots (as per this TortoiseHG bug report)

    Then his repo worked again.

    EDIT: As per @Marmoute's comment - when dealing with lock-related issues, using hg debuglock is a safer alternative to blindly deleting the .hg/store/lock file.

    0 讨论(0)
提交回复
热议问题