Modified: 
subversion/branches/better-pristines/subversion/libsvn_fs_fs/cached_data.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_fs/cached_data.h?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_fs/cached_data.h 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_fs/cached_data.h 
Sun Feb 25 13:34:45 2018
@@ -171,7 +171,7 @@ svn_fs_fs__get_proplist(apr_hash_t **pro
                         apr_pool_t *pool);
 
 /* Create a changes retrieval context object in *RESULT_POOL and return it
- * in *CONTEXT.  It will allow svn_fs_x__get_changes to fetch consecutive
+ * in *CONTEXT.  It will allow svn_fs_fs__get_changes to fetch consecutive
  * blocks (one per invocation) from REV's changed paths list in FS. */
 svn_error_t *
 svn_fs_fs__create_changes_context(svn_fs_fs__changes_context_t **context,

Modified: subversion/branches/better-pristines/subversion/libsvn_fs_fs/fs_fs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_fs/fs_fs.c?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_fs/fs_fs.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_fs/fs_fs.c Sun 
Feb 25 13:34:45 2018
@@ -1151,8 +1151,8 @@ write_config(svn_fs_t *fs,
 "[" CONFIG_SECTION_DEBUG "]"                                                 NL
 "###"                                                                        NL
 "### Whether to verify each new revision immediately before finalizing"      NL
-"### the commit. The default is false in release-mode builds, and true"      NL
-"### in debug-mode builds."                                                  NL
+"### the commit.  This is disabled by default except in maintainer-mode"     NL
+"### builds."                                                                NL
 "# " CONFIG_OPTION_VERIFY_BEFORE_COMMIT " = false"                           NL
 ;
 #undef NL

Modified: 
subversion/branches/better-pristines/subversion/libsvn_fs_fs/temp_serializer.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_fs/temp_serializer.h?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/subversion/libsvn_fs_fs/temp_serializer.h 
(original)
+++ 
subversion/branches/better-pristines/subversion/libsvn_fs_fs/temp_serializer.h 
Sun Feb 25 13:34:45 2018
@@ -374,7 +374,7 @@ typedef struct svn_fs_fs__changes_list_t
      of elements in the list is a multiple of our block / range size. */
   svn_boolean_t eol;
 
-  /* Array of #svn_fs_x__change_t * representing a consecutive sub-range of
+  /* Array of #svn_fs_fs__change_t * representing a consecutive sub-range of
      elements in a changed paths list. */
 
   /* number of entries in the array */

Modified: 
subversion/branches/better-pristines/subversion/libsvn_ra_serf/options.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_ra_serf/options.c?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_ra_serf/options.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_ra_serf/options.c 
Sun Feb 25 13:34:45 2018
@@ -71,6 +71,9 @@ typedef struct options_context_t {
   svn_ra_serf__response_handler_t inner_handler;
   void *inner_baton;
 
+  /* Have we received any DAV headers at all? */
+  svn_boolean_t received_dav_header;
+
   const char *activity_collection;
   svn_revnum_t youngest_rev;
 
@@ -165,6 +168,8 @@ capabilities_headers_iterator_callback(v
       apr_array_header_t *vals = svn_cstring_split(val, ",", TRUE,
                                                    opt_ctx->pool);
 
+      opt_ctx->received_dav_header = TRUE;
+
       /* Right now we only have a few capabilities to detect, so just
          seek for them directly.  This could be written slightly more
          efficiently, but that wouldn't be worth it until we have many
@@ -396,6 +401,19 @@ options_response_handler(serf_request_t
       serf_bucket_headers_do(hdrs, capabilities_headers_iterator_callback,
                              opt_ctx);
 
+      /* Bail out early if we're not talking to a DAV server.
+         Note that this check is only valid if we've received a success
+         response; redirects and errors don't count. */
+      if (opt_ctx->handler->sline.code >= 200
+          && opt_ctx->handler->sline.code < 300
+          && !opt_ctx->received_dav_header)
+        {
+          return svn_error_createf
+            (SVN_ERR_RA_DAV_OPTIONS_REQ_FAILED, NULL,
+             _("The server at '%s' does not support the HTTP/DAV protocol"),
+             session->session_url_str);
+        }
+
       /* Assume mergeinfo capability unsupported, if didn't receive information
          about server or repository mergeinfo capability. */
       if (!svn_hash_gets(session->capabilities, SVN_RA_CAPABILITY_MERGEINFO))

Modified: 
subversion/branches/better-pristines/subversion/libsvn_subr/compress_lz4.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/compress_lz4.c?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/compress_lz4.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/compress_lz4.c 
Sun Feb 25 13:34:45 2018
@@ -27,7 +27,7 @@
 
 #include "svn_private_config.h"
 
-#if SVN_INTERNAL_LZ4
+#ifdef SVN_INTERNAL_LZ4
 #include "lz4/lz4internal.h"
 #else
 #include <lz4.h>

Modified: subversion/branches/better-pristines/subversion/libsvn_subr/lz4/lz4.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/lz4/lz4.c?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/lz4/lz4.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/lz4/lz4.c Sun 
Feb 25 13:34:45 2018
@@ -1,5 +1,5 @@
 #include "svn_private_config.h"
-#if SVN_INTERNAL_LZ4
+#ifdef SVN_INTERNAL_LZ4
 /*
    LZ4 - Fast LZ compression algorithm
    Copyright (C) 2011-2016, Yann Collet.

Modified: 
subversion/branches/better-pristines/subversion/libsvn_subr/lz4/lz4internal.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/lz4/lz4internal.h?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/subversion/libsvn_subr/lz4/lz4internal.h 
(original)
+++ 
subversion/branches/better-pristines/subversion/libsvn_subr/lz4/lz4internal.h 
Sun Feb 25 13:34:45 2018
@@ -1,5 +1,5 @@
 #include "svn_private_config.h"
-#if SVN_INTERNAL_LZ4
+#ifdef SVN_INTERNAL_LZ4
 /*
  *  LZ4 - Fast LZ compression algorithm
  *  Header File

Modified: 
subversion/branches/better-pristines/subversion/libsvn_subr/mergeinfo.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/mergeinfo.c?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/mergeinfo.c 
(original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/mergeinfo.c Sun 
Feb 25 13:34:45 2018
@@ -891,7 +891,7 @@ adjust_remaining_ranges(svn_rangelist_t
               new_modified_range->end = modified_range->end;
               new_modified_range->inheritable = FALSE;
               modified_range->end = next_range->start;
-              (*range_index)+=2;
+              (*range_index) += 2 + elements_to_delete;
               svn_sort__array_insert(rangelist, &new_modified_range,
                                      *range_index);
               /* Recurse with the new range. */

Modified: subversion/branches/better-pristines/subversion/svn/cl.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/cl.h?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/cl.h (original)
+++ subversion/branches/better-pristines/subversion/svn/cl.h Sun Feb 25 
13:34:45 2018
@@ -312,9 +312,6 @@ svn_opt_subcommand_t
   svn_cl__shelf_save,
   svn_cl__shelf_shelve,
   svn_cl__shelf_unshelve,
-  svn_cl__shelve,
-  svn_cl__unshelve,
-  svn_cl__shelves,
   svn_cl__status,
   svn_cl__switch,
   svn_cl__unlock,

Modified: subversion/branches/better-pristines/subversion/svn/shelf-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/shelf-cmd.c?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/shelf-cmd.c (original)
+++ subversion/branches/better-pristines/subversion/svn/shelf-cmd.c Sun Feb 25 
13:34:45 2018
@@ -71,6 +71,36 @@ friendly_duration_str(apr_time_t duratio
   return s;
 }
 
+#ifndef WIN32
+/* Run CMD with ARGS.
+ * Send its stdout to the parent's stdout. Disconnect its stdin and stderr.
+ */
+static svn_error_t *
+run_cmd(const char *cmd,
+        const char *const *args,
+        apr_pool_t *scratch_pool)
+{
+  apr_status_t apr_err;
+  apr_file_t *outfile;
+  svn_error_t *err;
+  int exitcode;
+
+  apr_err = apr_file_open_stdout(&outfile, scratch_pool);
+  if (apr_err)
+    return svn_error_wrap_apr(apr_err, "Can't open stdout");
+
+  err = svn_io_run_cmd(NULL /*path*/, cmd, args,
+                       &exitcode, NULL /*exitwhy*/,
+                       TRUE /*inherit*/,
+                       NULL /*infile*/, outfile, NULL /*errfile*/,
+                       scratch_pool);
+  if (err || exitcode)
+    return svn_error_createf(SVN_ERR_EXTERNAL_PROGRAM, err,
+                             _("Could not run external command '%s'"), cmd);
+  return SVN_NO_ERROR;
+}
+#endif
+
 /* Print some details of the changes in the patch described by INFO.
  */
 static svn_error_t *
@@ -79,14 +109,19 @@ show_diffstat(svn_client_shelf_version_t
 {
 #ifndef WIN32
   const char *patch_abspath;
-  int result;
+  const char *args[4];
+  svn_error_t *err;
 
   SVN_ERR(svn_client_shelf_get_patch_abspath(&patch_abspath, shelf_version,
                                              scratch_pool));
-  result = system(apr_psprintf(scratch_pool,
-                               "diffstat -p0 '%s' 2> /dev/null",
-                               patch_abspath));
-  if (result == 0)
+  args[0] = "diffstat";
+  args[1] = "-p0";
+  args[2] = patch_abspath;
+  args[3] = NULL;
+  err = run_cmd("diffstat", args, scratch_pool);
+  if (err)
+    svn_error_clear(err);
+  else
     SVN_ERR(svn_cmdline_printf(scratch_pool, "\n"));
 #endif
   return SVN_NO_ERROR;
@@ -421,8 +456,9 @@ shelve(int *new_version_p,
   const char *cwd_abspath;
   struct status_baton sb;
 
-  SVN_ERR(svn_client_shelf_open(&shelf,
-                                name, local_abspath, ctx, scratch_pool));
+  SVN_ERR(svn_client_shelf_open_or_create(&shelf,
+                                          name, local_abspath,
+                                          ctx, scratch_pool));
   previous_version = shelf->max_version;
 
   if (! quiet)

Modified: subversion/branches/better-pristines/subversion/svn/svn.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/svn.c?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/svn.c (original)
+++ subversion/branches/better-pristines/subversion/svn/svn.c Sun Feb 25 
13:34:45 2018
@@ -61,8 +61,6 @@
 #include "svn_private_config.h"
 
 
-/*#define WITH_SHELVE_V1*/
-
 /*** Option Processing ***/
 
 /* Add an identifier here for long options that don't have a short
@@ -148,11 +146,6 @@ typedef enum svn_cl__longopt_t {
   opt_show_item,
   opt_adds_as_modification,
   opt_vacuum_pristines,
-#ifdef WITH_SHELVE_V1
-  opt_delete,
-  opt_keep_shelved,
-  opt_list,
-#endif
   opt_compatible_version
 } svn_cl__longopt_t;
 
@@ -479,12 +472,6 @@ const apr_getopt_option_t svn_cl__option
   {"vacuum-pristines", opt_vacuum_pristines, 0,
                        N_("remove unreferenced pristines from .svn 
directory")},
 
-#ifdef WITH_SHELVE_V1
-  {"list", opt_list, 0, N_("list shelved patches")},
-  {"keep-shelved", opt_keep_shelved, 0, N_("do not delete the shelved patch")},
-  {"delete", opt_delete, 0, N_("delete the shelved patch")},
-#endif
-
   {"compatible-version", opt_compatible_version, 1,
                        N_("use working copy format compatible with 
Subversion\n"
                        "                             "
@@ -1703,7 +1690,6 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  the output of 'svn help merge' for 'undo'.\n"),
     {opt_targets, 'R', opt_depth, 'q', opt_changelist} },
 
-#ifndef WITH_SHELVE_V1
   { "shelf-diff", svn_cl__shelf_diff, {0}, N_
     ("Show shelved changes as a diff.\n"
      "usage: shelf-diff NAME [VERSION]\n"
@@ -1812,75 +1798,6 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  in the next release, and there is no promise of backward 
compatibility.\n"
     ),
     {'q', opt_dry_run} },
-#else
-  { "shelve", svn_cl__shelve, {0}, N_
-    ("Put a local change aside, as if putting it on a shelf.\n"
-     "usage: 1. shelve [--keep-local] NAME [PATH...]\n"
-     "       2. shelve --delete NAME\n"
-     "       3. shelve --list\n"
-     "\n"
-     "  1. Save the local change in the given PATHs to a patch file, and\n"
-     "     revert that change from the WC unless '--keep-local' is given.\n"
-     "     If a log message is given with '-m' or '-F', include it at the\n"
-     "     beginning of the patch file.\n"
-     "\n"
-     "  2. Delete the shelved change NAME.\n"
-     "     (A backup is kept, named with a '.bak' extension.)\n"
-     "\n"
-     "  3. List shelved changes. Include the first line of any log message\n"
-     "     and some details about the contents of the change, unless '-q' is\n"
-     "     given.\n"
-     "\n"
-     "  The kinds of change you can shelve are those supported by 'svn diff'\n"
-     "  and 'svn patch'. The following are currently NOT supported:\n"
-     "     mergeinfo changes, copies, moves, mkdir, rmdir,\n"
-     "     'binary' content, uncommittable states\n"
-     "\n"
-     "  To bring back a shelved change, use 'svn unshelve NAME'.\n"
-     "\n"
-     "  A shelved change is stored as a patch file, .svn/shelves/NAME.patch\n"
-     "\n"
-     "  The shelving feature is EXPERIMENTAL. This command is likely to 
change\n"
-     "  in the next release, and there is no promise of backward 
compatibility.\n"
-    ),
-    {opt_delete, opt_list, 'q', opt_dry_run, opt_keep_local,
-     opt_depth, opt_targets, opt_changelist,
-     /* almost SVN_CL__LOG_MSG_OPTIONS but not currently opt_with_revprop: */
-     'm', 'F', opt_force_log, opt_editor_cmd, opt_encoding,
-    } },
-
-  { "unshelve", svn_cl__unshelve, {0}, N_
-    ("Bring a shelved change back to a local change in the WC.\n"
-     "usage: 1. unshelve [--keep-shelved] [NAME]\n"
-     "       2. unshelve --list\n"
-     "\n"
-     "  1. Apply the shelved change NAME to the working copy.\n"
-     "     Delete the patch unless the '--keep-shelved' option is given.\n"
-     "     (A backup is kept, named with a '.bak' extension.)\n"
-     "     NAME defaults to the most recent shelved change.\n"
-     "\n"
-     "  2. List shelved changes. Include the first line of any log message\n"
-     "     and some details about the contents of the change, unless '-q' is\n"
-     "     given.\n"
-     "\n"
-     "  Any conflict between the change being unshelved and a change\n"
-     "  already in the WC is handled the same way as by 'svn patch',\n"
-     "  creating a 'reject' file.\n"
-     "\n"
-     "  The shelving feature is EXPERIMENTAL. This command is likely to 
change\n"
-     "  in the next release, and there is no promise of backward 
compatibility.\n"
-    ),
-    {opt_keep_shelved, opt_list, 'q', opt_dry_run} },
-
-  { "shelves", svn_cl__shelves, {0}, N_
-    ("List shelved changes.\n"
-     "usage: shelves\n"
-     "\n"
-     "  The shelving feature is EXPERIMENTAL. This command is likely to 
change\n"
-     "  in the next release, and there is no promise of backward 
compatibility.\n"
-    ),
-    {'q'} },
-#endif
 
   { "status", svn_cl__status, {"stat", "st"}, N_
     ("Print the status of working copy files and directories.\n"
@@ -2510,11 +2427,6 @@ sub_main(int *exit_code, int argc, const
       case opt_dry_run:
         opt_state.dry_run = TRUE;
         break;
-#ifdef WITH_SHELVE_V1
-      case opt_list:
-        opt_state.list = TRUE;
-        break;
-#endif
       case opt_revprop:
         opt_state.revprop = TRUE;
         break;
@@ -2698,9 +2610,6 @@ sub_main(int *exit_code, int argc, const
         opt_state.diff.summarize = TRUE;
         break;
       case opt_remove:
-#ifdef WITH_SHELVE_V1
-      case opt_delete:
-#endif
         opt_state.remove = TRUE;
         break;
       case opt_changelist:
@@ -2716,9 +2625,6 @@ sub_main(int *exit_code, int argc, const
         opt_state.keep_changelists = TRUE;
         break;
       case opt_keep_local:
-#ifdef WITH_SHELVE_V1
-      case opt_keep_shelved:
-#endif
         opt_state.keep_local = TRUE;
         break;
       case opt_with_all_revprops:
@@ -3235,12 +3141,8 @@ sub_main(int *exit_code, int argc, const
           || subcommand->cmd_func == svn_cl__move
           || subcommand->cmd_func == svn_cl__lock
           || subcommand->cmd_func == svn_cl__propedit
-#ifndef WITH_SHELVE_V1
           || subcommand->cmd_func == svn_cl__shelf_save
           || subcommand->cmd_func == svn_cl__shelf_shelve
-#else
-          || subcommand->cmd_func == svn_cl__shelve
-#endif
          ))
     {
       /* If the -F argument is a file that's under revision control,

Modified: 
subversion/branches/better-pristines/subversion/tests/cmdline/authz_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/authz_tests.py?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/subversion/tests/cmdline/authz_tests.py 
(original)
+++ 
subversion/branches/better-pristines/subversion/tests/cmdline/authz_tests.py 
Sun Feb 25 13:34:45 2018
@@ -168,7 +168,7 @@ def authz_read_access(sbox):
   fws_url = B_url + '/folder with spaces'
   fws_empty_folder_url = fws_url + '/empty folder'
 
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"
@@ -280,7 +280,7 @@ def authz_write_access(sbox):
 
   write_restrictive_svnserve_conf(sbox.repo_dir)
 
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E220004: Access denied.*"
@@ -367,7 +367,7 @@ def authz_checkout_test(sbox):
   # 1st part: disable all read access, checkout should fail
 
   # write an authz file with *= on /
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"
@@ -502,7 +502,7 @@ def authz_log_and_tracing_test(sbox):
   write_restrictive_svnserve_conf(sbox.repo_dir)
 
   # write an authz file with *=rw on /
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"
@@ -533,7 +533,7 @@ def authz_log_and_tracing_test(sbox):
 
   # now disable read access on the first version of rho, keep the copy in
   # /A/D readable.
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"
@@ -551,7 +551,7 @@ def authz_log_and_tracing_test(sbox):
                                      'log', '-r', '2', '--limit', '1',
                                      wc_dir)
 
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err2 = expected_err
   else:
     expected_err2 = ".*svn: E220001: ((Unreadable path encountered; " \
@@ -593,7 +593,7 @@ def authz_log_and_tracing_test(sbox):
   svntest.actions.run_and_verify_svn(None, expected_err2,
                                      'cat', '-r', '2', D_url+'/rho')
 
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err2 = expected_err
   else:
     expected_err2 = ".*svn: E220001: Unreadable path encountered; access 
denied.*"
@@ -624,7 +624,7 @@ def authz_aliases(sbox):
 
   write_restrictive_svnserve_conf(sbox.repo_dir)
 
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"
@@ -669,9 +669,9 @@ def authz_validate(sbox):
   write_authz_file(sbox, { "/"  : "* = r",
                            "/A/B" : "@undefined_group = rw" })
 
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
-  elif sbox.repo_url.startswith("svn"):
+  elif svntest.main.is_ra_type_svn():
     expected_err = ".*Invalid authz configuration"
   else:
     expected_err = ".*@undefined_group.*"
@@ -688,9 +688,9 @@ devs1 = @admins, dev1
 devs2 = @admins, dev2
 devs = @devs1, dev3, dev4""" })
 
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
-  elif sbox.repo_url.startswith("svn"):
+  elif svntest.main.is_ra_type_svn():
     expected_err = ".*Invalid authz configuration"
   else:
     expected_err = ".*Circular dependency.*"
@@ -726,7 +726,7 @@ def authz_locking(sbox):
   write_authz_file(sbox, {"/": "", "/A": "jrandom = rw"})
   write_restrictive_svnserve_conf(sbox.repo_dir)
 
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: warning: W170001: Authorization failed.*"
@@ -781,7 +781,7 @@ def authz_locking(sbox):
   svntest.actions.run_and_verify_info([{'Lock Token' : None}],
                                       sbox.ospath('A/mu'))
 
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: warning: W160039: .*([Aa]uth.*perf|[Ff]orbidden).*"
   else:
     expected_err = ".*svn: warning: W170001: Authorization failed.*"
@@ -981,7 +981,7 @@ def multiple_matches(sbox):
   sbox.build(create_wc = False)
   root_url = sbox.repo_url
   write_restrictive_svnserve_conf(sbox.repo_dir)
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"
@@ -1137,7 +1137,7 @@ def case_sensitive_authz(sbox):
   # error messages
   expected_error_for_commit = ".*Commit failed.*"
 
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_error_for_cat = ".*[Ff]orbidden.*"
   else:
     expected_error_for_cat = ".*svn: E170001: Authorization failed.*"

Modified: 
subversion/branches/better-pristines/subversion/tests/cmdline/davautocheck.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/davautocheck.sh?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/subversion/tests/cmdline/davautocheck.sh 
(original)
+++ 
subversion/branches/better-pristines/subversion/tests/cmdline/davautocheck.sh 
Sun Feb 25 13:34:45 2018
@@ -274,6 +274,9 @@ say "Using '$HTPASSWD'..."
 LOAD_MOD_DAV=$(get_loadmodule_config mod_dav) \
   || fail "DAV module not found"
 
+LOAD_MOD_DAV_FS=$(get_loadmodule_config mod_dav_fs) \
+  || fail "Filesystem DAV module not found"
+
 LOAD_MOD_LOG_CONFIG=$(get_loadmodule_config mod_log_config) \
   || fail "log_config module not found"
 
@@ -440,6 +443,7 @@ $LOAD_MOD_MIME
 $LOAD_MOD_ALIAS
 $LOAD_MOD_UNIXD
 $LOAD_MOD_DAV
+$LOAD_MOD_DAV_FS
 LoadModule          dav_svn_module "$MOD_DAV_SVN"
 $LOAD_MOD_AUTH
 $LOAD_MOD_AUTHN_CORE
@@ -475,6 +479,13 @@ mkdir "$HTTPD_LOCK" \
 __EOF__
 fi
 
+HTTPD_DAV="$HTTPD_ROOT/dav"
+mkdir "$HTTPD_DAV" \
+    || fail "couldn't create DAV lock directory '$HTTPD_DAV'"
+cat >> "$HTTPD_CFG" <<__EOF__
+DavLockDB "$HTTPD_DAV/lock.db"
+__EOF__
+
 if [ ${USE_SSL:+set} ]; then
 cat >> "$HTTPD_CFG" <<__EOF__
 SSLEngine on
@@ -518,6 +529,15 @@ CustomLog           "$HTTPD_ROOT/ops" "%
   #Require           all granted
 </Directory>
 
+Alias /nodavroot $ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/nodavroot
+<Directory $ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/nodavroot>
+</Directory>
+
+Alias /fsdavroot $ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/fsdavroot
+<Directory $ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/fsdavroot>
+  DAV filesystem
+</Directory>
+
 <Location /svn-test-work/repositories>
   DAV               svn
   SVNParentPath     
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/repositories"

Modified: 
subversion/branches/better-pristines/subversion/tests/cmdline/iprop_authz_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/iprop_authz_tests.py?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/subversion/tests/cmdline/iprop_authz_tests.py
 (original)
+++ 
subversion/branches/better-pristines/subversion/tests/cmdline/iprop_authz_tests.py
 Sun Feb 25 13:34:45 2018
@@ -105,7 +105,7 @@ def iprops_authz(sbox):
   write_authz_file(sbox, {
     "/"          : svntest.main.wc_author + "=rw",
     "/A/D/H/psi" : svntest.main.wc_author + "=",})
-  if sbox.repo_url.startswith("http"):
+  if svntest.main.is_ra_type_dav():
     expected_err = ".*[Ff]orbidden.*"
   else:
     expected_err = ".*svn: E170001: Authorization failed.*"

Modified: 
subversion/branches/better-pristines/subversion/tests/cmdline/svnadmin_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/svnadmin_tests.py?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/subversion/tests/cmdline/svnadmin_tests.py 
(original)
+++ 
subversion/branches/better-pristines/subversion/tests/cmdline/svnadmin_tests.py 
Sun Feb 25 13:34:45 2018
@@ -777,9 +777,13 @@ def verify_windows_paths_in_repos(sbox):
 def fsfs_file(repo_dir, kind, rev):
   if svntest.main.options.server_minor_version >= 5:
     if svntest.main.options.fsfs_sharding is None:
+      if svntest.main.is_fs_type_fsx():
+        rev = 'r' + rev
       return os.path.join(repo_dir, 'db', kind, '0', rev)
     else:
       shard = int(rev) // svntest.main.options.fsfs_sharding
+      if svntest.main.is_fs_type_fsx():
+        rev = 'r' + rev
       path = os.path.join(repo_dir, 'db', kind, str(shard), rev)
 
       if svntest.main.options.fsfs_packing is None or kind == 'revprops':
@@ -2856,10 +2860,7 @@ def verify_quickly(sbox):
   "verify quickly using metadata"
 
   sbox.build(create_wc = False)
-  if svntest.main.is_fs_type_fsfs():
-    rev_file = open(fsfs_file(sbox.repo_dir, 'revs', '1'), 'r+b')
-  else:
-    rev_file = open(fsfs_file(sbox.repo_dir, 'revs', 'r1'), 'r+b')
+  rev_file = open(fsfs_file(sbox.repo_dir, 'revs', '1'), 'r+b')
 
   # set new contents
   rev_file.seek(8)

Modified: 
subversion/branches/better-pristines/subversion/tests/cmdline/svnsync_authz_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/svnsync_authz_tests.py?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/subversion/tests/cmdline/svnsync_authz_tests.py
 (original)
+++ 
subversion/branches/better-pristines/subversion/tests/cmdline/svnsync_authz_tests.py
 Sun Feb 25 13:34:45 2018
@@ -415,7 +415,7 @@ def specific_deny_authz(sbox):
 
   # For mod_dav_svn's parent path setup we need per-repos permissions in
   # the authz file...
-  if sbox.repo_url.startswith('http'):
+  if svntest.main.is_ra_type_dav():
     src_authz = sbox.authz_name()
     dst_authz = dest_sbox.authz_name()
     write_authz_file(sbox, None,

Modified: 
subversion/branches/better-pristines/subversion/tests/cmdline/svntest/actions.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/svntest/actions.py?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/subversion/tests/cmdline/svntest/actions.py
 (original)
+++ 
subversion/branches/better-pristines/subversion/tests/cmdline/svntest/actions.py
 Sun Feb 25 13:34:45 2018
@@ -74,6 +74,11 @@ def setup_pristine_greek_repository():
   if not os.path.exists(main.general_repo_dir):
     os.makedirs(main.general_repo_dir) # this also creates all the 
intermediate dirs
 
+  if not os.path.exists(main.other_dav_root_dir):
+    os.makedirs(main.other_dav_root_dir)
+  if not os.path.exists(main.non_dav_root_dir):
+    os.makedirs(main.non_dav_root_dir)
+
   # If there's no pristine repos, create one.
   if not os.path.exists(main.pristine_greek_repos_dir):
     if main.options.fsfs_version is not None:

Modified: 
subversion/branches/better-pristines/subversion/tests/cmdline/svntest/main.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/svntest/main.py?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/subversion/tests/cmdline/svntest/main.py 
(original)
+++ 
subversion/branches/better-pristines/subversion/tests/cmdline/svntest/main.py 
Sun Feb 25 13:34:45 2018
@@ -224,6 +224,10 @@ SVN_PROP_INHERITABLE_IGNORES = "svn:glob
 general_repo_dir = os.path.join(work_dir, "repositories")
 general_wc_dir = os.path.join(work_dir, "working_copies")
 
+# Directories used for DAV tests
+other_dav_root_dir = os.path.join(work_dir, "fsdavroot")
+non_dav_root_dir = os.path.join(work_dir, "nodavroot")
+
 # temp directory in which we will create our 'pristine' local
 # repository and other scratch data.  This should be removed when we
 # quit and when we startup.
@@ -1035,7 +1039,8 @@ def _post_create_repos(path, minor_versi
       users += (crosscheck_username + " = " + crosscheck_password + "\n")
     file_append(os.path.join(path, "conf", "passwd"), users)
 
-  if options.fs_type is None or options.fs_type == 'fsfs':
+  if options.fs_type is None or options.fs_type == 'fsfs' or \
+     options.fs_type == 'fsx':
     # fsfs.conf file
     if (minor_version is None or minor_version >= 6):
       confpath = get_fsfs_conf_file_path(path)
@@ -2335,6 +2340,8 @@ def execute_tests(test_list, serial_only
 
   global pristine_url
   global pristine_greek_repos_url
+  global other_dav_root_url
+  global non_dav_root_url
   global svn_binary
   global svnadmin_binary
   global svnlook_binary
@@ -2414,6 +2421,10 @@ def execute_tests(test_list, serial_only
                                   pristine_greek_repos_dir.replace(
                                       os.path.sep, '/'))
 
+  other_dav_root_url = options.test_area_url + '/fsdavroot'
+  non_dav_root_url = options.test_area_url + '/nodavroot'
+
+
   if options.use_jsvn:
     if options.svn_bin is None:
       options.svn_bin = ''

Modified: 
subversion/branches/better-pristines/subversion/tests/libsvn_subr/mergeinfo-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/libsvn_subr/mergeinfo-test.c?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/subversion/tests/libsvn_subr/mergeinfo-test.c
 (original)
+++ 
subversion/branches/better-pristines/subversion/tests/libsvn_subr/mergeinfo-test.c
 Sun Feb 25 13:34:45 2018
@@ -1673,100 +1673,27 @@ test_remove_prefix_from_catalog(apr_pool
 static svn_error_t *
 test_rangelist_merge_overlap(apr_pool_t *pool)
 {
-  svn_rangelist_t * changes;
-  /* 
15014-19472,19473-19612*,19613-19614,19615-19630*,19631-19634,19635-20055* */
-  svn_rangelist_t * rangelist = apr_array_make(pool, 1, 
sizeof(svn_merge_range_t *));
-  svn_merge_range_t *mrange = apr_pcalloc(pool, sizeof(*mrange));
-
-  /* This range is optional for reproducing issue #4686 */
-  mrange->start = 15013;
-  mrange->end = 19472;
-  mrange->inheritable = TRUE;
-  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = mrange;
-
-  mrange = apr_pcalloc(pool, sizeof(*mrange));
-  mrange->start = 19472;
-  mrange->end = 19612;
-  mrange->inheritable = FALSE;
-  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = mrange;
-
-  /* This range is optional for reproducing issue #4686 */
-  mrange = apr_pcalloc(pool, sizeof(*mrange));
-  mrange->start = 19612;
-  mrange->end = 19614;
-  mrange->inheritable = TRUE;
-  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = mrange;
-
-  mrange = apr_pcalloc(pool, sizeof(*mrange));
-  mrange->start = 19614;
-  mrange->end = 19630;
-  mrange->inheritable = FALSE;
-  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = mrange;
-
-  mrange = apr_pcalloc(pool, sizeof(*mrange));
-  mrange->start = 19630;
-  mrange->end = 19634;
-  mrange->inheritable = TRUE;
-  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = mrange;
-
-  /* This range is optional for reproducing issue #4686 */
-  mrange = apr_pcalloc(pool, sizeof(*mrange));
-  mrange->start = 19634;
-  mrange->end = 20055;
-  mrange->inheritable = FALSE;
-  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = mrange;
-
-  /* 15014-20515* */
-  changes = apr_array_make(pool, 1, sizeof(svn_merge_range_t *));
-  mrange = apr_pcalloc(pool, sizeof(*mrange));
-  mrange->start = 15013;
-  mrange->end = 20515;
-  mrange->inheritable = FALSE;
-  APR_ARRAY_PUSH(changes, svn_merge_range_t *) = mrange;
-#if 0
-  {
-    svn_string_t * tmpString;
-
-    svn_rangelist_to_string(&tmpString, rangelist, pool);
-    printf("rangelist %s\n", tmpString->data);
-  }
-  {
-    svn_string_t * tmpString;
-
-    svn_rangelist_to_string(&tmpString, changes, pool);
-    printf("changes %s\n", tmpString->data);
-  }
-#endif
-
+  const char *rangelist_str = "19473-19612*,19615-19630*,19631-19634";
+  const char *changes_str = "15014-20515*";
+  const char *expected_str = "15014-19630*,19631-19634,19635-20515*";
+  /* wrong result: "15014-19630*,19634-19631*,19631-19634,19635-20515*" */
+  svn_rangelist_t *rangelist, *changes;
+  svn_string_t *result_string;
+
+  /* prepare the inputs */
+  SVN_ERR(svn_rangelist__parse(&rangelist, rangelist_str, pool));
+  SVN_ERR(svn_rangelist__parse(&changes, changes_str, pool));
   SVN_TEST_ASSERT(svn_rangelist__is_canonical(rangelist));
   SVN_TEST_ASSERT(svn_rangelist__is_canonical(changes));
 
+  /* perform the merge */
   SVN_ERR(svn_rangelist_merge2(rangelist, changes, pool, pool));
 
+  /* check the output */
   SVN_TEST_ASSERT(svn_rangelist__is_canonical(rangelist));
+  SVN_ERR(svn_rangelist_to_string(&result_string, rangelist, pool));
+  SVN_TEST_STRING_ASSERT(result_string->data, expected_str);
 
-#if 0
-  {
-    svn_string_t * tmpString;
-
-    svn_rangelist_to_string(&tmpString, rangelist, pool);
-    printf("result %s\n", tmpString->data);
-  }
-#endif
-
-  /* wrong result
-    result 
15014-19472,19473-19612*,19613-19614,19615-19630*,19634-19631*,19631-19634,19635-20515*
-  */
-
-  {
-     svn_string_t * tmp_string;
-     svn_rangelist_t *range_list;
-
-     SVN_ERR(svn_rangelist_to_string(&tmp_string, rangelist, pool));
-
-     SVN_ERR(svn_rangelist__parse(&range_list, tmp_string->data, pool));
-  }
-  
   return SVN_NO_ERROR;
 }
 
@@ -1900,9 +1827,9 @@ static struct svn_test_descriptor_t test
                    "diff of rangelists"),
     SVN_TEST_PASS2(test_remove_prefix_from_catalog,
                    "removal of prefix paths from catalog keys"),
-    SVN_TEST_XFAIL2(test_rangelist_merge_overlap,
+    SVN_TEST_PASS2(test_rangelist_merge_overlap,
                    "merge of rangelists with overlaps (issue 4686)"),
-    SVN_TEST_XFAIL2(test_rangelist_loop,
+    SVN_TEST_PASS2(test_rangelist_loop,
                     "test rangelist edgecases via loop"),
     SVN_TEST_NULL
   };

Modified: 
subversion/branches/better-pristines/subversion/tests/libsvn_wc/utils.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/libsvn_wc/utils.c?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/libsvn_wc/utils.c 
(original)
+++ subversion/branches/better-pristines/subversion/tests/libsvn_wc/utils.c Sun 
Feb 25 13:34:45 2018
@@ -418,11 +418,12 @@ sbox_wc_revert(svn_test__sandbox_t *b, c
   SVN_ERR(svn_wc__acquire_write_lock(&lock_root_abspath, b->wc_ctx,
                                      dir_abspath, FALSE /* lock_anchor */,
                                      b->pool, b->pool));
-  SVN_ERR(svn_wc_revert5(b->wc_ctx, abspath, depth,
+  SVN_ERR(svn_wc_revert6(b->wc_ctx, abspath, depth,
                          FALSE /* use_commit_times */,
                          NULL /* changelist_filter */,
                          FALSE /* clear_changelists */,
                          FALSE /* metadata_only */,
+                         TRUE /*added_keep_local*/,
                          NULL, NULL, /* cancel baton + func */
                          NULL, NULL, /* notify baton + func */
                          b->pool));

Modified: 
subversion/branches/better-pristines/tools/buildbot/slaves/bb-openbsd/svnbuild.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/tools/buildbot/slaves/bb-openbsd/svnbuild.sh?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- 
subversion/branches/better-pristines/tools/buildbot/slaves/bb-openbsd/svnbuild.sh
 (original)
+++ 
subversion/branches/better-pristines/tools/buildbot/slaves/bb-openbsd/svnbuild.sh
 Sun Feb 25 13:34:45 2018
@@ -25,4 +25,5 @@ set -x
 url="$(svn info --show-item url)"
 branch="${url##*/}"
 (test -h ../GNUmakefile || ln -s ../unix-build/Makefile.svn ../GNUmakefile)
+touch ../objdir/svn-${branch}/.retrieved
 (cd .. && gmake BRANCH="$branch" THREADING="no" JAVA="no" MAKE_JOBS=8)

Modified: subversion/branches/better-pristines/tools/dev/unix-build/Makefile.svn
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/tools/dev/unix-build/Makefile.svn?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/tools/dev/unix-build/Makefile.svn 
(original)
+++ subversion/branches/better-pristines/tools/dev/unix-build/Makefile.svn Sun 
Feb 25 13:34:45 2018
@@ -171,7 +171,7 @@ FETCH_CMD   = wget -c
 SUBVERSION_REPOS_URL = https://svn.apache.org/repos/asf/subversion
 BDB_URL                = http://download.oracle.com/berkeley-db/$(BDB_DIST)
 APR_URL                = https://svn.apache.org/repos/asf/apr/apr
-APR_ICONV_URL  = https://www.apache.org/dist/apr/$(APR_ICONV_DIST)
+APR_ICONV_URL  = https://archive.apache.org/dist/apr/$(APR_ICONV_DIST)
 GNU_ICONV_URL  = https://ftp.gnu.org/pub/gnu/libiconv/$(GNU_ICONV_DIST)
 APR_UTIL_URL   = https://svn.apache.org/repos/asf/apr/apr-util
 HTTPD_URL      = https://archive.apache.org/dist/httpd/$(HTTPD_DIST)
@@ -240,6 +240,10 @@ endif
 # We need this to make sure some targets below pick up the right libraries
 
LD_LIBRARY_PATH=$(PREFIX)/apr/lib:$(PREFIX)/gettext/lib:$(PREFIX)/iconv/lib:$(PREFIX)/bdb/lib:$(PREFIX)/neon/lib:$(PREFIX)/serf/lib:$(PREFIX)/sqlite/lib:$(PREFIX)/cyrus-sasl/lib:$(PREFIX)/iconv/lib:$(PREFIX)/libmagic/lib:$(PREFIX)/ruby/lib:$(PREFIX)/python/lib:$(PREFIX)/svn-$(WC)/lib
 
+# We need this to make sure some targets below pick up the right pkg-config 
files
+PKG_CONFIG_PATH=$(PREFIX)/apr/lib/pkgconfig:$(PREFIX)/neon/lib/pkgconfig:$(PREFIX)/serf/lib/pkgconfig:$(PREFIX)/sqlite/lib/pkgconfig:$(PREFIX)/ruby/lib/pkgconfig:$(PREFIX)/python/lib/pkgconfig:$(PREFIX)/lz4/lib/pkgconfig
+
+
 #######################################################################
 # Main targets.
 #######################################################################
@@ -390,6 +394,7 @@ $(APR_OBJDIR)/.configured: $(APR_OBJDIR)
        cd $(APR_SRCDIR) && ./buildconf
        cd $(APR_OBJDIR) \
                && env CFLAGS="-O0 -g $(PROFILE_CFLAGS)" GREP="`which grep`" \
+               PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                $(APR_SRCDIR)/configure \
                --prefix=$(PREFIX)/apr \
                --enable-maintainer-mode \
@@ -439,6 +444,7 @@ $(APR_ICONV_OBJDIR)/.configured: $(APR_I
        cd $(APR_ICONV_OBJDIR) \
                && env CFLAGS="-g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \
                GREP="`which grep`" \
+               PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                $(APR_ICONV_SRCDIR)/configure \
                --prefix=$(PREFIX)/apr \
                --with-apr=$(PREFIX)/apr
@@ -522,6 +528,7 @@ $(GNU_ICONV_OBJDIR)/.configured: $(GNU_I
                ${MAKE} -f Makefile.devel lib/aliases.h
        cd $(GNU_ICONV_OBJDIR) \
                && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`"\
+               PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                $(GNU_ICONV_SRCDIR)/configure \
                --prefix=$(PREFIX)/iconv \
                --enable-extra-encodings
@@ -592,6 +599,7 @@ $(APR_UTIL_OBJDIR)/.configured: $(APR_UT
        cd $(APR_UTIL_SRCDIR) && ./buildconf --with-apr=$(APR_SRCDIR)
        cd $(APR_UTIL_OBJDIR) \
                && env LD_LIBRARY_PATH=$(PREFIX)/bdb/lib \
+                       PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                        CFLAGS="-O0 -g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \
                        GREP="`which grep`" \
                        $(APR_UTIL_SRCDIR)/configure \
@@ -728,6 +736,7 @@ $(HTTPD_OBJDIR)/.configured: $(HTTPD_OBJ
        cd $(HTTPD_OBJDIR) \
                && env CFLAGS="-g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \
                GREP="`which grep`" \
+               PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                $(HTTPD_SRCDIR)/configure \
                --prefix=$(PREFIX)/httpd \
                --enable-maintainer-mode \
@@ -812,6 +821,7 @@ $(NEON_OBJDIR)/.configured: $(NEON_OBJDI
        fi
        cd $(NEON_OBJDIR) \
                && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`" \
+               PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                $(NEON_SRCDIR)/configure \
                PATH=$(NEON_OBJDIR):$$PATH \
                --prefix=$(PREFIX)/neon \
@@ -874,7 +884,8 @@ $(SERF_OBJDIR)/.compiled: $(SERF_OBJDIR)
                        CFLAGS="-O0 -g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \
                        APR=$(PREFIX)/apr \
                        APU=$(PREFIX)/apr \
-                       PREFIX=$(PREFIX)/serf
+                       PREFIX=$(PREFIX)/serf \
+                       PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)
        touch $@
 
 # install serf
@@ -966,6 +977,7 @@ endif
 $(SQLITE_OBJDIR)/.configured: $(SQLITE_OBJDIR)/.retrieved
        cd $(SQLITE_OBJDIR) \
                && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`" \
+               PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                $(SQLITE_SRCDIR)/configure \
                --prefix=$(PREFIX)/sqlite \
                $(THREADSAFE_FLAG)
@@ -1036,6 +1048,7 @@ $(CYRUS_SASL_OBJDIR)/.configured: $(CYRU
                && env CFLAGS="-g $(PROFILE_CFLAGS)" \
                CPPFLAGS="-I/usr/include/kerberosV" \
                GREP="`which grep`" \
+               PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                $(CYRUS_SASL_SRCDIR)/configure \
                --with-dbpath=$(PREFIX)/cyrus-sasl/etc/sasldb2 \
                --with-plugindir=$(PREFIX)/cyrus-sasl/lib/sasl2 \
@@ -1087,6 +1100,7 @@ $(LIBMAGIC_OBJDIR)/.retrieved: $(DISTDIR
 $(LIBMAGIC_OBJDIR)/.configured: $(LIBMAGIC_OBJDIR)/.retrieved
        cd $(LIBMAGIC_OBJDIR) \
                && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`"\
+               PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                $(LIBMAGIC_SRCDIR)/configure \
                --enable-fsect-man5 \
                --prefix=$(PREFIX)/libmagic
@@ -1140,6 +1154,7 @@ endif
 $(RUBY_OBJDIR)/.configured: $(RUBY_OBJDIR)/.retrieved
        cd $(RUBY_OBJDIR) \
                && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`"\
+               PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                $(RUBY_SRCDIR)/configure \
                --prefix=$(PREFIX)/ruby \
                --enable-shared \
@@ -1250,6 +1265,7 @@ $(PYTHON_OBJDIR)/.configured: $(PYTHON_O
                CPPFLAGS="-I$(PREFIX)/bz2/include" \
                LDFLAGS="-Wl,-rpath=$(PREFIX)/python/lib -L$(PREFIX)/bz2/lib" \
                LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \
+               PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                $(PYTHON_SRCDIR)/configure \
                --prefix=$(PREFIX)/python \
                --enable-shared \
@@ -1317,6 +1333,7 @@ $(GETTEXT_OBJDIR)/.configured: $(GETTEXT
        cd $(GETTEXT_SRCDIR) \
                && env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`"\
                LDFLAGS="-L$(PREFIX)/iconv/lib" \
+               PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                $(GETTEXT_SRCDIR)/configure \
                --prefix=$(PREFIX)/gettext \
                --with-libiconv-prefix=$(PREFIX)/iconv \
@@ -1503,6 +1520,17 @@ SVN_WITH_HTTPD=--with-apxs="$(PREFIX)/ht
 SVN_WITH_SASL=--with-sasl="$(PREFIX)/cyrus-sasl"
 endif
 
+# On OpenBSD, MExtUtils -e ldopts outputs -L/usr/local/lib, which can
+# cause us to link Perl bindings against the wrong set of SVN libraries.
+# As a workaround, we patch the configure script after it has been generated.
+ifeq ($(UNAME),OpenBSD)
+SWIG_PL_INCLUDES_HACK= sed -i 's^\($$PERL -MExtUtils::Embed -e ccopts\)^\1 | 
sed -e s@-I/usr/local/include@@^' $(svn_builddir)/configure
+SWIG_PL_LINK_HACK= sed -i 's^\($$PERL -MExtUtils::Embed -e ldopts\)^\1 | sed 
-e s@-L/usr/local/lib@@^' $(svn_builddir)/configure
+else
+SWIG_PL_INCLUDES_HACK=true
+SWIG_PL_LINK_HACK=true
+endif
+
 $(SVN_OBJDIR)/.configured: $(SVN_OBJDIR)/.retrieved $(DISTDIR)/$(JUNIT_DIST) \
        $(APR_OBJDIR)/.installed $(APR_UTIL_OBJDIR)/.installed \
        $(BDB_OBJDIR)/.installed $(SQLITE_OBJDIR)/.installed \
@@ -1511,11 +1539,14 @@ $(SVN_OBJDIR)/.configured: $(SVN_OBJDIR)
        $(SERF_OBJDIR)/.installed $(SERF_OLD_OBJDIR)/.installed \
        $(RUBY_OBJDIR)/.installed $(PYTHON_OBJDIR)/.installed
        cd $(SVN_SRCDIR) && ./autogen.sh
+       $(SWIG_PL_INCLUDES_HACK)
+       $(SWIG_PL_LINK_HACK)
        cd $(svn_builddir) && \
                env LDFLAGS="-L$(PREFIX)/neon/lib -L$(PREFIX)/apr/lib 
$(SERF_LDFLAG) $(LZ4_LDFLAG) -L$(PREFIX)/gettext/lib -L$(PREFIX)/iconv/lib" \
                        CFLAGS="-I$(PREFIX)/gettext/include -DAPR_POOL_DEBUG" \
                        CXXFLAGS="-I$(PREFIX)/gettext/include -DAPR_POOL_DEBUG" 
\
                        LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \
+                       PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
                        GREP="`which grep`" \
                        
PATH=$(PREFIX)/ruby/bin:$(PREFIX)/python/bin:$(PREFIX)/gettext/bin:$$PATH \
                        $(SVN_SRCDIR)/configure \
@@ -1563,6 +1594,17 @@ $(SVN_OBJDIR)/.pre-generated-swig-cleane
                && env MAKEFLAGS= make clean-swig
        touch $@
 
+
+# On OpenBSD, Perl's LDDLFLAGS include -L/usr/local/lib, which can cause
+# us to link Perl bindings against the wrong set of SVN libraries.
+# We manually fix up the generated Makefile.PL to work around this issue.
+ifeq ($(UNAME),OpenBSD)
+MAKEFILE_PL_LDDLFLAGS_HACK= sed -i 's@^WriteMakefile@$$config{LDDLFLAGS} =~ 
s+-L/usr/local/lib++; WriteMakefile@' \
+                       
$(SVN_SRCDIR)/subversion/bindings/swig/perl/native/Makefile.PL
+else
+MAKEFILE_PL_LDDLFLAGS_HACK=true
+endif
+
 $(SVN_OBJDIR)/.bindings-compiled: $(SVN_OBJDIR)/.installed 
$(SVN_OBJDIR)/.pre-generated-swig-cleaned
        cd $(svn_builddir) \
                && env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
@@ -1571,13 +1613,15 @@ $(SVN_OBJDIR)/.bindings-compiled: $(SVN_
                env PATH=$(PREFIX)/ruby/bin:$$PATH \
                LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) env MAKEFLAGS= make 
-j${MAKE_JOBS} swig-rb
        if [ $(ENABLE_PERL_BINDINGS) = yes ]; then \
+               cd $(svn_builddir) && make 
$(SVN_SRCDIR)/subversion/bindings/swig/perl/native/Makefile.PL; \
+               $(MAKEFILE_PL_LDDLFLAGS_HACK); \
                cd $(svn_builddir) \
                        && env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
                                env MAKEFLAGS= make -j${MAKE_JOBS} swig-pl; \
        fi
        if [ $(ENABLE_JAVA_BINDINGS) = yes ]; then \
                cd $(svn_builddir) \
-                       && env MAKEFLAGS= make -j${MAKE_JOBS} javahl; \
+                       && env MAKEFLAGS= make javahl; \
        fi
        touch $@
 
@@ -1587,13 +1631,15 @@ $(SVN_OBJDIR)/.bindings-installed: $(SVN
                env MAKEFLAGS= make install-swig-py
        cd $(svn_builddir) && \
                env PATH=$(PREFIX)/ruby/bin:$$PATH \
-               LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) env MAKEFLAGS= make 
install-swig-rb
+               LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) MAKEFLAGS= make 
install-swig-rb
        if [ $(ENABLE_PERL_BINDINGS) = yes ]; then \
                cd $(svn_builddir) \
-           && env MAKEFLAGS= make install-swig-pl-lib; \
-         cd subversion/bindings/swig/perl/native \
-                 && perl Makefile.PL PREFIX="$(SVN_PREFIX)" \
-                 && env MAKEFLAGS= make install; \
+                       && env MAKEFLAGS= LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+                               make install-swig-pl-lib; \
+               cd subversion/bindings/swig/perl/native \
+                       && perl Makefile.PL PREFIX="$(SVN_PREFIX)" \
+                       && env MAKEFLAGS= LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+                               make install; \
        fi
        if [ $(ENABLE_JAVA_BINDINGS) = yes ]; then \
                cd $(svn_builddir) \
@@ -1924,6 +1970,7 @@ endif
 
 HTTPD_CMD = env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(LIB_PTHREAD_HACK) \
                $(PREFIX)/httpd/bin/apachectl
+HTTPD_LOG_ROTATE = mv $(PREFIX)/httpd/logs/error_log 
$(PREFIX)/httpd/logs/error_log.old
 HTTPD_START_CMD = $(HTTPD_CMD) -f $(HTTPD_CHECK_CONF) -k start
 HTTPD_START_CMD_PROXY = $(HTTPD_CMD) -f $(HTTPD_PROXY_CONF)
 HTTPD_START_CMD_DEBUG = $(HTTPD_START_CMD) -X
@@ -1942,6 +1989,7 @@ SVNSERVE_STOP_CMD = kill `cat $(PWD)/svn
                        rm -f $(PWD)/svnserve-$(WC).pid
 
 start-httpd: $(HTTPD_CHECK_CONF)
+       -$(HTTPD_LOG_ROTATE)
        $(HTTPD_START_CMD)
        @echo "To run tests over http, run:"
        @echo "    make check BASE_URL=http://localhost:$(HTTPD_CHECK_PORT)"

Modified: subversion/branches/better-pristines/tools/dist/README.backport
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/tools/dist/README.backport?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/tools/dist/README.backport (original)
+++ subversion/branches/better-pristines/tools/dist/README.backport Sun Feb 25 
13:34:45 2018
@@ -7,20 +7,23 @@ F1. Auto-merge bot; the nightly svn-role
 
 F2. Conflicts detector bot; the svn-backport-conflicts-1.9.x buildbot task.
 
-And two interactive functions, described later.
+And two interactive functions¹:
+
+F3. Reviewing STATUS nominations and casting votes.
+
+F4. Adding new entries to STATUS.
 
 
 
 The scripts are:
 
 backport.pl:
-    oldest script, implements both [F1] and [F2], plus two interactive
-    functions¹.  As of March 2015, used in production by svn-role and
-    by svn-backport-conflicts-1.9.x.
+    oldest script, implements [F1], [F2], and [F3].  As of Feb 2018, used in
+    production by svn-role (running on svn-qavm3) and by 
svn-backport-conflicts-1.9.x
+    (a buildbot job).
 
 nominate.pl:
-    Symlink to backport.pl.  Implements one of the two interactive features.
-    Not used by bots.
+    Symlink to backport.pl.  Implements [F4].  (The script inspects its 
argv[0].)
 
 backport_tests_pl.py:
     Regression tests for backport.pl.
@@ -39,9 +42,11 @@ backport/*.py:
 
 detect-conflicting-backports.py:
     Implementation of [F2] using backport.py.
+    Not currently used in production.
 
 merge-approved-backports.py:
     Implementation of [F1] using backport.py.
+    Not currently used in production.
 
 backport_tests_py.py:
     Regression tests for detect-conflicting-backports.py and 
merge-approved-backports.py
@@ -52,13 +57,28 @@ backport_tests.py:
     svntest framework (../../subversion/tests/cmdline/svntest/), which is
     written in Python 2.
 
-backport*.dump:
+    Note that backport_tests.py and backport/*.py are written in different
+    languages, so they never 'import' each other.  backport_tests.py invokes
+    detect-conflicting-backports.py, merge-approved-backports.py, and
+    backport.pl in the same manner: through subprocess.check_call().
+
+backport_tests_data/backport*.dump:
     Expected output files for backport_tests.py; see the BackportTest
-    decorator.
+    decorator in backport_tests.py.
 
 
 All scripts can be run with '--help' to display their usage messages.
 
+backport.pl is considered deprecated since backport.py is better architected
+and is written in a language that many more active developers are comfortable
+with.  The unattended jobs [F1] and [F2] should be converted to using
+backport.py whenever someone gets around to do the legwork.  The interactive
+versions [F3] and [F4] are still in active use, however, so the physical
+backport.pl script should be kept around until Python versions of these are
+available.
+
+
+TODO: document that "Notes: ... --accept=foo ..." is parsed, see 
backport_tests.py #3.
 
 
 ¹ For backport.pl's interactive features, see:

Modified: subversion/branches/better-pristines/tools/dist/backport.pl
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/tools/dist/backport.pl?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/tools/dist/backport.pl (original)
+++ subversion/branches/better-pristines/tools/dist/backport.pl Sun Feb 25 
13:34:45 2018
@@ -791,7 +791,7 @@ sub vote {
 
     # Add to state votes that aren't '+0' or 'edit'
     $state->{$_->{digest}}++ for grep
-                                   +{ qw/-1 t -0 t +1 t/ }->{$_->{vote}},
+                                 ($_->{approval} or $_->{vote} =~ 
/^(-1|-0|[+]1)$/),
                                  @votesarray;
   }
 }
@@ -1279,7 +1279,7 @@ sub nominate_main {
   # Open the file in line-mode (not paragraph-mode).
   my @STATUS;
   tie @STATUS, "Tie::File", $STATUS, recsep => "\n";
-  my ($index) = grep { $STATUS[$_] =~ /^Veto/ } (0..$#STATUS);
+  my ($index) = grep { $STATUS[$_] =~ /^Veto|^Approved/ } (0..$#STATUS);
   die "Couldn't find where to add an entry" unless $index;
 
   # Add an empty line if needed.

Modified: subversion/branches/better-pristines/tools/dist/backport/status.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/tools/dist/backport/status.py?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/tools/dist/backport/status.py 
(original)
+++ subversion/branches/better-pristines/tools/dist/backport/status.py Sun Feb 
25 13:34:45 2018
@@ -194,10 +194,10 @@ class StatusFile:
         try:
           entry = StatusEntry(para_text, status_file=self)
           kind = Kind.nomination
-        except ParseException:
+        except ParseException as e:
           kind = Kind.unknown
-          logger.warning("Failed to parse entry {!r} in {!r}".format(
-                          para_text, status_fp))
+          logger.warning("Failed to parse entry {!r} in {!r}: {}".format(
+                          para_text, status_fp, e))
       else:
         kind = Kind.preamble
 
@@ -379,9 +379,11 @@ class StatusEntry:
       raise ParseException("Entry found with neither branch nor revisions")
 
     # Parse the logsummary.
-    while lines and not self._is_subheader(lines[0]):
+    while True:
       self.logsummary.append(lines[0])
       lines = lines[1:]
+      if (not lines) or self._is_subheader(lines[0]):
+        break
 
     # Parse votes.
     if "Votes:" in lines:

Modified: subversion/branches/better-pristines/tools/dist/backport_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/tools/dist/backport_tests.py?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/tools/dist/backport_tests.py (original)
+++ subversion/branches/better-pristines/tools/dist/backport_tests.py Sun Feb 
25 13:34:45 2018
@@ -660,6 +660,21 @@ def backport_unicode_entry(sbox):
   # Run it.
   run_backport(sbox)
 
+#----------------------------------------------------------------------
+@BackportTest('76cee987-25c9-4d6c-ad40-000000000013')
+def backport_logsummary_colon(sbox):
+  "a logsummary that looks like a header"
+
+  # r6: nominate r4
+  approved_entries = [
+    make_entry([4], logsummary="HTTPv2: Add comments."),
+  ]
+  sbox.simple_append(STATUS, serialize_STATUS(approved_entries))
+  sbox.simple_commit(message='Nominate r4')
+
+  # Run it.
+  run_backport(sbox)
+
 
 #----------------------------------------------------------------------
 
@@ -680,6 +695,7 @@ test_list = [ None,
               backport_otherproject_change,
               backport_STATUS_mods,
               backport_unicode_entry,
+              backport_logsummary_colon,
               # When adding a new test, include the test number in the last
               # 6 bytes of the UUID, in decimal.
              ]

Modified: subversion/branches/better-pristines/tools/dist/release.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/tools/dist/release.py?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/tools/dist/release.py (original)
+++ subversion/branches/better-pristines/tools/dist/release.py Sun Feb 25 
13:34:45 2018
@@ -71,16 +71,16 @@ tool_versions = {
             
'954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969'],
             'libtool'  : ['2.4.6',
             
'e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3'],
-            'swig'     : ['3.0.10',
-            
'2939aae39dec06095462f1b95ce1c958ac80d07b926e48871046d17c0094f44c'],
+            'swig'     : ['3.0.12',
+            
'7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d'],
   },
   '1.10' : {
             'autoconf' : ['2.69',
             
'954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969'],
             'libtool'  : ['2.4.6',
             
'e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3'],
-            'swig'     : ['3.0.10',
-            
'2939aae39dec06095462f1b95ce1c958ac80d07b926e48871046d17c0094f44c'],
+            'swig'     : ['3.0.12',
+            
'7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d'],
   },
   '1.9' : {
             'autoconf' : ['2.69',

Modified: 
subversion/branches/better-pristines/tools/hook-scripts/mailer/mailer.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/better-pristines/tools/hook-scripts/mailer/mailer.py?rev=1825304&r1=1825303&r2=1825304&view=diff
==============================================================================
--- subversion/branches/better-pristines/tools/hook-scripts/mailer/mailer.py 
(original)
+++ subversion/branches/better-pristines/tools/hook-scripts/mailer/mailer.py 
Sun Feb 25 13:34:45 2018
@@ -71,16 +71,10 @@ _MIN_SVN_VERSION = [1, 5, 0]
 
 # Import the Subversion Python bindings, making sure they meet our
 # minimum version requirements.
-try:
-  import svn.fs
-  import svn.delta
-  import svn.repos
-  import svn.core
-except ImportError:
-  sys.stderr.write(
-    "You need version %s or better of the Subversion Python bindings.\n" \
-    % ".".join([str(x) for x in _MIN_SVN_VERSION]))
-  sys.exit(1)
+import svn.fs
+import svn.delta
+import svn.repos
+import svn.core
 if _MIN_SVN_VERSION > [svn.core.SVN_VER_MAJOR,
                        svn.core.SVN_VER_MINOR,
                        svn.core.SVN_VER_PATCH]:


Reply via email to