subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bert Huijben" <b...@qqmail.nl>
Subject RE: Subversion crashes on list with an empty format 3 repo
Date Sun, 07 Feb 2016 14:38:42 GMT


> -----Original Message-----
> From: Daniel Shahaf [mailto:danielsh@apache.org]
> Sent: zondag 7 februari 2016 01:22
> To: Michael Osipov <michaelo@apache.org>
> Cc: Ivan Zhakov <ivan@visualsvn.com>; users@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@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


Mime
View raw message