Problem with creating new branch when I change task (probably asynchronous git commend calls)
Since I switched to v. 2017.2.2 from 2016's I've got some problems with creating new branches during tasks changing.
I worked on task T1 which is connected with my feature branch (FB-1), created from developer branch. Then I wanted to create new task. I chose create branch from master. Then in event log I've got 2 positions:
11:58 Checked out master
11:58 Couldn't create new branch: Unable to create '.git/index.lock': File exists.
I think that lock exists, because checking-out process was still active. My guess was that this 2 processes worked asynchronously. I found an article about that: https://www.jetbrains.com/help/phpstorm/2017.1/git-branches-in-multirooted-projects.html I thought that I supposed to enable synchronous branch control, but there is no such setting in my git menu. I worked a lot on 2016 versions and I never experienced such problem. I've got only one repo in my project.
请先登录再写评论。
Synchronous branch control is a feature to keep all repositories in the project on the same branch if there are several VCS roots in the project. This feature does not call commands on the same root asynchronously. from the description, it looks like you have a single git root in the project.
The file might have left if checkout process finished unexpectedly. Are there any errors in the IDE.log?
Are there any errors in the IDE.log? Does it reproduce every time? You could report the issue to https://youtrack.jetbrains.com/issues/IDEA and attach logs for investigation
It happened to me 2 times within last 14 days, when I switched to 2017.2.2 and EAP. I don't remember such issue before on 2016. It's hard to reproduce, because I haven't found any pattern. I noticed only that it happened when I made a lot of changes on branch from which I wanted to switch. I think that checkout process was successfully, because it switched me finally to master branch. I attache you some logs from this moment. There are only 2 processes named: FileBasedIndexProjectHandler between checkout and creating new branch.
There were no another app running, which had got access to git. What's more I was able to create branch manually from git after 30 seconds since this error occurred. There were no .git/index.lock then.
If you have no idea what could it be, I'll creat isse on youtrack later.
2017-09-04 11:58:20,478 [12153678] INFO - g.FileBasedIndexProjectHandler - Reindexing refreshed files: 83 to update, calculated in 204ms
2017-09-04 11:58:29,016 [12162216] INFO - .diagnostic.PerformanceWatcher - Reindexing refreshed files took 8538ms; general responsiveness: ok; EDT responsiveness: 1/8 sluggish
2017-09-04 11:58:51,368 [12184568] INFO - lij.tasks.impl.TaskManagerImpl - Searching for task 'SRD-2551' in JiraRepository(URL='https://spotello.atlassian.net')
2017-09-04 11:58:51,486 [12184686] INFO - #git4idea.commands.GitHandler - [_a] git -c core.quotepath=false -c log.showSignature=false checkout master --
2017-09-04 11:58:51,889 [12185089] INFO - #git4idea.commands.GitHandler - Switched to branch 'master'
2017-09-04 11:58:51,889 [12185089] INFO - #git4idea.commands.GitHandler - Your branch is up-to-date with 'origin/master'.
2017-09-04 11:58:53,057 [12186257] INFO - #git4idea.commands.GitHandler - [_a] git -c core.quotepath=false -c log.showSignature=false checkout -b SRD-2551
2017-09-04 11:58:53,066 [12186266] INFO - g.FileBasedIndexProjectHandler - Reindexing refreshed files: 77 to update, calculated in 1ms
2017-09-04 11:58:53,305 [12186505] INFO - #git4idea.commands.GitHandler - fatal: Unable to create 'D:/wamp/www/wielkiWS/_a/.git/index.lock': File exists.
2017-09-04 11:58:53,305 [12186505] INFO - #git4idea.commands.GitHandler - If no other git process is currently running, this probably means a
2017-09-04 11:58:53,305 [12186505] INFO - #git4idea.commands.GitHandler - git process crashed in this repository earlier. Make sure no other git
2017-09-04 11:58:53,305 [12186505] INFO - #git4idea.commands.GitHandler - process is running and remove the file manually to continue.
According to the log, checkout completed sucessfully.
Please report an issue to the tracker for additional investigation. Please attach full logs.