You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/11/30 11:24:23 UTC

svn commit: r1717223 [49/50] - in /subversion/branches/ra-git: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/hook-scripts/ notes/ notes/api-errata/1.9/ notes/move-tracking/ subversion/ subversion/bindings/ctypes-python/...

Modified: subversion/branches/ra-git/subversion/tests/libsvn_subr/config-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/libsvn_subr/config-test.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/libsvn_subr/config-test.c (original)
+++ subversion/branches/ra-git/subversion/tests/libsvn_subr/config-test.c Mon Nov 30 10:24:16 2015
@@ -367,6 +367,39 @@ test_expand(const svn_test_opts_t *opts,
      of "c" was not created in a temporary pool when expanding "g". */
   SVN_TEST_STRING_ASSERT(val, "bar");
 
+  /* Get expanded "j" and "k" which have cyclic definitions.
+   * They must return empty values. */
+  svn_config_get(cfg, &val, "section1", "j", NULL);
+  SVN_TEST_STRING_ASSERT(val, "");
+  svn_config_get(cfg, &val, "section1", "k", NULL);
+  SVN_TEST_STRING_ASSERT(val, "");
+
+  /* Get expanded "l" which depends on a cyclic definition.
+   * So, it also considered "undefined" and will be normalized to "". */
+  svn_config_get(cfg, &val, "section1", "l", NULL);
+  SVN_TEST_STRING_ASSERT(val, "");
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_invalid_bom(apr_pool_t *pool)
+{
+  svn_config_t *cfg;
+  svn_error_t *err;
+  svn_string_t *cfg_string;
+  svn_stream_t *stream;
+
+  cfg_string = svn_string_create("\xEF", pool);
+  stream = svn_stream_from_string(cfg_string, pool);
+  err = svn_config_parse(&cfg, stream, TRUE, TRUE, pool);
+  SVN_TEST_ASSERT_ERROR(err, SVN_ERR_MALFORMED_FILE);
+
+  cfg_string = svn_string_create("\xEF\xBB", pool);
+  stream = svn_stream_from_string(cfg_string, pool);
+  err = svn_config_parse(&cfg, stream, TRUE, TRUE, pool);
+  SVN_TEST_ASSERT_ERROR(err, SVN_ERR_MALFORMED_FILE);
+
   return SVN_NO_ERROR;
 }
 
@@ -402,6 +435,8 @@ static struct svn_test_descriptor_t test
                        "test r/o mode"),
     SVN_TEST_OPTS_PASS(test_expand,
                        "test variable expansion"),
+    SVN_TEST_PASS2(test_invalid_bom,
+                   "test parsing config file with invalid BOM"),
     SVN_TEST_NULL
   };
 

Modified: subversion/branches/ra-git/subversion/tests/libsvn_subr/config-test.cfg
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/libsvn_subr/config-test.cfg?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/libsvn_subr/config-test.cfg (original)
+++ subversion/branches/ra-git/subversion/tests/libsvn_subr/config-test.cfg Mon Nov 30 10:24:16 2015
@@ -40,6 +40,11 @@ g=lyrical %(c)sd
 h=  %(unterminated
 # Multiple expansions
 i=%(a)s %(b)s
+# Recursive two-level variable expansion with surrounding text
+j=some %(k)scle
+k=c%(j)sy
+# Depends on a cyclic definition
+l=depends on a %(j)scycle!
 
 [UpperCaseSection]
 a=Aa

Modified: subversion/branches/ra-git/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/ra-git/subversion/tests/libsvn_subr/dirent_uri-test.c Mon Nov 30 10:24:16 2015
@@ -904,16 +904,36 @@ static const testcase_canonicalize_t uri
     { "https://[::1]:443",     "https://[::1]" },
     { "http://[FACE:B00C::]/s","http://[face:b00c::]/s" },
     { "svn+ssh://b@[1:2::3]/s","svn+ssh://b@[1:2::3]/s" },
+    { "file:///A%2f%2Fb%2fc",  "file:///A/b/c"},
+    { "file:///A%2fb%2f%2Fc",  "file:///A/b/c"},
 #ifdef SVN_USE_DOS_PATHS
     { "file:///c:/temp/repos", "file:///C:/temp/repos" },
     { "file:///c:/temp/REPOS", "file:///C:/temp/REPOS" },
     { "file:///C:/temp/REPOS", "file:///C:/temp/REPOS" },
     { "file:///c:/",           "file:///C:" },
+    { "file:///c:%2ftemp",     "file:///C:/temp"},
+    { "file:///C:hi",          "file:///C:hi" },
+    { "file:///c:hi",          "file:///C:hi" },
+    { "file:///C:hi/Q",        "file:///C:hi/Q" },
+    { "file:///c:hi/q",        "file:///C:hi/q" },
+    { "file:///c:hi%2fD",      "file:///C:hi/D" },
+    { "file:///c:hi%25/A",     "file:///C:hi%25/A"},
+    { "file:///c:hi%2E/A",     "file:///C:hi./A"},
+    { "file:///c:hi%/A",       "file:///C:hi%25/A"},
 #else /* !SVN_USE_DOS_PATHS */
     { "file:///c:/temp/repos", "file:///c:/temp/repos" },
     { "file:///c:/temp/REPOS", "file:///c:/temp/REPOS" },
     { "file:///C:/temp/REPOS", "file:///C:/temp/REPOS" },
     { "file:///c:/",           "file:///c:" },
+    { "file:///c:%2ftemp",     "file:///c:/temp"},
+    { "file:///C:hi",          "file:///C:hi" },
+    { "file:///c:hi",          "file:///c:hi" },
+    { "file:///C:hi/Q",        "file:///C:hi/Q" },
+    { "file:///c:hi/q",        "file:///c:hi/q" },
+    { "file:///c:hi%2fD",      "file:///c:hi/D" },
+    { "file:///c:hi%25/A",     "file:///c:hi%25/A" },
+    { "file:///c:hi%2E/A",     "file:///c:hi./A"},
+    { "file:///c:hi%/A",       "file:///c:hi%25/A"},
 #endif /* SVN_USE_DOS_PATHS */
     /* Hostnames that look like non-canonical paths */
     { "file://./foo",             "file://./foo" },
@@ -2332,6 +2352,25 @@ test_dirent_from_file_url(apr_pool_t *po
     { "file:///A%7C",              "A:/" },
     { "file:///A%7C/dir",          "A:/dir" },
     { "file:///A%7Cdir",           "A:dir" },
+    { "file:///A%7C%5Cdir",        "A:/dir" },
+    { "file:///A%7C%5Cdir%5Cfile", "A:/dir\\file" },
+    { "file:///A:%5Cdir",          "A:/dir" },
+    { "file:///A:%5Cdir%5Cfile",   "A:/dir\\file" },
+    { "file://localhost/A:%5Cfile","A:/file"},
+    { "file://localhost/A:file",   "A:file"}
+#else
+    { "file:///A:",                "/A:" },
+    { "file:///A:/dir",            "/A:/dir" },
+    { "file:///A:dir",             "/A:dir" },
+    { "file:///A%7C",              "/A|" },
+    { "file:///A%7C/dir",          "/A|/dir" },
+    { "file:///A%7Cdir",           "/A|dir" },
+    { "file:///A%7C%5Cdir",        "/A|\\dir" },
+    { "file:///A%7C%5Cdir%5Cfile", "/A|\\dir\\file" },
+    { "file:///A:%5Cdir",          "/A:\\dir" },
+    { "file:///A:%5Cdir%5Cfile",   "/A:\\dir\\file" },
+    { "file://localhost/A:%5Cfile","/A:\\file" },
+    { "file://localhost/A:file",   "/A:file" }
 #endif
   };
   int i;
@@ -2347,6 +2386,11 @@ test_dirent_from_file_url(apr_pool_t *po
                                  "svn_uri_get_dirent_from_file_url(\"%s\") "
                                  "returned \"%s\" expected \"%s\"",
                                  tests[i].url, result, tests[i].result);
+      if (!svn_dirent_is_canonical(result, pool))
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+          "svn_uri_get_dirent_from_file_url(\"%s\") "
+          "returned \"%s\", which is not canonical.",
+          tests[i].url, result);
     }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/ra-git/subversion/tests/libsvn_subr/hashdump-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/libsvn_subr/hashdump-test.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/libsvn_subr/hashdump-test.c (original)
+++ subversion/branches/ra-git/subversion/tests/libsvn_subr/hashdump-test.c Mon Nov 30 10:24:16 2015
@@ -168,6 +168,67 @@ test3(apr_pool_t *pool)
 }
 
 
