简体   繁体   English

如何在git-hg存储库中删除hg锁定?

[英]How to remove hg lock in a git-hg repository?

When I run git pull origin master for the repository hg::http://hg.openjdk.java.net/jdk8u/jdk8u/corba/ (set as remote origin ) hangs at 当我为存储库运行git pull origin master hg::http://hg.openjdk.java.net/jdk8u/jdk8u/corba/ (设置为远程origin )挂在

waiting for lock on repository /mnt/main/sources/jdk8u-jdk8u/.git/modules/corba/hg/origin/clone held by 'richter-Lenovo-IdeaPad-Z500-Touch\xef\x80\xa217970'

Interrupting with Ctrl + C displays the following trace Ctrl + C中断显示以下跟踪

^CTraceback (most recent call last):
  File "/usr/bin/git-remote-hg", line 1322, in <module>

    sys.exit(main(sys.argv))
  File "/usr/bin/git-remote-hg", line 1286, in main
richter@richtercloud:/mnt/main/sources/jdk8u-jdk8u/corba$     repo = get_repo(url, alias)
  File "/usr/bin/git-remote-hg", line 433, in get_repo
    repo.pull(peer, heads=None, force=True)
  File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 1578, in pull
    return exchange.pull (self, remote, heads, force)
  File "/usr/lib/python2.7/dist-packages/mercurial/exchange.py", line 559, in pull
    lock = pullop.repo.lock()
  File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 1098, in lock
    self.invalidate, _('repository %s') % self.origroot)
  File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 1064, in _lock
    releasefn, desc=desc)
  File "/usr/lib/python2.7/dist-packages/mercurial/lock.py", line 41, in __init__
    self.delay = self.lock()
  File "/usr/lib/python2.7/dist-packages/mercurial/lock.py", line 63, in lock
    time.sleep(1)
KeyboardInterrupt

In a hg repository this can be resolved with solutions in Mercurial stuck "waiting for lock" , but in git-hg (doesn't have a .hg directory)? hg储存库中,可以使用Mercurial卡住的“等待锁”中的解决方案来解决,但是在git-hg (没有.hg目录)?

Try to find your directory by running the following command - 尝试通过运行以下命令查找目录-

find / -name ".hg/store/" -> / will start looking your directory from root folder. find / -name ".hg/store/" -> /将开始从根文件夹查找目​​录。 Run the command as root user to access all the folder. root用户身份运行命令以访问所有文件夹。

Then follow the post mercurial-stuck-waiting-for-lock 然后按照张贴在锁上的等待

The .hg repository (normally under the source/checkout root) is available at .git/hg/.hg/ . .hg存储库(通常在源/签出根目录下)可从.git/hg/.hg/ The lock can be removed from there following Mercurial stuck "waiting for lock" . Mercurial卡住“等待锁”之后,可以从那里卸下

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM