Live Fast, Code Hard, Die Young

image

I’m using TortoiseSVN for source control both at work and at home. Lately I’ve been having some problems with it though because the icon overlays that show the status of files are not displayed. That kind of takes away one of the great features of the program so it quickly drove me nuts.

It turned out that it was not hard to fix. After some searching I found out that the problem is that Windows only supports a maximum of 15 registered overlay icons. Of those it uses 4 itself so that leaves us with 11 icons to play with. What happens if more icons are registered? Well, those extra icons are simply not shown. According to the TortoiseSVN FAQ this is taken into consideration when Tortoise is deciding which icons to use and I’ve never had any problems with it until now. Maybe it is not working as intended when running in Windows 7 (64-bit)?

So how does Windows decide which icons to use? Well there is a special key in the registry where everything can be found. It’s under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers.

This is how my registry looks:

image

Windows reads this list in alphabetical order which is kind of lame. I have some icons from Dropbox, some from Tortoise and some other that I suspect belong to Windows or Office. It seems that this list of 15 icons should work but it doesn’t. It’s more likely that only 11 of these icons are used because I’m missing the most common Tortoise icons (Modified and Normal) which happen to fall just outside the range.

The great part here is that each of these keys only contains a GUID which tells Windows where to lookup the actual icon information. In fact, we can change the names of the keys without breaking anything which gives us an easy way of rearranging the list!

This is a simple way of fixing it and making sure that the Tortoise icons gets a higher priority:

image

As you can see I renamed the icon identifiers and prefixed them using numbers which will ensure they are sorted before the other icons. I skipped the “TortoiseUnversioned” icon because it’s usually not of interest to me. Maybe I could skip some of the other icons too but I wanted to make sure it worked first.

After doing this little rename operation you have to restart your computer (yea, it’s Windows isn’t it?) and then the icons should show up nicely again. Quite sweet isn’t it…

image

It’s working! 🙂

Advertisements

Comments on: "Fixing the missing icons in TortoiseSVN" (7)

  1. Hi there! I just wanted to say thanks for your excellent tip! I got a laptop at work as an upgrade, which runs Windows 7. I couldn’t see my status icons when using TortoiseSVN, which was horrible. Your tip worked wonders. Thanks so much for sharing it! =)

  2. Thanks !!
    Simple description of the problem & solution.

  3. Hi, Although your tip and describtion seems very promising, moreover I do guess the tortoiseSNV-girlsandboys implemented you tip because: today on a brand new machine (Window 8 Pro x64) trying to set up TortoiseSVN…. everything works fine however only the ‘overlay’ icons are NOT shown… looking into my registry I do see your number-suggestion implemented, so my list contains numbers from 1 to more listed as the first icons. In the past on my former window 7ult. machine I had the same problem but it turned out I had to play with the ‘drive types’ in conjunction with the excluded path and/or included path. Playing today as well with those setting this does not work either…. so my search getting those icons visible continues….

  4. Fatemeh said:

    That was great. It had been a big problem for me during past days and I didn’t know how to solve it. Thank you so much.

  5. Martin Green said:

    I know this article is over five years old now, but I just wanted to add my thanks. I wondered some time ago why some of my TortoiseSVN icons had disappeared, then the other day I noticed they were ALL gone and I had no way of determining the status of my project files under version control. In addition to TortoiseSVN, I have both OneDrive and Box Sync installed.

    I wanted to point out that is seems that both Microsoft and Box are on to this trick… when they are installed they preface their registry entries with either a string of spaces or zeroes to ensure they get to the top of the list. The simple one digit prefixes you used here are no match for their subterfuge. 😉

    I used two-digit number prefixes on every entry to ensure I have complete control of the sequence.

  6. You do not need to restart your computer. Kill explorer in task manager and then restart the explorer, the icons of new svn will be applied.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: