[MERGE][0.15] _iter_changes returns Unicode paths

John Arbash Meinel john at arbash-meinel.com
Fri Mar 16 15:05:37 GMT 2007


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

Robert Collins wrote:
> On Thu, 2007-03-15 at 18:40 -0500, John Arbash Meinel wrote:
>> I don't specifically like this fix, nor do I prefer the test case. The
>> unknowns tests is testing too many things at the same time, and the
>> change to dirstate causes it to decode the short names all the time,
>> rather than only doing it after we've determined we are going to yield
>> this tuple. 
> 
> Ah, so we can't just decode when we decide to yield ?
> 
> other than that, +1.
> 
> -Rob

We can, it is just that we may be dealing with "None" at that point.
Like for 'added' paths we have the tuple:

 (None, 'name')

And we need to decode 'name' but obviously not None.

What I would really like to see is us inverting our layering, as you
have mentioned. So that we have an _iter_3_trees (I'm calling it 3
because you have the disk and two versioned trees), and then
_process_entry becomes the point of actually yielding the data back to
the caller. I think will end up with a lot fewer if/else statements that
essentially do the same thing.

I think a change like that can wait until 0.16. So I was thinking to do
this "simple" fix for 0.15, and then clean it up for 0.16.

John
=:->

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

iD8DBQFF+rJBJdeBCYSNAAMRAs89AJ9OqbwdK4X0GGd55LHQD7SW6ehNGACfTB2/
7knnucYNwcghejIyO00Bfjw=
=T5DN
-----END PGP SIGNATURE-----



More information about the bazaar mailing list