+static const char *
+hash_gets_stringt(apr_hash_t *ht, const char *key)
+{
+  svn_string_t *str = svn_hash_gets(ht, key);
+  if (str)
+    return str->data;
+  else
+    return NULL;
+}
+
+static svn_error_t *
+read_hash_buffered_test(apr_pool_t *pool)
+{
+  apr_file_t *file;
+  apr_hash_t *ht;
+
+  /* Write hash table to file. */
+  ht = apr_hash_make(pool);
+  svn_hash_sets(ht, "key1", svn_string_create("value1", pool));
+  svn_hash_sets(ht, "key2", svn_string_create("value2", pool));
+  svn_hash_sets(ht, "key3", svn_string_create("value3", pool));
+  svn_hash_sets(ht, "key4", svn_string_create("value4", pool));
+  svn_hash_sets(ht, "key5", svn_string_create("value5", pool));
+  svn_hash_sets(ht, "key6", svn_string_create("value6", pool));
+  svn_hash_sets(ht, "key7", svn_string_create("value7", pool));
+  svn_hash_sets(ht, "key8", svn_string_create("value8", pool));
+
+  SVN_ERR(svn_io_file_open(&file, "hashdump.out",
+                           APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_BUFFERED,
+                           APR_OS_DEFAULT, pool));
+
+  SVN_ERR(svn_hash_write2(ht, svn_stream_from_aprfile2(file, FALSE, pool),
+                          SVN_HASH_TERMINATOR, pool));
+
+  SVN_ERR(svn_io_file_close(file, pool));
+
+  /* Read hash table using buffered APR file. */
+  ht = apr_hash_make(pool);
+  SVN_ERR(svn_io_file_open(&file, "hashdump.out",
+                           APR_FOPEN_READ | APR_FOPEN_BUFFERED,
+                           APR_OS_DEFAULT, pool));
+  SVN_ERR(svn_hash_read2(ht, svn_stream_from_aprfile(file, pool),
+                         SVN_HASH_TERMINATOR, pool));
+  SVN_ERR(svn_io_file_close(file, pool));
+
+  /* Check result. */
+  SVN_TEST_STRING_ASSERT(hash_gets_stringt(ht, "key1"), "value1");
+  SVN_TEST_STRING_ASSERT(hash_gets_stringt(ht, "key2"), "value2");
+  SVN_TEST_STRING_ASSERT(hash_gets_stringt(ht, "key3"), "value3");
+  SVN_TEST_STRING_ASSERT(hash_gets_stringt(ht, "key4"), "value4");
+  SVN_TEST_STRING_ASSERT(hash_gets_stringt(ht, "key5"), "value5");
+  SVN_TEST_STRING_ASSERT(hash_gets_stringt(ht, "key6"), "value6");
+  SVN_TEST_STRING_ASSERT(hash_gets_stringt(ht, "key7"), "value7");
+  SVN_TEST_STRING_ASSERT(hash_gets_stringt(ht, "key8"), "value8");
+
+  SVN_TEST_ASSERT(apr_hash_count(ht) == 8);
+
+  SVN_ERR(svn_io_remove_file2("hashdump.out", TRUE, pool));
+
+  return SVN_NO_ERROR;
+}
 
 
 /*
@@ -189,6 +250,8 @@ static struct svn_test_descriptor_t test
                    "read a file into a hash"),
     SVN_TEST_PASS2(test3,
                    "write hash out, read back in, compare"),
+    SVN_TEST_PASS2(read_hash_buffered_test,
+                   "read hash from buffered file"),
     SVN_TEST_NULL
   };
 

Modified: subversion/branches/ra-git/subversion/tests/libsvn_subr/io-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/libsvn_subr/io-test.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/libsvn_subr/io-test.c (original)
+++ subversion/branches/ra-git/subversion/tests/libsvn_subr/io-test.c Mon Nov 30 10:24:16 2015
@@ -30,8 +30,10 @@
 
 #include "svn_pools.h"
 #include "svn_string.h"
+#include "svn_io.h"
 #include "private/svn_skel.h"
 #include "private/svn_dep_compat.h"
+#include "private/svn_io_private.h"
 
 #include "../svn_test.h"
 #include "../svn_test_fs.h"
@@ -737,7 +739,186 @@ ignore_enoent(apr_pool_t *pool)
   return SVN_NO_ERROR;
 }
 
-
+static svn_error_t *
+test_install_stream_to_longpath(apr_pool_t *pool)
+{
+  const char *tmp_dir;
+  const char *final_abspath;
+  const char *deep_dir;
+  svn_stream_t *stream;
+  svn_stringbuf_t *actual_content;
+  int i;
+
+  /* Create an empty directory. */
+  SVN_ERR(svn_dirent_get_absolute(&tmp_dir, "test_install_stream_to_longpath",
+                                  pool));
+  SVN_ERR(svn_io_remove_dir2(tmp_dir, TRUE, NULL, NULL, pool));
+  SVN_ERR(svn_io_make_dir_recursively(tmp_dir, pool));
+  svn_test_add_dir_cleanup(tmp_dir);
+
+  deep_dir = tmp_dir;
+
+  /* Generate very long path (> 260 symbols) */
+  for (i = 0; i < 26; i++)
+    {
+      deep_dir = svn_dirent_join(deep_dir, "1234567890", pool);
+      SVN_ERR(svn_io_make_dir_recursively(deep_dir, pool));
+    }
+
+  final_abspath = svn_dirent_join(deep_dir, "stream1", pool);
+  SVN_ERR(svn_stream__create_for_install(&stream, deep_dir, pool, pool));
+  SVN_ERR(svn_stream_puts(stream, "stream1 content"));
+  SVN_ERR(svn_stream_close(stream));
+  SVN_ERR(svn_stream__install_stream(stream,
+                                     final_abspath,
+                                     TRUE,
+                                     pool));
+
+  SVN_ERR(svn_stringbuf_from_file2(&actual_content,
+                                   final_abspath,
+                                   pool));
+
+  SVN_TEST_STRING_ASSERT(actual_content->data, "stream1 content");
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_install_stream_over_readonly_file(apr_pool_t *pool)
+{
+  const char *tmp_dir;
+  const char *final_abspath;
+  svn_stream_t *stream;
+  svn_stringbuf_t *actual_content;
+
+  /* Create an empty directory. */
+  SVN_ERR(svn_dirent_get_absolute(&tmp_dir, "test_install_stream_over_readonly_file",
+                                  pool));
+  SVN_ERR(svn_io_remove_dir2(tmp_dir, TRUE, NULL, NULL, pool));
+  SVN_ERR(svn_io_make_dir_recursively(tmp_dir, pool));
+  svn_test_add_dir_cleanup(tmp_dir);
+
+  final_abspath = svn_dirent_join(tmp_dir, "stream1", pool);
+
+  /* Create empty read-only file. */
+  SVN_ERR(svn_io_file_create_empty(final_abspath, pool));
+  SVN_ERR(svn_io_set_file_read_only(final_abspath, FALSE, pool));
+
+  SVN_ERR(svn_stream__create_for_install(&stream, tmp_dir, pool, pool));
+  SVN_ERR(svn_stream_puts(stream, "stream1 content"));
+  SVN_ERR(svn_stream_close(stream));
+  SVN_ERR(svn_stream__install_stream(stream,
+                                     final_abspath,
+                                     TRUE,
+                                     pool));
+
+  SVN_ERR(svn_stringbuf_from_file2(&actual_content,
+                                   final_abspath,
+                                   pool));
+
+  SVN_TEST_STRING_ASSERT(actual_content->data, "stream1 content");
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_file_size_get(apr_pool_t *pool)
+{
+  const char *tmp_dir, *path;
+  apr_file_t *file;
+  svn_filesize_t filesize;
+
+  /* Create an empty directory. */
+  SVN_ERR(svn_dirent_get_absolute(&tmp_dir, "test_file_size_get", pool));
+  SVN_ERR(svn_io_remove_dir2(tmp_dir, TRUE, NULL, NULL, pool));
+  SVN_ERR(svn_io_make_dir_recursively(tmp_dir, pool));
+  svn_test_add_dir_cleanup(tmp_dir);
+
+  /* Path does not exist. */
+  path = svn_dirent_join(tmp_dir, "file", pool);
+
+  /* Create a file.*/
+  SVN_ERR(svn_io_file_open(&file, path,
+                           APR_WRITE | APR_CREATE | APR_BUFFERED,
+                           APR_OS_DEFAULT, pool));
+  SVN_ERR(svn_io_file_size_get(&filesize, file, pool));
+  SVN_TEST_ASSERT(filesize == 0);
+
+  /* Write 8 bytes and check new size. */
+  SVN_ERR(svn_io_file_write_full(file, "12345678", 8, NULL, pool));
+
+  SVN_ERR(svn_io_file_size_get(&filesize, file, pool));
+  SVN_TEST_ASSERT(filesize == 8);
+
+  /* Truncate to 2 bytes. */
+  SVN_ERR(svn_io_file_trunc(file, 2, pool));
+
+  SVN_ERR(svn_io_file_size_get(&filesize, file, pool));
+  SVN_TEST_ASSERT(filesize == 2);
+
+  /* Close the file. */
+  SVN_ERR(svn_io_file_close(file, pool));
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_file_rename2(apr_pool_t *pool)
+{
+  const char *tmp_dir;
+  const char *foo_path;
+  const char *bar_path;
+  svn_stringbuf_t *actual_content;
+  svn_node_kind_t actual_kind;
+
+  /* Create an empty directory. */
+  SVN_ERR(svn_dirent_get_absolute(&tmp_dir, "test_file_rename2", pool));
+  SVN_ERR(svn_io_remove_dir2(tmp_dir, TRUE, NULL, NULL, pool));
+  SVN_ERR(svn_io_make_dir_recursively(tmp_dir, pool));
+  svn_test_add_dir_cleanup(tmp_dir);
+
+  foo_path = svn_dirent_join(tmp_dir, "foo", pool);
+  bar_path = svn_dirent_join(tmp_dir, "bar", pool);
+
+  /* Test 1: Simple file rename. */
+  SVN_ERR(svn_io_file_create(foo_path, "file content", pool));
+
+  SVN_ERR(svn_io_file_rename2(foo_path, bar_path, FALSE, pool));
+
+  SVN_ERR(svn_stringbuf_from_file2(&actual_content, bar_path, pool));
+  SVN_TEST_STRING_ASSERT(actual_content->data, "file content");
+
+  SVN_ERR(svn_io_check_path(foo_path, &actual_kind, pool));
+  SVN_TEST_ASSERT(actual_kind == svn_node_none);
+  SVN_ERR(svn_io_remove_file2(bar_path, FALSE, pool));
+
+  /* Test 2: Rename file with flush_to_disk flag. */
+  SVN_ERR(svn_io_file_create(foo_path, "file content", pool));
+
+  SVN_ERR(svn_io_file_rename2(foo_path, bar_path, TRUE, pool));
+
+  SVN_ERR(svn_stringbuf_from_file2(&actual_content, bar_path, pool));
+  SVN_TEST_STRING_ASSERT(actual_content->data, "file content");
+  SVN_ERR(svn_io_check_path(foo_path, &actual_kind, pool));
+  SVN_TEST_ASSERT(actual_kind == svn_node_none);
+
+  SVN_ERR(svn_io_remove_file2(bar_path, FALSE, pool));
+
+  /* Test 3: Rename file over existing read-only file. */
+  SVN_ERR(svn_io_file_create(foo_path, "file content", pool));
+  SVN_ERR(svn_io_file_create(bar_path, "bar content", pool));
+  SVN_ERR(svn_io_set_file_read_only(bar_path, FALSE, pool));
+
+  SVN_ERR(svn_io_file_rename2(foo_path, bar_path, FALSE, pool));
+
+  SVN_ERR(svn_stringbuf_from_file2(&actual_content, bar_path, pool));
+  SVN_TEST_STRING_ASSERT(actual_content->data, "file content");
+  SVN_ERR(svn_io_check_path(foo_path, &actual_kind, pool));
+  SVN_TEST_ASSERT(actual_kind == svn_node_none);
+  SVN_ERR(svn_io_remove_file2(bar_path, FALSE, pool));
+
+  return SVN_NO_ERROR;
+}
+
 /* The test table.  */
 
 static int max_threads = 3;
@@ -759,6 +940,14 @@ static struct svn_test_descriptor_t test
                    "test aligned seek"),
     SVN_TEST_PASS2(ignore_enoent,
                    "test ignore-enoent"),
+    SVN_TEST_PASS2(test_install_stream_to_longpath,
+                   "test svn_stream__install_stream to long path"),
+    SVN_TEST_PASS2(test_install_stream_over_readonly_file,
+                   "test svn_stream__install_stream over RO file"),
+    SVN_TEST_PASS2(test_file_size_get,
+                   "test svn_io_file_size_get"),
+    SVN_TEST_PASS2(test_file_rename2,
+                   "test svn_io_file_rename2"),
     SVN_TEST_NULL
   };
 

