You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/02/06 09:45:09 UTC

svn commit: r1565116 [3/3] - in /subversion/branches/fsfs-ucsnorm: ./ build/ac-macros/ build/generator/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ subversion/bindings/javahl/src/org/apache/s...

Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_subr/stream.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_subr/stream.c Thu Feb  6 08:45:07 2014
@@ -29,7 +29,7 @@
 #include <apr_strings.h>
 #include <apr_file_io.h>
 #include <apr_errno.h>
-#include <apr_md5.h>
+#include <apr_poll.h>
 #include <apr_portable.h>
 
 #include <zlib.h>
@@ -53,11 +53,13 @@
 struct svn_stream_t {
   void *baton;
   svn_read_fn_t read_fn;
+  svn_read_fn_t read_full_fn;
   svn_stream_skip_fn_t skip_fn;
   svn_write_fn_t write_fn;
   svn_close_fn_t close_fn;
   svn_stream_mark_fn_t mark_fn;
   svn_stream_seek_fn_t seek_fn;
+  svn_stream_data_available_fn_t data_available_fn;
   svn_stream__is_buffered_fn_t is_buffered_fn;
   apr_file_t *file; /* Maybe NULL */
 };
@@ -66,7 +68,7 @@ struct svn_stream_t {
 /*** Forward declarations. ***/
 
 static svn_error_t *
-skip_default_handler(void *baton, apr_size_t len, svn_read_fn_t read_fn);
+skip_default_handler(void *baton, apr_size_t len, svn_read_fn_t read_full_fn);
 
 
 /*** Generic streams. ***/
@@ -84,6 +86,7 @@ svn_stream_create(void *baton, apr_pool_
   stream->close_fn = NULL;
   stream->mark_fn = NULL;
   stream->seek_fn = NULL;
+  stream->data_available_fn = NULL;
   stream->is_buffered_fn = NULL;
   stream->file = NULL;
   return stream;
@@ -98,9 +101,12 @@ svn_stream_set_baton(svn_stream_t *strea
 
 
 void
-svn_stream_set_read(svn_stream_t *stream, svn_read_fn_t read_fn)
+svn_stream_set_read2(svn_stream_t *stream,
+                     svn_read_fn_t read_fn,
+                     svn_read_fn_t read_full_fn)
 {
   stream->read_fn = read_fn;
+  stream->read_full_fn = read_full_fn;
 }
 
 void
@@ -134,26 +140,72 @@ svn_stream_set_seek(svn_stream_t *stream
 }
 
 void
+svn_stream_set_data_available(svn_stream_t *stream,
+                              svn_stream_data_available_fn_t data_available_fn)
+{
+  stream->data_available_fn = data_available_fn;
+}
+
+void
 svn_stream__set_is_buffered(svn_stream_t *stream,
                             svn_stream__is_buffered_fn_t is_buffered_fn)
 {
   stream->is_buffered_fn = is_buffered_fn;
 }
 
+/* Standard implementation for svn_stream_read_full() based on multiple.
+   svn_stream_read2() calls
+   (in separate function to make it more likely for svn_stream_read_full
+    to be inlined) */
+static svn_error_t *
+full_read_fallback(svn_stream_t *stream, char *buffer, apr_size_t *len)
+{
+  apr_size_t to_read;
+
+  to_read = *len;
+
+  while (to_read > 0)
+    {
+      *len = to_read;
+      SVN_ERR(svn_stream_read2(stream, buffer, len));
+
+      to_read -= *len;
+      buffer += *len;
+
+      if (*len == 0)
+        {
+          *len = to_read;
+          return SVN_NO_ERROR;
+        }
+    }
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
-svn_stream_read(svn_stream_t *stream, char *buffer, apr_size_t *len)
+svn_stream_read2(svn_stream_t *stream, char *buffer, apr_size_t *len)
 {
-  SVN_ERR_ASSERT(stream->read_fn != NULL);
+  if (stream->read_fn == NULL)
+    return svn_error_create(SVN_ERR_STREAM_NOT_SUPPORTED, NULL, NULL);
+
   return svn_error_trace(stream->read_fn(stream->baton, buffer, len));
 }
 
+svn_error_t *
+svn_stream_read_full(svn_stream_t *stream, char *buffer, apr_size_t *len)
+{
+  if (stream->read_full_fn == NULL)
+    return svn_error_trace(full_read_fallback(stream, buffer, len));
+
+  return svn_error_trace(stream->read_full_fn(stream->baton, buffer, len));
+}
 
 svn_error_t *
 svn_stream_skip(svn_stream_t *stream, apr_size_t len)
 {
   if (stream->skip_fn == NULL)
     return svn_error_trace(
-            skip_default_handler(stream->baton, len, stream->read_fn));
+            skip_default_handler(stream->baton, len, stream->read_full_fn));
 
   return svn_error_trace(stream->skip_fn(stream->baton, len));
 }
@@ -199,6 +251,17 @@ svn_stream_seek(svn_stream_t *stream, co
   return svn_error_trace(stream->seek_fn(stream->baton, mark));
 }
 
+svn_error_t *
+svn_stream_data_available(svn_stream_t *stream,
+                          svn_boolean_t *data_available)
+{
+  if (stream->data_available_fn == NULL)
+    return svn_error_create(SVN_ERR_STREAM_NOT_SUPPORTED, NULL, NULL);
+
+  return svn_error_trace(stream->data_available_fn(stream->baton,
+                                                   data_available));
+}
+
 svn_boolean_t
 svn_stream__is_buffered(svn_stream_t *stream)
 {
@@ -291,7 +354,7 @@ stream_readline_bytewise(svn_stringbuf_t
   while (*match)
     {
       numbytes = 1;
-      SVN_ERR(svn_stream_read(stream, &c, &numbytes));
+      SVN_ERR(svn_stream_read_full(stream, &c, &numbytes));
       if (numbytes != 1)
         {
           /* a 'short' read means the stream has run out. */
@@ -346,7 +409,7 @@ stream_readline_chunky(svn_stringbuf_t *
 
   /* Read the first chunk. */
   numbytes = SVN__LINE_CHUNK_SIZE;
-  SVN_ERR(svn_stream_read(stream, buffer, &numbytes));
+  SVN_ERR(svn_stream_read_full(stream, buffer, &numbytes));
   buffer[numbytes] = '\0';
 
   /* Look for the EOL in this first chunk. If we find it, we are done here.
@@ -381,7 +444,7 @@ stream_readline_chunky(svn_stringbuf_t *
          */
         svn_stringbuf_ensure(str, str->len + SVN__LINE_CHUNK_SIZE);
         numbytes = SVN__LINE_CHUNK_SIZE;
-        SVN_ERR(svn_stream_read(stream, str->data + str->len, &numbytes));
+        SVN_ERR(svn_stream_read_full(stream, str->data + str->len, &numbytes));
         str->len += numbytes;
         str->data[str->len] = '\0';
 
@@ -493,7 +556,7 @@ svn_error_t *svn_stream_copy3(svn_stream
              break;
         }
 
-      err = svn_stream_read(from, buf, &len);
+      err = svn_stream_read_full(from, buf, &len);
       if (err)
          break;
 
@@ -526,10 +589,10 @@ svn_stream_contents_same2(svn_boolean_t 
   while (bytes_read1 == SVN__STREAM_CHUNK_SIZE
          && bytes_read2 == SVN__STREAM_CHUNK_SIZE)
     {
-      err = svn_stream_read(stream1, buf1, &bytes_read1);
+      err = svn_stream_read_full(stream1, buf1, &bytes_read1);
       if (err)
         break;
-      err = svn_stream_read(stream2, buf2, &bytes_read2);
+      err = svn_stream_read_full(stream2, buf2, &bytes_read2);
       if (err)
         break;
 
@@ -552,7 +615,7 @@ svn_stream_contents_same2(svn_boolean_t 
 
 /* Skip data from any stream by reading and simply discarding it. */
 static svn_error_t *
-skip_default_handler(void *baton, apr_size_t len, svn_read_fn_t read_fn)
+skip_default_handler(void *baton, apr_size_t len, svn_read_fn_t read_full_fn)
 {
   apr_size_t bytes_read = 1;
   char buffer[4096];
@@ -561,7 +624,7 @@ skip_default_handler(void *baton, apr_si
   while ((to_read > 0) && (bytes_read > 0))
     {
       bytes_read = sizeof(buffer) < to_read ? sizeof(buffer) : to_read;
-      SVN_ERR(read_fn(baton, buffer, &bytes_read));
+      SVN_ERR(read_full_fn(baton, buffer, &bytes_read));
       to_read -= bytes_read;
     }
 
@@ -611,7 +674,7 @@ svn_stream_empty(apr_pool_t *pool)
   svn_stream_t *stream;
 
   stream = svn_stream_create(NULL, pool);
-  svn_stream_set_read(stream, read_handler_empty);
+  svn_stream_set_read2(stream, read_handler_empty, read_handler_empty);
   svn_stream_set_write(stream, write_handler_empty);
   svn_stream_set_mark(stream, mark_handler_empty);
   svn_stream_set_seek(stream, seek_handler_empty);
@@ -683,7 +746,13 @@ svn_stream_tee(svn_stream_t *out1,
 static svn_error_t *
 read_handler_disown(void *baton, char *buffer, apr_size_t *len)
 {
-  return svn_error_trace(svn_stream_read(baton, buffer, len));
+  return svn_error_trace(svn_stream_read2(baton, buffer, len));
+}
+
+static svn_error_t *
+read_full_handler_disown(void *baton, char *buffer, apr_size_t *len)
+{
+  return svn_error_trace(svn_stream_read_full(baton, buffer, len));
 }
 
 static svn_error_t *
@@ -710,6 +779,12 @@ seek_handler_disown(void *baton, const s
   return svn_error_trace(svn_stream_seek(baton, mark));
 }
 
+static svn_error_t *
+data_available_disown(void *baton, svn_boolean_t *data_available)
+{
+  return svn_error_trace(svn_stream_data_available(baton, data_available));
+}
+
 static svn_boolean_t
 is_buffered_handler_disown(void *baton)
 {
@@ -721,11 +796,12 @@ svn_stream_disown(svn_stream_t *stream, 
 {
   svn_stream_t *s = svn_stream_create(stream, pool);
 
-  svn_stream_set_read(s, read_handler_disown);
+  svn_stream_set_read2(s, read_handler_disown, read_full_handler_disown);
   svn_stream_set_skip(s, skip_handler_disown);
   svn_stream_set_write(s, write_handler_disown);
   svn_stream_set_mark(s, mark_handler_disown);
   svn_stream_set_seek(s, seek_handler_disown);
+  svn_stream_set_data_available(s, data_available_disown);
   svn_stream__set_is_buffered(s, is_buffered_handler_disown);
 
   return s;
@@ -749,6 +825,38 @@ read_handler_apr(void *baton, char *buff
 {
   struct baton_apr *btn = baton;
   svn_error_t *err;
+
+  if (*len == 1)
+    {
+      err = svn_io_file_getc(buffer, btn->file, btn->pool);
+      if (err)
+        {
+          *len = 0;
+          if (APR_STATUS_IS_EOF(err->apr_err))
+            {
+              svn_error_clear(err);
+              err = SVN_NO_ERROR;
+            }
+        }
+    }
+  else
+    {
+      err = svn_io_file_read(btn->file, buffer, len, btn->pool);
+      if (err && APR_STATUS_IS_EOF(err->apr_err))
+        {
+          svn_error_clear(err);
+          err = NULL;
+        }
+    }
+
+  return svn_error_trace(err);
+}
+
+static svn_error_t *
+read_full_handler_apr(void *baton, char *buffer, apr_size_t *len)
+{
+  struct baton_apr *btn = baton;
+  svn_error_t *err;
   svn_boolean_t eof;
 
   if (*len == 1)
@@ -831,6 +939,40 @@ seek_handler_apr(void *baton, const svn_
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+data_available_handler_apr(void *baton, svn_boolean_t *data_available)
+{
+  struct baton_apr *btn = baton;
+  apr_pollfd_t pfd;
+  apr_status_t status;
+  int n;
+
+  pfd.desc_type = APR_POLL_FILE;
+  pfd.desc.f = btn->file;
+  pfd.p = btn->pool;
+  pfd.reqevents = APR_POLLIN;
+
+  status = apr_poll(&pfd, 1, &n, 0);
+  svn_pool_clear(btn->pool);
+
+  if (status == APR_SUCCESS)
+    {
+      *data_available = (n > 0);
+      return SVN_NO_ERROR;
+    }
+  else if (APR_STATUS_IS_EOF(status))
+    {
+      *data_available = FALSE;
+      return SVN_NO_ERROR;
+    }
+  else
+    {
+      return svn_error_create(SVN_ERR_STREAM_NOT_SUPPORTED,
+                              svn_error_create(status, NULL, NULL),
+                              NULL);
+    }
+}
+
 static svn_boolean_t
 is_buffered_handler_apr(void *baton)
 {
@@ -907,11 +1049,12 @@ svn_stream_from_aprfile2(apr_file_t *fil
   baton->file = file;
   baton->pool = pool;
   stream = svn_stream_create(baton, pool);
-  svn_stream_set_read(stream, read_handler_apr);
+  svn_stream_set_read2(stream, read_handler_apr, read_full_handler_apr);
   svn_stream_set_write(stream, write_handler_apr);
   svn_stream_set_skip(stream, skip_handler_apr);
   svn_stream_set_mark(stream, mark_handler_apr);
   svn_stream_set_seek(stream, seek_handler_apr);
+  svn_stream_set_data_available(stream, data_available_handler_apr);
   svn_stream__set_is_buffered(stream, is_buffered_handler_apr);
   stream->file = file;
 
@@ -1190,9 +1333,22 @@ static svn_error_t *
 read_handler_checksum(void *baton, char *buffer, apr_size_t *len)
 {
   struct checksum_stream_baton *btn = baton;
+
+  SVN_ERR(svn_stream_read2(btn->proxy, buffer, len));
+
+  if (btn->read_checksum)
+    SVN_ERR(svn_checksum_update(btn->read_ctx, buffer, *len));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+read_full_handler_checksum(void *baton, char *buffer, apr_size_t *len)
+{
+  struct checksum_stream_baton *btn = baton;
   apr_size_t saved_len = *len;
 
-  SVN_ERR(svn_stream_read(btn->proxy, buffer, len));
+  SVN_ERR(svn_stream_read_full(btn->proxy, buffer, len));
 
   if (btn->read_checksum)
     SVN_ERR(svn_checksum_update(btn->read_ctx, buffer, *len));
@@ -1215,6 +1371,14 @@ write_handler_checksum(void *baton, cons
   return svn_error_trace(svn_stream_write(btn->proxy, buffer, len));
 }
 
+static svn_error_t *
+data_available_handler_checksum(void *baton, svn_boolean_t *data_available)
+{
+  struct checksum_stream_baton *btn = baton;
+
+  return svn_error_trace(svn_stream_data_available(btn->proxy,
+                                                   data_available));
+}
 
 static svn_error_t *
 close_handler_checksum(void *baton)
@@ -1230,7 +1394,7 @@ close_handler_checksum(void *baton)
 
       do
         {
-          SVN_ERR(read_handler_checksum(baton, buf, &len));
+          SVN_ERR(read_full_handler_checksum(baton, buf, &len));
         }
       while (btn->read_more);
     }
@@ -1277,105 +1441,13 @@ svn_stream_checksummed2(svn_stream_t *st
   baton->pool = pool;
 
   s = svn_stream_create(baton, pool);
-  svn_stream_set_read(s, read_handler_checksum);
+  svn_stream_set_read2(s, read_handler_checksum, read_full_handler_checksum);
   svn_stream_set_write(s, write_handler_checksum);
+  svn_stream_set_data_available(s, data_available_handler_checksum);
   svn_stream_set_close(s, close_handler_checksum);
   return s;
 }
 
-struct md5_stream_baton
-{
-  const unsigned char **read_digest;
-  const unsigned char **write_digest;
-  svn_checksum_t *read_checksum;
-  svn_checksum_t *write_checksum;
-  svn_stream_t *proxy;
-  apr_pool_t *pool;
-};
-
-static svn_error_t *
-read_handler_md5(void *baton, char *buffer, apr_size_t *len)
-{
-  struct md5_stream_baton *btn = baton;
-  return svn_error_trace(svn_stream_read(btn->proxy, buffer, len));
-}
-
-static svn_error_t *
-skip_handler_md5(void *baton, apr_size_t len)
-{
-  struct md5_stream_baton *btn = baton;
-  return svn_error_trace(svn_stream_skip(btn->proxy, len));
-}
-
-static svn_error_t *
-write_handler_md5(void *baton, const char *buffer, apr_size_t *len)
-{
-  struct md5_stream_baton *btn = baton;
-  return svn_error_trace(svn_stream_write(btn->proxy, buffer, len));
-}
-
-static svn_error_t *
-close_handler_md5(void *baton)
-{
-  struct md5_stream_baton *btn = baton;
-
-  SVN_ERR(svn_stream_close(btn->proxy));
-
-  if (btn->read_digest)
-    *btn->read_digest
-      = apr_pmemdup(btn->pool, btn->read_checksum->digest,
-                    APR_MD5_DIGESTSIZE);
-
-  if (btn->write_digest)
-    *btn->write_digest
-      = apr_pmemdup(btn->pool, btn->write_checksum->digest,
-                    APR_MD5_DIGESTSIZE);
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_stream_t *
-svn_stream_checksummed(svn_stream_t *stream,
-                       const unsigned char **read_digest,
-                       const unsigned char **write_digest,
-                       svn_boolean_t read_all,
-                       apr_pool_t *pool)
-{
-  svn_stream_t *s;
-  struct md5_stream_baton *baton;
-
-  if (! read_digest && ! write_digest)
-    return stream;
-
-  baton = apr_palloc(pool, sizeof(*baton));
-  baton->read_digest = read_digest;
-  baton->write_digest = write_digest;
-  baton->pool = pool;
-
-  /* Set BATON->proxy to a stream that will fill in BATON->read_checksum
-   * and BATON->write_checksum (if we want them) when it is closed. */
-  baton->proxy
-    = svn_stream_checksummed2(stream,
-                              read_digest ? &baton->read_checksum : NULL,
-                              write_digest ? &baton->write_checksum : NULL,
-                              svn_checksum_md5,
-                              read_all, pool);
-
-  /* Create a stream that will forward its read/write/close operations to
-   * BATON->proxy and will fill in *READ_DIGEST and *WRITE_DIGEST (if we
-   * want them) after it closes BATON->proxy. */
-  s = svn_stream_create(baton, pool);
-  svn_stream_set_read(s, read_handler_md5);
-  svn_stream_set_skip(s, skip_handler_md5);
-  svn_stream_set_write(s, write_handler_md5);
-  svn_stream_set_close(s, close_handler_md5);
-  return s;
-}
-
-
-
-
 /* Miscellaneous stream functions. */
 
 svn_error_t *
@@ -1393,7 +1465,7 @@ svn_stringbuf_from_stream(svn_stringbuf_
   do
     {
       to_read = text->blocksize - 1 - text->len;
-      SVN_ERR(svn_stream_read(stream, text->data + text->len, &to_read));
+      SVN_ERR(svn_stream_read_full(stream, text->data + text->len, &to_read));
       text->len += to_read;
 
       if (to_read && text->blocksize < text->len + MIN_READ_SIZE)
@@ -1482,6 +1554,15 @@ seek_handler_stringbuf(void *baton, cons
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+data_available_handler_stringbuf(void *baton, svn_boolean_t *data_available)
+{
+  struct stringbuf_stream_baton *btn = baton;
+
+  *data_available = ((btn->str->len - btn->amt_read) > 0);
+  return SVN_NO_ERROR;
+}
+
 static svn_boolean_t
 is_buffered_handler_stringbuf(void *baton)
 {
@@ -1502,11 +1583,12 @@ svn_stream_from_stringbuf(svn_stringbuf_
   baton->str = str;
   baton->amt_read = 0;
   stream = svn_stream_create(baton, pool);
-  svn_stream_set_read(stream, read_handler_stringbuf);
+  svn_stream_set_read2(stream, read_handler_stringbuf, read_handler_stringbuf);
   svn_stream_set_skip(stream, skip_handler_stringbuf);
   svn_stream_set_write(stream, write_handler_stringbuf);
   svn_stream_set_mark(stream, mark_handler_stringbuf);
   svn_stream_set_seek(stream, seek_handler_stringbuf);
+  svn_stream_set_data_available(stream, data_available_handler_stringbuf);
   svn_stream__set_is_buffered(stream, is_buffered_handler_stringbuf);
   return stream;
 }
@@ -1577,6 +1659,15 @@ skip_handler_string(void *baton, apr_siz
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+data_available_handler_string(void *baton, svn_boolean_t *data_available)
+{
+  struct string_stream_baton *btn = baton;
+
+  *data_available = ((btn->str->len - btn->amt_read) > 0);
+  return SVN_NO_ERROR;
+}
+
 static svn_boolean_t
 is_buffered_handler_string(void *baton)
 {
@@ -1597,10 +1688,11 @@ svn_stream_from_string(const svn_string_
   baton->str = str;
   baton->amt_read = 0;
   stream = svn_stream_create(baton, pool);
-  svn_stream_set_read(stream, read_handler_string);
+  svn_stream_set_read2(stream, read_handler_string, read_handler_string);
   svn_stream_set_mark(stream, mark_handler_string);
   svn_stream_set_seek(stream, seek_handler_string);
   svn_stream_set_skip(stream, skip_handler_string);
+  svn_stream_set_data_available(stream, data_available_handler_string);
   svn_stream__set_is_buffered(stream, is_buffered_handler_string);
   return stream;
 }
@@ -1668,7 +1760,7 @@ svn_string_from_stream(svn_string_t **re
     {
       apr_size_t len = SVN__STREAM_CHUNK_SIZE;
 
-      SVN_ERR(svn_stream_read(stream, buffer, &len));
+      SVN_ERR(svn_stream_read_full(stream, buffer, &len));
       svn_stringbuf_appendbytes(work, buffer, len);
 
       if (len < SVN__STREAM_CHUNK_SIZE)
@@ -1751,7 +1843,21 @@ read_handler_lazyopen(void *baton,
   lazyopen_baton_t *b = baton;
 
   SVN_ERR(lazyopen_if_unopened(b));
-  SVN_ERR(svn_stream_read(b->real_stream, buffer, len));
+  SVN_ERR(svn_stream_read2(b->real_stream, buffer, len));
+
+  return SVN_NO_ERROR;
+}
+
+/* Implements svn_read_fn_t */
+static svn_error_t *
+read_full_handler_lazyopen(void *baton,
+                      char *buffer,
+                      apr_size_t *len)
+{
+  lazyopen_baton_t *b = baton;
+
+  SVN_ERR(lazyopen_if_unopened(b));
+  SVN_ERR(svn_stream_read_full(b->real_stream, buffer, len));
 
   return SVN_NO_ERROR;
 }
@@ -1824,6 +1930,17 @@ seek_handler_lazyopen(void *baton,
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+data_available_handler_lazyopen(void *baton,
+                                svn_boolean_t *data_available)
+{
+  lazyopen_baton_t *b = baton;
+
+  SVN_ERR(lazyopen_if_unopened(b));
+  return svn_error_trace(svn_stream_data_available(b->real_stream,
+                                                   data_available));
+}
+
 /* Implements svn_stream__is_buffered_fn_t */
 static svn_boolean_t
 is_buffered_lazyopen(void *baton)
@@ -1853,12 +1970,14 @@ svn_stream_lazyopen_create(svn_stream_la
   lob->open_on_close = open_on_close;
 
   stream = svn_stream_create(lob, result_pool);
-  svn_stream_set_read(stream, read_handler_lazyopen);
+  svn_stream_set_read2(stream, read_handler_lazyopen,
+                       read_full_handler_lazyopen);
   svn_stream_set_skip(stream, skip_handler_lazyopen);
   svn_stream_set_write(stream, write_handler_lazyopen);
   svn_stream_set_close(stream, close_handler_lazyopen);
   svn_stream_set_mark(stream, mark_handler_lazyopen);
   svn_stream_set_seek(stream, seek_handler_lazyopen);
+  svn_stream_set_data_available(stream, data_available_handler_lazyopen);
   svn_stream__set_is_buffered(stream, is_buffered_lazyopen);
 
   return stream;

Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_subr/subst.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/libsvn_subr/subst.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_subr/subst.c Thu Feb  6 08:45:07 2014
@@ -1290,7 +1290,7 @@ translated_stream_read(void *baton,
 
           svn_stringbuf_setempty(b->readbuf);
           b->readbuf_off = 0;
-          SVN_ERR(svn_stream_read(b->stream, b->buf, &readlen));
+          SVN_ERR(svn_stream_read_full(b->stream, b->buf, &readlen));
           buf_stream = svn_stream_from_stringbuf(b->readbuf, b->iterpool);
 
           SVN_ERR(translate_chunk(buf_stream, b->in_baton, b->buf,
@@ -1850,7 +1850,7 @@ read_handler_special(void *baton, char *
 
   if (btn->read_stream)
     /* We actually found a file to read from */
-    return svn_stream_read(btn->read_stream, buffer, len);
+    return svn_stream_read_full(btn->read_stream, buffer, len);
   else
     return svn_error_createf(APR_ENOENT, NULL,
                              "Can't read special file: File '%s' not found",

Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/adm_crawler.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/adm_crawler.c Thu Feb  6 08:45:07 2014
@@ -876,7 +876,7 @@ read_handler_copy(void *baton, char *buf
 {
   struct copying_stream_baton *btn = baton;
 
-  SVN_ERR(svn_stream_read(btn->source, buffer, len));
+  SVN_ERR(svn_stream_read_full(btn->source, buffer, len));
 
   return svn_stream_write(btn->target, buffer, len);
 }

Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/adm_ops.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/adm_ops.c Thu Feb  6 08:45:07 2014
@@ -997,9 +997,10 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
 
 
 svn_error_t *
-svn_wc_add_from_disk2(svn_wc_context_t *wc_ctx,
+svn_wc_add_from_disk3(svn_wc_context_t *wc_ctx,
                       const char *local_abspath,
                       const apr_hash_t *props,
+                      svn_boolean_t skip_checks,
                       svn_wc_notify_func2_t notify_func,
                       void *notify_baton,
                       apr_pool_t *scratch_pool)
@@ -1018,7 +1019,7 @@ svn_wc_add_from_disk2(svn_wc_context_t *
 
       SVN_ERR(svn_wc__canonicalize_props(
                 &new_props,
-                local_abspath, kind, props, FALSE /* skip_some_checks */,
+                local_abspath, kind, props, skip_checks,
                 scratch_pool, scratch_pool));
       props = new_props;
     }

Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/deprecated.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/deprecated.c Thu Feb  6 08:45:07 2014
@@ -924,6 +924,19 @@ svn_wc_delete(const char *path,
 }
 
 svn_error_t *
+svn_wc_add_from_disk2(svn_wc_context_t *wc_ctx,
+                     const char *local_abspath,
+                      const apr_hash_t *props,
+                     svn_wc_notify_func2_t notify_func,
+                     void *notify_baton,
+                     apr_pool_t *scratch_pool)
+{
+  SVN_ERR(svn_wc_add_from_disk3(wc_ctx, local_abspath, NULL, FALSE,
+                                 notify_func, notify_baton, scratch_pool));
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
 svn_wc_add_from_disk(svn_wc_context_t *wc_ctx,
                      const char *local_abspath,
                      svn_wc_notify_func2_t notify_func,

Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/info.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/info.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/info.c Thu Feb  6 08:45:07 2014
@@ -191,7 +191,7 @@ build_info_for_node(svn_wc__info2_t **in
           SVN_ERR(svn_wc__internal_get_origin(NULL, &tmpinfo->rev,
                                               &repos_relpath,
                                               &tmpinfo->repos_root_URL,
-                                              &tmpinfo->repos_UUID, NULL,
+                                              &tmpinfo->repos_UUID, NULL, NULL,
                                               db, local_abspath, TRUE,
                                               result_pool, scratch_pool));
         }

Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/node.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/node.c Thu Feb  6 08:45:07 2014
@@ -220,12 +220,9 @@ svn_wc__internal_get_repos_info(svn_revn
     }
   else /* added, or WORKING incomplete */
     {
-      const char *op_root_abspath = NULL;
-
       /* We have an addition. scan_addition() will find the intended
          repository location by scanning up the tree.  */
-      SVN_ERR(svn_wc__db_scan_addition(NULL, repos_relpath
-                                                    ? &op_root_abspath : NULL,
+      SVN_ERR(svn_wc__db_scan_addition(NULL,  NULL,
                                        repos_relpath, repos_root_url,
                                        repos_uuid, NULL, NULL, NULL, NULL,
                                        db, local_abspath,
@@ -323,21 +320,6 @@ svn_wc_read_kind2(svn_node_kind_t *kind,
 }
 
 svn_error_t *
-svn_wc__node_get_depth(svn_depth_t *depth,
-                       svn_wc_context_t *wc_ctx,
-                       const char *local_abspath,
-                       apr_pool_t *scratch_pool)
-{
-  return svn_error_trace(
-    svn_wc__db_read_info(NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                         NULL, NULL, depth, NULL, NULL, NULL, NULL,
-                         NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                         NULL, NULL, NULL, NULL, NULL, NULL,
-                         wc_ctx->db, local_abspath, scratch_pool,
-                         scratch_pool));
-}
-
-svn_error_t *
 svn_wc__node_get_changed_info(svn_revnum_t *changed_rev,
                               apr_time_t *changed_date,
                               const char **changed_author,
@@ -531,27 +513,6 @@ svn_wc__internal_walk_children(svn_wc__d
 }
 
 svn_error_t *
-svn_wc__node_is_status_deleted(svn_boolean_t *is_deleted,
-                               svn_wc_context_t *wc_ctx,
-                               const char *local_abspath,
-                               apr_pool_t *scratch_pool)
-{
-  svn_wc__db_status_t status;
-
-  SVN_ERR(svn_wc__db_read_info(&status,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL,
-                               wc_ctx->db, local_abspath,
-                               scratch_pool, scratch_pool));
-
-  *is_deleted = (status == svn_wc__db_status_deleted);
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
 svn_wc__node_get_deleted_ancestor(const char **deleted_ancestor_abspath,
                                   svn_wc_context_t *wc_ctx,
                                   const char *local_abspath,
@@ -952,6 +913,7 @@ svn_wc__internal_get_origin(svn_boolean_
                             const char **repos_relpath,
                             const char **repos_root_url,
                             const char **repos_uuid,
+                            svn_depth_t *depth,
                             const char **copy_root_abspath,
                             svn_wc__db_t *db,
                             const char *local_abspath,
@@ -972,7 +934,7 @@ svn_wc__internal_get_origin(svn_boolean_
 
   SVN_ERR(svn_wc__db_read_info(&status, NULL, revision, repos_relpath,
                                repos_root_url, repos_uuid, NULL, NULL, NULL,
-                               NULL, NULL, NULL,
+                               depth, NULL, NULL,
                                &original_repos_relpath,
                                &original_repos_root_url,
                                &original_repos_uuid, &original_revision,
@@ -1079,6 +1041,7 @@ svn_wc__node_get_origin(svn_boolean_t *i
                         const char **repos_relpath,
                         const char **repos_root_url,
                         const char **repos_uuid,
+                        svn_depth_t *depth,
                         const char **copy_root_abspath,
                         svn_wc_context_t *wc_ctx,
                         const char *local_abspath,
@@ -1088,7 +1051,7 @@ svn_wc__node_get_origin(svn_boolean_t *i
 {
   return svn_error_trace(svn_wc__internal_get_origin(is_copy, revision,
                            repos_relpath, repos_root_url, repos_uuid,
-                           copy_root_abspath,
+                           depth, copy_root_abspath,
                            wc_ctx->db, local_abspath, scan_deleted,
                            result_pool, scratch_pool));
 }
@@ -1364,16 +1327,22 @@ svn_wc__node_was_moved_away(const char *
                             apr_pool_t *result_pool,
                             apr_pool_t *scratch_pool)
 {
-  svn_boolean_t is_deleted;
+  svn_wc__db_status_t status;
 
   if (moved_to_abspath)
     *moved_to_abspath = NULL;
   if (op_root_abspath)
     *op_root_abspath = NULL;
 
-  SVN_ERR(svn_wc__node_is_status_deleted(&is_deleted, wc_ctx, local_abspath,
-                                         scratch_pool));
-  if (is_deleted)
+  SVN_ERR(svn_wc__db_read_info(&status,
+                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, NULL,
+                               wc_ctx->db, local_abspath,
+                               scratch_pool, scratch_pool));
+
+  if (status == svn_wc__db_status_deleted)
     SVN_ERR(svn_wc__db_scan_deletion(NULL, moved_to_abspath, NULL,
                                      op_root_abspath, wc_ctx->db,
                                      local_abspath,

Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/wc.h?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/wc.h Thu Feb  6 08:45:07 2014
@@ -623,6 +623,7 @@ svn_wc__internal_get_origin(svn_boolean_
                             const char **repos_relpath,
                             const char **repos_root_url,
                             const char **repos_uuid,
+                            svn_depth_t *depth,
                             const char **copy_root_abspath,
                             svn_wc__db_t *db,
                             const char *local_abspath,

Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/wc_db.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_wc/wc_db.c Thu Feb  6 08:45:07 2014
@@ -12143,37 +12143,37 @@ scan_addition(svn_wc__db_status_t *statu
       {
         const char *base_relpath;
 
-    while (TRUE)
-      {
-        const char *tmp;
+        while (TRUE)
+          {
+            const char *tmp;
 
-        SVN_ERR(svn_sqlite__reset(stmt));
+            SVN_ERR(svn_sqlite__reset(stmt));
 
-        /* Pointing at op_depth, look at the parent */
-        repos_prefix_path =
-          svn_relpath_join(svn_relpath_basename(op_root_relpath, NULL),
-                           repos_prefix_path,
-                           scratch_pool);
-        op_root_relpath = svn_relpath_dirname(op_root_relpath, scratch_pool);
+            /* Pointing at op_depth, look at the parent */
+            repos_prefix_path =
+                svn_relpath_join(svn_relpath_basename(op_root_relpath, NULL),
+                                 repos_prefix_path,
+                                 scratch_pool);
+            op_root_relpath = svn_relpath_dirname(op_root_relpath, scratch_pool);
 
 
-        SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, op_root_relpath));
-        SVN_ERR(svn_sqlite__step(&have_row, stmt));
+            SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, op_root_relpath));
+            SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
-        if (! have_row)
-          break;
+            if (! have_row)
+              break;
 
-        op_depth = svn_sqlite__column_int(stmt, 0);
+            op_depth = svn_sqlite__column_int(stmt, 0);
 
-        /* Skip to op_depth */
-        tmp = op_root_relpath;
+            /* Skip to op_depth */
+            tmp = op_root_relpath;
 
-        op_root_relpath = svn_relpath_limit(op_root_relpath, op_depth,
-                                              scratch_pool);
-        repos_prefix_path = svn_relpath_join(
-                              svn_relpath_skip_ancestor(op_root_relpath, tmp),
-                              repos_prefix_path, scratch_pool);
-      }
+            op_root_relpath = svn_relpath_limit(op_root_relpath, op_depth,
+                                                scratch_pool);
+            repos_prefix_path = svn_relpath_join(
+                                                 svn_relpath_skip_ancestor(op_root_relpath, tmp),
+                                                 repos_prefix_path, scratch_pool);
+          }
 
       SVN_ERR(svn_sqlite__reset(stmt));
 

Modified: subversion/branches/fsfs-ucsnorm/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/mod_authz_svn/mod_authz_svn.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/mod_authz_svn/mod_authz_svn.c Thu Feb  6 08:45:07 2014
@@ -250,7 +250,7 @@ log_access_verdict(LOG_ARGS_SIGNATURE,
                    const request_rec *r, int allowed,
                    const char *repos_path, const char *dest_repos_path)
 {
-  int level = allowed ? APLOG_INFO : APLOG_ERR;
+  int level = allowed ? APLOG_INFO : APLOG_WARNING;
   const char *verdict = allowed ? "granted" : "denied";
 
   if (r->user)

Modified: subversion/branches/fsfs-ucsnorm/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/mod_dav_svn/repos.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/mod_dav_svn/repos.c Thu Feb  6 08:45:07 2014
@@ -3669,7 +3669,7 @@ deliver(const dav_resource *resource, ap
         apr_size_t bufsize = SVN__STREAM_CHUNK_SIZE;
 
         /* read from the FS ... */
-        serr = svn_stream_read(stream, block, &bufsize);
+        serr = svn_stream_read_full(stream, block, &bufsize);
         if (serr != NULL)
           {
             return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,

Modified: subversion/branches/fsfs-ucsnorm/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/svnadmin/svnadmin.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/svnadmin/svnadmin.c Thu Feb  6 08:45:07 2014
@@ -189,6 +189,7 @@ enum svnadmin__cmdline_options_t
     svnadmin__config_dir,
     svnadmin__bypass_hooks,
     svnadmin__bypass_prop_validation,
+    svnadmin__ignore_dates,
     svnadmin__use_pre_commit_hook,
     svnadmin__use_post_commit_hook,
     svnadmin__use_pre_revprop_change_hook,
@@ -235,6 +236,9 @@ static const apr_getopt_option_t options
     {"bypass-prop-validation",  svnadmin__bypass_prop_validation, 0,
      N_("bypass property validation logic")},
 
+    {"ignore-dates",  svnadmin__ignore_dates, 0,
+     N_("ignore revision datestamps found in the stream")},
+
     {"quiet",         'q', 0,
      N_("no progress (only errors to stderr)")},
 
@@ -404,6 +408,7 @@ static const svn_opt_subcommand_desc2_t 
     "If --revision is specified, limit the loaded revisions to only those\n"
     "in the dump stream whose revision numbers match the specified range.\n"),
    {'q', 'r', svnadmin__ignore_uuid, svnadmin__force_uuid,
+    svnadmin__ignore_dates,
     svnadmin__use_pre_commit_hook, svnadmin__use_post_commit_hook,
     svnadmin__parent_dir, svnadmin__bypass_prop_validation, 'M'} },
 
@@ -534,6 +539,7 @@ struct svnadmin_opt_state
   svn_boolean_t keep_going;                         /* --keep-going */
   svn_boolean_t check_normalization;                /* --check-normalization */
   svn_boolean_t bypass_prop_validation;             /* --bypass-prop-validation */
+  svn_boolean_t ignore_dates;                       /* --ignore-dates */
   enum svn_repos_load_uuid uuid_action;             /* --ignore-uuid,
                                                        --force-uuid */
   apr_uint64_t memory_cache_size;                   /* --memory-cache-size M */
@@ -1331,11 +1337,12 @@ subcommand_load(apr_getopt_t *os, void *
   if (! opt_state->quiet)
     notify_baton.feedback_stream = recode_stream_create(stdout, pool);
 
-  err = svn_repos_load_fs4(repos, stdin_stream, lower, upper,
+  err = svn_repos_load_fs5(repos, stdin_stream, lower, upper,
                            opt_state->uuid_action, opt_state->parent_dir,
                            opt_state->use_pre_commit_hook,
                            opt_state->use_post_commit_hook,
                            !opt_state->bypass_prop_validation,
+                           opt_state->ignore_dates,
                            opt_state->quiet ? NULL : repos_notify_handler,
                            &notify_baton, check_cancel, NULL, pool);
   if (err && err->apr_err == SVN_ERR_BAD_PROPERTY_VALUE)
@@ -2468,6 +2475,9 @@ sub_main(int *exit_code, int argc, const
       case svnadmin__bypass_prop_validation:
         opt_state.bypass_prop_validation = TRUE;
         break;
+      case svnadmin__ignore_dates:
+        opt_state.ignore_dates = TRUE;
+        break;
       case svnadmin__clean_logs:
         opt_state.clean_logs = TRUE;
         break;

Modified: subversion/branches/fsfs-ucsnorm/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/svnmucc/svnmucc.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/svnmucc/svnmucc.c Thu Feb  6 08:45:07 2014
@@ -43,21 +43,19 @@
 #include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_client.h"
+#include "svn_client_mtcc.h"
 #include "svn_cmdline.h"
 #include "svn_config.h"
 #include "svn_error.h"
 #include "svn_path.h"
 #include "svn_pools.h"
 #include "svn_props.h"
-#include "svn_ra.h"
 #include "svn_string.h"
 #include "svn_subst.h"
 #include "svn_utf.h"
 #include "svn_version.h"
 
 #include "private/svn_cmdline_private.h"
-#include "private/svn_ra_private.h"
-#include "private/svn_string_private.h"
 
 /* Version compatibility check */
 static svn_error_t *

Modified: subversion/branches/fsfs-ucsnorm/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/svnserve/serve.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/svnserve/serve.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/svnserve/serve.c Thu Feb  6 08:45:07 2014
@@ -1587,7 +1587,7 @@ static svn_error_t *get_file(svn_ra_svn_
       while (1)
         {
           len = sizeof(buf);
-          err = svn_stream_read(contents, buf, &len);
+          err = svn_stream_read_full(contents, buf, &len);
           if (err)
             break;
           if (len > 0)
@@ -3877,7 +3877,7 @@ serve_interruptable(svn_boolean_t *termi
 
       /* create the connection, configure ports etc. */
       connection->conn
-        = svn_ra_svn_create_conn3(connection->usock, NULL, NULL,
+        = svn_ra_svn_create_conn4(connection->usock, NULL, NULL,
                                   connection->params->compression_level,
                                   connection->params->zero_copy_limit,
                                   connection->params->error_check_interval,

Modified: subversion/branches/fsfs-ucsnorm/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/svnserve/svnserve.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/svnserve/svnserve.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/svnserve/svnserve.c Thu Feb  6 08:45:07 2014
@@ -276,9 +276,7 @@ static const apr_getopt_option_t svnserv
         "                             "
         "minimize redundant operations.\n"
         "                             "
-        "Default is 128 for threaded and 16 for non-\n"
-        "                             "
-        "threaded mode.\n"
+        "Default is 16.\n"
         "                             "
         "[used for FSFS repositories only]")},
     {"cache-txdeltas", SVNSERVE_OPT_CACHE_TXDELTAS, 1,
@@ -1010,28 +1008,21 @@ sub_main(int *exit_code, int argc, const
     {
       apr_pool_t *connection_pool;
       svn_ra_svn_conn_t *conn;
-      apr_file_t *in_file, *out_file;
+      svn_stream_t *stdin_stream;
+      svn_stream_t *stdout_stream;
 
       params.tunnel = (run_mode == run_mode_tunnel);
       apr_pool_cleanup_register(pool, pool, apr_pool_cleanup_null,
                                 redirect_stdout);
-      status = apr_file_open_stdin(&in_file, pool);
-      if (status)
-        {
-          return svn_error_wrap_apr(status, _("Can't open stdin"));
-        }
 
-      status = apr_file_open_stdout(&out_file, pool);
-      if (status)
-        {
-          return svn_error_wrap_apr(status, _("Can't open stdout"));
-        }
+      SVN_ERR(svn_stream_for_stdin(&stdin_stream, pool));
+      SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool));
 
       /* Use a subpool for the connection to ensure that if SASL is used
        * the pool cleanup handlers that call sasl_dispose() (connection_pool)
        * and sasl_done() (pool) are run in the right order. See issue #3664. */
       connection_pool = svn_pool_create(pool);
-      conn = svn_ra_svn_create_conn3(NULL, in_file, out_file,
+      conn = svn_ra_svn_create_conn4(NULL, stdin_stream, stdout_stream,
                                      params.compression_level,
                                      params.zero_copy_limit,
                                      params.error_check_interval,

Modified: subversion/branches/fsfs-ucsnorm/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/tests/cmdline/diff_tests.py?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/tests/cmdline/diff_tests.py Thu Feb  6 08:45:07 2014
@@ -4696,7 +4696,117 @@ def diff_repo_wc_copies(sbox):
                                      '--show-copies-as-adds',
                                      iota_url, iota_copy)
 
+@Issue(4460)
+def diff_repo_wc_file_props(sbox):
+  "diff repo to wc file target with props"
+  sbox.build()
+  iota = sbox.ospath('iota')
+
+  # add a mime-type and a line to iota to test the binary check
+  sbox.simple_propset('svn:mime-type', 'text/plain', 'iota')
+  sbox.simple_append('iota','second line\n')
+
+  # test that we get the line and the property add
+  expected_output = make_diff_header(iota, 'revision 1', 'working copy') + \
+                    [ '@@ -1 +1,2 @@\n',
+                      " This is the file 'iota'.\n",
+                      "+second line\n", ] + \
+                    make_diff_prop_header(iota) + \
+                    make_diff_prop_added('svn:mime-type', 'text/plain')
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'diff', '-r1', iota)
+
+  # reverse the diff, should get a property delete and line delete
+  expected_output = make_diff_header(iota, 'working copy', 'revision 1') + \
+                    [ '@@ -1,2 +1 @@\n',
+                      " This is the file 'iota'.\n",
+                      "-second line\n", ] + \
+                    make_diff_prop_header(iota) + \
+                    make_diff_prop_deleted('svn:mime-type', 'text/plain')
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'diff', '--old', iota,
+                                     '--new', iota + '@1')
+
+  # copy iota to test with --show-copies as adds
+  sbox.simple_copy('iota', 'iota_copy')
+  iota_copy = sbox.ospath('iota_copy')
+
+  # test that we get all lines as added and the property added
+  # TODO: We only test that this test doesn't error out because of Issue #4464
+  # if and when that issue is fixed this test should check output
+  svntest.actions.run_and_verify_svn(None, None, [], 'diff',
+                                     '--show-copies-as-adds', '-r1', iota_copy)
+
+  # reverse the diff, should get all lines as a delete and no property
+  # TODO: We only test that this test doesn't error out because of Issue #4464
+  # if and when that issue is fixed this test should check output
+  svntest.actions.run_and_verify_svn(None, None, [], 'diff',
+                                     '--show-copies-as-adds',
+                                     '--old', iota_copy,
+                                     '--new', iota + '@1')
 
+  # revert and commit with the eol-style of LF and then update so
+  # that we can see a change on either windows or *nix.
+  sbox.simple_revert('iota', 'iota_copy')
+  sbox.simple_propset('svn:eol-style', 'LF', 'iota')
+  sbox.simple_commit() #r2
+  sbox.simple_update()
+
+  # now that we have a LF file on disk switch to CRLF
+  sbox.simple_propset('svn:eol-style', 'CRLF', 'iota')
+
+  # test that not only the property but also the file changes
+  # i.e. that the line endings substitution works
+  if svntest.main.is_os_windows():
+    # test suite normalizes crlf output into just lf on Windows.
+    # so we have to assume it worked because there is an add and
+    # remove line with the same content.  Fortunately, it does't
+    # do this on *nix so we can be pretty sure that it works right.
+    # TODO: Provide a way to handle this better
+    crlf = '\n'
+  else:
+    crlf = '\r\n'
+  expected_output = make_diff_header(iota, 'revision 1', 'working copy') + \
+                    [ '@@ -1 +1 @@\n',
+                      "-This is the file 'iota'.\n",
+                      "+This is the file 'iota'." + crlf ] + \
+                    make_diff_prop_header(iota) + \
+                    make_diff_prop_added('svn:eol-style', 'CRLF')
+
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'diff', '-r1', iota)
+
+
+@Issue(4460)
+def diff_repo_repo_added_file_mime_type(sbox):
+    "diff repo to repo added file with mime-type"
+    sbox.build()
+    wc_dir = sbox.wc_dir
+    newfile = sbox.ospath('newfile')
+
+    # add a file with a mime-type
+    sbox.simple_append('newfile', "This is the file 'newfile'.\n")
+    sbox.simple_add('newfile')
+    sbox.simple_propset('svn:mime-type', 'text/plain', 'newfile')
+    sbox.simple_commit() # r2
+
+    # try to diff across the addition
+    expected_output = make_diff_header(newfile, 'revision 0', 'revision 2') + \
+                      [ '@@ -0,0 +1 @@\n',
+                        "+This is the file 'newfile'.\n" ] + \
+                      make_diff_prop_header(newfile) + \
+                      make_diff_prop_added('svn:mime-type', 'text/plain')
+
+    svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff',
+                                       '-r1:2', newfile)
+
+    # reverse the diff to diff across a deletion
+    # Note no property delete is printed when whole file is deleted
+    expected_output = make_diff_header(newfile, 'revision 2', 'revision 1') + \
+                      [ '@@ -1, +0,0 @@\n',
+                        "-This is the file 'newfile'.\n" ]
+    svntest.actions.run_and_verify_svn(None, None, [], 'diff',
+                                       '-r2:1', newfile)
 
 ########################################################################
 #Run the tests
@@ -4781,6 +4891,8 @@ test_list = [ None,
               diff_local_missing_obstruction,
               diff_move_inside_copy,
               diff_repo_wc_copies,
+              diff_repo_wc_file_props,
+              diff_repo_repo_added_file_mime_type,
               ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fsfs-ucsnorm/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/tests/cmdline/svnadmin_tests.py?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/tests/cmdline/svnadmin_tests.py Thu Feb  6 08:45:07 2014
@@ -26,11 +26,12 @@
 
 # General modules
 import os
+import logging
 import re
 import shutil
 import sys
 import threading
-import logging
+import time
 
 logger = logging.getLogger()
 
@@ -2242,6 +2243,36 @@ def fsfs_hotcopy_old_non_empty(sbox):
   check_hotcopy_fsfs(sbox.repo_dir, backup_dir)
 
 
+def load_ignore_dates(sbox):
+  "svnadmin load --ignore-dates"
+
+  # All revisions in the loaded repository should come after this time.
+  start_time = time.localtime()
+  time.sleep(1)
+  
+  sbox.build(create_wc=False)
+  svntest.main.safe_rmtree(sbox.repo_dir, True)
+  svntest.main.create_repos(sbox.repo_dir)
+
+  dumpfile_skeleton = open(os.path.join(os.path.dirname(sys.argv[0]),
+                                        'svnadmin_tests_data',
+                                        'skeleton_repos.dump')).read()
+
+  load_dumpstream(sbox, dumpfile_skeleton, '--ignore-dates')
+  svntest.actions.run_and_verify_svnlook("Unexpected output", ['6\n'],
+                                         None, 'youngest', sbox.repo_dir)
+  for rev in range(6):
+    exit_code, output, errput = svntest.main.run_svnlook('date', '-r', rev,
+                                                         sbox.repo_dir)
+    if errput:
+      raise SVNUnexpectedStderr(errput)
+    rev_time = time.strptime(output[0].rstrip()[:19], '%Y-%m-%d %H:%M:%S')
+    if rev_time < start_time:
+      raise svntest.Failure("Revision time for r%d older than load start time\n"
+                            "    rev_time: %s\n"
+                            "  start_time: %s"
+                            % (rev, str(rev_time), str(start_time)))
+
 ########################################################################
 # Run the tests
 
@@ -2283,6 +2314,7 @@ test_list = [ None,
               verify_denormalized_names,
               fsfs_recover_old_non_empty,
               fsfs_hotcopy_old_non_empty,
+              load_ignore_dates,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fsfs-ucsnorm/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/tests/cmdline/svntest/main.py?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/tests/cmdline/svntest/main.py Thu Feb  6 08:45:07 2014
@@ -942,7 +942,8 @@ def create_repos(path, minor_version = N
 
   if options.fs_type is None or options.fs_type == 'fsfs':
     # fsfs.conf file
-    if options.config_file is not None:
+    if options.config_file is not None and \
+       (not minor_version or minor_version >= 6):
       shutil.copy(options.config_file, get_fsfs_conf_file_path(path))
 
     # format file

Modified: subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_client/client-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_client/client-test.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_client/client-test.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_client/client-test.c Thu Feb  6 08:45:07 2014
@@ -31,6 +31,7 @@
 #include "../../libsvn_client/client.h"
 #include "svn_pools.h"
 #include "svn_client.h"
+#include "svn_client_mtcc.h"
 #include "svn_repos.h"
 #include "svn_subst.h"
 #include "private/svn_wc_private.h"

Modified: subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_client/mtcc-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_client/mtcc-test.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_client/mtcc-test.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_client/mtcc-test.c Thu Feb  6 08:45:07 2014
@@ -21,15 +21,10 @@
  * ====================================================================
  */
 
-#define SVN_DEPRECATED
-
-#include "svn_mergeinfo.h"
 #include "svn_pools.h"
 #include "svn_props.h"
 #include "svn_client.h"
-#include "svn_repos.h"
-#include "svn_subst.h"
-#include "private/svn_wc_private.h"
+#include "svn_client_mtcc.h"
 
 #include "../svn_test.h"
 #include "../svn_test_fs.h"

Modified: subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_ra/ra-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_ra/ra-test.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_ra/ra-test.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_ra/ra-test.c Thu Feb  6 08:45:07 2014
@@ -26,7 +26,7 @@
 #include <apr_general.h>
 #include <apr_pools.h>
 #include <apr_file_io.h>
-
+#include <assert.h>
 #define SVN_DEPRECATED
 
 #include "svn_error.h"
@@ -108,11 +108,16 @@ check_tunnel(void *tunnel_baton, const c
   return last_tunnel_check;
 }
 
+static void
+close_tunnel(void *tunnel_context, void *tunnel_baton);
+
 static svn_error_t *
-open_tunnel(apr_file_t **request, apr_file_t **response,
-            void **tunnel_context, void *tunnel_baton,
+open_tunnel(svn_stream_t **request, svn_stream_t **response,
+            svn_ra_close_tunnel_func_t *close_func, void **close_baton,
+            void *tunnel_baton,
             const char *tunnel_name, const char *user,
             const char *hostname, int port,
+            svn_cancel_func_t cancel_func, void *cancel_baton,
             apr_pool_t *pool)
 {
   svn_node_kind_t kind;
@@ -158,22 +163,20 @@ open_tunnel(apr_file_t **request, apr_fi
   apr_file_inherit_unset(proc->in);
   apr_file_inherit_unset(proc->out);
 
-  *request = proc->in;
-  *response = proc->out;
-  open_tunnel_context = *tunnel_context = &kind;
+  *request = svn_stream_from_aprfile2(proc->in, FALSE, pool);
+  *response = svn_stream_from_aprfile2(proc->out, FALSE, pool);
+  *close_func = close_tunnel;
+  open_tunnel_context = *close_baton = &last_tunnel_check;
   ++tunnel_open_count;
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *
-close_tunnel(void *tunnel_context, void *tunnel_baton,
-             const char *tunnel_name, const char *user,
-             const char *hostname, int port)
+static void
+close_tunnel(void *tunnel_context, void *tunnel_baton)
 {
-  SVN_TEST_ASSERT(tunnel_context == open_tunnel_context);
-  SVN_TEST_ASSERT(tunnel_baton == check_tunnel_baton);
+  assert(tunnel_context == open_tunnel_context);
+  assert(tunnel_baton == check_tunnel_baton);
   --tunnel_open_count;
-  return SVN_NO_ERROR;
 }
 
 
@@ -255,7 +258,6 @@ check_tunnel_callback_test(const svn_tes
   SVN_ERR(svn_ra_create_callbacks(&cbtable, pool));
   cbtable->check_tunnel_func = check_tunnel;
   cbtable->open_tunnel_func = open_tunnel;
-  cbtable->close_tunnel_func = close_tunnel;
   cbtable->tunnel_baton = check_tunnel_baton = &cbtable;
   SVN_ERR(svn_cmdline_create_auth_baton(&cbtable->auth_baton,
                                         TRUE  /* non_interactive */,
@@ -293,7 +295,6 @@ tunel_callback_test(const svn_test_opts_
   SVN_ERR(svn_ra_create_callbacks(&cbtable, pool));
   cbtable->check_tunnel_func = check_tunnel;
   cbtable->open_tunnel_func = open_tunnel;
-  cbtable->close_tunnel_func = close_tunnel;
   cbtable->tunnel_baton = check_tunnel_baton = &cbtable;
   SVN_ERR(svn_cmdline_create_auth_baton(&cbtable->auth_baton,
                                         TRUE  /* non_interactive */,

Modified: subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_subr/spillbuf-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_subr/spillbuf-test.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_subr/spillbuf-test.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_subr/spillbuf-test.c Thu Feb  6 08:45:07 2014
@@ -350,7 +350,7 @@ test_spillbuf_stream(apr_pool_t *pool)
   /* now: two blocks: 8 and 4 bytes  */
 
   readlen = 8;
-  SVN_ERR(svn_stream_read(stream, readbuf, &readlen));
+  SVN_ERR(svn_stream_read_full(stream, readbuf, &readlen));
   SVN_TEST_ASSERT(readlen == 8
                   && memcmp(readbuf, "abcdefgh", 8) == 0);
   /* now: one block: 4 bytes  */
@@ -358,7 +358,7 @@ test_spillbuf_stream(apr_pool_t *pool)
   SVN_ERR(svn_stream_write(stream, "mnopqr", &writelen));
   /* now: two blocks: 8 and 2 bytes  */
 
-  SVN_ERR(svn_stream_read(stream, readbuf, &readlen));
+  SVN_ERR(svn_stream_read_full(stream, readbuf, &readlen));
   SVN_TEST_ASSERT(readlen == 8
                   && memcmp(readbuf, "ijklmnop", 8) == 0);
   /* now: one block: 2 bytes  */
@@ -368,14 +368,14 @@ test_spillbuf_stream(apr_pool_t *pool)
   SVN_ERR(svn_stream_write(stream, "GHIJKL", &writelen));
   /* now: two blocks: 8 and 6 bytes, and 6 bytes spilled to a file  */
 
-  SVN_ERR(svn_stream_read(stream, readbuf, &readlen));
+  SVN_ERR(svn_stream_read_full(stream, readbuf, &readlen));
   SVN_TEST_ASSERT(readlen == 8
                   && memcmp(readbuf, "qrstuvwx", 8) == 0);
   readlen = 6;
-  SVN_ERR(svn_stream_read(stream, readbuf, &readlen));
+  SVN_ERR(svn_stream_read_full(stream, readbuf, &readlen));
   SVN_TEST_ASSERT(readlen == 6
                   && memcmp(readbuf, "ABCDEF", 6) == 0);
-  SVN_ERR(svn_stream_read(stream, readbuf, &readlen));
+  SVN_ERR(svn_stream_read_full(stream, readbuf, &readlen));
   SVN_TEST_ASSERT(readlen == 6
                   && memcmp(readbuf, "GHIJKL", 6) == 0);
 

Modified: subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_subr/stream-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_subr/stream-test.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_subr/stream-test.c Thu Feb  6 08:45:07 2014
@@ -73,7 +73,7 @@ test_stream_from_string(apr_pool_t *pool
       while (len == TEST_BUF_SIZE)
         {
           /* Read a chunk ... */
-          SVN_ERR(svn_stream_read(stream, buffer, &len));
+          SVN_ERR(svn_stream_read_full(stream, buffer, &len));
 
           /* ... and append the chunk to the stringbuf. */
           svn_stringbuf_appendbytes(outbuf, buffer, len);
@@ -206,7 +206,7 @@ test_stream_compressed(apr_pool_t *pool)
       while (len >= TEST_BUF_SIZE)
         {
           len = TEST_BUF_SIZE;
-          SVN_ERR(svn_stream_read(stream, buf, &len));
+          SVN_ERR(svn_stream_read_full(stream, buf, &len));
           if (len > 0)
             svn_stringbuf_appendbytes(inbuf, buf, len);
         }
@@ -332,17 +332,17 @@ test_stream_seek_stringbuf(apr_pool_t *p
   stringbuf = svn_stringbuf_create("OneTwo", pool);
   stream = svn_stream_from_stringbuf(stringbuf, pool);
   len = 3;
-  SVN_ERR(svn_stream_read(stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(stream, buf, &len));
   buf[3] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "One");
   SVN_ERR(svn_stream_mark(stream, &mark, pool));
   len = 3;
-  SVN_ERR(svn_stream_read(stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(stream, buf, &len));
   buf[3] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "Two");
   SVN_ERR(svn_stream_seek(stream, mark));
   len = 3;
-  SVN_ERR(svn_stream_read(stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(stream, buf, &len));
   buf[3] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "Two");
 
@@ -351,7 +351,7 @@ test_stream_seek_stringbuf(apr_pool_t *p
   SVN_ERR(svn_stream_skip(stream, 2));
   /* The remaining line should be empty */
   len = 3;
-  SVN_ERR(svn_stream_read(stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(stream, buf, &len));
   buf[len] = '\0';
   SVN_TEST_ASSERT(len == 1);
   SVN_TEST_STRING_ASSERT(buf, "o");
@@ -381,7 +381,7 @@ test_stream_seek_translated(apr_pool_t *
                                                   FALSE, keywords, TRUE, pool);
   /* Seek from outside of keyword to inside of keyword. */
   len = 25;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 25);
   buf[25] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "One$MyKeyword: my keyword");
@@ -389,7 +389,7 @@ test_stream_seek_translated(apr_pool_t *
   SVN_ERR(svn_stream_reset(translated_stream));
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   len = 4;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 4);
   buf[4] = '\0';
   SVN_TEST_STRING_ASSERT(buf, " was");
@@ -397,7 +397,7 @@ test_stream_seek_translated(apr_pool_t *
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   SVN_ERR(svn_stream_skip(translated_stream, 2));
   len = 2;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 2);
   buf[len] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "as");
@@ -405,13 +405,13 @@ test_stream_seek_translated(apr_pool_t *
   /* Seek from inside of keyword to inside of keyword. */
   SVN_ERR(svn_stream_mark(translated_stream, &mark, pool));
   len = 9;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 9);
   buf[9] = '\0';
   SVN_TEST_STRING_ASSERT(buf, " expanded");
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   len = 9;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 9);
   buf[9] = '\0';
   SVN_TEST_STRING_ASSERT(buf, " expanded");
@@ -419,7 +419,7 @@ test_stream_seek_translated(apr_pool_t *
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   SVN_ERR(svn_stream_skip(translated_stream, 6));
   len = 3;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 3);
   buf[len] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "ded");
@@ -427,13 +427,13 @@ test_stream_seek_translated(apr_pool_t *
   /* Seek from inside of keyword to outside of keyword. */
   SVN_ERR(svn_stream_mark(translated_stream, &mark, pool));
   len = 4;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 4);
   buf[4] = '\0';
   SVN_TEST_STRING_ASSERT(buf, " $Tw");
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   len = 4;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 4);
   buf[4] = '\0';
   SVN_TEST_STRING_ASSERT(buf, " $Tw");
@@ -441,7 +441,7 @@ test_stream_seek_translated(apr_pool_t *
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   SVN_ERR(svn_stream_skip(translated_stream, 2));
   len = 2;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 2);
   buf[len] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "Tw");
@@ -449,13 +449,13 @@ test_stream_seek_translated(apr_pool_t *
   /* Seek from outside of keyword to outside of keyword. */
   SVN_ERR(svn_stream_mark(translated_stream, &mark, pool));
   len = 1;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 1);
   buf[1] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "o");
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   len = 1;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 1);
   buf[1] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "o");
@@ -463,7 +463,7 @@ test_stream_seek_translated(apr_pool_t *
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   SVN_ERR(svn_stream_skip(translated_stream, 2));
   len = 1;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 0);
   buf[len] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "");
@@ -524,7 +524,7 @@ test_stream_compressed_empty_file(apr_po
                                  pool, pool));
   stream = svn_stream_compressed(empty_file_stream, pool);
   len = sizeof(buf);
-  SVN_ERR(svn_stream_read(stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(stream, buf, &len));
   if (len > 0)
     return svn_error_create(SVN_ERR_TEST_FAILED, NULL,
                             "Got unexpected result.");

Modified: subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_wc/pristine-store-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_wc/pristine-store-test.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_wc/pristine-store-test.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_wc/pristine-store-test.c Thu Feb  6 08:45:07 2014
@@ -242,7 +242,7 @@ pristine_delete_while_open(const svn_tes
     char buffer[4];
     apr_size_t len = 4;
 
-    SVN_ERR(svn_stream_read(contents, buffer, &len));
+    SVN_ERR(svn_stream_read_full(contents, buffer, &len));
     SVN_TEST_ASSERT(len == 4);
     SVN_TEST_ASSERT(memcmp(buffer, data, len) == 0);
   }

Modified: subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_wc/utils.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_wc/utils.c Thu Feb  6 08:45:07 2014
@@ -172,7 +172,8 @@ sbox_wc_add(svn_test__sandbox_t *b, cons
   parent_abspath = svn_dirent_dirname(path, b->pool);
   SVN_ERR(svn_wc__acquire_write_lock(NULL, b->wc_ctx, parent_abspath, FALSE,
                                      b->pool, b->pool));
-  SVN_ERR(svn_wc_add_from_disk2(b->wc_ctx, path, NULL /*props*/,
+  SVN_ERR(svn_wc_add_from_disk3(b->wc_ctx, path, NULL /*props*/,
+                                FALSE /* skip checks */,
                                 NULL, NULL, b->pool));
   SVN_ERR(svn_wc__release_write_lock(b->wc_ctx, parent_abspath, b->pool));
   return SVN_NO_ERROR;

Modified: subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_wc/wc-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_wc/wc-test.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_wc/wc-test.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/tests/libsvn_wc/wc-test.c Thu Feb  6 08:45:07 2014
@@ -182,6 +182,7 @@ test_node_get_origin(const svn_test_opts
 
         SVN_ERR(svn_wc__node_get_origin(NULL, &revision, &repos_relpath,
                                         &repos_root_url, &repos_uuid, NULL,
+                                        NULL,
                                         b->wc_ctx, local_abspath, FALSE,
                                         b->pool, b->pool));
         SVN_TEST_ASSERT(revision == subtest->origin.rev);

Modified: subversion/branches/fsfs-ucsnorm/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/tests/svn_test_fs.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/fsfs-ucsnorm/subversion/tests/svn_test_fs.c Thu Feb  6 08:45:07 2014
@@ -282,7 +282,7 @@ svn_test__stream_to_string(svn_stringbuf
   do
     {
       len = sizeof(buf);
-      SVN_ERR(svn_stream_read(stream, buf, &len));
+      SVN_ERR(svn_stream_read_full(stream, buf, &len));
 
       /* Now copy however many bytes were *actually* read into str. */
       svn_stringbuf_appendbytes(str, buf, len);

Modified: subversion/branches/fsfs-ucsnorm/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/tools/dev/unix-build/Makefile.svn?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/fsfs-ucsnorm/tools/dev/unix-build/Makefile.svn Thu Feb  6 08:45:07 2014
@@ -66,7 +66,7 @@ OBJDIR		= $(PWD)/objdir
 
 BDB_MAJOR_VER	= 4.7
 BDB_VER		= $(BDB_MAJOR_VER).25
-APR_VER		= 1.4.6
+APR_VER		= 1.4.8
 APR_ICONV_VER	= 1.2.1
 GNU_ICONV_VER	= 1.14
 APR_UTIL_VER	= 1.4.1

Modified: subversion/branches/fsfs-ucsnorm/tools/server-side/fsfs-stats.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/tools/server-side/fsfs-stats.c?rev=1565116&r1=1565115&r2=1565116&view=diff
==============================================================================
--- subversion/branches/fsfs-ucsnorm/tools/server-side/fsfs-stats.c (original)
+++ subversion/branches/fsfs-ucsnorm/tools/server-side/fsfs-stats.c Thu Feb  6 08:45:07 2014
@@ -910,7 +910,7 @@ read_windows(apr_array_header_t **window
   content->data += 3;
   content->len -= 3;
   stream = svn_stream_from_stringbuf(content, pool);
-  SVN_ERR(svn_stream_read(stream, &version, &len));
+  SVN_ERR(svn_stream_read_full(stream, &version, &len));
 
   /* read the windows from that stream */
   while (TRUE)
@@ -921,7 +921,7 @@ read_windows(apr_array_header_t **window
 
       len = sizeof(dummy);
       SVN_ERR(svn_stream_mark(stream, &mark, pool));
-      SVN_ERR(svn_stream_read(stream, &dummy, &len));
+      SVN_ERR(svn_stream_read_full(stream, &dummy, &len));
       if (len == 0)
         break;