[MERGE] Small tweaks for _walkdirs_wint32
John Arbash Meinel
john at arbash-meinel.com
Thu Jul 17 16:32:04 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Belchenko wrote:
| You can ignore my mail if you wish, but I simply can't pass over this
| patch.
| Thank you for writing this, I knew bzr must have this long ago,
| but I was unable to write such code myself.
|
So, attached is a cleanup patch, which should address the concerns
Alexander brought up.
It does a few things
1) Changes the _walkdirs_utf8 implementation to cache its chosen
selection. This way, it only checks it 1 run, rather than repeating the
logic all the time.
2) Use evil hacks to test that it picks the right implementation based
on the environment. These aren't terribly evil, but I don't usually like
writing to variables like 'sys.platform' and 'os.name'.
3) Use os.name == 'nt' to skip this fast-path on Win98. I'd like people
not on Vista to test this. (Windows XP, Windows 2000, Win98, etc.) But
I'm 99% confident that it is correct.
4) Some small documentation improvements and pyrex compatibility changes
for Alexander.
It is pretty minor, but especially since I changed the logic for
_walkdirs_utf8 I didn't feel it was trivial enough to go without a review.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkh/ZfQACgkQJdeBCYSNAAN2qgCdEs7QFUP3rrHSY2tsxO5EsaxW
SWIAn24IrzhPsaMO3RuoMcFjI/Cl1Fa6
=YmPU
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: win32_find_files_cleanup.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080717/420cfda5/attachment-0001.diff
More information about the bazaar
mailing list