Filesystem paths

Jan Hudec bulb at ucw.cz
Thu Apr 27 19:28:28 BST 2006


On Thu, Apr 27, 2006 at 13:05:50 -0500, John Arbash Meinel wrote:
> 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".

Just on a side-note, there is no reason to replace the : following drive
letter with | -- the proper url is 'file:///C:/foo'

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060427/99556e96/attachment.pgp 


More information about the bazaar mailing list