case sensitivity on Windows

John Arbash Meinel john at arbash-meinel.com
Thu Oct 9 18:54:54 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Hammond wrote:
>> Yes, there's hope of help from other bzr developers.  Maybe a good
>> place to begin would be with a kind of doctest-ish description of what
>> mappings are meant to occur and where.
> 
> After chatting with you on #bzr, I hope the following is what you have in
> mind.  I'm posting it inline here and welcome any edits, and will eventually
> post it somewhere near
> http://bazaar-vcs.org/CaseInsensitiveWorkingTreeSupport.  I'm sure there are
> a number of other scenarios which could be added, but the below is probably
> enough to get started.
> 
> Also, FYI, I'm off for 10 days vacation in a couple of days, so you can
> expect to not hear from me for that period - but I'll be back with a
> vengeance ;)
> 
> Cheers,
> 
> Mark
> 
> ----
> 
> This document attempts to describe the desired semantics for Bzr on a
> Windows file system.  Most Windows file systems are "case preserving", in
> that the original case given for a filename is retained, even though any
> case can be used to access the file.  This is in contrast to some
> file-systems, used on Windows and elsewhere, that are truly case-insensitve
> (ie, where the original case is lost)
>     
> This document concerns itself mainly with the behaviour on a case-preserving
> file system.
> 
> This document is intended to be in a "psuedo-doctest" format.  Lines
> beginning with '%' are entered at a command-prompt, while lines beginning
> with ">" are intended to show that command's output.  Where the desired
> behaviour differs from the current behaviour is marked with lines starting
> with '***'.
> 
> So, let's get started:
> 

> 
> Bzr should attempt to use the name on the file-system rather than the name
> supplied by the user.

Agreed here.


> 
> Supplying the incorrect case to a file already in the inventory should work
> correctly.  Let's add a new file to bzr with the correct case:

Agreed


> 
> All comments which accept a filename need to handle this situation.  Eg, rm:
> 

Agreed

...

> If an external program changes the case of the file underneath us, it must
> not phase us.
> 

Here I'm not so sure.

> % bzr revert
>> +N  Foo
>> +N  lower
> 
> % rm Foo
> % echo hello > foo
> % bzr status
> *** current behaviour ***
>> removed:
>>   Foo
>> unknown:
>>   foo
> *** expected behaviour ***
>> modified:
>>   Foo
> 

Specifically, how do you end up asking bzr to change the case of a file.
I can go into explorer and do <F2> <BS> foo <enter> and rename the file
(I think some versions of Windows actually fail at this, but I know that
Vista works.)
Is it just that you have to explicitly use "bzr mv", how does that work
after-the-fact? Since it seems like we will auto-resolve to whatever
name, and then we can't really see which one is the new and correct form.

One possibility would be to have the behavior:

% bzr st
renamed:
  Foo => foo
modified:
  foo

So we automatically detect the rename.

v- Revert would happen naturally as a side-effect.

> And reverting a tree in that state should restore the case of the file:
> 

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjuRW4ACgkQJdeBCYSNAAPUKgCgvazxKgQ2mQEbSx93rpejgBPd
x2UAnjFTP89OOBxBl0FV5gHC1nWcbQMw
=JjHp
-----END PGP SIGNATURE-----



More information about the bazaar mailing list