Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » What else can cause "[lock failed]" besides branches that are dups except for case?
What else can cause "[lock failed]" besides branches that are dups except for case? [message #1807660] Wed, 05 June 2019 18:42 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 754
Registered: July 2009
Senior Member
In the teams I work with, many of them often make the mistake of creating branches whose name is the same as existing branches, except with a case difference. When this is done, some devs working on Windows (our main desktop interface) will get mysterious error dialogs in Eclipse with "[lock failed]" on every branch in the repository. I finally wrote a script that looks at all the remote branches for a repository and finds the ones that are dups except for case. This has fixed the problem in almost every single instance of this error report.

There is one person who is getting this same error in one repository, but I've run the script that checks for this, and there are no branches that are dups except for case.

I thought perhaps he might be getting this because he has local branches that aren't on the remote that are dups except for case, but he literally only has a single branch in the local repo.

What else might possibly be wrong that could cause this?
Re: What else can cause "[lock failed]" besides branches that are dups except for case? [message #1807672 is a reply to message #1807660] Wed, 05 June 2019 21:58 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1212
Registered: July 2009
Senior Member
Did you check the Eclipse error log ?
There might be real lock failures. Shutdown Eclipse and search for files with extension .lock.
You may end up with stale lock files if Eclipse crashed or was killed.
Re: What else can cause "[lock failed]" besides branches that are dups except for case? [message #1843147 is a reply to message #1807672] Fri, 16 July 2021 14:07 Go to previous message
David M. Karr is currently offline David M. KarrFriend
Messages: 754
Registered: July 2009
Senior Member
I happened to notice this old note of mine. I think I know why this can happen even with my original script not showing any dups. My old script wasn't very thorough. I found a more robust way of finding all of the branch names (using the REST api for the SCM, not git), and in at least one case, I found more dup branches with that version.
Previous Topic:PostCommitHook
Next Topic:EGit 5.13 clone TFS repository with SSH fail
Goto Forum:
  


Current Time: Sun Sep 25 14:59:08 GMT 2022

Powered by FUDForum. Page generated in 0.01627 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top