Windows Explorer icons in TortoiseSVN take a long time to refresh to correct state
Asked Answered
S

15

71

After I commit files, the icons stay on either modified or waiting for commit for a long time. Is there any way to force a refresh to ensure that the icon that I am seeing is the correct state of the file?

Shuster answered 7/2, 2010 at 19:0 Comment(4)
F5 is not working . . .Shuster
I have never observed a consistent correlation between F5/Refresh in Windows Explorer and a timely update of the icons afterward. Sometimes it works, but no more often than when the correct icon status occurs without refreshing. Doesn't stop me from habitually hitting F5 in vain though...Religion
The reason why is that F5 refreshes your display, but does absolutely nothing to actually update SVNs cache. The only reason F5 would update the overlays is if the SVN cache was updated in the time between your F5 presses. Obviously I press it obsessively too, just sayin :)Baalbek
Funny when you use svn cleanup "C:\myfolder" it doesn't refresh anything sometimes, and when you use Tortoise clean up on context menu, it always works. :-/Trunnel
C
60

As stated in the FAQ: try running a cleanup.

Carbamidine answered 8/2, 2010 at 15:19 Comment(4)
Not a problem with the immediate post-commit scenario in the original question, but it's probably worth the reminder that cleanup will revert uncommitted local changes.Cristencristi
Sorry, but no. Cleanup will not revert uncommitted local changes. Unless you explicitly check that box in the cleanup dialog.Carbamidine
I am sorry but even at Tortoise 1.8.6, a Cleanup will still take a long time to refresh shell overlay. I have to F5, Cleanup, go up to parent folder, go in again. Then after some times the overlay icons appears correctlyGrabowski
Works even if the Dry Run box is checked - thanks!Isoleucine
W
36

You can try this:

TortoiseSVN -> Settings -> Icon Overlay, set Status Cache to 'Shell' instead of 'Default'

Ref. to the Help.

Shell Caching is done directly inside the shell extension DLL file, but only for the currently visible folder. Each time you navigate to another folder, the status information is fetched again.

Advantage: needs only very little memory (around 1 MB of RAM) and can show the status in real time.

Disadvantage: Since only one folder is cached, the overlays don't show the status recursively. For big working copies, it can take more time to show a folder in explorer than with the default cache. Also the mime-type column is not available.

Wifeless answered 3/3, 2010 at 19:27 Comment(3)
"don't show the status recursively. " means it becomes close to useless: I mean I'm on the icon of a folder that contains modified files and shows green, I have to get into the folder to find it. While svn status gives me all modified files in the whole tree in less than a secondTransistorize
@Transistorize Sure, but not as useless as no icons at all, if all else fails and this is the only option.Sweetheart
If you toggle to "Shell," close the Settings window, then switch back to "Default," the icon overlays will come back.Midst
R
14

I posted a similar answer here but to save you the trouble of opening the link I will quote it here:

I'm not sure if this is exactly related to your issue but I have found TortoiseSVN can sometimes be quite slow when dealing with repositories that have a lot of files in them. This manifests itself in the tsvncache.exe process taking up a lot of memory. The tsvncache.exe process scans files and folders and associates the familiar icons with them to denote changed/ignored etc. files.

A fix for this is to tell Tortoise SVN to only cache the folders you are working in and ignore the others. To do this, right-click your project folder and select TortoiseSVN->Settings->Icon Overlays. I have Exclude paths set to c:* and d:* (basically ignore all fixed drives) and Include paths set to my projects folder.

Razzia answered 19/2, 2010 at 21:42 Comment(1)
This should be the accepted answer as it really solves the problem, not only patches it..Comity
M
7

Stumbled upon this issue recently. Found a short and dirty workaround that has proven to be 100% effective.

Create an empty text file in the folder you wish for the icons to refresh in by right clicking and selecting "New" --> "Text Document". The icons should magically refresh. Delete the empty text file after of course.

Magog answered 11/4, 2015 at 1:24 Comment(0)
S
5

Closing the Windows Explorer window and reopening helps. Most often the icon stays at the tree part of Windows Explorer.

And no - Clean Up and F5 doesn't help. I guess it has something to do with Explorer and not TortoiseSVN.

Showroom answered 7/2, 2010 at 20:23 Comment(1)
Or going up/down one folder and back again.Jotter
L
2

If you want to check if you comitted everything, there is the "svn check for modifications" menu option. If you press F5 there it will update and show you the truth. If it annoys you that the folder icons are out of date, you can turn the icons off.