Modified: subversion/branches/ra-git/subversion/tests/libsvn_subr/spillbuf-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/libsvn_subr/spillbuf-test.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/libsvn_subr/spillbuf-test.c (original)
+++ subversion/branches/ra-git/subversion/tests/libsvn_subr/spillbuf-test.c Mon Nov 30 10:24:16 2015
@@ -514,7 +514,7 @@ static svn_error_t *
 test_spillbuf__file_attrs(apr_pool_t *pool, svn_boolean_t spill_all,
                           svn_spillbuf_t *buf)
 {
-  apr_finfo_t finfo;
+  svn_filesize_t filesize;
 
   SVN_ERR(svn_spillbuf__write(buf, "abcdef", 6, pool));
   SVN_ERR(svn_spillbuf__write(buf, "ghijkl", 6, pool));
@@ -528,13 +528,12 @@ test_spillbuf__file_attrs(apr_pool_t *po
   SVN_TEST_ASSERT(svn_spillbuf__get_file(buf) != NULL);
 
   /* The size of the file must match expectations */
-  SVN_ERR(svn_io_file_info_get(&finfo, APR_FINFO_SIZE,
-                               svn_spillbuf__get_file(buf), pool));
+  SVN_ERR(svn_io_file_size_get(&filesize, svn_spillbuf__get_file(buf), pool));
   if (spill_all)
-    SVN_TEST_ASSERT(finfo.size == svn_spillbuf__get_size(buf));
+    SVN_TEST_ASSERT(filesize == svn_spillbuf__get_size(buf));
   else
-    SVN_TEST_ASSERT(finfo.size == (svn_spillbuf__get_size(buf)
-                                   - svn_spillbuf__get_memory_size(buf)));
+    SVN_TEST_ASSERT(filesize == (svn_spillbuf__get_size(buf)
+                                 - svn_spillbuf__get_memory_size(buf)));
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/ra-git/subversion/tests/libsvn_subr/stream-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/libsvn_subr/stream-test.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/branches/ra-git/subversion/tests/libsvn_subr/stream-test.c Mon Nov 30 10:24:16 2015
@@ -32,6 +32,7 @@
 
 #include "../svn_test.h"
 
+/*------------------------ Tests --------------------------- */
 
 static svn_error_t *
 test_stream_from_string(apr_pool_t *pool)
@@ -549,9 +550,27 @@ test_stream_base64(apr_pool_t *pool)
     NULL
   };
 
+  /* Test svn_base64_encode2() with BREAK_LINES=FALSE. */
   stream = svn_stream_from_stringbuf(actual, pool);
   stream = svn_base64_decode(stream, pool);
-  stream = svn_base64_encode(stream, pool);
+  stream = svn_base64_encode2(stream, TRUE, pool);
+
+  for (i = 0; strings[i]; i++)
+    {
+      apr_size_t len = strlen(strings[i]);
+
+      svn_stringbuf_appendbytes(expected, strings[i], len);
+      SVN_ERR(svn_stream_write(stream, strings[i], &len));
+    }
+
+  SVN_ERR(svn_stream_close(stream));
+
+  SVN_TEST_STRING_ASSERT(actual->data, expected->data);
+
+  /* Test svn_base64_encode2() with BREAK_LINES=FALSE. */
+  stream = svn_stream_from_stringbuf(actual, pool);
+  stream = svn_base64_decode(stream, pool);
+  stream = svn_base64_encode2(stream, FALSE, pool);
 
   for (i = 0; strings[i]; i++)
     {
@@ -700,6 +719,32 @@ test_stream_base64_2(apr_pool_t *pool)
   };
   int i;
 
+  /* Test svn_base64_encode2() with BREAK_LINES=TRUE. */
+  for (i = 0; data[i].encoded1; i++)
+    {
+      apr_size_t len1 = strlen(data[i].encoded1);
+
+      svn_stringbuf_t *actual = svn_stringbuf_create_empty(pool);
+      svn_stringbuf_t *expected = svn_stringbuf_create_empty(pool);
+      svn_stream_t *stream = svn_stream_from_stringbuf(actual, pool);
+
+      stream = svn_base64_encode2(stream, TRUE, pool);
+      stream = svn_base64_decode(stream, pool);
+
+      SVN_ERR(svn_stream_write(stream, data[i].encoded1, &len1));
+      svn_stringbuf_appendbytes(expected, data[i].encoded1, len1);
+
+      if (data[i].encoded2)
+        {
+          apr_size_t len2 = strlen(data[i].encoded2);
+          SVN_ERR(svn_stream_write(stream, data[i].encoded2, &len2));
+          svn_stringbuf_appendbytes(expected, data[i].encoded2, len2);
+        }
+
+      SVN_ERR(svn_stream_close(stream));
+    }
+
+  /* Test svn_base64_encode2() with BREAK_LINES=FALSE. */
   for (i = 0; data[i].encoded1; i++)
     {
       apr_size_t len1 = strlen(data[i].encoded1);
@@ -708,7 +753,7 @@ test_stream_base64_2(apr_pool_t *pool)
       svn_stringbuf_t *expected = svn_stringbuf_create_empty(pool);
       svn_stream_t *stream = svn_stream_from_stringbuf(actual, pool);
 
-      stream = svn_base64_encode(stream, pool);
+      stream = svn_base64_encode2(stream, FALSE, pool);
       stream = svn_base64_decode(stream, pool);
 
       SVN_ERR(svn_stream_write(stream, data[i].encoded1, &len1));

Modified: subversion/branches/ra-git/subversion/tests/libsvn_subr/string-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/libsvn_subr/string-test.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/libsvn_subr/string-test.c (original)
+++ subversion/branches/ra-git/subversion/tests/libsvn_subr/string-test.c Mon Nov 30 10:24:16 2015
@@ -634,7 +634,15 @@ test_stringbuf_remove(apr_pool_t *pool)
   SVN_TEST_STRING_ASSERT(a->data, "stell");
 
   svn_stringbuf_remove(a, 1200, 393);
-  return expect_stringbuf_equal(a, "stell", pool);
+  SVN_ERR(expect_stringbuf_equal(a, "stell", pool));
+
+  svn_stringbuf_remove(a, APR_SIZE_MAX, 2);
+  SVN_ERR(expect_stringbuf_equal(a, "stell", pool));
+
+  svn_stringbuf_remove(a, 1, APR_SIZE_MAX);
+  SVN_ERR(expect_stringbuf_equal(a, "s", pool));
+
+  return SVN_NO_ERROR;
 }
 
 static svn_error_t *
@@ -672,6 +680,12 @@ test_stringbuf_replace(apr_pool_t *pool)
                     svn_stringbuf_ncreate("test hello\0-\0world!\0-\0!",
                                           23, pool)));
 
+  svn_stringbuf_replace(a, 1, APR_SIZE_MAX, "x", 1);
+  SVN_ERR(expect_stringbuf_equal(a, "tx", pool));
+
+  svn_stringbuf_replace(a, APR_SIZE_MAX, APR_SIZE_MAX, "y", 1);
+  SVN_ERR(expect_stringbuf_equal(a, "txy", pool));
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/ra-git/subversion/tests/libsvn_wc/conflict-data-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/branches/ra-git/subversion/tests/libsvn_wc/conflict-data-test.c Mon Nov 30 10:24:16 2015
@@ -853,7 +853,7 @@ test_prop_conflict_resolving(const svn_t
   SVN_ERR(sbox_wc_update(&b, "", 1));
 
   A_abspath = sbox_wc_path(&b, "A");
-  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL,
+  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, NULL,
                                    b.wc_ctx->db, A_abspath,
                                    pool, pool));
 
@@ -880,7 +880,7 @@ test_prop_conflict_resolving(const svn_t
   SVN_ERR(sbox_wc_resolve_prop(&b, "A", "prop-3",
                                svn_wc_conflict_choose_merged));
 
-  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL,
+  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, NULL,
                                    b.wc_ctx->db, A_abspath,
                                    pool, pool));
 
@@ -910,6 +910,45 @@ test_prop_conflict_resolving(const svn_t
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_binary_file_conflict(const svn_test_opts_t *opts,
+                          apr_pool_t *pool)
+{
+  svn_test__sandbox_t sbox;
+  const apr_array_header_t *conflicts;
+  svn_wc_conflict_description2_t *desc;
+
+  SVN_ERR(svn_test__sandbox_create(&sbox, "test_binary_file_conflict", opts, pool));
+
+  /* Create and add a binary file. */
+  SVN_ERR(sbox_file_write(&sbox, "binary-file", "\xff\xff"));
+  SVN_ERR(sbox_wc_add(&sbox, "binary-file"));
+  SVN_ERR(sbox_wc_propset(&sbox, SVN_PROP_MIME_TYPE,
+                          "application/octet-stream", "binary-file"));
+  SVN_ERR(sbox_wc_commit(&sbox, "binary-file")); /* r1 */
+
+  /* Make a change to the binary file. */
+  SVN_ERR(sbox_file_write(&sbox, "binary-file", "\xfc\xfc\xfc\xfc\xfc\xfc"));
+  SVN_ERR(sbox_wc_commit(&sbox, "binary-file")); /* r2 */
+
+  /* Update back to r1, make a conflicting change to binary file. */
+  SVN_ERR(sbox_wc_update(&sbox, "binary-file", 1));
+  SVN_ERR(sbox_file_write(&sbox, "binary-file", "\xfd\xfd\xfd\xfd"));
+
+  /* Update to HEAD and ensure the conflict is marked as binary. */
+  SVN_ERR(sbox_wc_update(&sbox, "binary-file", 2));
+  SVN_ERR(svn_wc__read_conflicts(&conflicts, NULL, sbox.wc_ctx->db,
+                                 sbox_wc_path(&sbox, "binary-file"),
+                                 FALSE /* create_tempfiles */,
+                                 FALSE /* only_tree_conflict */,
+                                 pool, pool));
+  SVN_TEST_ASSERT(conflicts->nelts == 1);
+  desc = APR_ARRAY_IDX(conflicts, 0, svn_wc_conflict_description2_t *);
+  SVN_TEST_ASSERT(desc->is_binary);
+
+  return SVN_NO_ERROR;
+}
+
 
 /* The test table.  */
 
@@ -934,6 +973,8 @@ static struct svn_test_descriptor_t test
                        "test prop conflicts"),
     SVN_TEST_OPTS_PASS(test_prop_conflict_resolving,
                        "test property conflict resolving"),
