storage branch - remaining issues?

Aaron Bentley aaron.bentley at utoronto.ca
Thu Jan 19 01:11:46 GMT 2006


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

Robert Collins wrote:
|>Ultimately, we should not be doing: 't = get_transport(unicode(base))',
|>but I think that can wait for my encoding branch, since part of my work
|>is to make sure that transports really do require and return urls. Which
|>they will then internally translate into unicode as needed.
|
|
| We should remove the unicode cast minimally though.

I think what we need is a UI function that interprets a path or URL and
produces a URL.


|>Inside 'put_utf8' we are iterating over the input file object, and
|>encoding it into the output.
|>However, file objects should only be bytestreams. They should not be a
|>unicode string.

Yes, it's messy that some files produce bytestrings and some produce
unicodestrings, but I don't know where you get "should".

|>I would say that put_utf8 should *only* accept strings not files. In
|>fact, it should only accept unicode strings. But I would allow ascii
|>regular strings as well.
|
|
| That works for me

It does mean that in order to put unicode into a file, you have to have
the whole thing in memory.  I'd prefer accepting an iterable (which a
string is), but I can live with this.

|>Which also means that we don't need 'file_iterator' since this is the
|>only place it is used. We might still need IterableFile for other
|>things, though.

I planned on using file_iterator in the TreeTransform branch.
IterableFile isn't used elsewhere, so we can nuke it now, and revert it
back when we need it.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDzudR0F+nu1YWqI0RAt5fAJ9uFicHloldgwqoow3jXc1NAiXzHgCfZpnI
AnmvYBR/quIWhlaLzsU0DEA=
=SIRM
-----END PGP SIGNATURE-----




More information about the bazaar mailing list