Filesystem paths

John Arbash Meinel john at arbash-meinel.com
Thu Apr 27 19:05:50 BST 2006


Alexander Belchenko wrote:
> John Arbash Meinel пишет:
>>
>> When a user supplies a path to the command-line tool, that would have to
>> be a URL. But once it gets inside of bzrlib, it should be turned into a
>> unicode string.
> 
> I don't think that this is a good idea. This approach breaks
> compatibility with other tools (at least on Windows). I don't think that
> inability to copy and paste local file path from windows explorer to
> command line of bzr is good. I'm personally don't want to type every
> time file:///c|/path/to/file instead of c:\path\to\file. Because latter
> I can copy and paste from somewhere.
> 
> So, if you want to make life much harder for windows user then force to
> require only URL paths from command-line interface. Worst idea is hard
> to invent. :-(
> 
> -- 
> Alexander

I completely agree. And it isn't just a windows thing. Any time you want
to type a path, you need to be careful how you handle it.

I've written a lot about it, but right now I'm using the "if it starts
with *:// it is a URL, else it is a local path".

And URLs must be properly escaped (I don't accept URL's with unicode in
them).

So while you *can* type file://C|/foo, you can also just type "foo".

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


More information about the bazaar mailing list