+    SVN_TEST_OPTS_PASS(test_binary_file_conflict,
+                       "test binary file conflict"),
     SVN_TEST_NULL
   };
 

Modified: subversion/branches/ra-git/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/libsvn_wc/op-depth-test.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/ra-git/subversion/tests/libsvn_wc/op-depth-test.c Mon Nov 30 10:24:16 2015
@@ -515,7 +515,7 @@ check_db_conflicts(svn_test__sandbox_t *
       local_abspath = svn_dirent_join(b->wc_abspath, info->local_relpath,
                                       iterpool);
 
-      SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL,
+      SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, NULL,
                                        b->wc_ctx->db, local_abspath,
                                        iterpool, iterpool));
 
@@ -3622,6 +3622,17 @@ revert_file_externals(const svn_test_opt
     SVN_ERR(check_db_rows(&b, "", rows));
   }
 
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  {
+    nodes_row_t rows[] = {
+      { 0, "",    "normal",      1, "" },
+      { 0, "f",   "normal",      1, "f" },
+      { 0, "g",   "normal",      1, "f", TRUE },
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "", rows));
+  }
+
   return SVN_NO_ERROR;
 }
 
@@ -5981,8 +5992,8 @@ check_tree_conflict_repos_path(svn_test_
   const apr_array_header_t *locations;
   svn_boolean_t text_conflicted, prop_conflicted, tree_conflicted;
 
-  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, b->wc_ctx->db,
-                                   sbox_wc_path(b, wc_path),
+  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, NULL,
+                                   b->wc_ctx->db, sbox_wc_path(b, wc_path),
                                    b->pool, b->pool));
 
   SVN_TEST_ASSERT(conflict != NULL);
@@ -11773,6 +11784,103 @@ test_global_commit(const svn_test_opts_t
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_global_commit_switched(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "global_commit_switched", opts, pool));
+  {
+    nodes_row_t before[] = {
+      { 0, "",          "normal",       2, "" },
+      { 0, "A",         "normal",       2, "A" },
+      /* A/B is switched... The libsvn_client layer tries to prevent this,
+                             because it has such an unexpected behavior. */
+      { 0, "A/B",       "normal",       2, "N/B" },
+      { 0, "A/B/C",     "normal",       2, "N/B/C" },
+      { 0, "A/B/C/D",   "normal",       2, "N/B/C/D" },
+      { 0, "A/B/C/E",   "normal",       2, "N/B/C/E" },
+      { 2, "A/B",       "normal",       3, "Z/B" },
+      { 2, "A/B/C",     "normal",       3, "Z/B/C" },
+      { 2, "A/B/C/D",   "normal",       3, "Z/B/C/D" },
+      { 2, "A/B/C/E",   "base-deleted", NO_COPY_FROM },
+      /* not-present nodes have an 'uninteresting path',
+         which doesn't have to be as implied by ancestor at same depth */
+      { 2, "A/B/C/F",   "not-present",  3, "ZZ-Z-Z_ZZ_Z_Z" },
+      { 2, "A/B/C/G",   "normal",       3, "Z/B/C/G" },
+      { 2, "A/B/C/G/H", "normal",       3, "Z/B/C/G/H" },
+
+      { 3, "A/B/C",     "normal",       4, "Q/C" },
+      { 3, "A/B/C/D",   "base-deleted", NO_COPY_FROM },
+      { 3, "A/B/C/G",   "normal",       4, "Q/C/G" },
+      { 3, "A/B/C/G/H", "base-deleted", NO_COPY_FROM },
+
+      { 4, "A/B/C/F",   "normal",       NO_COPY_FROM },
+      { 5, "A/B/C/G/H", "normal",       NO_COPY_FROM },
+      { 0 }
+    };
+    SVN_ERR(insert_dirs(&b, before));
+    SVN_ERR(verify_db(&b));
+  }
+
+  SVN_ERR(svn_wc__db_global_commit(b.wc_ctx->db,
+                                   sbox_wc_path(&b, "A/B"),
+                                   7, 7, 12, "me", NULL, NULL,
+                                   FALSE, FALSE, NULL, pool));
+
+  {
+    nodes_row_t after[] = {
+      { 0, "",          "normal",       2, "" },
+      { 0, "A",         "normal",       2, "A" },
+      /* The commit is applied as A/B, because the path is calculated from A,
+         and not the shadowed node at A/B. (Fixed in r1663991) */
+      { 0, "A/B",       "normal",       7, "A/B" },
+      { 0, "A/B/C",     "normal",       7, "A/B/C" },
+      { 0, "A/B/C/D",   "normal",       7, "A/B/C/D" },
+      /* Even calculated path of not-present is fixed */
+      { 0, "A/B/C/F",   "not-present",  7, "A/B/C/F" },
+      { 0, "A/B/C/G",   "normal",       7, "A/B/C/G" },
+      { 0, "A/B/C/G/H", "normal",       7, "A/B/C/G/H" },
+
+      /* The higher layers are unaffected */
+      { 3, "A/B/C",     "normal",       4, "Q/C" },
+      { 3, "A/B/C/D",   "base-deleted", NO_COPY_FROM },
+      { 3, "A/B/C/G",   "normal",       4, "Q/C/G" },
+      { 3, "A/B/C/G/H", "base-deleted", NO_COPY_FROM },
+
+      { 4, "A/B/C/F",   "normal",       NO_COPY_FROM },
+      { 5, "A/B/C/G/H", "normal",       NO_COPY_FROM },
+      { 0 }
+    };
+    SVN_ERR(verify_db(&b));
+    SVN_ERR(check_db_rows(&b, "", after));
+  }
+
+  SVN_ERR(svn_wc__db_global_commit(b.wc_ctx->db,
+                                   sbox_wc_path(&b, "A/B/C"),
+                                   8, 8, 12, "me", NULL, NULL,
+                                   FALSE, FALSE, NULL, pool));
+
+  {
+    nodes_row_t after[] = {
+      { 0, "",          "normal",       2, "" },
+      { 0, "A",         "normal",       2, "A" },
+      { 0, "A/B",       "normal",       7, "A/B" },
+      /* Base deleted and not-present are now gone */
+      { 0, "A/B/C",     "normal",       8, "A/B/C" },
+      { 0, "A/B/C/G",   "normal",       8, "A/B/C/G" },
+
+      { 4, "A/B/C/F",   "normal",       NO_COPY_FROM },
+      { 5, "A/B/C/G/H", "normal",       NO_COPY_FROM },
+      { 0 }
+    };
+    SVN_ERR(verify_db(&b));
+    SVN_ERR(check_db_rows(&b, "", after));
+  }
+
+  return SVN_NO_ERROR;
+}
+
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
 
@@ -11988,6 +12096,8 @@ static struct svn_test_descriptor_t test
                        "make a copy of a mixed revision tree and del"),
     SVN_TEST_OPTS_PASS(test_global_commit,
                        "test global commit"),
+    SVN_TEST_OPTS_PASS(test_global_commit_switched,
+                       "test global commit switched"),
     SVN_TEST_NULL
   };
 

Modified: subversion/branches/ra-git/subversion/tests/libsvn_wc/wc-queries-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/libsvn_wc/wc-queries-test.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/libsvn_wc/wc-queries-test.c (original)
+++ subversion/branches/ra-git/subversion/tests/libsvn_wc/wc-queries-test.c Mon Nov 30 10:24:16 2015
@@ -52,7 +52,7 @@ WC_QUERIES_SQL_DECLARE_STATEMENT_INFO(wc
 /* The first query after the normal wc queries */
 #define STMT_SCHEMA_FIRST STMT_CREATE_SCHEMA
 
-#define SQLITE_ERR(x)   \
+#define SQLITE_ERR(x) do                                         \
 {                                                                \
   int sqlite_err__temp = (x);                                    \
   if (sqlite_err__temp != SQLITE_OK)                             \
@@ -108,6 +108,7 @@ static const int slow_statements[] =
   /* Slow, but just if foreign keys are enabled:
    * STMT_DELETE_PRISTINE_IF_UNREFERENCED,
    */
+  STMT_HAVE_STAT1_TABLE, /* Queries sqlite_master which has no index */
 
   -1 /* final marker */
 };
@@ -926,6 +927,15 @@ test_schema_statistics(apr_pool_t *scrat
                    "VALUES (1, '', '')",
                    NULL, NULL, NULL));
 
+  SQLITE_ERR(
+      sqlite3_exec(sdb,
+                   "INSERT INTO EXTERNALS (wc_id, local_relpath,"
+                   "                       parent_relpath, repos_id,"
+                   "                       presence, kind, def_local_relpath,"
+                   "                       def_repos_relpath) "
+                   "VALUES (1, 'subdir', '', 1, 'normal', 'dir', '', '')",
+                   NULL, NULL, NULL));
+
   /* These are currently not necessary for query optimization, but it's better
      to tell Sqlite how we intend to use this table anyway */
   SQLITE_ERR(

Modified: subversion/branches/ra-git/subversion/tests/svn_test.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/svn_test.h?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/svn_test.h (original)
+++ subversion/branches/ra-git/subversion/tests/svn_test.h Mon Nov 30 10:24:16 2015
@@ -131,6 +131,22 @@ extern "C" {
           tst_str2, tst_str1, __FILE__, __LINE__);                  \
   } while(0)
 
