[MERGE] Rename on Windows is able to change filename case. (#77740)
Vincent Ladeuil
v.ladeuil+lp at free.fr
Tue Nov 13 09:40:46 GMT 2007
>>>>> "bialix" == Alexander Belchenko <bialix at ukr.net> writes:
bialix> Aaron Bentley пишет:
>> Alexander Belchenko wrote:
>>> Aaron Bentley ?8H5B:
>>>> Alexander Belchenko wrote:
>>>>> Windows used case insensitive filesystem therefore rename (bzr mv) should care about special case
>>>>> when only case is changed.
>>>> bb:comment
>>>> Could you please explain why we should avoid using fancy_rename in that
>>>> special case.?
>>> Because it simply did not work for this special case, but os.rename works just like a charm.
>>
>> bb:approve
>>
>> Well, this change is certainly better than what we have. But it's not a
>> complete fix:
>>
>> 1. Windows may encounter case-sensitive filesystems over SMB or NFS.
>> 2. Unix may encounter case-(insensitive + preserving) filesystems over
>> SMB or NFS.
>> 3. Unix and Windows may both encounter case-insensitive filesystems over
>> ftp, sftp or bzr+ssh.
>>
>> So while I'm willing to approve this because it likely fixes 95% of the
>> cases, I'd rather see a fix to fancy_rename, because it would also fix
>> ftp and sftp.
bialix> I'm also like to see the complete fix, but we need some way
bialix> to detect case-insensitivity first. In my spec:
bialix> http://bazaar-vcs.org/CaseInsensitiveWorkingTreeSupport
bialix> I assume that we can fast detect case sensitiveness at the moment when we open working tree.
bialix> Unfortunately osutils is abstract layer, and checking case sensitiveness in each call of
bialix> fancy_rename is overkill. Do you have better ideas?
Don't know if it's a better idea but:
I always thought we need write access to detect
case-insensitivity, but then I realized that bzr generally begin
working with a tree by checking some .bzr/*format (either for
branch or for repository).
So, once we get the content of a '.bzr/*format' file if we try
to get '.bzr*FORMAT' we know if we are using a case-sensitive
file system or not...
More information about the bazaar
mailing list