[patch][win32] Use u'.' not '.' as hardcoded path

John Arbash Meinel john at arbash-meinel.com
Tue Jan 3 14:45:20 GMT 2006


Robert Collins wrote:
> On Mon, 2006-01-02 at 15:29 -0600, John Arbash Meinel wrote:
> 
> 

...

> 
> It makes it unambiguous, and prevents the whole class of bugs with url
> only transports - where we *cannot* cheat. (I.e. DAV).
> 
> Rob
> 

I'm sold. Paths given to and received from Transport objects are url +
utf-8 encoded. We'll need to create a set of tests for this.

It also seems like the storage on disk should keep this encoding. So
that accessing things over http will go to the right file. It also
solves my problem with the ':' character in revision ids.

Though I guess that brings up the issue that the encoding on disk might
be different in different locations. Specifically Stores would not
transcode, but the working directory would have to.

I guess I have to wonder how unicode paths pun in http:// paths.

Typing in a unicode arabic path gives me:
%D8%AC%D9%88%D8%AC%D9%88.html
instead of
جوجو.html
That looks a whole lot like utf-8 + url encoding. Since the file path on
disk is:
'\xd8\xac\xd9\x88\xd8\xac\xd9\x88.html'

Also, it looks like we want the urllib.quote() and urllib.unquote()
functions, not the urlencode(). urlencode is for dealing with query
parameters.

So the question becomes, what *do* we do about ':' in revision ids. Do
we just give revision ids another layer of urllib.quote()?

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060103/7dad527c/attachment.pgp 


More information about the bazaar mailing list