+ /** Handy macro for testing integer equality.
+  */
+#define SVN_TEST_INT_ASSERT(expr, expected_expr)                  \
+  do {                                                            \
+    apr_int64_t tst_int1 = (expr);                                \
+    apr_int64_t tst_int2 = (expected_expr);                       \
+                                                                  \
+    if (tst_int1 != tst_int2)                                     \
+      return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,         \
+          "Integers not equal\n"                                  \
+          "  Expected: %" APR_INT64_T_FMT "\n"                    \
+          "     Found: %" APR_INT64_T_FMT "\n"                    \
+          "  at %s:%d",                                           \
+          tst_int2, tst_int1, __FILE__, __LINE__);                \
+  } while(0)
+
 
 /* Baton for any arguments that need to be passed from main() to svn
  * test functions.
@@ -149,6 +165,8 @@ typedef struct svn_test_opts_t
   const char *repos_dir;
   /* Repository url: The url to access REPOS_DIR as */
   const char *repos_url;
+  /* Memcached server. */
+  const char *memcached_server;
   /* Repository template: pre-created repository to copy for tests */
   const char *repos_template;
   /* Minor version to use for servers and FS backends, or zero to use

Modified: subversion/branches/ra-git/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/svn_test_fs.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/ra-git/subversion/tests/svn_test_fs.c Mon Nov 30 10:24:16 2015
@@ -119,7 +119,7 @@ create_fs(svn_fs_t **fs_p,
      runs.  */
   SVN_ERR(svn_io_remove_dir2(name, TRUE, NULL, NULL, pool));
 
-  SVN_ERR(svn_fs_create(fs_p, name, fs_config, pool));
+  SVN_ERR(svn_fs_create2(fs_p, name, fs_config, pool, pool));
   if (! *fs_p)
     return svn_error_create(SVN_ERR_FS_GENERAL, NULL,
                             "Couldn't alloc a new fs object.");
@@ -195,7 +195,7 @@ svn_test__create_fs2(svn_fs_t **fs_p,
   SVN_ERR(maybe_install_fs_conf(*fs_p, opts, &must_reopen, pool));
   if (must_reopen)
     {
-      SVN_ERR(svn_fs_open2(fs_p, name, NULL, pool, pool));
+      SVN_ERR(svn_fs_open2(fs_p, name, fs_config, pool, pool));
       svn_fs_set_warning_func(*fs_p, fs_warning_handler, NULL);
     }
 
@@ -364,15 +364,17 @@ svn_test__set_file_contents(svn_fs_root_
   svn_txdelta_window_handler_t consumer_func;
   void *consumer_baton;
   svn_string_t string;
+  apr_pool_t *subpool = svn_pool_create(pool);
 
   SVN_ERR(svn_fs_apply_textdelta(&consumer_func, &consumer_baton,
-                                 root, path, NULL, NULL, pool));
+                                 root, path, NULL, NULL, subpool));
 
   string.data = contents;
   string.len = strlen(contents);
   SVN_ERR(svn_txdelta_send_string(&string, consumer_func,
-                                  consumer_baton, pool));
+                                  consumer_baton, subpool));
 
+  svn_pool_destroy(subpool);
   return SVN_NO_ERROR;
 }
 
@@ -399,27 +401,30 @@ static svn_error_t *
 get_dir_entries(apr_hash_t *tree_entries,
                 svn_fs_root_t *root,
                 const char *path,
-                apr_pool_t *pool)
+                apr_pool_t *scratch_pool)
 {
   apr_hash_t *entries;
   apr_hash_index_t *hi;
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  apr_pool_t *result_pool = apr_hash_pool_get(tree_entries);
 
-  SVN_ERR(svn_fs_dir_entries(&entries, root, path, pool));
+  SVN_ERR(svn_fs_dir_entries(&entries, root, path, scratch_pool));
 
   /* Copy this list to the master list with the path prepended to the
      names */
-  for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
+  for (hi = apr_hash_first(scratch_pool, entries); hi; hi = apr_hash_next(hi))
     {
       void *val;
       svn_fs_dirent_t *dirent;
       const char *full_path;
+      svn_pool_clear(iterpool);
 
       apr_hash_this(hi, NULL, NULL, &val);
       dirent = val;
 
       /* Calculate the full path of this entry (by appending the name
          to the path thus far) */
-      full_path = svn_path_join(path, dirent->name, pool);
+      full_path = svn_path_join(path, dirent->name, result_pool);
 
       /* Now, copy this dirent to the master hash, but this time, use
          the full path for the key */
@@ -427,7 +432,7 @@ get_dir_entries(apr_hash_t *tree_entries
 
       /* If this entry is a directory, recurse into the tree. */
       if (dirent->kind == svn_node_dir)
-        SVN_ERR(get_dir_entries(tree_entries, root, full_path, pool));
+        SVN_ERR(get_dir_entries(tree_entries, root, full_path, iterpool));
     }
 
   return SVN_NO_ERROR;
@@ -500,6 +505,7 @@ svn_test__validate_tree(svn_fs_root_t *r
 {
   apr_hash_t *tree_entries, *expected_entries;
   apr_pool_t *subpool = svn_pool_create(pool);
+  apr_pool_t *iterpool = svn_pool_create(pool);
   svn_stringbuf_t *extra_entries = NULL;
   svn_stringbuf_t *missing_entries = NULL;
   svn_stringbuf_t *corrupt_entries = NULL;
@@ -509,6 +515,13 @@ svn_test__validate_tree(svn_fs_root_t *r
   /* There should be no entry with this name. */
   const char *na_name = "es-vee-en";
 
+  /* Create our master hash for storing the entries */
+  tree_entries = apr_hash_make(subpool);
+
+  /* Recursively get the whole tree */
+  SVN_ERR(get_dir_entries(tree_entries, root, "", iterpool));
+  svn_pool_clear(iterpool);
+
   /* Create a hash for storing our expected entries */
   expected_entries = apr_hash_make(subpool);
 
@@ -517,12 +530,6 @@ svn_test__validate_tree(svn_fs_root_t *r
     apr_hash_set(expected_entries, entries[i].path,
                  APR_HASH_KEY_STRING, &(entries[i]));
 
-  /* Create our master hash for storing the entries */
-  tree_entries = apr_hash_make(pool);
-
-  /* Begin the recursive directory entry dig */
-  SVN_ERR(get_dir_entries(tree_entries, root, "", subpool));
-
   /* For each entry in our EXPECTED_ENTRIES hash, try to find that
      entry in the TREE_ENTRIES hash given us by the FS.  If we find
      that object, remove it from the TREE_ENTRIES.  If we don't find
@@ -536,6 +543,7 @@ svn_test__validate_tree(svn_fs_root_t *r
       void *val;
       svn_test__tree_entry_t *entry;
 
+      svn_pool_clear(iterpool);
       apr_hash_this(hi, &key, &keylen, &val);
       entry = val;
 
@@ -546,7 +554,7 @@ svn_test__validate_tree(svn_fs_root_t *r
           svn_error_t *err;
 
           if ((err = validate_tree_entry(root, entry->path,
-                                         entry->contents, subpool)))
+                                         entry->contents, iterpool)))
             {
               /* If we don't have a corrupt entries string, make one. */
               if (! corrupt_entries)
@@ -627,6 +635,7 @@ svn_test__validate_tree(svn_fs_root_t *r
          extra_entries ? extra_entries->data : "");
     }
 
+  svn_pool_destroy(iterpool);
   svn_pool_destroy(subpool);
   return SVN_NO_ERROR;
 }
@@ -675,6 +684,7 @@ svn_test__txn_script_exec(svn_fs_root_t
                           apr_pool_t *pool)
 {
   int i;
+  apr_pool_t *iterpool = svn_pool_create(pool);
 
   /* Run through the list of edits, making the appropriate edit on
      that entry in the TXN_ROOT. */
@@ -685,18 +695,19 @@ svn_test__txn_script_exec(svn_fs_root_t
       int cmd = script[i].cmd;
       svn_boolean_t is_dir = (param1 == 0);
 
+      svn_pool_clear(iterpool);
       switch (cmd)
         {
         case 'a':
           if (is_dir)
             {
-              SVN_ERR(svn_fs_make_dir(txn_root, path, pool));
+              SVN_ERR(svn_fs_make_dir(txn_root, path, iterpool));
             }
           else
             {
-              SVN_ERR(svn_fs_make_file(txn_root, path, pool));
+              SVN_ERR(svn_fs_make_file(txn_root, path, iterpool));
               SVN_ERR(svn_test__set_file_contents(txn_root, path,
-                                                  param1, pool));
+                                                  param1, iterpool));
             }
           break;
 
@@ -706,21 +717,21 @@ svn_test__txn_script_exec(svn_fs_root_t
             svn_fs_root_t *rev_root;
             svn_fs_t *fs = svn_fs_root_fs(txn_root);
 
-            SVN_ERR(svn_fs_youngest_rev(&youngest, fs, pool));
-            SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest, pool));
-            SVN_ERR(svn_fs_copy(rev_root, path, txn_root, param1, pool));
+            SVN_ERR(svn_fs_youngest_rev(&youngest, fs, iterpool));
+            SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest, iterpool));
+            SVN_ERR(svn_fs_copy(rev_root, path, txn_root, param1, iterpool));
           }
           break;
 
         case 'd':
-          SVN_ERR(svn_fs_delete(txn_root, path, pool));
+          SVN_ERR(svn_fs_delete(txn_root, path, iterpool));
           break;
 
         case 'e':
           if (! is_dir)
             {
               SVN_ERR(svn_test__set_file_contents(txn_root, path,
-                                                  param1, pool));
+                                                  param1, iterpool));
             }
           break;
 
@@ -729,6 +740,7 @@ svn_test__txn_script_exec(svn_fs_root_t
         }
     }
 
+  svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }
 
