Comment 1 for bug 484902

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 484902] [NEW] bzr add problem

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

kidrock wrote:
> Public bug reported:
>
> When i try to add file in my bazaar project i recived:
> bzr: ERROR: exceptions.KeyError: u'localita\u0300'
>
> Traceback (most recent call last):
> File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
> return the_callable(*args, **kwargs)
> File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 1037, in run_bzr
> ret = run(*run_argv)
> File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
> return self.run(**all_cmd_args)
> File "/Library/Python/2.5/site-packages/bzrlib/builtins.py", line 659, in run
> no_recurse, action=action, save=not dry_run)
> File "/Library/Python/2.5/site-packages/bzrlib/mutabletree.py", line 53, in tree_write_locked
> return unbound(self, *args, **kwargs)
> File "/Library/Python/2.5/site-packages/bzrlib/mutabletree.py", line 493, in smart_add
> this_ie = parent_ie.children[directory.base_path]
> KeyError: u'localita\u0300'
>
...

> in what way to resolved this problem?
> I've a mac book pro.

So my best guess is that u'localita\u0300' is not normalized the way
things are normalized on the Mac. Looking at it, I think we would
expect: u'localit\xe0'

Which is "localit" + à.

The difference is that \xe0 is "a with accent" while "a \u0300" is a and
combining accent.

Hard to explain with the complexities of Unicode, but suffice it to say
that Mac has decided to do everything different than everyone else. They
force all paths to be ~NFD normalized, while most everyone writes
unicode filenames as NFC. There are bits of good and bad in this, but it
causes headaches for us to have our filenames rewritten underneath us.

The easiest way to resolve this problem is to not use characters that
Mac treats differently than other systems. And so instead use "localita"
rather than "località", for example.

I think this bug is also a dupe, but I don't know the bug offhand.

 status: confirmed
 importance: medium

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

iEYEARECAAYFAksEZwUACgkQJdeBCYSNAAM7ggCglNx0pJugFDqkypewN0bvE0Dr
74sAn0LH22JQvZC3JJzQehUSmuZpgIX1
=g+Ct
-----END PGP SIGNATURE-----