[merge][0.11] Transform._set_mode stats the wrong file
John Arbash Meinel
john at arbash-meinel.com
Thu Sep 21 20:33:46 BST 2006
Attached is a patch which fixes:
https://launchpad.net/products/bzr/+bug/56549
And includes a test case.
I'm not super happy with the test case, but it was the easiest way to
fight my way through all the layering.
At this point, I don't see why TreeTransform needs '_set_mode()' because
the executable bit is always set by the 'set_executability()' code.
Perhaps Aaron was thinking that rw permissions should be preserved as
much as possible. Though because of the bug, that wasn't really happening.
But anyway, this test exposes the bug, and the patch fixes that bug. It
would also be able to expose the bug by implementing the same steps that
the bug report uses. Which is that if you run 'bzr revert' from a
subdirectory, and you have a file with the same name as the current
directory, it tries to stat the wrong path, and stat() raises a weird
exception that we don't handle.
It didn't seem right to test that, because it is a side effect of the
bug, not the actual bug.
I'd like to get this, or something like this into 0.11, because it is a
foolish bug that I would like to close. Another alternative would be to
just remove the '_set_mode()' call entirely. But Aaron would need to
decide that.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: revert-subpath-56549.patch
Type: text/x-patch
Size: 3653 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060921/eb52ba91/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060921/eb52ba91/attachment.pgp
More information about the bazaar
mailing list