[MERGE][0.16][bug #110399] 'bzr status' and 'bzr diff' shouldn't recurse into unknowns
John Arbash Meinel
john at arbash-meinel.com
Fri Apr 27 00:08:33 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Attached is the fix I wrote for Aaron earlier, only with a reasonable
test case for it.
I would have really liked to have written an 'intertree' test, since it
would mean that we would test for current and all future formats.
However, the only reasonable way I found to do it, was to monkeypatch
_walkdirs_utf8 so that we spy on what directories are processed.
And WT3 doesn't use walkdirs. I suppose one other possibility would be
to spy on os.lstat(), but that also seems a bit brittle. (You would need
to check that we *don't* stat certain files/directories, but what if
they use stat instead of lstat, or use the ext3 extensions, or we
re-implement it in C instead of python, etc.)
This is still a little brittle, but it is the best I could come up with.
The other possibility would be to create a subdirectory that would cause
it to "blow up" (like chmod 000 versioned/unversioned/bogus), which is
sort of the cause of Aaron's problem.
But doing a 'chmod 000' is also pretty ugly.
Does anyone know of a better way to test this?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 13021 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070426/e6a720ec/attachment.bin
More information about the bazaar