My eclipse IDE failing to detect changed files in Git perspective? - eclipse

Hi I have Eclipse Mars Installed, I have imported git repository (Having PHP code inside). Open perspective is "Git". Once I open eclipse, it says no repository has been selected. I click on repository, it shows progress bar (I guess git status might be running at background). Then it detects the changes that I made last time before closing the Eclipse. But since this point of time no any further file changes are getting detected by eclipse unless & until I restart it & follow the steps as mentioned above. Is there any refresh button that eclipse has in git perspective ?

Please see the below screenshot which has refresh button in the git perspective, hope you are in this view.

Related

how to know if ther is new version in svn?

I'm using eclipse with subclipse svn.
We are working in two programmers in the same application.
Sometimes, the user 1 changes some code in a specific class.
How can the user 2 know that changes were made?
Is there a way to make eclipse verify the changes in the server from time to time?
Right click on the project in the Project Explorer, then click the Team submenu, then click "Synchronize with Repository" (or click "History" if you want to see the latest commits).
If you want, you can also right click on a file and click "Compare With" then "Latest from Repository" - and it will open a side-by-side comparison. Or, you can use the SVN Repository Explorer (in the menu bar click "Window" then "Open Perspective", then "SVN Repository Explorer" - if it's not in the list, click "Other..." and then find it.)
How can the user 2 know that changes were made?
Without actually pulling the file(s) down, you can look at the checkin log (history), or do a diff of specific files/folders, otherwise just do an Update. Some wrappers (e.g. a VS IDE plugin, say) will also indicate in the explorer whether or not a file is checked out, locked, out of date, conflicted etc.
Is there a way to make eclipse verify the changes in the server from time to time?
Yes, use the command line, shell extension, or IDE plugin to do an Update.
A solution I like, that has nothing to do with Eclipse, is to add a post-commit hook in the repository that sends emails when a commit happens. This is what most open-source projects use.
In Eclipse, you can do Team > Synchronize. Once the view is open, note that there is a way to "Pin" the Synchronization and also to Schedule it. Using these features you can setup Eclipse to automatically refresh the information every N minutes. That way, you do not have to specifically run the option. Eclipse will always do it for you on the schedule you specify.

Two SVN Repository Perspectives in Eclipse

For Android development I'm using Eclipse Indigo and Subclipse 1.6.18.
I happened to notice today that when I go to Window > Open Perspective I see two SVN Repository Perspectives. One says "SVN Repository Exploring" and the other says the same thing but inside angle brackets, i.e,
"<SVN Repository Exploring>".
The first one brings up a blank window; the angle-bracket one brings up a window with my repositories in an upper tab and "task repositories" in a lower tab.
I also noticed that if I go to Help > Install New Software and show what's already installed,and uninstall all the Subclipse components, and restart Eclipse, these two SVN perspectives still exist. They don't work anymore because of missing SVN components but they're still there.
So where do these two SVN repository perspectives come from and why one with, and one without, angle-brackets? Thanks in advance.
You can have two if you have both Subclipse and Subversive installed. However, note that your workspace also will save and remember perspectives, particularly if you customize and save them. Try starting Eclipse with a new workspace and see if they go away.

Eclipse + Git - How to get toolbar?

I've got Eclipse 3.7.2 installed and working fine. I installed the git plugins (see below).
Right clicking my active project and clicking on "Team" gives me the options to pull/push/commit and more.
I have set my git executeable to msysgit (C git).
The docs told me that to add git to the toolbar I should look in Window->Customize Perspective..., but I couldn't anything related to git there, not even under the "Command Groups Availability" section.
How do I add push, pull & commit buttons to my Eclipse toolbar?
Stumbled on this answer, but found this works:
Install the Egit plugin, add the Git command group in Customize Perspective|Command Groups Availability, not the (pretty much useless) "Team", then check "Git" in Customize Perspective|Tool Bar Visibility
First install EGit from http://download.eclipse.org/egit/updates. Then you should find the Git command group and be able to activate it. msysgit isn't integrated with Eclipse.
See "Activating the Git toolbar "
Nothing worked and I had begun getting an unrelated error on startup with a troubleshooting step requiring reinstall.
This time I downloaded Eclipse for Mobile Developers, and since then I have added my other packages and it's all working, but clicking the commit thing and clicking the arrow to merge my changes (with comment) results in nothing.
It isn't committed nor is an error given.
install a fresh copy of eclipse with a new fresh workplace
install egit
show egit in toolbar (from customise perspective, etc....)
copy \.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi from the fresh installed workplace into your current workplace
you'll loose some position settings of the layout, but most of the settings will be kept, and most important you'll have egit in toolbar in your current workplace.
if you like you can analyse/diff the file workbench.xmi and see what you have to set to get the toolbar; for me it was enough (most likely workplace was from previous versions of eclipse, and egit/eclipse does not update this xml file)

SVN Switch with relocate in Eclipse

My question can be claimed to be an extension/similar to the question posted here.
basically, I need to do the same functionality using Eclipse plugin Subclipse. Subclipse has a functionality to "Switch branch/tag/revision", however, this is limited as it treats the new url as a repository and tries to compare them. I only wish to change the URL.
any ideas!
From SVN Repository Exploring perspective right click on your project repository and choose Relocate.. from contextual menu:
It will bring up a confirmation windows showing you active projects which will be affected by relocation.
In more recent versions of Eclipse/Subversive (which don't have the Relocate option) you can simply click Location Properties instead and change the URL. It will warn you that "The attached projects will be relocated because the repository root URL differs from the previously entered one." This is what you want!
I had the similar issue on Eclipse Luna 4.4.2 64 bit version. Initially I've relocated the project on the command line and Eclipse failed to recognize the relocation change. Alternatively I've tried to delete and re-import the projects, but sadly this approach failed to work out as well. Then sorted it out this way;
Closed all the projects,
Opened the SVN Repository Exploring perspective,
Right clicked on the repository >> Location properties,
In the properties pane, I've changed the url and in the below I choose "Use the repository URL as the label" clicked on finish,
Switched back to the Java perspective and reopened the projects.
After this alteration Eclipse stopped giving such errors and I was able to see the new root address of each project on the right side of the name
I found that if the projects that are related with the SVN you are trying to relocate are open in Eclipse, the operation fails with the following error in the 'SVN Console':
switch --relocate http://old.scm.com/svn/APP http://new.scm.com/svn/APP .../webapp
svn: E155019: Cannot relocate '...\webapp' as it is not the root of a working copy
svn: E155019: Cannot relocate '...\webapp' as it is not the root of a working copy
The solution was to close all the projects (Project Explorer -> right click on the project -> Close Project) and only after that, do the URL relocation in the SVN window (SVN Repositories window -> right click on the URL of the old SVN -> Relocate).
Notice that that the box 'Projects that will be relocated:' on the following screen is empty. Before it showed all the open projects in Eclipse IDE.
This was they only way I got it to succeed.
Using Eclipse Kepler Service Release 2, with Subclipse 1.10.10.

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.