On Mon, 6 Oct 2003, Philip Martin wrote:
> "B. W. Fitzpatrick" <fitz@red-bean.com> writes:
>
> > Philip Martin <philip@codematters.co.uk> writes:
> >> Martin Furter <mf@rola.ch> writes:
> >>
> >> > Here is an example config:
> >> >
> >> > [auto-props]
> >> > * = svn:executable
> >> > *.txt = svn:eol-style=native
> >> > *.old.txt =
> >> > *.sh = svn:eol-style=LF;svn:executable
> >> > README.old.txt = svn:eol-style=CRLF
> >> > Makefile = svn:eol-style=LF
> >>
> >> Users are going to want to use this feature to set svn:ignore, but it
> >> doesn't look like that will work since svn:ignore generally has a
> >> multi-line value. I suppose a space separated list could be used
> >> above (like global-ignores), but then the code is going to have to
> >> convert spaces into newlines for this particular "magic" property.
> >
> > If the config parser works like ConfigParser in python (and it
> > should), the value of the key is the value of all characters*
> > up until the next line that begins with a non-whitespace character:
> >
> > [auto-props]
> > *.blah: svn:ignore=foo
> > bar
> > baz
>
> I've applied Martin's patch, but Fitz's suggestion doesn't quite
> work. Using
>
> [auto-props]
> foo = xxx=yyy
> zzz
>
> I get
>
> $svn pl -v wc/foo
> Properties on 'wc/foo':
> xxx : yyyzzz
>
> It appears that the newlines are being stripped. I don't know whether
> that's a bug, or whether it is the config parser or Martin's patch
> that does it. It's not that important at present since Martin's patch
> doesn't yet do directories, but it does mean that a future directory
> implementation of auto-props will have to change something to support
> svn:ignore.
There are 2 things happening:
1. newlines and whitespace around it is replaces by one space character
2. apr_collapse_spaces removes that space
I didn't expect apr_collapse_spaces to do that, so i had to replace it by
svn_string_strip_whitespace which does what i want.
If there are properties which need a newline i'd have to parse the value
and replace '\n' by newline and '\\' by '\'. What is the eol-style for
properties ?
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Oct 6 04:39:40 2003