0

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

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

^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)?

Community
  • 1
  • 1
Kalle Richter
  • 8,008
  • 26
  • 77
  • 177

2 Answers2

1

Try to find your directory by running the following command -

find / -name ".hg/store/" -> / will start looking your directory from root folder. Run the command as root user to access all the folder.

Then follow the post mercurial-stuck-waiting-for-lock

Community
  • 1
  • 1
royki
  • 1,593
  • 3
  • 25
  • 45
  • Works. One seems to has access to the `hg` repository in `.git/hg/.hg/`. Searching under `/` doesn't make sense, though, searching under the source root is sufficient. – Kalle Richter Aug 28 '15 at 18:06
  • @KarlRichter I also know the searching under `/` doesn't make sense. It was for your sake of help that you don't miss the folder . And from your post it seems you forgot how to search through command line if you graphically can't find out. and after all you need to use the access of `root` If it works then accept the answer. – royki Aug 28 '15 at 18:19
  • I just didn't think that there's might be a `.hg` directory at all. I'll accept the answer if improved. You can reuse the information in my first comment. – Kalle Richter Aug 28 '15 at 18:35
  • @KarlRichter that's the reason why the SO is. What you don't think, other can think and help each other and to extend the thoughts. – royki Aug 28 '15 at 19:03
  • Searching in `/` is irrelevant for my question and doesn't help others because running `find` in source root always brings a better result than in `/`. – Kalle Richter Aug 28 '15 at 19:58
  • Fair enough. The "search idea" is the another way to come out from your problem. Do you realize that !!! – royki Aug 28 '15 at 20:38
  • No, I don't. I'm not contradicting the search idea, just proposing an optimization. Searching in `/` makes as much sense as searching on my friends PC or go to the library and search in a book. It is not wrong to search in `/` and a deterministic way to solve the problem in my question, but it's not a TIMTOWTDI case (which SO policy would encourage to be posted). It's just a non-optimal version of a legitimate answer. – Kalle Richter Aug 29 '15 at 00:25
  • You would not better and that's why before posting your question,you even didn't try to search to "your friends pc " or "going to library", even not in your own pc. Talking about optimization and deterministic first identify what you need and realize how to achieve. – royki Aug 29 '15 at 09:15
0

The .hg repository (normally under the source/checkout root) is available at .git/hg/.hg/. The lock can be removed from there following Mercurial stuck "waiting for lock".

Community
  • 1
  • 1
Kalle Richter
  • 8,008
  • 26
  • 77
  • 177