EGit freezes when adding from unstaged changes to staged changes in Staging view - egit

For a reasonably sized project, when dragging files from the "Unstaged Changes" pane to the "Staged Changes" pane in the "Git Staging" view in EGit, the entire workspace freezes for about 15-20 seconds even for a single file. The same via command line almost finishes instantaneously. Is this tracked in a known EGit issue and more importantly are there are workarounds?
Thanks in advance!
Configuration:
eclipse-jee-juno-SR1-linux-gtk-x86_64 (with patch from http://download.eclipse.org/eclipse/updates/junoSR1Patch-tmp)
RHEL (6.3) 2.6.32
8-CPU 64bit
8 GB RAM
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)

There was a change to improve performance for this, which is to be released with EGit 2.2 on 2012-12-19:
http://wiki.eclipse.org/EGit/New_and_Noteworthy/2.2#Re-indexing_repositories_is_now_done_incrementally
If you don't want to wait until then, update to the nightly build from the nightly update site.

Related

EGit unstaged files will not go away

I have 3 files in the Unstaged Changes box that I cannot make go away. I've reset hard, replace with HEAD version, assumed unchanged: nothing makes these files go away and when I do compares on them with another branch or the HEAD revision, there are no differences. Mystified, so say the least. Also this morning my local Remotes for fetch/pull in Eclipse just disappeared and I had to rebuild them. These events may be related, but I'm not sure. Is there a repair action I can do for EGit? This shouldn't be a line-ending problem like what I've found in my research. I've lost a fair amount of productivity today on this.
I think I've suffered some kind of corruption of the IDE. Can't prove it; it's just a hunch. Here's my relevant info:
Windows 10
Eclipse Java EE IDE for Web Developers.
Version: 2018-09 (4.9.0)
Build id: 20180917-1800
EGit 5.1.0.201809111528-r

How can I prevent TortoiseSVN database locking up?

I have a Windows 7 PC with the latest TortoiseSVN version (1.11.0 x64). Almost every time I want to commit changes to the server, I get the following error:
Commit failed (details follow):
Failed to load properties: sqlite[S5]: database is locked
Error unlocking locked dirs (details follow): sqlite[S5]: database is locked
Another process is blocking the working copy database, or the underlying filesystem does
not support file locking; if the working copy is on a network filesystem, make sure file
locking has been enabled on the file server.
It's easy to fix - I just go to the project root folder, do an SVN cleanup, and then the commit works fine. However, if I want to commit again a few minutes after that, it will most likely fail again and force me to do another cleanup. It gets really annoying.
Is there any way I can prevent these locks from happening? Any settings I can change on TortoiseSVN, or something?
A few more details:
Both my SVN projects and TortoiseSVN itself are placed in my local HDD (no network filesystem), and their folders are excluded from the antivirus software.
The working copy folder is not network shared (nor locally, I'm the only user on that PC).
I don't have Dropbox, Google Drive or any other cloud software sync'ing the folder, either.
It's specific to TortoiseSVN, I never get this error when I commit my changes from Eclipse.
I really don't think it's a TortoiseSVN bug though, I recently updated from version 1.9.6 to 1.11.0 and both had the same issue, if this really was a bug it surely would have been fixed... right? :)
I'm the only developer currently working with the projects (it's not an issue of my local database being out of date, or existing conflicts).
I also think the lock is caused by eclipse plugin. Here some more details about my setup and how I got rid of the problem:
Tortoise: TortoiseSVN 1.12.2, Build 28653 - 64 Bit , 2019/08/04 13:03:09
Subversion: Subversion 1.12.2, -release
Eclipse: Spring Tool Suite Version: 3.9.6.RELEASE (eclipse Eclipse 2018-09 (4.9.0))
SVN-Plugins in eclipse:
Subversive Revision Graph (Optional) 4.0.0.I20160226-1700
Subversive SVN Connectors 6.0.4.I20161211-1700
Subversive SVN Team Provider 4.0.5.I20170425-1700
SVNKit 1.8.14 Implementation (Optional) 6.0.4.I20161211-1700
Subversive SVN Integration for the M2E Project (Optional) 4.0.0.I20160226-1700
After de-installing the last (optional) plugin ("Subversive SVN Integration for the M2E Project") the lock on explorer's tortoise didn't occure anymore.
So I am happy because all functionality I use within eclipse still works, and tortoise in explorer works also. Usually I only use the "team/show annotation" context menu in eclipse, all other SVN stuff I do in explorer through tortoise.
Edit: the problem wasn't actually caused by Eclipse itself. It was either the Subversive plugin, or the SVNKit connector. I've switched to Subclipse and JavaHL, and the problem has completely disappeared. I haven't tried with Subclipse+SVNKit, nor Subversive+JavaHL, I guess one of these combinations will solve the problem too, and the other won't.
It seems that the problem is caused by Eclipse. We usually structure our SVN projects like this:
/trunk
/docs
/etc
/scripts
/source
/pom.xml
/src/main/...
I checkout the whole trunk (or some branch), and then import the source projects into Eclipse.
To manage code changes, I use the SVN sync view in Eclipse, which is more user-friendly (just my opinion) than TortoiseSVN. For changes outside the /source folder I have to use TortoiseSVN, since the files aren't in Eclipse.
The problem is that apparently, Eclipse has some background process which "updates the SVN cache" every few minutes, even if you didn't change anything on that project, just by having it open in the workspace. And it messes up TortoiseSVN, hence the errors unless I perform a cleanup.
There is an option in Eclipse, under Team > SVN > Performance, which allows to disable the SVN status cache... but the last time I tried, it didn't prevent the issue, it only made Eclipse SVN sync slower.
I guess my only choices here are to use different checkout folders for Eclipse and TortoiseSVN (ugh...), or to disable SVN in Eclipse and use always TortoiseSVN (ugh...).

