Mercurial stuck “waiting for lock”

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

    I had this problem with no detectable lock files. I found the solution here: http://schooner.uwaterloo.ca/twiki/bin/view/MAG/HgLockError

    Here is a transcript from Tortoise Hg Workbench console

    % hg debuglocks
    lock:  user None, process 7168, host HPv32 (114213199s)
    wlock: free
    [command returned code 1 Sat Jan 07 18:00:18 2017]
    % hg debuglocks --force-lock
    [command completed successfully Sat Jan 07 18:03:15 2017]
    cmdserver: Process crashed
    PaniniDev% hg debuglocks
    % hg debuglocks
    lock:  free
    wlock: free
    [command completed successfully Sat Jan 07 18:03:30 2017]
    

    After this the aborted pull ran sucessfully.

    The lock had been set more than 2 years ago, by a process on a machine that is no longer on the LAN. Shame on the hg developers for a) not documenting locks adequately; b) not timestamping them for automatic removal when they get stale.

提交回复
热议问题