RFC: loosening file name limits

Robert Collins robertc at robertcollins.net
Wed Jul 30 23:52:41 BST 2008


On Wed, 2008-07-30 at 17:35 -0500, John Arbash Meinel wrote:


> So, number #3 is the harder one, as allowing '\n' and '\t', etc into
> path names is going to break all of our current serializers. (Even
> dirstate uses '\n' as a delimiter).

I'm not suggesting we do #3 today;

> The reason for '\\' isn't so much about portability, it is because
> internally on win32 we do "path.replace('\\', '/')" in lots of places.
> So if you commit a file with '\\' and check it out on win32, you get to
> keep the pieces, and it will take a fairly large amount of code auditing
> to make sure we clean up all of that. (I can guess where the api
> abstractions *should* be, we've just chosen to force it throughout the
> whole api to make it easier on ourselves.)

It seems to me that we can error on \\ in a path during tree transforms
on win32 fairly easily; thats enough to cause an error-early.

> Which means that ATM, it is probably really hard to know on win32 if
> there is a '\' in the path, or if it is just another directory
> separator. (I guess if we check just '\\' in IE.name...)

Yup.
-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080731/a35730f4/attachment.pgp 


More information about the bazaar mailing list