summaryrefslogtreecommitdiff
path: root/subversion/libsvn_repos/load.c
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/libsvn_repos/load.c')
-rw-r--r--subversion/libsvn_repos/load.c32
1 files changed, 8 insertions, 24 deletions
diff --git a/subversion/libsvn_repos/load.c b/subversion/libsvn_repos/load.c
index 691ff92..96eda85 100644
--- a/subversion/libsvn_repos/load.c
+++ b/subversion/libsvn_repos/load.c
@@ -21,26 +21,18 @@
*/
-#include "svn_private_config.h"
+#include <apr.h>
+
#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_error.h"
-#include "svn_fs.h"
#include "svn_repos.h"
#include "svn_string.h"
-#include "svn_path.h"
-#include "svn_props.h"
#include "repos.h"
#include "svn_private_config.h"
-#include "svn_mergeinfo.h"
-#include "svn_checksum.h"
-#include "svn_subst.h"
#include "svn_ctype.h"
-#include <apr_lib.h>
-
#include "private/svn_dep_compat.h"
-#include "private/svn_mergeinfo_private.h"
/*----------------------------------------------------------------------*/
@@ -150,7 +142,7 @@ read_key_or_val(char **pbuf,
char c;
numread = len;
- SVN_ERR(svn_stream_read(stream, buf, &numread));
+ SVN_ERR(svn_stream_read_full(stream, buf, &numread));
*actual_length += numread;
if (numread != len)
return svn_error_trace(stream_ran_dry());
@@ -158,7 +150,7 @@ read_key_or_val(char **pbuf,
/* Suck up extra newline after key data */
numread = 1;
- SVN_ERR(svn_stream_read(stream, &c, &numread));
+ SVN_ERR(svn_stream_read_full(stream, &c, &numread));
*actual_length += numread;
if (numread != 1)
return svn_error_trace(stream_ran_dry());
@@ -291,7 +283,8 @@ parse_property_block(svn_stream_t *stream,
}
-/* Read CONTENT_LENGTH bytes from STREAM, and use
+/* Read CONTENT_LENGTH bytes from STREAM. If IS_DELTA is true, use
+ PARSE_FNS->apply_textdelta to push a text delta, otherwise use
PARSE_FNS->set_fulltext to push those bytes as replace fulltext for
a node. Use BUFFER/BUFLEN to push the fulltext in "chunks".
@@ -324,15 +317,6 @@ parse_text_block(svn_stream_t *stream,
SVN_ERR(parse_fns->set_fulltext(&text_stream, record_baton));
}
- /* If there are no contents to read, just write an empty buffer
- through our callback. */
- if (content_length == 0)
- {
- wlen = 0;
- if (text_stream)
- SVN_ERR(svn_stream_write(text_stream, "", &wlen));
- }
-
/* Regardless of whether or not we have a sink for our data, we
need to read it. */
while (content_length)
@@ -343,7 +327,7 @@ parse_text_block(svn_stream_t *stream,
rlen = (apr_size_t) content_length;
num_to_read = rlen;
- SVN_ERR(svn_stream_read(stream, buffer, &rlen));
+ SVN_ERR(svn_stream_read_full(stream, buffer, &rlen));
content_length -= rlen;
if (rlen != num_to_read)
return stream_ran_dry();
@@ -654,7 +638,7 @@ svn_repos_parse_dumpstream3(svn_stream_t *stream,
rlen = (apr_size_t) remaining;
num_to_read = rlen;
- SVN_ERR(svn_stream_read(stream, buffer, &rlen));
+ SVN_ERR(svn_stream_read_full(stream, buffer, &rlen));
remaining -= rlen;
if (rlen != num_to_read)
return stream_ran_dry();