selftests failing

John Arbash Meinel john at arbash-meinel.com
Tue Jun 13 04:13:41 BST 2006


Robey Pointer wrote:
> 

...

> 
> Yeah I remember that coming up before.  That's cool if it's a known
> problem, I just wanted to make sure it was known.
> 
> If you want me to try tinkering with any bits or try anything, just let
> me know where I should tinker or what to try, and I'll be glad to help.
> 
> robey

Well, we need to figure out where 'unicode_filename' should be inserted
into the stack. I don't think it should be done at the Transport layer,
because Transport only accesses bzr control files. And to-date, they are
all ascii filenames (potentially because it is escaped + utf-8 encoded,
etc, but the on-disk name is ascii).

So it is just an issue with WorkingTree. I'm hoping that we could fix
'list_files'. But in general, anything that calls 'os.listdir()' needs
to be fixed. I see it happen in 3 places, 2 times in list_files(), and
one time in 'extras()'.

What I have in mind is to do something like:

f = children.popleft()
f, is_normalized = unicode_filename(f)

if not is_normalized:
  # This file cannot be versioned
  c = '?'
  fap = from_dir_abspath + '/' + f
  fk = file_kind(fap)
  yield fp[1:], c, fk, None, fk_entries[fk]()

There would need to be a few other places, such as an explicit add from
a user should raise an exception about not being able to version a
non-normalized filename, etc.

It is also possible that we might want to just punt about non-normalized
filenames. We also might want to think of something more generic, so
that we can look into how to handle case-insensitive filesystems, etc.

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/7a394cf1/attachment.pgp 


More information about the bazaar mailing list