transmission line noise

home

.DS_Store, Macs and Mercurial

23 Jul 2010

Tagged with Work

As a mat­ter of choice i develop on Mac’s, it’s a long story and i won’t bore you with it and i have moved my VCS to Mer­cu­r­ial from SVN, that’s a shorter story but not for now. How­ever when cloning a project recently i ran into some prob­lems with the dreaded Mac .DS_Store.

.DS_Store, which stands for Desk­top Ser­vices Store is a hid­den file cre­ated in every local folder in Mac OS X. This file stores cus­tom attrib­utes such as posi­tion of folder icons and the choice of back­ground col­ors. By default it will be cre­ated in every local folder accessed by Mac OS X.

The file on the Mac is invis­i­ble, any file start­ing with a . is invis­i­ble in the Mac finder. You can see them when you search by chang­ing the cri­te­ria though. Nor­mally it is not a prob­lem. When you trans­fer entire direc­to­ries to another sys­tem, Win­dows or Linux then it does become vis­i­ble, puz­zles peo­ple and some­times wor­ries them as to where the arte­fact came from, but does no harm.

Any­way back to cloning my HG project. The >DS_Store files which i had excluded in my .hgig­nore file kept caus­ing the clone to fail with a strange error. I removed the file from the root of the project but it just failed at the lower level. So i removed the .DS_Store files and it worked fine.

To save has­sle in the future is used DS_Store Cleaner on all my web fold­ers to pre­vent this hap­pen­ing. DS Store Cleaner is no longer main­tained but works fine and as i am using the lat­est release of Snow Leop­ard it works on that.

In pass­ing i also found another util­ity that will remove DSStore and Thumbs.db if you have got­ten file from Win­dows. I have not tried this but it is called <a href="http://www.addictivetips.com/windows-tips/what-is-dsstore-and-how-to-remove-it/" target="_blank">Fold­er­Washer if you want to have a go.

comments powered by Disqus