[MERGE] Stop treating Permission Denied as lock contention

Alexander Belchenko bialix at ukr.net
Wed Jan 31 19:54:37 GMT 2007


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

John Arbash Meinel пишет:
> Aaron Bentley wrote:
>> Alexander Belchenko wrote:
>>> John Arbash Meinel ?8H5B:
>>> test_lockdir.TestLockDir.test_lock_permission                                          FAIL
>>>         608ms
>>>     PermissionDenied not raised
>> Damn.  Thanks for testing.  I'll see what the win32 behavior should be,
>> and update my test.
>>
>> Aaron
> 
> I'm guessing the problem is that os.chmod(444) isn't actually making the
> file readonly. I'm not sure if Alexander is testing on FAT32 or NTFS,
> but I seem to recall having problems setting a readonly flag on windows
> files.

I'm testing on Windows XP + NTFS. But read-only works the same on FAT too, AFAIK.
And osutils.make_readonly actually makes file or directory readonly.
I just re-run the tests with --keep-output flag and see:

test0000.tmp\test_lockdir.TestLockDir.test_lock_permission\work\test_lock is readonly.

but directory 'held' and file 'info' inside is not.

> 
> I know I've definitely had problems for directories. Because there
> doesn't seem to be a separate permission for the directory versus the
> files inside the directory. (I can open up the dialog box and set
> readonly on the dir, and it asks if I want to apply it to all child
> files, but when I open it up again it comes back with the square rather
> than a check, which generally means => some are readonly, some aren't).

It's true.

> 
> And after doing so, I was still able to create files inside that
> directory. So obviously it wasn't readonly.
> 
> I wish I knew more to tell you.
> 
> But as near as I can tell, you can't make a directory readonly on Win32.

It's not true.

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

iD8DBQFFwPP9zYr338mxwCURAjmoAKCE44AFeLT9sd3zXPdUCCU3YwR1BACfT2SN
Ql0XIftGxOscNoOahzdJKC0=
=I09A
-----END PGP SIGNATURE-----




More information about the bazaar mailing list