[MERGE] Rename on Windows is able to change filename case. (#77740)

Aaron Bentley aaron.bentley at utoronto.ca
Mon Nov 12 21:06:30 GMT 2007


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

Alexander Belchenko wrote:
> Aaron Bentley ?8H5B:
>> Alexander Belchenko wrote:
>>> I'm also like to see the complete fix, but we need some way
>>> to detect case-insensitivity first.
>> I'm not sure that's true.  We could handle it this way:
> 
>> rename target -> tmp (success)
>> rename src -> target (failure)
>> rename tmp -> target (success)
> 
>> We would be subject to race conditions, but fancy_rename already is.
> 
> What about this variant for fancy_rename:

I like it.

> +        except (IOError, OSError), e:
> +            # case insensitive filesystem may be?
> +            if (not file_existed
> +                or e.errno not in (None, errno.ENOENT, errno.ENOTDIR)):

Why would we get ENOTDIR?

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHOMBW0F+nu1YWqI0RAhdzAJ0RokYtRv484Fl+32cx6Y0iCJ/HtQCcDeZa
PKXJo4+0HqVufqViExfmPqA=
=loFw
-----END PGP SIGNATURE-----



More information about the bazaar mailing list