Last week I tried to add the media folder of a large catalog Magento website. Initially everything worked well, however eventually I started having severe issues on my local development environment. The issue is largely related to the File Name Case Sensitivity within SVN and how file names behave differently between Linux and Windows. I am just sharing my observation and I do not have a complete answer to this issue as of yet, maybe you can help here…
What happens is that under the media folder, actually /media/catalog/product/ to be exact, Magento stores all product image files and files them according to the first and second letter of the file name. So, the file name football.gif for example will be under ./f/o/football.gif and the file tennis.gif will be filed under ./t/e/tennis.gif, etc. While this works great under Linux and can easily be stored in SVN with a simple SVN add and SVN Commit, it does not work for Windows based environment.
The reason it does not work on Windows is because in Windows, filenames and folder names are case insensitive, hence /media/catalog/product/a will collide with the folder /media/catalog/product/A (notice one is upper case and one is lower case). This is extremely frustrating as it means that I must ignore the media/catalog/product folder completely if I want to develop on Windows and deploy on Linux.
Another option I just found is to disable the case sensitivity in my SVN repo, but still I do not know how this will translate into real life scenario as I did not try it.
Aside from sticking to all linux dev environment or ignoring the entire /media/catalog/product folders, how are you handling this issue?