Eclipse regularly resets settings

Eclipse Juno regularly resets all of its settings (.metadata). It starts from a clear desktop as if it was recently installed. So I need to restore .metadata once a week or two.
Why does it happen? Is it a known Eclipse problem?
UPDATED
This happens every time when I switch off second display.
Do not put .metadata itself under version control. Only put contents of the workspace (i.e. projects) under version control. By manipulating the .metadata directory during checkouts, you are essentially breaking the workspace yourself.
The metadata directory cannot be shared by design and this will lead to trouble. See What of Eclipse project .metadata can I safely ignore in Git/Mercurial? or Which Eclipse files belong under version control? for some more pointers about that.

Eclipse periodically freezes when editing large project in a git repository

I am developing a python project in Eclispe 3.7, PyDev, and EGit. Every 20 minutes or so, Eclipse will freeze up, displaying in the bottom-right corner "Git repository refresh Job: (0%)" Once this number increases above 0%, the UI becomes responsive again and can be used until the next time it freezes. Is there a way to stop this from happening?
Sounds like a bug in EGit. Could you write an email to the EGit mailing list (egit-dev#eclipse.org) or file a bug report on http://bugs.eclipse.org and provide as many information as possible?
As a first workaround you could look at the options on Window -> Preferences -> Team -> Git and on that page the preference "Refresh resources when index changed" and "Refresh only when workbench is active". You can also look at Label decoration and play with the recurse option.
I'm having a similar issue with eGit and Eclipse 3.7. I suggest you take a look at this Eclipse bug:
Eclipse Bug 336612
I took a stack trace when my UI was freezing, and was able to match it against the stack trace in the Eclipse bug. It appeared to be an issue with how long eGit is taking to perform an operation.

Subclipse: Updating Change Sets for SVNStatusSubscriber (UPDATED - clock sync issue)

I see this when digging into the error logs of Eclipse - I keep getting an error:
An internal error occurred during:
"Updating Change Sets for
SVNStatusSubscriber"
It happens a few times when trying to update or commit, and eventually hoses my local copy of SVN, and I'm forced to rebuild it.
Has anyone every encountered either of these or have any thoughts on fixing? It's a huge annoyance to have to rebuild SVN each time. I'm using Subclipse with Helios. Also I'm connected via FUSE/SSHfs to the project on a VM.
Did samba fix it? Have you tried using different client implementations?
Okay, so this is still not 100% certain, but it would appear that what's happened is that the date goes out of sync on the VM on occassion. During svn updates or commits, this causes inconsistent synchronization data and the client in Eclipse, confused, ends up throwing errors.
Because the errors cause an abort of the update or commit process, this leaves the repository in a very unstable state, my guess is that it tries to retrieve a name of a file but gets back null, and ends up writing this back to the .svn/entries somehow.
As I said I can't confirm that this is the only thing causing the problems, but it makes sense as after my clock went out of sync, pretty much all of svn was broken on the next svn up call.
Hey so I had a similar issue, and this seems to have fixed the problem (keeping my fingures crossed that it stays fixed.)
right click on the project to open the options then set Team->Refresh/Cleanup. I am using a local repository so not sure if this will help you.
This is rather old however it has been viewed thousands of times which makes me feel that it's still a relevant issue. I arrived on this page because I had the same question.
The steps to fix the issue are
Ensure that you have an SVN client actually installed. (ex. if you are using Catalina make sure Catalina is actually installed)
If you are using extra tools on top of your SVN client such as TortoiseSVN ensure that it's installed. Most tools have co-dependencies to the official SVN release. (ex. TortoiseSVN versions closely match SVN versions)
Check if SubEclipse is installed (Help > Eclipse Marketplace > Type: subeclipse). When you update your SVN client SubEclipse needs to catch up. If you see the Install button available click it, most likely it will update SubEclipse to look at the right SVN client
If you get a Working-Copy error go to the actual folders in question through your OS and right click on the folders and choose "SVN Update"
If you are still having an issue in Eclipse choose your project(s) and right click > Team > Refresh/Cleanup. Then right click > Team > Synchronize with Repository
Hopefully one of the 5 steps will resolve your issue. In my case I had to do all 5.
As a solution to this problem, uninstall the svn client from eclipse. Go to Help -> about -> installation details -> select all subclipse plugins and click uninstall. After this install Subclipse from using subclipse update site. Don't forget to restart eclipse / STS whenever asked to do so.
Doing so solved my this problem. Hope this helps in your case as well.
I had the same problem, after creating some new classes. I've fixed it after synchronizing with repository of the parent package. the svn error "Updating Change Sets for SVNStatusSubscriber" disappered.
Changing the SVN client from eclipse with restart or start eclipse with "-clean" option didn't work for me.
My observation is that commonly the SVN commit fails, when there is a collision in XML files. SVN is not correctly reporting and updating XMLs. I had to delete (move the res folder to a temporary folder outside project) the entire folder, commit, restore the folder and commit again. I have not tried, but I think automatic build for Eclipse should be disabled before taking update. However you can get the version updates from team-->history, from there you can extract the updates to a folder, to compare the updates are done properly.