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

RE: Subversion crashes on list with an empty format 3 repo

From: Bert Huijben <bert_at_qqmail.nl>
Date: Sun, 7 Feb 2016 15:38:42 +0100

> -----Original Message-----
> From: Daniel Shahaf [mailto:danielsh_at_apache.org]
> Sent: zondag 7 februari 2016 01:22
> To: Michael Osipov <michaelo_at_apache.org>
> Cc: Ivan Zhakov <ivan_at_visualsvn.com>; users_at_subversion.apache.org
> Subject: Re: Subversion crashes on list with an empty format 3 repo
>
> Michael Osipov wrote on Fri, Feb 05, 2016 at 23:34:16 +0100:
> > Am 2016-02-05 um 22:10 schrieb Ivan Zhakov:
> > >'vn: E160033: Invalid name for FS type 'fsfs
> > >]]]
> > We know now that the repo is mangled. The output of the last line is
> broken
> > btw. It should read "svn:... 'fsfs'" but it reads "'vn:...'fsfs". Shall a I
> > create a JIRA issue for that?
>
> Yes, please. We should be escaping the \r character rather than
> printing it literally.
>
> The root problem is that we just use the equivalent of apr_psprintf("The
> value is '%s'", value) to enter replaceables into error messages; we
> don't escape the argument to %s, nor do we use a format code (like
> the %r and {!r} of Python's string formatting or the %q of the printf(1)
> builtin of bash and zsh) that implements single-quoting-and-escaping itself.
>
> >>> print("The value is '%s'." % ('fsfs\x0D',))
> '.e value is 'fsfs
> >>> print("The value is %r." % ('fsfs\x0D',))
> The value is 'fsfs\r'.
>
> > I have unzipped the repo on:
> > FreeBSD bsd10 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug
> 12
> > 15:26:37 UTC 2015
> root_at_releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC
> > amd64
> >
> > and I receive the very same error as you do.
>
> That's not surprising: the fs-type file has a CRLF line ending, and on
> FreeBSD the CR wouldn't be removed.
>
> Does 'svnadmin create' use CRLF for the fs-type file on windows? It
> should probably use LF to make the format entirely platform-independent.

No, it uses a LF only, like on other platforms. (I think that should be clear about this bug report... We fail when we have a file with that byte sequence we never create ourselves). We open most text files as binary in the libsvn_* code on Windows. (Note that we use the other default in our python testsuite)

It is probably nice to fix this specific case as it is above the FS layer, but I don't think we should really start to look at fsfs as EOL agnostic.

        Bert
Received on 2016-02-07 15:39:02 CET

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

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