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

Re: svn commit: rev 2127 - trunk/subversion/libsvn_repos

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-06-08 14:23:03 CEST

cmpilato@tigris.org writes:

> Fix repository loader bug that mishandled zero-length files.

> + /* Special case: we have zero data content bytes, but this is
> + file. Files *always* have contents, even if they are empty. */
> + else if (is_node)
> + {
> + struct node_baton *nb = record_baton;
> + if (nb->kind == svn_node_file)
> + {
> + apr_size_t wlen = 0;
> + svn_stream_t *text_stream;
> +
> + SVN_ERR (parse_fns->set_fulltext (&text_stream, record_baton));
> + if (text_stream != NULL)
> + {
> + SVN_ERR (svn_stream_write (text_stream, "", &wlen));
> + SVN_ERR (svn_stream_close (text_stream));
> + }
> + }
> + }
> +

I don't get this... why would we need to push "" at a newly created
file in the filesystem? I thought that svn_fs_make_file() creates an
"empty", i.e. 0 byte, file. That's always been the docstring... did
that change in the new fs schema?

What bug prompted this change? Just curious.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jun 8 14:24:57 2002

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.