[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: Ph. Marek <philipp.marek_at_bmlv.gv.at>
Date: 2005-04-11 07:16:56 CEST

On Friday 08 April 2005 18:35, Branko Čibej wrote:
> Ph. Marek wrote:
> >1: It's very good if a configuration file is parsed in one way, and only
> > one. Handling some parts with escaping and others without leads to
> > confusion.
>
> I think you're confusing "parsing" and "interpreting the results". We
> already have different ways of interpreting the results; see, for
> example, svn_config_get_bool().
>
> >2: I don't know what can break if there are special characters in other
> >parameters, especially as svn_string uses a length field, but much
> > internal handling still happens on the ->data directly and is
> > \0-sensitive. That's why I asked if NUL characters should be disallowed
> > in unescaping.
>
> Do we want to autoprop binary properties? I'd guess not.
I'd believe it might be necessary. Do you define tab as binary? Form-feed? How
do you enter them into auto-props? (Without putting invisible characters into
the file, which get lost with copy+paste)

> >All in all, I believe that having 1 is of higher priority than 2.
> >In most cases it's much harder to adapt users to something than to adapt
> > some program to the users.
>
> 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 :-)

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)

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.

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 ...

Regards,

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 11 07:17:50 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.