Comment 20 for bug 3918

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 3918] Re: bzr can be caused to error with filenames containing newlines

On Tue, 2009-09-29 at 00:13 +0000, Andrew Bennetts wrote:
> I agree, it would be good to be able to accept these paths. I was a bit
> surprised to realise that \n (at least) in a filename still does not
> work in a 2a format repository. Obviously 2a will be the default format
> for quite some time now, but it would be interesting to see how hard it
> is to allow all bytes in filenames in the next development format. My
> guess is that it's not actually very hard now that we no longer use XML
> for inventories.

\n will break CHKMap unless its escaped. And dirstate.

Supporting these paths is no easier or harder than it was before:
 - we need a encode/decode pair around the things that our low level
code wants to use as control characters.

One way would be a content filter; another would be to specify it as
always being present and bump various formats to match.

Also we need to make sure we don't corrupt old formats that think they
can pull from 2a etc.

-Rob