[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Escapes in configuration (svn:ignore in dir-auto-props)

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-04-11 12:33:26 CEST

Ph. Marek wrote:

>On Friday 08 April 2005 18:35, Branko Čibej wrote:
>
>
>>I think all your examples are about lists of values, rather than about
>>escaping in general. For example, when setting svn:ignore, you want a
>>list of values, not necessarly a newline-separated list. What if,
>>instead of an escaping scheme, we come up with an additional syntax for
>>value lists?
>>Instead of
>>
>> svn:ignore=
>> foo
>> bar
>>we could also accept
>> svn:ignore=@list("foo", "bar")
>>
>>
>That's an idea.
>
>
>
>>The list items enclosed in quotes could be subject to escaping (e.g.,
>>for the quites themselves). Something like this could be done in a
>>completely backward-compatible way (except for the pathologic case where
>>someone actually wants to ignore a file named @list(...); but the
>>workaround for that is @list("@list(...)")).
>>
>>
>Problem is, no matter what encoding we take, there'll be someone who uses
>exactly that values. So somebody bites the dust :-)
>
>
Oh, sure. In the end, it's a matter of probability.

>And IMO,
> * = svn:ignore=abc\n
> def\n
> ghi\n
>is not more or less readable than
> * = svn:ignore=@list("abc",
> "def",
> "ghi")
>(both are ugly, in some way)
>
>
Yes, but the first won't work as you expect, because the line
continuation always inserts one space between items on different lines
(and, incidentally, removes other whitespace -- you'd have to be very
careful about how you handle your escaped newlines).

>And how do you get " into filenames? The list isn't easily expandable - any
>script which wants to put new values into that has to account for the braces.
>
>
Um, I did say i'd allow escapint within the quotes. Those escapes, like
the @list itself, would be expanded when the value is interpreted, not
when it's parsed.

>I know that this will probably not matter much to most people - but if there's
>one thing I learned, it's "keep it simple and scriptable" :-).
>
>
>But to get as much backward-compatibility as possible, how about restricting
>this escape sequences to auto-props and dir-auto-props?
>Although it might be necessary to have special characters for the diff-cmd,
>and possibly tunnels - although that's exactly the points where pathnames
>(which have a backslash in windows) are used ...
>
>

Yup. That's where the difference between parsing and interpretation
becomes important.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 11 12:34:25 2005

This is an archived mail posted to the Subversion Dev mailing list.