Subclipse (1.8.5) requires cleanup / refresh cycle to detect changes made with TortoiseSVN (1.7.4)
Asked Answered
P

3

5

My problem:

Subclipse does not update locked status overlay icons in eclipse after I lock/unlock some files with TortoiseSVN in windows explorer (and vice versa).

Is this expected behaviour or am I missing a setting?

The files have the svn property "svn:needs-lock" set.

I can sync Subclipse again by first clicking "Team - Refresh/Cleanup" and then "Refresh F5".

I am not a 100% sure but I think with Subclipse 1.6.x and TortoiseSVN 1.6.x I was able to just hit F5 in eclipse, and the status was refreshed correctly.

Thank you for your time.

Peripeteia answered 9/3, 2012 at 15:15 Comment(0)
C
10

I do not think you should have to do the second F5, but we added the Team > Refresh/Cleanup option for this reason.

With pre-SVN 1.7.x releases any change in the working copy caused files in all of the hidden .svn folders to be modified. When you hit F5 in Eclipse, it would see these changed files and fire off notifications that Subclipse would see and use that to refresh decorations.

With SVN 1.7, all this information is consolidated in a single location, and it sounds like it probably does not even live inside your Eclipse project folder. So F5 in Eclipse effectively does nothing because no files on the filesystem that Eclipse can see has been modified. Eclipse does not send out any notifications.

The Team > Refresh/Cleanup option calls the same Eclipse action as F5, but it also triggers an explicit refresh of SVN cached information regardless of whether Eclipse sees any changes.

Coronado answered 9/3, 2012 at 15:52 Comment(5)
Thank you for this info. I made some tests: (1) When the ".svn" dir is in the parent of the project (not within eclipse), I am required to first click "Team - Refresh/Cleanup", followed by a "Refresh F5". (2) If the ".svn" is inside the project root (inside eclipse), I am required to just click "Team - Refresh/Cleanup".Spiraea
I don't quite understand why in the second use case, a normal F5 hit is not enough. According to your info, some files inside the ".svn" dir should change when I lock/unlock a file?Spiraea
Is there any way to simplify the task of the refresh for several projects at once? I have about 10 single projects wih the ".svn" outside of Eclipse, so now I need to right-click every single project and choose "Team -> Refreh/Cleanup"Surface
@Leto: Define a keyboard binding as Guillaume suggested (make a separate one, don't override the default F5 Refresh). Then in the eclipse project/package explorer, collapse all projects, select all (with Ctrl+A), then hit your key combination for "Team - Refresh/Cleanup", and for good measure (since your .svn lives outside of eclipse), throw in a normal F5 "Refresh" (for me the commands do not work in the Navigator view).Spiraea
I don't know anything about the underlying workings of eclipse, but it would be great if subclipse could locate the .svn folder and then watch for changes itself. As it stands I stopped using subclipse completely when I upgraded my SVN to 1.7 because I found it too annoying to use, but I hadn't thought of a keyboard shortcut either.Aurita
P
4

Just to explain in more detail how to create the keyboard shortcut:

I was once pretty desperate to get this keyboard binding to work and after a lot of head banging found out that I also had to enable the "SVN Command Group" in my eclipse perspective (as explained here: SVN key bindings not working in Eclipse):

enter image description here

Peripeteia answered 26/11, 2012 at 11:5 Comment(0)
T
2

You can bind the F5 key to the "Cleanup/refresh" option of the SVN menu.

First,you must go to Window dropdown menu > Customize Perspective > Command Groups Availability and there check the SVN box.

With this option you will get a dropdown menu called SVN with all the relevant commands.

Then you go to Settings > General > Keys :

  • unbind the F5 key if you want to use this key
  • bind the command %CleanupAction.label to F5 or any key you may find useful (like Shift+F5 if you don't want the F5 key to be unbind.)
Tanka answered 13/6, 2012 at 12:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.