Lankester answered 7/2, 2010 at 19:46 Comment(0)
A
1

I don't know if it's related but hitting F5 seems to help... sometimes.

My experience with TortoiseSVN is that the performance is somehow directly linked to the number of checked out directories. You can set the directories that must be included/excluded in some TortoiseSVN properties to speed up the process.

Andersonandert answered 7/2, 2010 at 19:33 Comment(0)
L
1

Go to the directory under which you want the icons to be updated. Right click on that directory with your mouse and in the SVN context explorer menu select 'cleanup' and then press F5. It should refresh all SVN icons under that directory for you. It did for me.

I work on a huge project with thousands of files and a SVN 'cleanup' is very fast on my computer so I do it at the root level for the most part, thus refreshing all icons. For slower computers without much memory a full cleanup for a big project might take a while. In that case you can refresh just the directory you need.

Someone says above that a 'cleanup' will revert your local changes but that is not necessarily true. It does not revert for me... Furthermore, I do not think it's an option you should enable. Sometimes your local SVN caches get corrupted and a cleanup will fix them for you... that being often a necessity in order to do your commits, etc...

Hope it helps.

PS. My tortoise SVN version is: TortoiseSVN 1.6.16, Build 21511 - 64 Bit

Lamp answered 20/1, 2012 at 18:43 Comment(0)
G
1

Windows' "refresh" (F5) mostly works for me (OK, I press it obsessively, too), but sometimes a window doesn't have any icon overlays at all. In these cases, "Cleanup" doesn't help either, no matter which options I choose, including "Refresh Shell Overlays".

I followed the tip from gekowa:

TortoiseSVN -> Settings -> Icon Overlay, set Status Cache to 'Shell' instead of 'Default'

and the next time I opened the window, the overlays were correct. It took a few seconds for the window to open, but everything was right after that. The I set the Status Cache back to "Shell" and the time lag went away, too.

Previously, I had set the Status Cache to "None", but that didn't help.

Germ answered 14/2, 2012 at 17:58 Comment(0)
G
1

I had a similar problem. I'v created a new branch and afterwards checked out to a new working copy. The new working copy didn't have the icon overlays as it should. Nothing showed up. Only after killing the TSVNCache.exe process via the Windows task manager, did the icons appear correctly.

Gymnasiast answered 1/7, 2012 at 6:26 Comment(2)
Seems like a good (if dirty) workaround. You don't lose performance like you would by setting the cache to Shell, and at the same time, you can refresh the icons whenever you like by killing TSVNCache.exe.Horatius
This has removed all tortoise icons rather than made them green.Lobule
W
1

F5 did not work for me either, but I found one F5 method that worked.

Say you have a folder called projects and in there is a folder called mysubversionedproject. If you expand the explorer tree, you will see

  • projects
    • mysubversionedproject

If you now press F5 it might not work, as many have noticed.

But, if you close this tree so that you only see

  • projects

(and made sure that you also clicked on projects so that it is actually selected)
and press F5 and then expand the tree again, then it might work.

For me, mysubversionedproject now has the overlayed icon, as it should.

Wurtz answered 22/10, 2012 at 15:5 Comment(0)
D
0

A fix for this is to tell Tortoise SVN to only cache the folders you are working in and ignore the others. To do this, right-click your project folder and select TortoiseSVN->Settings->Icon Overlays. I have Exclude paths set to c:* and d:* (basically ignore all fixed drives) and Include paths set to my projects folder.

I did essentially the same thing as Malice did, but I unchecked the fixed drives and added C:\Users\YOURNAMEHERE\Documents* to the include directory. Works very well for me as all my projects are under this folder.

Dub answered 9/12, 2013 at 18:51 Comment(0)
T
0

Building upon noodle7's answer: another option is to change:

TortoiseSVN -> Settings -> Icon Overlay, set Status Cache to 'Default' instead of 'Shell'

This worked for me. TortoiseSVN 1.9.

Taxdeductible answered 8/3, 2016 at 13:48 Comment(0)
K
0

So... of all these answers/tricks/solutions, honestly all you have to do is switch to another pre-existing branch using the dropdown - right click > Git Branch, then switch back to the branch you were working on in order to see the status icons updated. Voila!

Kartis answered 6/12, 2016 at 17:51 Comment(0)
S
0

When it gets annoying, I just rename the root folder, then name it back as it was originally.

Sundry answered 19/5, 2022 at 13:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.