@@ -765,21 +777,26 @@ svn_test__check_greek_tree(svn_fs_root_t
   svn_stringbuf_t *rstring;
   svn_stringbuf_t *content;
   const struct svn_test__tree_entry_t *node;
+  apr_pool_t *iterpool = svn_pool_create(pool);
 
   /* Loop through the list of files, checking for matching content. */
   for (node = svn_test__greek_tree_nodes; node->path; node++)
     {
       if (node->contents)
         {
-          SVN_ERR(svn_fs_file_contents(&rstream, root, node->path, pool));
-          SVN_ERR(svn_test__stream_to_string(&rstring, rstream, pool));
-          content = svn_stringbuf_create(node->contents, pool);
+          svn_pool_clear(iterpool);
+
+          SVN_ERR(svn_fs_file_contents(&rstream, root, node->path, iterpool));
+          SVN_ERR(svn_test__stream_to_string(&rstring, rstream, iterpool));
+          content = svn_stringbuf_create(node->contents, iterpool);
           if (! svn_stringbuf_compare(rstring, content))
             return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
                                      "data read != data written in file '%s'.",
                                      node->path);
         }
     }
+
+  svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }
 
@@ -789,22 +806,28 @@ svn_test__create_greek_tree_at(svn_fs_ro
                                apr_pool_t *pool)
 {
   const struct svn_test__tree_entry_t *node;
+  apr_pool_t *iterpool = svn_pool_create(pool);
 
   for (node = svn_test__greek_tree_nodes; node->path; node++)
     {
-      const char *path = svn_relpath_join(root_dir, node->path, pool);
+      const char *path;
+      svn_pool_clear(iterpool);
+
+      path = svn_relpath_join(root_dir, node->path, iterpool);
 
       if (node->contents)
         {
-          SVN_ERR(svn_fs_make_file(txn_root, path, pool));
+          SVN_ERR(svn_fs_make_file(txn_root, path, iterpool));
           SVN_ERR(svn_test__set_file_contents(txn_root, path, node->contents,
-                                              pool));
+                                              iterpool));
         }
       else
         {
-          SVN_ERR(svn_fs_make_dir(txn_root, path, pool));
+          SVN_ERR(svn_fs_make_dir(txn_root, path, iterpool));
         }
     }
+
+  svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }
 
