selftests failing
John Arbash Meinel
john at arbash-meinel.com
Mon Jun 12 20:50:08 BST 2006
Robey Pointer wrote:
> As of this morning's bzr.dev @1765, there are 20 failures and 1 error in
> the selftest (on osx). The 'tee' log is huge (350K -- so I won't attach
> it unless someone asks for it) but at least the last few failures seem
> to be encoding-related. Is this known? Bad timing on my part?
>
> The only reason I care is that I use the selftests to verify that I
> haven't broken anything when I'm hacking on my own branches.
>
> robey
> (I'm baaaaack...) :)
Unfortunately, this is a known problem on Mac. The problem is because of
the new Encoding changes that I did.
Basically, the Mac is changing filenames on the fly, and we don't have
the workarounds to ignore that fact (yet).
On a Mac if you create the name u'\xe5', it will actually create the
name u'a\u030a'. The two of them look like: å and: å, respectively.
The first is 'a w/ circle', and the second is 'a' + 'combining circle'.
Depending on your unicode implementation they may look identical, or
they may be a little bit different.
This means that if you checkout a branch that contains a file with one
of those characters, Mac will suddenly say that you have an unknown
file, and you have deleted the original. (Bad Mac, bad, no biscuit).
Anyway, I have the function in there to do the right thing:
osutils.unicode_filename()
Which basically makes sure that all filenames are normalized as they are
read in. The reason it is a little bit complicated, is because on the
Mac, you will translate them on the fly. But on Windows/Linux you will
only support the normalized form. If someone creates a file with the
non-normalized form it is an error. 'bzr add' should fail, but it should
show up fine as an unknown, and probably we should be able to ignore it.
I'm sorry that the whole test suite isn't passing on the Mac yet. In all
honesty, the codebase is actually more correct now than it used to be.
We are just now aware of some of the places it does the wrong thing.
John
=:->
-------------- 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/20060612/8ee37134/attachment.pgp
More information about the bazaar
mailing list