case sensitivity on Windows

Mark Hammond mhammond at skippinet.com.au
Sat Oct 11 00:14:53 BST 2008


> On Fri, Oct 10, 2008 at 3:40 PM, Robert Collins
> <robertc at robertcollins.net> wrote:
> > On Fri, 2008-10-10 at 10:20 +1100, Mark Hammond wrote:
> >
> >
> >> > (NTFS can represent this quite sanely... pity about the API's)
> >>
> >> I would consider such a case to be truly exceptional, because as you
> >> mention, you can't use the APIs to do that.
> >
> > Users of SFU can create them though - and they can run bzr natively
> > there, so I don't think we can be entirely blazé about this.
> 
> The wiki spec for this says that bzr will determine whether to use
> case-insensitivity logic at runtime, not based on the platform or
> filesystem type, but on whether opening a file (eg checkout/FORMAT)
> under different case is possible or not.  So in this situation, it
> presumably would observe the filesystem as being case-sensitive, and
> will be able to handle both files sanely.

I fear that wiki page is putting the cart before the horse a little - ie, it
is considering implementation specifics before we even know what we are
trying to achieve fully.

Specifically, that process doesn't handle a case-preserving file-system.  On
both 'case preserving' and (let's call it) 'case normalizing', opening
'checkout/FORMAT' and 'checkout/format' would succeed but doesn't tell us if
case is preserved - and I think we are moving towards a scheme that can take
advantage of case preservation.

It seems the problem reduces to that bzr may be faced with a filename as a
string specified by the user, and a file on disk.  These strings may differ
by case, but windows still treats that as referring to the same file.  So
really, it's just a matter of bzr working out which of the ambiguous cases
to work with internally, and a case-preserving file-system can resolve that
ambiguity (it doesn't matter to the OS which case it uses 'externally' -
windows and its apps will work regardless)
 
Personally, I think it would be a huge step forward for us to support
case-preserving file-systems using Windows APIs, and in the short-term
largely ignore case insensitive file-systems.  This would mean we work with
the vast majority of file-systems people actually use on Windows, and the
poor souls who use truly case-insensitive file-systems, on Windows or
anywhere else, can just stay in the same position they are now, and it can
be addressed as it becomes a real problem.  Today it is not IMO.

Cheers,

Mark




More information about the bazaar mailing list