[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DEP 5 and directory/file names with spaces

On Mon, Jun 08, 2009 at 11:18:41PM -0400, Jonathan Yu wrote:
> Another thing is that it just looks more readable. And the (standard)
> diff utility output is nicer (and more helpful). Sure, more helpful
> GUI diff programs will show you the exact subsequence which has
> changed... But for something so trivial, I can't think of anything
> better (hopefully someone else can).

I don't see why diffs would be a major concern here.

And to the extent that they are, I think that having the file list on a
single line (with optional wrapping) is *more* useful, because it means the
context for changes will be clearer.

> If you have a filename with an \n in it, then you'd need to escape the newline.

And presumably also ignore whitespace at the beginning of the line, to avoid
having to cope with parsing unindented lines that don't include a field
header.  So then you have to escape both your newline, *and* any whitespace
immediately following the newline, *and* any uses of your escape character.
Which is just downright goofy as a set of rules to try to remember when
*authoring* these files, which remains the predominant use case at this
point.  That, and the rules no longer map at all to any escaping scheme
recognized by standard commandline tools, so everybody gets to implement
their own parser.

> In general, the problem is thus:

> 1. You have to pick some sort of separator, X.
> 2. No matter what, any uses of X anywhere in a filename needs to be escaped

> Now, it's easier if X is as infrequently used as possible.

vorlon@gluck> cd /srv/lintian.debian.org/laboratory/source
vorlon@gluck> find . -name '*,*' | wc -l
vorlon@gluck> find . -name '* *' | wc -l

That's right, there are a total of *23* files *in all the source packages in
all the Debian archive* that have spaces in their filenames; and chances are
these are all going to be covered by globs anyway.

This is bikeshedding in the extreme.

> I'm not saying this is the *most* elegant solution possible. However,
> I am saying that it seems like the most elegant solution proposed thus
> far (and I'm hoping to hear from others either giving some adjustments
> we can make to improve this format, or proposing a much better
> alternative).

I disagree that it's elegant at all.  I think shell-style escaping would be
much better.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: Digital signature

Reply to: