[MERGE][0.15] handle ERROR_DIRECTORY for win32 "bzr status filename"

John Arbash Meinel john at arbash-meinel.com
Mon Mar 19 23:43:12 GMT 2007


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

It seems Windows raises WindowsError(errno=267) when you do
"os.listdir('filename')" rather than errno.ENOTDIR.

Looking at pywin32, 267 == ERROR_DIRECTORY.

So the attached patch just defines that constant, and updates the code
to treat that error the same as the rest.

We are fortunate that WindowsError is a child of OSError. I'm also not
sure how Wouter's patch was working, since I can't find an e.winerror
member. Maybe it is a python2.5 versus 2.4 thing.

This and my last patch cover the errors I know about when working with
DirState trees on win32. We still need to fix the test suite, but I
haven't run into actual failures in day-to-day use.

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

iD8DBQFF/yAQJdeBCYSNAAMRAumvAJ0V0yZjeuhMsIincw+t2DLm5NbCiwCfVxDt
oiY8pwEMr8JmJphioNy+uzo=
=wrue
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: win32_notdir.patch
Type: text/x-patch
Size: 7648 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070319/c51b66d6/attachment.bin 


More information about the bazaar mailing list