Muffinresearch Labs by Stuart Colville

Case Insensitive File-systems and Bazaar | Comments (0)

Posted in Code on 28th September 2007, 10:23 pm by Stuart

There’s an issue with Bazaar caused by case-insensitive file systems (technically case preserving). When you add a file/directory called “foo” when “Foo” is already versioned, Bazaar will do exactly as it’s told and while start to version Foo. Now the problems start because to a case-insensitive file-system, “Foo” and “foo” point to the same location.

When others update the branch all kinds of horrific errors will occur as bazaar will try to update both the files/directories that it has registered internally but as they resolve to one location the whole thing get’s in a real mess.

The kind of error that you might see could be something like: bzr: ERROR: [Errno 66] Directory not empty

There’s a couple of ways to resolve this problem if it was caused by the last commit. Simply run bzr uncommit.

Alternatively you can checkout the branch with the issue to a case-sensitive filesystem. On a mac this is possible by creating a disk image with Disk utility and then re-formatting to HFS+ with case-sensitivity switched on. Still even if you remove these files from the branch here and commit them you will still need to get other users to remove the files on their local system as an update will still try to remove both files/directories and get tied up again :-)

The Future Solution

The good news is that there’s a blueprint in place for this problem to be addressed (see http://bazaar-vcs.org/CaseInsensitiveWorkingTreeSupport for more info). Naturally to me it seems that a case-insensitivity filesystem compatibility mode (CIF) should be on by default. This is particularly necessary if you take into account something like launchpad.net where you want anyone in the community to be able to checkout a branch. Naturally this will occur across all kinds of operating systems and filesystems so CIF will be required to prevent duplicate files to get versioned.

Just as a word of warning don’t be tempted to install Mac OSX on partition formatted as case-sensitive HFS+. Apparently lots of applications have been built that rely on the case-insensitive default formatting and will break when running on a case-sensitive partition.

Post Tools

Comments: Add yours







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Using Loggerhead with mod_wsgi|(0)

Here’s a post I wrote over on the Project Fondue Blog about our use of Loggerhead with mod_wsgi under Apache. Loggerhead is the rather nice branch viewer for bazaar branches as used on Launchpad.net.

If you’re not already subscribed to the Project Fondue blog feed then I can recommend it, as there should be some interesting posts coming out of there in the coming months (yes I’m unashamedly biased!).

Ubuntu: Turn off changing workspace with mouse wheel|(1)

I found the changing with the workspace with the mouse wheel really annoying. To disable it go to System => Preferences => CompizConfig (available if the compizconfig-settings-manager package is installed) and uncheck “Viewport Switcher” which is under the “Desktop” heading.

Photos on Flickr

© Copyright 2004-10 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.588s.