@@ -826,6 +849,7 @@ svn_test__create_blame_repository(svn_re
   svn_fs_txn_t *txn;
   svn_fs_root_t *txn_root, *revision_root;
   svn_revnum_t youngest_rev = 0;
+  apr_pool_t *subpool = svn_pool_create(pool);
 
   /* Create a filesystem and repository. */
   SVN_ERR(svn_test__create_repos(&repos, test_name,
@@ -836,87 +860,96 @@ svn_test__create_blame_repository(svn_re
 
   /* Revision 1:  Add trunk, tags, branches. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
-                                            "initial", "log msg", pool));
-  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-  SVN_ERR(svn_fs_make_dir(txn_root, "trunk", pool));
-  SVN_ERR(svn_fs_make_dir(txn_root, "tags", pool));
-  SVN_ERR(svn_fs_make_dir(txn_root, "branches", pool));
-  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+                                            "initial", "log msg", subpool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
+  SVN_ERR(svn_fs_make_dir(txn_root, "trunk", subpool));
+  SVN_ERR(svn_fs_make_dir(txn_root, "tags", subpool));
+  SVN_ERR(svn_fs_make_dir(txn_root, "branches", subpool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
+  svn_pool_clear(subpool);
 
   /* Revision 2:  Add the Greek tree on the trunk. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
-                                            "initial", "log msg", pool));
-  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-  SVN_ERR(svn_test__create_greek_tree_at(txn_root, "trunk", pool));
-  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+                                            "initial", "log msg", subpool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
+  SVN_ERR(svn_test__create_greek_tree_at(txn_root, "trunk", subpool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
+  svn_pool_clear(subpool);
 
   /* Revision 3:  Tweak trunk/A/mu. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
-                                            "user-trunk", "log msg", pool));
-  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+                                            "user-trunk", "log msg", subpool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "trunk/A/mu",
-                                      "A\nB\nC\nD\nE\nF\nG\nH\nI", pool));
-  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+                                      "A\nB\nC\nD\nE\nF\nG\nH\nI", subpool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
+  svn_pool_clear(subpool);
 
   /* Revision 4:  Copy trunk to branches/1.0.x. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
-                                            "copy", "log msg", pool));
-  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-  SVN_ERR(svn_fs_revision_root(&revision_root, fs, youngest_rev, pool));
+                                            "copy", "log msg", subpool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
+  SVN_ERR(svn_fs_revision_root(&revision_root, fs, youngest_rev, subpool));
   SVN_ERR(svn_fs_copy(revision_root, "trunk",
                       txn_root, "branches/1.0.x",
-                      pool));
-  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+                      subpool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
+  svn_pool_clear(subpool);
 
   /* Revision 5:  Tweak trunk/A/mu. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
-                                            "user-trunk", "log msg", pool));
-  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+                                            "user-trunk", "log msg", subpool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "trunk/A/mu",
                                       "A\nB\nC -- trunk edit\nD\nE\nF\nG\nH\nI",
-                                      pool));
-  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+                                      subpool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
+  svn_pool_clear(subpool);
 
   /* Revision 6:  Tweak branches/1.0.x/A/mu. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
-                                            "user-branch", "log msg", pool));
-  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+                                            "user-branch", "log msg", subpool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "branches/1.0.x/A/mu",
                                       "A\nB\nC\nD -- branch edit\nE\nF\nG\nH\nI",
-                                      pool));
-  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+                                      subpool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
+  svn_pool_clear(subpool);
 
   /* Revision 7:  Merge trunk to branch. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
-                                            "user-merge1", "log msg", pool));
-  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+                                            "user-merge1", "log msg", subpool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "branches/1.0.x/A/mu",
                                       "A\nB\nC -- trunk edit\nD -- branch edit"
-                                      "\nE\nF\nG\nH\nI", pool));
+                                      "\nE\nF\nG\nH\nI", subpool));
   SVN_ERR(svn_fs_change_node_prop(txn_root, "/branches/1.0.x", "svn:mergeinfo",
-                                  svn_string_create("/trunk:4-6", pool),
-                                  pool));
-  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+                                  svn_string_create("/trunk:4-6", subpool),
+                                  subpool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
+  svn_pool_clear(subpool);
 
   /* Revision 8:  Merge branch to trunk. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
-                                            "user-merge2", "log msg", pool));
-  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+                                            "user-merge2", "log msg", subpool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "trunk/A/mu",
                                       "A\nB\nC -- trunk edit\nD -- branch edit\n"
-                                      "E\nF\nG\nH\nI", pool));
+                                      "E\nF\nG\nH\nI", subpool));
   SVN_ERR(svn_fs_change_node_prop(txn_root, "/trunk", "svn:mergeinfo",
-                                  svn_string_create("/branches/1.0.x:4-7", pool),
-                                  pool));
-  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+                                  svn_string_create("/branches/1.0.x:4-7", subpool),
+                                  subpool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
+  svn_pool_destroy(subpool);
+
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/ra-git/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/svn_test_main.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/ra-git/subversion/tests/svn_test_main.c Mon Nov 30 10:24:16 2015
@@ -104,6 +104,7 @@ enum test_options_e {
   reposdir_opt,
   reposurl_opt,
   repostemplate_opt,
+  memcached_server_opt,
   mode_filter_opt,
   sqlite_log_opt,
   parallel_opt,
@@ -144,6 +145,8 @@ static const apr_getopt_option_t cl_opti
                     N_("the url to access reposdir as")},
   {"repos-template",repostemplate_opt, 1,
                     N_("the repository to use as template")},
+  {"memcached-server", memcached_server_opt, 1,
+                    N_("the memcached server to use")},
   {"sqlite-logging", sqlite_log_opt, 0,
                     N_("enable SQLite logging")},
   {"parallel",      parallel_opt, 0,
@@ -746,13 +749,14 @@ svn_test__init_auth_baton(svn_auth_baton
                  SVN_CONFIG_OPTION_PASSWORD_STORES,
                  "windows-cryptoapi");
 
-  SVN_ERR(svn_cmdline_create_auth_baton(ab,
-                                        TRUE  /* non_interactive */,
-                                        "jrandom", "rayjandom",
-                                        NULL,
-                                        TRUE  /* no_auth_cache */,
-                                        FALSE /* trust_server_cert */,
-                                        cfg_config, NULL, NULL, result_pool));
+  SVN_ERR(svn_cmdline_create_auth_baton2(ab,
+                                         TRUE  /* non_interactive */,
+                                         "jrandom", "rayjandom",
+                                         NULL,
+                                         TRUE  /* no_auth_cache */,
+                                         TRUE /* trust_server_cert_unkown_ca */,
+                                         FALSE, FALSE, FALSE, FALSE,
+                                         cfg_config, NULL, NULL, result_pool));
 
   return SVN_NO_ERROR;
 }
@@ -914,6 +918,10 @@ svn_test_main(int argc, const char *argv
           opts.repos_template = svn_dirent_internal_style(opts.repos_template,
                                                           pool);
           break;
+        case memcached_server_opt:
+          SVN_INT_ERR(svn_utf_cstring_to_utf8(&opts.memcached_server, opt_arg,
+                                              pool));
+          break;
         case list_opt:
           list_mode = TRUE;
           break;

Modified: subversion/branches/ra-git/tools/buildbot/slaves/bb-openbsd/svnbuild.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/buildbot/slaves/bb-openbsd/svnbuild.sh?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/buildbot/slaves/bb-openbsd/svnbuild.sh (original)
+++ subversion/branches/ra-git/tools/buildbot/slaves/bb-openbsd/svnbuild.sh Mon Nov 30 10:24:16 2015
@@ -25,4 +25,4 @@ set -x
 export JAVA_HOME=/usr/local/jdk-1.7.0
 
 branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"
-(cd .. && gmake BRANCH="$branch" THREADING="no")
+(cd .. && gmake BRANCH="$branch" THREADING="no" ENABLE_PERL_BINDINGS="no")

Modified: subversion/branches/ra-git/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh (original)
+++ subversion/branches/ra-git/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh Mon Nov 30 10:24:16 2015
@@ -24,8 +24,8 @@ set -x
 
 branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"
 export MALLOC_OPTIONS=S
-(cd .. && gmake BRANCH="$branch" THREADING="no" svn-check-bindings)
-grep -q "^Result: PASS$" tests.log.bindings.pl || exit 1
+(cd .. && gmake BRANCH="$branch" THREADING="no" ENABLE_PERL_BINDINGS="no" svn-check-bindings)
+#grep -q "^Result: PASS$" tests.log.bindings.pl || exit 1
 grep -q "^OK$" tests.log.bindings.py || exit 1
 tail -n 1 tests.log.bindings.rb | grep -q ", 0 failures, 0 errors" || exit 1
 #TODO javahl

Modified: subversion/branches/ra-git/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh (original)
+++ subversion/branches/ra-git/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh Mon Nov 30 10:24:16 2015
@@ -28,7 +28,10 @@ cd ../obj
 LD_PRELOAD_64=/export/home/wandisco/buildbot/install/lib/preloadable_libiconv.so
 export LD_PRELOAD_64
 
-if [ $SVN_VER_MINOR -eq 9 ]; then
+if [ $SVN_VER_MINOR -ge 10 ]; then
+  echo "============ make svnserveautocheck"
+  make svnserveautocheck CLEANUP=1 PARALLEL=30 THREADED=1 GLOBAL_SCHEDULER=1 || exit $?
+elif [ $SVN_VER_MINOR -ge 9 ]; then
   echo "============ make svnserveautocheck"
   make svnserveautocheck CLEANUP=1 PARALLEL=30 THREADED=1 || exit $?
 else

Propchange: subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/
            ('svn:ignore' removed)

Modified: subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh (original)
+++ subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh Mon Nov 30 10:24:16 2015
@@ -53,7 +53,7 @@ mount | grep "^/dev/disk[0-9][0-9]* on $
 
     # Make sure we strip trailing spaces from the result of older
     # versions of hduitil.
-    device=$(echo $(hdiutil attach -nomount ram://900000))
+    device=$(echo $(hdiutil attach -nomount ram://1000000))
     newfs_hfs -M 0700 -v "$1" "${device}"
     hdiutil mountvol "${device}"
 

Modified: subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/setenv.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/setenv.sh?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/setenv.sh (original)
+++ subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/setenv.sh Mon Nov 30 10:24:16 2015
@@ -19,7 +19,6 @@
 ## variables:
 ##
 ##     PATH                     The search path
-##     SVNBB_OPENSSL            OpenSSL installation prefix
 ##     SVNBB_BDB                Berkeley DB installation prefix
 ##     SVNBB_SWIG               Swig installation prefix
 ##     SVNBB_SERF               Serf installation prefix
@@ -30,13 +29,12 @@
 ##     SVNBB_APR_20_DEV         Path of APR-2.0
 ##     SVNBB_JUNIT              The path of the junit.jar
 ##     SVNBB_PARALLEL           Optional: parallelization; defaults to 2
-##     LIBTOOL_CONFIG           Optional: libtool configuration path
 ##
 ## The invoking script will set local variable named ${scripts} that
 ## is the absolute path the parent of this file.
 
 # Modify this to suit your deployment
-environment=$(cd "${scripts}/.." && pwd)/environment.sh
+environment=$(cd "${scripts}/../.." && pwd)/environment.sh
 
 eval $(${environment})
 SVNBB_PARALLEL="${SVNBB_PARALLEL-2}"
@@ -50,7 +48,6 @@ export SVNBB_APR_15
 export SVNBB_APR_20_DEV
 export SVNBB_JUNIT
 export SVNBB_PARALLEL
-export LIBTOOL_CONFIG
 
 
 # Set the absolute source path

Modified: subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh (original)
+++ subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh Mon Nov 30 10:24:16 2015
@@ -80,7 +80,7 @@ cd ${absbld}
 env CC=clang CXX=clang++ \
 ${abssrc}/configure \
     --prefix="${absbld}/.install-prefix" \
-    --disable-debug${optimizeconfig} \
+    --enable-debug${optimizeconfig} \
     --disable-nls \
     --disable-mod-activation \
     ${aprconfig}${serfconfig} \

Modified: subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh (original)
+++ subversion/branches/ra-git/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh Mon Nov 30 10:24:16 2015
@@ -20,10 +20,11 @@
 
 run_tests() {
     check="$1"
+    cleanup="$2"
 
     echo "============ make check-${check}"
     cd ${absbld}
-    make check-${check} || exit 1
+    make check-${check} ${cleanup} || exit 1
 }
 
 
@@ -53,6 +54,6 @@ done
 ${check_swig_py} && run_tests swig-py
 ${check_swig_pl} && run_tests swig-pl
 ${check_swig_rb} && run_tests swig-rb
-${check_javahl} && run_tests javahl
+${check_javahl} && run_tests javahl JAVAHL_CLEANUP=1
 
 exit 0

Modified: subversion/branches/ra-git/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd (original)
+++ subversion/branches/ra-git/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd Mon Nov 30 10:24:16 2015
@@ -80,29 +80,6 @@ if "%SVN_BRANCH%" GTR "1.9." (
         echo Done.
     )
 
-) ELSE IF "%SVN_BRANCH%" GTR "1.8." (
-
-    mkdir "%TESTDIR%\swig\pl-debug\SVN"
-    mkdir "%TESTDIR%\swig\pl-debug\auto\SVN"
-    xcopy subversion\bindings\swig\perl\native\*.pm "%TESTDIR%\swig\pl-debug\SVN" > nul:
-    pushd debug\subversion\bindings\swig\perl\native
-    for %%i in (*.dll) do (
-        set name=%%i
-        mkdir "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!"
-        xcopy "!name:~0,-4!.*" "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!" > nul:
-        xcopy /y "_Core.dll" "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!" > nul:
-    )
-    popd
-
-
-    SET PERL5LIB=%PERL5LIB%;%TESTDIR%\swig\pl-debug;
-    pushd subversion\bindings\swig\perl\native
-    perl -MExtUtils::Command::MM -e "test_harness()" t\*.t
-    IF ERRORLEVEL 1 (
-        echo [Test runner reported error !ERRORLEVEL!]
-        REM SET result=1
-    )
-    popd
 )
 
 if "%SVN_BRANCH%" GTR "1.9." (

Modified: subversion/branches/ra-git/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd (original)
+++ subversion/branches/ra-git/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd Mon Nov 30 10:24:16 2015
@@ -31,7 +31,7 @@ IF "%SVN_BRANCH%" LEQ "1.6.x" (
 SET DEBUG_TARGETS=/t:__ALL_TESTS__
 SET RELEASE_TARGETS=/t:__SWIG_PYTHON__
 
-if "%SVN_BRANCH%" GTR "1.8." (
+if "%SVN_BRANCH%" GTR "1.9." (
   SET DEBUG_TARGETS=%DEBUG_TARGETS% /t:__SWIG_PERL__
 )
 

Modified: subversion/branches/ra-git/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd (original)
+++ subversion/branches/ra-git/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd Mon Nov 30 10:24:16 2015
@@ -30,6 +30,7 @@ SET ARGS=
 
 SET FSFS=
 SET LOCAL=
+SET RC=0
 :next
 
 IF "%1" == "-r" (
@@ -75,17 +76,23 @@ IF "%SVN_BRANCH%" LSS "1.9." (
 IF "%LOCAL%+%FSFS%" == "1+1" (
   echo win-tests.py -c %PARALLEL% %MODE% -f fsfs %ARGS% "%TESTDIR%\tests"
   win-tests.py -c %PARALLEL% %MODE% -f fsfs %ARGS% "%TESTDIR%\tests"
-  IF ERRORLEVEL 1 EXIT /B 1
+  IF ERRORLEVEL 1 SET RC=1
 )
 
 IF "%SVN%+%FSFS%" == "1+1" (
   echo win-tests.py -c %PARALLEL% %MODE% -f fsfs -u svn://127.0.0.1 %ARGS% "%TESTDIR%\tests"
   win-tests.py -c %PARALLEL% %MODE% -f fsfs -u svn://127.0.0.1 %ARGS% "%TESTDIR%\tests"
-  IF ERRORLEVEL 1 EXIT /B 1
+  IF ERRORLEVEL 1 SET RC=1
 )
 
 IF "%DAV%+%FSFS%" == "1+1" (
-  echo win-tests.py -c %PARALLEL% %MODE% -f fsfs --httpd-dir "%CD%\..\deps\release\httpd" --httpd-port %TESTPORT% -u http://127.0.0.1:%TESTPORT% %ARGS% "%TESTDIR%\tests"
-  win-tests.py -c %PARALLEL% %MODE% -f fsfs --httpd-dir "%CD%\..\deps\release\httpd" --httpd-port %TESTPORT% -u http://127.0.0.1:%TESTPORT% %ARGS% "%TESTDIR%\tests"
-  IF ERRORLEVEL 1 EXIT /B 1
+  echo win-tests.py -c %PARALLEL% %MODE% -f fsfs --httpd-no-log --httpd-dir "%CD%\..\deps\release\httpd" --httpd-port %TESTPORT% -u http://127.0.0.1:%TESTPORT% %ARGS% "%TESTDIR%\tests"
+  win-tests.py -c %PARALLEL% %MODE% -f fsfs --httpd-no-log --httpd-dir "%CD%\..\deps\release\httpd" --httpd-port %TESTPORT% -u http://127.0.0.1:%TESTPORT% %ARGS% "%TESTDIR%\tests"
+  IF ERRORLEVEL 1 SET RC=1
 )
+
+IF EXIST "%TEMP%\svn-*" (
+  echo "SVN Files left:"
+  dir "%TEMP%"
+)
+EXIT /B %RC%

Modified: subversion/branches/ra-git/tools/client-side/bash_completion
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/client-side/bash_completion?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/client-side/bash_completion (original)
+++ subversion/branches/ra-git/tools/client-side/bash_completion Mon Nov 30 10:24:16 2015
@@ -84,6 +84,7 @@ function _svn_info()
   done
 }
 
+# broken since svn 1.7 | FIXME: change to svn status -v ?
 # _svn_lls (dir|file|all) files...
 # list svn-managed files from list
 # some 'svn status --all-files' would be welcome here?
@@ -106,6 +107,85 @@ function _svn_lls()
     done
 }
 
+# try to complete TARGET
+# 1. [nothing]  lists available protocols
+# 2. svn+ssh:// lists servers from .ssh/known_hosts
+# 3. http[s]:// lists already used svn servers
+# 4. file://    lists files from dir
+# 5. ^/ or protocol except file:/ triggers svn ls
+# this code expects bash 4, $cur is split by : too
+#
+# $1            'all' | 'remote_only'
+# return        true if found something
+function _svn_complete_target() {
+	# echo -e "\n_svn_complete_target: [$cur] 1:[${COMP_WORDS[COMP_CWORD]}] 2:[${COMP_WORDS[COMP_CWORD-1]}] 3:[${COMP_WORDS[COMP_CWORD-2]}] | [${COMP_WORDS[@]}] [$COMP_WORDBREAKS]"
+	local prefix=${COMP_WORDS[COMP_CWORD-2]}
+	local colon=${COMP_WORDS[COMP_CWORD-1]}
+	# see about COMP_WORDBREAKS workaround in prop completion
+	if [[ $prefix == "file" && "$colon" == ":" ]]
+	then
+		# file completion for file:// urls
+		COMPREPLY=( $(compgen -d -S '/' -X '*/.*' -- $cur ) )
+		return
+	elif [[ ( $1 == "all" && $cur == ^/* ) || ( "$colon" == ":" && $cur == //*/* ) ]]
+	then	# we already hava a protocoll and host: autocomplete for svn ls ^/bla | svn ls remote_url | svn checkout remote_url
+		local p
+		if [ "$colon" == ":" ] ; then
+			p="$prefix$colon"
+		fi
+		if [[ $cur =~ ((.*/)([^/]*)) ]] # url = everything up to the last /
+		then
+			local url="${BASH_REMATCH[2]}"
+			local path="${BASH_REMATCH[3]}"
+			local remote_files="$(svn ls --non-interactive "$p$url" 2> /dev/null )"
+			COMPREPLY=( $(compgen -P "$url" -W "$remote_files" -- "$path" ) )
+			compopt -o nospace
+			return 0
+		fi
+	elif [[ "$colon" == ":" ]]
+	then
+		# get known servers
+		# svn+ssh://
+		if [[ $prefix == "svn+ssh" && $cur =~ (^//(.*)) ]] ; then
+			local server_start=${BASH_REMATCH[2]}
+			# debian & suse: /usr/share/bash-completion/bash_completion
+			local suffix=/
+			_known_hosts_real -p // "$server_start"
+		else
+			local urls= file=
+			for file in ~/.subversion/auth/svn.simple/* ; do
+				if [ -r $file ] ; then
+					local url=$(_svn_read_hashfile svn:realmstring < $file)
+					url=${url/*</}
+					url=${url/>*/}
+					urls="$urls $url"
+				fi
+			done
+
+			# only suggest/show possible suffixes
+			local suffix=$cur c= choices=
+			for c in $urls ; do
+				[[ $c == $prefix:* ]] && choices="$choices ${c#*:}"
+			done
+		
+			COMPREPLY=( $(compgen -W "$choices" -- $suffix ) )
+		fi
+		compopt -o nospace
+		return
+	else
+		# show schemas
+		if [ $1 == 'all' ] ; then
+			COMPREPLY=( $(compgen -W "^/ $urlSchemas" -- $cur) )
+		else
+			COMPREPLY=( $(compgen -W "$urlSchemas" -- $cur) )
+		fi
+		compopt -o nospace
+		return
+	fi
+	#echo "nothing found"
+	return 1
+}
+
 # This completion guides the command/option order along the one suggested
 # by "svn help", although other syntaxes are allowed.
 #
@@ -183,6 +263,7 @@ _svn()
 	optsParam="$optsParam|--native-eol|-l|--limit|-c|--change"
 	optsParam="$optsParam|--depth|--set-depth|--with-revprop"
 	optsParam="$optsParam|--cl|--changelist|--accept|--show-revs"
+	optsParam="$optsParam|--show-item"
 
 	# svn:* and other (env SVN_BASH_*_PROPS) properties
 	local svnProps revProps allProps psCmds propCmds
@@ -392,38 +473,10 @@ _svn()
 	if [[ $cmd == @(co|checkout|ls|list) && $stat = 'arg' && \
 			$SVN_BASH_COMPL_EXT == *urls* ]]
 	then
-		# see about COMP_WORDBREAKS workaround in prop completion
-		if [[ $cur == file:* ]]
-		then
-			# file completion for file:// urls
-			local where=${cur/file:/}
-			COMPREPLY=( $(compgen -d -S '/' -X '*/.*' -- $where ) )
-			return
-		elif [[ $cur == *:* ]]
-		then
-			# get known urls
-			local urls= file=
-			for file in ~/.subversion/auth/svn.simple/* ; do
-				if [ -r $file ] ; then
-					local url=$(_svn_read_hashfile svn:realmstring < $file)
-					url=${url/*</}
-					url=${url/>*/}
-					urls="$urls $url"
-				fi
-			done
-
-			# only suggest/show possible suffixes
-			local prefix=${cur%:*} suffix=${cur#*:} c= choices=
-			for c in $urls ; do
-				[[ $c == $prefix:* ]] && choices="$choices ${c#*:}"
-			done
-
-			COMPREPLY=( $(compgen -W "$choices" -- $suffix ) )
-			return
+		if [[ $cmd == @(ls|list) ]] ; then
+			_svn_complete_target 'all' && return
 		else
-			# show schemas
-			COMPREPLY=( $(compgen -W "$urlSchemas" -- $cur) )
-			return
+			_svn_complete_target 'remote_only' && return
 		fi
 	fi
 
@@ -440,17 +493,23 @@ _svn()
 	    elif [[ "$here" == */trunk* ]] ; then
 	      # we guess that it is a merge from a branch
 	      COMPREPLY=( $(compgen -W ${here/\/trunk*/\/branches\/} -- $cur ) )
+	      compopt -o nospace
 	      return 0
 	    else
 	      # no se, let us suggest the repository root...
-	      COMPREPLY=( $(compgen -W $(_svn_info Root) -- $cur ) )
+	      COMPREPLY=( $(compgen -W $(_svn_info Root)/ -- $cur ) )
+	      compopt -o nospace
 	      return 0
 	    fi
+	  # this part is broken with bash 4 URL contains https only
 	  elif [[ $URL == */branches/* && $here == */trunk* && \
 	        ! $hasReintegrateOpt && $cur = '' && $stat = 'arg' ]] ; then
 	    # force --reintegrate only if the current word is empty
 	    COMPREPLY=( $(compgen -W '--reintegrate' -- $cur ) )
 	    return 0
+	  # autocomplete for svn merge ^/bla
+	  else
+	    _svn_complete_target 'all' && return
 	  fi
 	fi
 
@@ -501,6 +560,10 @@ _svn()
 
 	    [[ $previous = '--show-revs' ]] && values='merged eligible'
 
+	    [[ $previous = '--show-item' ]] && values="kind url relative-url \
+	      repos-root-url repos-uuid revision last-changed-revision \
+	      last-changed-date last-changed-author wc-root"
+
 	    if [[ $previous = '--username' ]] ; then
 	      values="$SVN_BASH_USERNAME"
 	      if [[ $SVN_BASH_COMPL_EXT == *username* ]] ; then
@@ -781,8 +844,7 @@ _svn()
 
 	# otherwise build possible options for the command
 	pOpts="--username --password --no-auth-cache --non-interactive \
-	       --trust-unknown-ca --trust-cn-mismatch \
-	       --trust-expired --trust-not-yet-valid --trust-other-failure \
+	       --trust-server-cert-failures \
 	       --force-interactive"
 	mOpts="-m --message -F --file --encoding --force-log --with-revprop"
 	rOpts="-r --revision"
@@ -938,7 +1000,7 @@ _svn()
 	status|stat|st)
 		cmdOpts="-u --show-updates -v --verbose $nOpts $qOpts $pOpts \
 		         --no-ignore --ignore-externals --incremental --xml \
-                         $cOpts"
+                         $rOpts $cOpts"
 		;;
 	switch|sw)
 		cmdOpts="--relocate $rOpts $nOpts $qOpts $pOpts --diff3-cmd \
@@ -1090,6 +1152,9 @@ _svnadmin ()
 		         --use-pre-commit-hook --use-post-commit-hook \
 		         --bypass-prop-validation -M --memory-cache-size"
 		;;
+	lstxns)
+        	cmdOpts="-r --revision"
+		;;
 	lock|unlock)
 		cmdOpts="--bypass-hooks"
 		;;

Modified: subversion/branches/ra-git/tools/dev/fsfs-access-map.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/dev/fsfs-access-map.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/dev/fsfs-access-map.c (original)
+++ subversion/branches/ra-git/tools/dev/fsfs-access-map.c Mon Nov 30 10:24:16 2015
@@ -198,9 +198,9 @@ open_file(const char *name, int handle)
       /* determine first revision of rev / packed rev files */
       if (strstr(name, "/db/revs/") != NULL && strstr(name, "manifest") == NULL)
         if (strstr(name, ".pack/pack") != NULL)
-          file->rev_num = atoi(strstr(name, "/db/revs/") + 9);
+          file->rev_num = SVN_STR_TO_REV(strstr(name, "/db/revs/") + 9);
         else
-          file->rev_num = atoi(strrchr(name, '/') + 1);
+          file->rev_num = SVN_STR_TO_REV(strrchr(name, '/') + 1);
       else
         file->rev_num = -1;
 
@@ -225,7 +225,7 @@ open_file(const char *name, int handle)
       *key = handle;
 
       handle_info = apr_pcalloc(pool, sizeof(*handle_info));
-      apr_hash_set(handles, key, sizeof(handle), handle_info);
+      apr_hash_set(handles, key, sizeof(*key), handle_info);
     }
 
   /* link handle to file */

Modified: subversion/branches/ra-git/tools/dev/scramble-tree.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/tools/dev/scramble-tree.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/tools/dev/scramble-tree.py (original)
+++ subversion/branches/ra-git/tools/dev/scramble-tree.py Mon Nov 30 10:24:16 2015
@@ -60,12 +60,7 @@ try:
 except AttributeError:
   my_getopt = getopt.getopt
 import random
-try:
-  # Python >=2.5
-  from hashlib import md5 as hashlib_md5
-except ImportError:
-  # Python <2.5
-  from md5 import md5 as hashlib_md5
+from hashlib import md5 as hashlib_md5
 import base64