TortoiseSVN checkout is mangling PNG files

Jul 18, 2010 at 6:04 AM

I keep running into problems with TortoiseSVN (1.6.9) against CodePlex. The current one is threatening to drive me crazy...

If I click on the link to download the latest changeset of my project from the Source Code tab, currently http://virtu.codeplex.com/SourceControl/changeset/changes/48648, then all is good with the world - nothing is mangled. So the repository seems to be okay. However, if instead I do a [Tortoise] SVN checkout to a new / clean directory using https://virtu.svn.codeplex.com/svn/trunk/, then my PNG files get mangled. I've had similar problems with other files in the past, which were fixed by setting the appropriate SVN property, e.g. svn:mime-type=application/octet-stream, replacing with an unmangled file and then checking back in. So I'm all the more confused that I can't seem to sort out the issue with the PNG files.

I have of course configured the SVN settings to 'enable-auto-props = yes' and have '*.png = svn:mime-type=image/png' (and it was like this before initial checkin of the files in question), but the first problem is I can't seem to see these properties in the Repository Browser. So I tried setting the property again from within the Repository Browser and it seemed to commit the change, but again the properties do not show in the Repository Browser. Hmmm. Actually none of the files I looked at in the repository show any SVN properties - and I definitely set a lot of them!? I looked at the SVN properties on my local copy and was surprised to see the PNG files have both svn:mime-type=image/png (good) and svn:eol-style=native (bad). It's clear from comparing the files that they have been mangled with 0x0A bytes becoming 0x0D 0x0A, i.e. eol translation took place even though they are also marked as a binary image file type. I tried removing the eol-style properties and checking in, but to no avail, the clean checkout still has both properties. WTF?

Right now I'm at a loss as to what to do and it makes working with the repository rather difficult. Has anyone else had problems like this or got any advice?

Jan 31, 2012 at 1:41 AM

I'm seeing the same thing with later versions of TortoiseSVN; I've lodged a support request and a request to change to Mercurial if SVN is permanently broken. In the meantime I guess I'll be storing ZIP files...

Jan 31, 2012 at 4:01 AM

@DavidRa A while ago now, I switched my project to Mercurial and since then haven't had any binary files mangled.