bzr add problem

Bug #484902 reported by kidrock
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

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'

bzr 2.0.1 on python 2.5.1 (Darwin-9.8.0-i386-32bit)
arguments: ['/usr/local/bin/bzr', 'add']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'it_IT.UTF-8'
plugins:
  bzrtools /Library/Python/2.5/site-packages/bzrlib/plugins/bzrtools [2.0.1]
  email /Library/Python/2.5/site-packages/bzrlib/plugins/email [unknown]
  extmerge /Library/Python/2.5/site-packages/bzrlib/plugins/extmerge [unknown]
  launchpad /Library/Python/2.5/site-packages/bzrlib/plugins/launchpad [2.0.1]
  loom /Library/Python/2.5/site-packages/bzrlib/plugins/loom [1.4.0dev]
  netrc_credential_store /Library/Python/2.5/site-packages/bzrlib/plugins/netrc_credential_store [2.0.1]
  qbzr /Library/Python/2.5/site-packages/bzrlib/plugins/qbzr [0.14.3]
  rebase /Library/Python/2.5/site-packages/bzrlib/plugins/rebase [0.5.4dev]
  search /Library/Python/2.5/site-packages/bzrlib/plugins/search [1.7.0dev]
  svn /Library/Python/2.5/site-packages/bzrlib/plugins/svn [1.0.0]
  upload /Library/Python/2.5/site-packages/bzrlib/plugins/upload [1.0.0dev]
  xmloutput /Library/Python/2.5/site-packages/bzrlib/plugins/xmloutput [0.8.5]

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

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

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-----

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.