You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by tr...@apache.org on 2018/01/31 04:16:44 UTC

svn commit: r1822736 [2/3] - in /subversion/branches/swig-py3: ./ build/ build/generator/ build/generator/swig/ build/generator/util/ subversion/bindings/javahl/native/ subversion/bindings/swig/python/libsvn_swig_py/ subversion/include/ subversion/incl...

Modified: subversion/branches/swig-py3/subversion/libsvn_client/shelve.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_client/shelve.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_client/shelve.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_client/shelve.c Wed Jan 31 04:16:43 2018
@@ -34,21 +34,74 @@
 #include "svn_path.h"
 #include "svn_hash.h"
 #include "svn_utf.h"
+#include "svn_ctype.h"
 
 #include "client.h"
+#include "private/svn_client_private.h"
 #include "private/svn_wc_private.h"
 #include "svn_private_config.h"
 
 
-/* Throw an error if NAME does not conform to our naming rules. */
 static svn_error_t *
-validate_name(const char *name,
-              apr_pool_t *scratch_pool)
+shelf_name_encode(char **encoded_name_p,
+                  const char *name,
+                  apr_pool_t *result_pool)
+{
+  char *encoded_name
+    = apr_palloc(result_pool, strlen(name) * 2 + 1);
+  char *out_pos = encoded_name;
+
+  if (name[0] == '\0')
+    return svn_error_create(SVN_ERR_BAD_CHANGELIST_NAME, NULL,
+                            _("Shelf name cannot be the empty string"));
+
+  while (*name)
+    {
+      apr_snprintf(out_pos, 3, "%02x", *name++);
+      out_pos += 2;
+    }
+  *encoded_name_p = encoded_name;
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+shelf_name_decode(char **decoded_name_p,
+                  const char *codename,
+                  apr_pool_t *result_pool)
+{
+  svn_stringbuf_t *sb
+    = svn_stringbuf_create_ensure(strlen(codename) / 2, result_pool);
+  const char *input = codename;
+
+  while (*input)
+    {
+      int c;
+      int nchars;
+      int nitems = sscanf(input, "%02x%n", &c, &nchars);
+
+      if (nitems != 1 || nchars != 2)
+        return svn_error_createf(SVN_ERR_BAD_CHANGELIST_NAME, NULL,
+                                 _("Shelve: Bad encoded name '%s'"), codename);
+      svn_stringbuf_appendbyte(sb, c);
+      input += 2;
+    }
+  *decoded_name_p = sb->data;
+  return SVN_NO_ERROR;
+}
+
+/* Set *NAME to the shelf name from FILENAME. */
+static svn_error_t *
+shelf_name_from_filename(char **name,
+                         const char *filename,
+                         apr_pool_t *result_pool)
 {
-  if (name[0] == '\0' || strchr(name, '/'))
-    return svn_error_createf(SVN_ERR_BAD_CHANGELIST_NAME, NULL,
-                             _("Shelve: Bad name '%s'"), name);
+  size_t len = strlen(filename);
 
+  if (len > 6 && strcmp(filename + len - 6, ".patch") == 0)
+    {
+      char *codename = apr_pstrndup(result_pool, filename, len - 6);
+      SVN_ERR(shelf_name_decode(name, codename, result_pool));
+    }
   return SVN_NO_ERROR;
 }
 
@@ -64,25 +117,36 @@ get_patch_abspath(char **patch_abspath,
                   apr_pool_t *scratch_pool)
 {
   char *dir;
-  const char *filename;
+  char *filename;
 
   SVN_ERR(svn_wc__get_shelves_dir(&dir, ctx->wc_ctx, wc_root_abspath,
                                   scratch_pool, scratch_pool));
-  filename = apr_pstrcat(scratch_pool, name, ".patch", SVN_VA_NULL);
+  SVN_ERR(shelf_name_encode(&filename, name, scratch_pool));
+  filename = apr_pstrcat(scratch_pool, filename, ".patch", SVN_VA_NULL);
   *patch_abspath = svn_dirent_join(dir, filename, result_pool);
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_client_shelf_write_patch(const char *name,
-                             const char *message,
-                             const char *wc_root_abspath,
-                             svn_boolean_t overwrite_existing,
-                             const apr_array_header_t *paths,
-                             svn_depth_t depth,
-                             const apr_array_header_t *changelists,
-                             svn_client_ctx_t *ctx,
-                             apr_pool_t *scratch_pool)
+/** Write local changes to a patch file for shelved change @a name.
+ *
+ * @a message: An optional log message.
+ *
+ * @a wc_root_abspath: The WC root dir.
+ *
+ * @a overwrite_existing: If a file at @a patch_abspath exists, overwrite it.
+ *
+ * @a paths, @a depth, @a changelists: The selection of local paths to diff.
+ */
+static svn_error_t *
+shelf_write_patch(const char *name,
+                  const char *message,
+                  const char *wc_root_abspath,
+                  svn_boolean_t overwrite_existing,
+                  const apr_array_header_t *paths,
+                  svn_depth_t depth,
+                  const apr_array_header_t *changelists,
+                  svn_client_ctx_t *ctx,
+                  apr_pool_t *scratch_pool)
 {
   char *patch_abspath;
   apr_int32_t flag;
@@ -128,6 +192,7 @@ svn_client_shelf_write_patch(const char
       if (svn_path_is_url(path))
         return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
                                  _("'%s' is not a local path"), path);
+      SVN_ERR(svn_dirent_get_absolute(&path, path, scratch_pool));
 
       SVN_ERR(svn_client_diff_peg6(
                      NULL /*options*/,
@@ -135,7 +200,7 @@ svn_client_shelf_write_patch(const char
                      &peg_revision,
                      &start_revision,
                      &end_revision,
-                     NULL,
+                     wc_root_abspath,
                      depth,
                      TRUE /*notice_ancestry*/,
                      FALSE /*no_diff_added*/,
@@ -157,13 +222,21 @@ svn_client_shelf_write_patch(const char
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_client_shelf_apply_patch(const char *name,
-                             const char *wc_root_abspath,
-                             svn_boolean_t reverse,
-                             svn_boolean_t dry_run,
-                             svn_client_ctx_t *ctx,
-                             apr_pool_t *scratch_pool)
+/** Apply the patch file for shelved change @a name to the WC.
+ *
+ * @a wc_root_abspath: The WC root dir.
+ *
+ * @a reverse: Apply the patch in reverse.
+ *
+ * @a dry_run: Don't really apply the changes, just notify what would be done.
+ */
+static svn_error_t *
+shelf_apply_patch(const char *name,
+                  const char *wc_root_abspath,
+                  svn_boolean_t reverse,
+                  svn_boolean_t dry_run,
+                  svn_client_ctx_t *ctx,
+                  apr_pool_t *scratch_pool)
 {
   char *patch_abspath;
 
@@ -179,11 +252,15 @@ svn_client_shelf_apply_patch(const char
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_client_shelf_delete_patch(const char *name,
-                              const char *wc_root_abspath,
-                              svn_client_ctx_t *ctx,
-                              apr_pool_t *scratch_pool)
+/** Delete the patch file for shelved change @a name.
+ *
+ * @a wc_root_abspath: The WC root dir.
+ */
+static svn_error_t *
+shelf_delete_patch(const char *name,
+                   const char *wc_root_abspath,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *scratch_pool)
 {
   char *patch_abspath, *to_abspath;
 
@@ -216,8 +293,6 @@ svn_client_shelve(const char *name,
   const char *message = "";
   svn_error_t *err;
 
-  SVN_ERR(validate_name(name, pool));
-
   /* ### TODO: check all paths are in same WC; for now use first path */
   SVN_ERR(svn_dirent_get_absolute(&local_abspath,
                                   APR_ARRAY_IDX(paths, 0, char *), pool));
@@ -236,10 +311,10 @@ svn_client_shelve(const char *name,
         return SVN_NO_ERROR;
     }
 
-  err = svn_client_shelf_write_patch(name, message, wc_root_abspath,
-                                     FALSE /*overwrite_existing*/,
-                                     paths, depth, changelists,
-                                     ctx, pool);
+  err = shelf_write_patch(name, message, wc_root_abspath,
+                          FALSE /*overwrite_existing*/,
+                          paths, depth, changelists,
+                          ctx, pool);
   if (err && APR_STATUS_IS_EEXIST(err->apr_err))
     {
       return svn_error_quick_wrapf(err,
@@ -253,15 +328,15 @@ svn_client_shelve(const char *name,
     {
       /* Reverse-apply the patch. This should be a safer way to remove those
          changes from the WC than running a 'revert' operation. */
-      SVN_ERR(svn_client_shelf_apply_patch(name, wc_root_abspath,
-                                           TRUE /*reverse*/, dry_run,
-                                           ctx, pool));
+      SVN_ERR(shelf_apply_patch(name, wc_root_abspath,
+                                TRUE /*reverse*/, dry_run,
+                                ctx, pool));
     }
 
   if (dry_run)
     {
-      SVN_ERR(svn_client_shelf_delete_patch(name, wc_root_abspath,
-                                            ctx, pool));
+      SVN_ERR(shelf_delete_patch(name, wc_root_abspath,
+                                 ctx, pool));
     }
 
   return SVN_NO_ERROR;
@@ -278,15 +353,13 @@ svn_client_unshelve(const char *name,
   const char *wc_root_abspath;
   svn_error_t *err;
 
-  SVN_ERR(validate_name(name, pool));
-
   SVN_ERR(svn_client_get_wc_root(&wc_root_abspath,
                                  local_abspath, ctx, pool, pool));
 
   /* Apply the patch. */
-  err = svn_client_shelf_apply_patch(name, wc_root_abspath,
-                                     FALSE /*reverse*/, dry_run,
-                                     ctx, pool);
+  err = shelf_apply_patch(name, wc_root_abspath,
+                          FALSE /*reverse*/, dry_run,
+                          ctx, pool);
   if (err && err->apr_err == SVN_ERR_ILLEGAL_TARGET)
     {
       return svn_error_quick_wrapf(err,
@@ -299,8 +372,8 @@ svn_client_unshelve(const char *name,
   /* Remove the patch. */
   if (! keep && ! dry_run)
     {
-      SVN_ERR(svn_client_shelf_delete_patch(name, wc_root_abspath,
-                                            ctx, pool));
+      SVN_ERR(shelf_delete_patch(name, wc_root_abspath,
+                                 ctx, pool));
     }
 
   return SVN_NO_ERROR;
@@ -315,8 +388,6 @@ svn_client_shelves_delete(const char *na
 {
   const char *wc_root_abspath;
 
-  SVN_ERR(validate_name(name, pool));
-
   SVN_ERR(svn_client_get_wc_root(&wc_root_abspath,
                                  local_abspath, ctx, pool, pool));
 
@@ -325,8 +396,8 @@ svn_client_shelves_delete(const char *na
     {
       svn_error_t *err;
 
-      err = svn_client_shelf_delete_patch(name, wc_root_abspath,
-                                          ctx, pool);
+      err = shelf_delete_patch(name, wc_root_abspath,
+                               ctx, pool);
       if (err && APR_STATUS_IS_ENOENT(err->apr_err))
         {
           return svn_error_quick_wrapf(err,
@@ -354,8 +425,6 @@ svn_client_shelf_get_paths(apr_hash_t **
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   apr_hash_t *paths = apr_hash_make(result_pool);
 
-  SVN_ERR(validate_name(name, scratch_pool));
-
   SVN_ERR(svn_client_get_wc_root(&wc_root_abspath,
                                  local_abspath, ctx, scratch_pool, scratch_pool));
   SVN_ERR(get_patch_abspath(&patch_abspath, name, wc_root_abspath,
@@ -445,15 +514,16 @@ svn_client_shelves_list(apr_hash_t **she
   for (hi = apr_hash_first(scratch_pool, dirents); hi; hi = apr_hash_next(hi))
     {
       const char *filename = apr_hash_this_key(hi);
-      size_t len = strlen(filename);
+      svn_io_dirent2_t *dirent = apr_hash_this_val(hi);
+      char *name = NULL;
 
-      if (len > 6 && strcmp(filename + len - 6, ".patch") == 0)
+      svn_error_clear(shelf_name_from_filename(&name, filename, result_pool));
+      if (name && dirent->kind == svn_node_file)
         {
-          const char *name = apr_pstrndup(result_pool, filename, len - 6);
           svn_client_shelved_patch_info_t *info
             = apr_palloc(result_pool, sizeof(*info));
 
-          info->dirent = apr_hash_this_val(hi);
+          info->dirent = dirent;
           info->mtime = info->dirent->mtime;
           info->patch_path
             = svn_dirent_join(shelves_dir, filename, result_pool);
@@ -466,17 +536,3 @@ svn_client_shelves_list(apr_hash_t **she
 
   return SVN_NO_ERROR;
 }
-
-svn_error_t *
-svn_client_shelves_any(svn_boolean_t *any_shelved,
-                       const char *local_abspath,
-                       svn_client_ctx_t *ctx,
-                       apr_pool_t *scratch_pool)
-{
-  apr_hash_t *shelved_patch_infos;
-
-  SVN_ERR(svn_client_shelves_list(&shelved_patch_infos, local_abspath,
-                                  ctx, scratch_pool, scratch_pool));
-  *any_shelved = apr_hash_count(shelved_patch_infos) != 0;
-  return SVN_NO_ERROR;
-}

Modified: subversion/branches/swig-py3/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_diff/parse-diff.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_diff/parse-diff.c Wed Jan 31 04:16:43 2018
@@ -69,6 +69,11 @@ struct svn_diff_hunk_t {
   /* APR file handle to the patch file this hunk came from. */
   apr_file_t *apr_file;
 
+  /* Whether the hunk was interpreted as pretty-print mergeinfo. If so,
+     the hunk content is in PATCH and the rest of this hunk object is
+     mostly uninitialized. */
+  svn_boolean_t is_pretty_print_mergeinfo;
+
   /* Ranges used to keep track of this hunk's texts positions within
    * the patch file. */
   struct svn_diff__hunk_range diff_text_range;
@@ -899,10 +904,6 @@ parse_prop_name(const char **prop_name,
  * The hunk header has the following format:
  * ## -0,NUMBER_OF_REVERSE_MERGES +0,NUMBER_OF_FORWARD_MERGES ##
  *
- * At this point, the number of reverse merges has already been
- * parsed into HUNK->ORIGINAL_LENGTH, and the number of forward
- * merges has been parsed into HUNK->MODIFIED_LENGTH.
- *
  * The header is followed by a list of mergeinfo, one path per line.
  * This function parses such lines. Lines describing reverse merges
  * appear first, and then all lines describing forward merges appear.
@@ -914,18 +915,27 @@ parse_prop_name(const char **prop_name,
  * ":r", which in turn is followed by a mergeinfo revision range,
  *  which is terminated by whitespace or end-of-string.
  *
- * If the current line meets the above criteria and we're able
- * to parse valid mergeinfo from it, the resulting mergeinfo
- * is added to patch->mergeinfo or patch->reverse_mergeinfo,
- * and we proceed to the next line.
+ * *NUMBER_OF_REVERSE_MERGES and *NUMBER_OF_FORWARD_MERGES are the
+ * numbers of reverse and forward merges remaining to be read. This
+ * function decrements *NUMBER_OF_REVERSE_MERGES for each LINE
+ * parsed until that is zero, then *NUMBER_OF_FORWARD_MERGES for
+ * each LINE parsed until that is zero. If both are zero, it parses
+ * and discards LINE.
+ *
+ * If LINE is successfully parsed, *FOUND_MERGEINFO is set to TRUE,
+ * otherwise to FALSE.
+ *
+ * If LINE is successfully parsed and counted, the resulting mergeinfo
+ * is added to PATCH->mergeinfo or PATCH->reverse_mergeinfo.
  */
 static svn_error_t *
-parse_mergeinfo(svn_boolean_t *found_mergeinfo,
-                svn_stringbuf_t *line,
-                svn_diff_hunk_t *hunk,
-                svn_patch_t *patch,
-                apr_pool_t *result_pool,
-                apr_pool_t *scratch_pool)
+parse_pretty_mergeinfo_line(svn_boolean_t *found_mergeinfo,
+                            svn_linenum_t *number_of_reverse_merges,
+                            svn_linenum_t *number_of_forward_merges,
+                            svn_stringbuf_t *line,
+                            svn_patch_t *patch,
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool)
 {
   char *slash = strchr(line->data, '/');
   char *colon = strrchr(line->data, ':');
@@ -972,7 +982,7 @@ parse_mergeinfo(svn_boolean_t *found_mer
 
       if (mergeinfo)
         {
-          if (hunk->original_length > 0) /* reverse merges */
+          if (*number_of_reverse_merges > 0) /* reverse merges */
             {
               if (patch->reverse)
                 {
@@ -994,9 +1004,9 @@ parse_mergeinfo(svn_boolean_t *found_mer
                                                  result_pool,
                                                  scratch_pool));
                 }
-              hunk->original_length--;
+              (*number_of_reverse_merges)--;
             }
-          else if (hunk->modified_length > 0) /* forward merges */
+          else if (number_of_forward_merges > 0) /* forward merges */
             {
               if (patch->reverse)
                 {
@@ -1018,7 +1028,7 @@ parse_mergeinfo(svn_boolean_t *found_mer
                                                  result_pool,
                                                  scratch_pool));
                 }
-              hunk->modified_length--;
+              (*number_of_forward_merges)--;
             }
 
           *found_mergeinfo = TRUE;
@@ -1165,18 +1175,48 @@ parse_next_hunk(svn_diff_hunk_t **hunk,
       if (in_hunk && *is_property && *prop_name &&
           strcmp(*prop_name, SVN_PROP_MERGEINFO) == 0)
         {
-          svn_boolean_t found_mergeinfo;
+          svn_boolean_t found_pretty_mergeinfo_line;
 
-          SVN_ERR(parse_mergeinfo(&found_mergeinfo, line, *hunk, patch,
-                                  result_pool, iterpool));
-          if (found_mergeinfo)
-            continue; /* Proceed to the next line in the svn:mergeinfo hunk. */
-          else
+          if (! hunk_seen)
+            {
+              /* We're reading the first line of the hunk, so the start
+               * of the line just read is the hunk text's byte offset. */
+              start = last_line;
+            }
+
+          SVN_ERR(parse_pretty_mergeinfo_line(&found_pretty_mergeinfo_line,
+                                              &original_lines, &modified_lines,
+                                              line, patch,
+                                              result_pool, iterpool));
+          if (found_pretty_mergeinfo_line)
             {
-              /* Perhaps we can also use original_lines/modified_lines here */
+              hunk_seen = TRUE;
+              (*hunk)->is_pretty_print_mergeinfo = TRUE;
+              continue; /* Proceed to the next line in the svn:mergeinfo hunk. */
+            }
 
-              in_hunk = FALSE; /* On to next property */
+          if ((*hunk)->is_pretty_print_mergeinfo)
+            {
+              /* We have reached the end of the pretty-print-mergeinfo hunk.
+                 (This format uses only one hunk.) */
+              if (eof)
+                {
+                  /* The hunk ends at EOF. */
+                  end = pos;
+                }
+              else
+                {
+                  /* The start of the current line marks the first byte
+                   * after the hunk text. */
+                  end = last_line;
+                }
+              original_end = end;
+              modified_end = end;
+              break;
             }
+
+          /* Otherwise, this is a property diff in the
+             regular format so fall through to normal processing. */
         }
 
       if (in_hunk)
@@ -1971,10 +2011,10 @@ parse_hunks(svn_patch_t *patch, apr_file
           else
             last_prop_name = prop_name;
 
-          /* Skip svn:mergeinfo properties.
-           * Mergeinfo data cannot be represented as a hunk and
+          /* Skip pretty-printed svn:mergeinfo property hunks.
+           * Pretty-printed mergeinfo data cannot be represented as a hunk and
            * is therefore stored in PATCH itself. */
-          if (strcmp(prop_name, SVN_PROP_MERGEINFO) == 0)
+          if (hunk->is_pretty_print_mergeinfo)
             continue;
 
           SVN_ERR(add_property_hunk(patch, prop_name, hunk, prop_operation,

Modified: subversion/branches/swig-py3/subversion/libsvn_subr/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/cmdline.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/cmdline.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/cmdline.c Wed Jan 31 04:16:43 2018
@@ -343,6 +343,23 @@ svn_cmdline_path_local_style_from_utf8(c
 }
 
 svn_error_t *
+svn_cmdline__stdin_readline(const char **result,
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool)
+{
+  svn_stringbuf_t *buf = NULL;
+  svn_stream_t *stdin_stream = NULL;
+  svn_boolean_t oob = FALSE;
+
+  SVN_ERR(svn_stream_for_stdin2(&stdin_stream, TRUE, scratch_pool));
+  SVN_ERR(svn_stream_readline(stdin_stream, &buf, APR_EOL_STR, &oob, result_pool));
+
+  *result = buf->data;
+
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
 svn_cmdline_printf(apr_pool_t *pool, const char *fmt, ...)
 {
   const char *message;

Modified: subversion/branches/swig-py3/subversion/libsvn_subr/config_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/config_file.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/config_file.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/config_file.c Wed Jan 31 04:16:43 2018
@@ -466,6 +466,7 @@ parse_value_continuation_lines(int *pch,
               else
                 {
                   /* This is a continuation line. Read it. */
+                  SVN_ERR(parser_ungetc(ctx, ch));
                   SVN_ERR(parser_get_line(ctx, ctx->line_read, &ch));
 
                   /* Trailing whitespace is ignored. */

Modified: subversion/branches/swig-py3/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/io.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/io.c Wed Jan 31 04:16:43 2018
@@ -5440,20 +5440,3 @@ svn_io_file_readline(apr_file_t *file,
 
   return SVN_NO_ERROR;
 }
-
-svn_error_t *
-svn_io_stdin_readline(const char **result,
-                      apr_pool_t *result_pool,
-                      apr_pool_t *scratch_pool)
-{
-  svn_stringbuf_t *buf = NULL;
-  svn_stream_t *stdin_stream = NULL;
-  svn_boolean_t oob = FALSE;
-
-  SVN_ERR(svn_stream_for_stdin2(&stdin_stream, TRUE, scratch_pool));
-  SVN_ERR(svn_stream_readline(stdin_stream, &buf, APR_EOL_STR, &oob, result_pool));
-
-  *result = buf->data;
-
-  return SVN_NO_ERROR;
-}

Modified: subversion/branches/swig-py3/subversion/libsvn_subr/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/version.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/version.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/version.c Wed Jan 31 04:16:43 2018
@@ -143,7 +143,7 @@ svn_version_extended(svn_boolean_t verbo
   info->build_time = __TIME__;
   info->build_host = SVN_BUILD_HOST;
   info->copyright = apr_pstrdup
-    (pool, _("Copyright (C) 2017 The Apache Software Foundation.\n"
+    (pool, _("Copyright (C) 2018 The Apache Software Foundation.\n"
              "This software consists of contributions made by many people;\n"
              "see the NOTICE file for more information.\n"
              "Subversion is open source software, see "

Modified: subversion/branches/swig-py3/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_wc/deprecated.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_wc/deprecated.c Wed Jan 31 04:16:43 2018
@@ -1091,6 +1091,33 @@ svn_wc_add(const char *path,
 
 /*** From revert.c ***/
 svn_error_t *
+svn_wc_revert5(svn_wc_context_t *wc_ctx,
+               const char *local_abspath,
+               svn_depth_t depth,
+               svn_boolean_t use_commit_times,
+               const apr_array_header_t *changelist_filter,
+               svn_boolean_t clear_changelists,
+               svn_boolean_t metadata_only,
+               svn_cancel_func_t cancel_func,
+               void *cancel_baton,
+               svn_wc_notify_func2_t notify_func,
+               void *notify_baton,
+               apr_pool_t *scratch_pool)
+{
+  SVN_ERR(svn_wc_revert6(wc_ctx, local_abspath,
+                         depth,
+                         use_commit_times,
+                         changelist_filter,
+                         clear_changelists,
+                         metadata_only,
+                         TRUE /*added_keep_local*/,
+                         cancel_func, cancel_baton,
+                         notify_func, notify_baton,
+                         scratch_pool));
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
 svn_wc_revert4(svn_wc_context_t *wc_ctx,
                const char *local_abspath,
                svn_depth_t depth,

Modified: subversion/branches/swig-py3/subversion/libsvn_wc/revert.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_wc/revert.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_wc/revert.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_wc/revert.c Wed Jan 31 04:16:43 2018
@@ -285,6 +285,7 @@ revert_restore(svn_boolean_t *run_wq,
                svn_boolean_t metadata_only,
                svn_boolean_t use_commit_times,
                svn_boolean_t revert_root,
+               svn_boolean_t added_keep_local,
                const struct svn_wc__db_info_t *info,
                svn_cancel_func_t cancel_func,
                void *cancel_baton,
@@ -344,8 +345,9 @@ revert_restore(svn_boolean_t *run_wq,
     }
   else
     {
-      if (!copied_here)
+      if (added_keep_local && !copied_here)
         {
+          /* It is a plain add, and we want to keep the local file/dir. */
           if (notify_func && notify_required)
             notify_func(notify_baton,
                         svn_wc_create_notify(local_abspath,
@@ -359,8 +361,17 @@ revert_restore(svn_boolean_t *run_wq,
                                                   scratch_pool));
           return SVN_NO_ERROR;
         }
+      else if (!copied_here)
+        {
+          /* It is a plain add, and we don't want to keep the local file/dir. */
+          status = svn_wc__db_status_not_present;
+          kind = svn_node_none;
+          recorded_size = SVN_INVALID_FILESIZE;
+          recorded_time = 0;
+        }
       else
         {
+          /* It is a copy, so we don't want to keep the local file/dir. */
           /* ### Initialise to values which prevent the code below from
            * ### trying to restore anything to disk.
            * ### 'status' should be status_unknown but that doesn't exist. */
@@ -429,6 +440,7 @@ revert_restore(svn_boolean_t *run_wq,
           SVN_ERR(revert_restore(run_wq,
                                  db, child_abspath, depth, metadata_only,
                                  use_commit_times, FALSE /* revert root */,
+                                 added_keep_local,
                                  apr_hash_this_val(hi),
                                  cancel_func, cancel_baton,
                                  notify_func, notify_baton,
@@ -536,11 +548,7 @@ revert_wc_data(svn_boolean_t *run_wq,
   /* If we expect a versioned item to be present then check that any
      item on disk matches the versioned item, if it doesn't match then
      fix it or delete it.  */
-  if (on_disk != svn_node_none
-      && status != svn_wc__db_status_server_excluded
-      && status != svn_wc__db_status_deleted
-      && status != svn_wc__db_status_excluded
-      && status != svn_wc__db_status_not_present)
+  if (on_disk != svn_node_none)
     {
       if (on_disk == svn_node_dir && kind != svn_node_dir)
         {
@@ -560,7 +568,11 @@ revert_wc_data(svn_boolean_t *run_wq,
               on_disk = svn_node_none;
             }
         }
-      else if (on_disk == svn_node_file)
+      else if (on_disk == svn_node_file
+               && status != svn_wc__db_status_server_excluded
+               && status != svn_wc__db_status_deleted
+               && status != svn_wc__db_status_excluded
+               && status != svn_wc__db_status_not_present)
         {
           svn_boolean_t modified;
           apr_hash_t *props;
@@ -712,6 +724,7 @@ revert(svn_wc__db_t *db,
        svn_boolean_t use_commit_times,
        svn_boolean_t clear_changelists,
        svn_boolean_t metadata_only,
+       svn_boolean_t added_keep_local,
        svn_cancel_func_t cancel_func,
        void *cancel_baton,
        svn_wc_notify_func2_t notify_func,
@@ -762,6 +775,7 @@ revert(svn_wc__db_t *db,
     err = svn_error_trace(
               revert_restore(&run_queue, db, local_abspath, depth, metadata_only,
                              use_commit_times, TRUE /* revert root */,
+                             added_keep_local,
                              info, cancel_func, cancel_baton,
                              notify_func, notify_baton,
                              scratch_pool));
@@ -791,6 +805,7 @@ revert_changelist(svn_wc__db_t *db,
                   apr_hash_t *changelist_hash,
                   svn_boolean_t clear_changelists,
                   svn_boolean_t metadata_only,
+                  svn_boolean_t added_keep_local,
                   svn_cancel_func_t cancel_func,
                   void *cancel_baton,
                   svn_wc_notify_func2_t notify_func,
@@ -809,7 +824,7 @@ revert_changelist(svn_wc__db_t *db,
                                         scratch_pool))
     SVN_ERR(revert(db, local_abspath,
                    svn_depth_empty, use_commit_times, clear_changelists,
-                   metadata_only,
+                   metadata_only, added_keep_local,
                    cancel_func, cancel_baton,
                    notify_func, notify_baton,
                    scratch_pool));
@@ -845,6 +860,7 @@ revert_changelist(svn_wc__db_t *db,
       SVN_ERR(revert_changelist(db, child_abspath, depth,
                                 use_commit_times, changelist_hash,
                                 clear_changelists, metadata_only,
+                                added_keep_local,
                                 cancel_func, cancel_baton,
                                 notify_func, notify_baton,
                                 iterpool));
@@ -871,6 +887,7 @@ revert_partial(svn_wc__db_t *db,
                svn_boolean_t use_commit_times,
                svn_boolean_t clear_changelists,
                svn_boolean_t metadata_only,
+               svn_boolean_t added_keep_local,
                svn_cancel_func_t cancel_func,
                void *cancel_baton,
                svn_wc_notify_func2_t notify_func,
@@ -892,6 +909,7 @@ revert_partial(svn_wc__db_t *db,
      children.  */
   SVN_ERR(revert(db, local_abspath, svn_depth_empty,
                  use_commit_times, clear_changelists, metadata_only,
+                 added_keep_local,
                  cancel_func, cancel_baton,
                  notify_func, notify_baton, iterpool));
 
@@ -926,7 +944,7 @@ revert_partial(svn_wc__db_t *db,
       /* Revert just this node (depth=empty).  */
       SVN_ERR(revert(db, child_abspath,
                      svn_depth_empty, use_commit_times, clear_changelists,
-                     metadata_only,
+                     metadata_only, added_keep_local,
                      cancel_func, cancel_baton,
                      notify_func, notify_baton,
                      iterpool));
@@ -939,13 +957,14 @@ revert_partial(svn_wc__db_t *db,
 
 
 svn_error_t *
-svn_wc_revert5(svn_wc_context_t *wc_ctx,
+svn_wc_revert6(svn_wc_context_t *wc_ctx,
                const char *local_abspath,
                svn_depth_t depth,
                svn_boolean_t use_commit_times,
                const apr_array_header_t *changelist_filter,
                svn_boolean_t clear_changelists,
                svn_boolean_t metadata_only,
+               svn_boolean_t added_keep_local,
                svn_cancel_func_t cancel_func,
                void *cancel_baton,
                svn_wc_notify_func2_t notify_func,
@@ -963,6 +982,7 @@ svn_wc_revert5(svn_wc_context_t *wc_ctx,
                                                changelist_hash,
                                                clear_changelists,
                                                metadata_only,
+                                               added_keep_local,
                                                cancel_func, cancel_baton,
                                                notify_func, notify_baton,
                                                scratch_pool));
@@ -972,6 +992,7 @@ svn_wc_revert5(svn_wc_context_t *wc_ctx,
     return svn_error_trace(revert(wc_ctx->db, local_abspath,
                                   depth, use_commit_times, clear_changelists,
                                   metadata_only,
+                                  added_keep_local,
                                   cancel_func, cancel_baton,
                                   notify_func, notify_baton,
                                   scratch_pool));
@@ -986,6 +1007,7 @@ svn_wc_revert5(svn_wc_context_t *wc_ctx,
     return svn_error_trace(revert_partial(wc_ctx->db, local_abspath,
                                           depth, use_commit_times,
                                           clear_changelists, metadata_only,
+                                          added_keep_local,
                                           cancel_func, cancel_baton,
                                           notify_func, notify_baton,
                                           scratch_pool));

Modified: subversion/branches/swig-py3/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_wc/wc.h?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/swig-py3/subversion/libsvn_wc/wc.h Wed Jan 31 04:16:43 2018
@@ -159,6 +159,7 @@ extern "C" {
  *
  * == 1.8.x shipped with format 31
  * == 1.9.x shipped with format 31
+ * == 1.10.x shipped with format 31
  *
  * Please document any further format changes here.
  */

Modified: subversion/branches/swig-py3/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/mod_dav_svn/dav_svn.h?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/swig-py3/subversion/mod_dav_svn/dav_svn.h Wed Jan 31 04:16:43 2018
@@ -359,10 +359,6 @@ svn_boolean_t dav_svn__get_list_parentpa
    master server version (if provided via SVNMasterVersion).  */
 svn_boolean_t dav_svn__check_httpv2_support(request_rec *r);
 
-/* For the repository referred to by this request, should ephemeral
-   txnprop support be advertised?  */
-svn_boolean_t dav_svn__check_ephemeral_txnprops_support(request_rec *r);
-
 
 
 /* SPECIAL URI

Modified: subversion/branches/swig-py3/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/mod_dav_svn/mod_dav_svn.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/swig-py3/subversion/mod_dav_svn/mod_dav_svn.c Wed Jan 31 04:16:43 2018
@@ -923,21 +923,6 @@ dav_svn__check_httpv2_support(request_re
 }
 
 
-svn_boolean_t
-dav_svn__check_ephemeral_txnprops_support(request_rec *r)
-{
-  svn_version_t *version = dav_svn__get_master_version(r);
-
-  /* We know this server supports ephemeral txnprops.  But if we're
-     proxying requests to a master server, we need to see if it
-     supports them, too.  */
-  if (version && (! svn_version__at_least(version, 1, 8, 0)))
-    return FALSE;
-
-  return TRUE;
-}
-
-
 /* FALSE if path authorization should be skipped.
  * TRUE if either the bypass or the apache subrequest methods should be used.
  */

Modified: subversion/branches/swig-py3/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/mod_dav_svn/version.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/swig-py3/subversion/mod_dav_svn/version.c Wed Jan 31 04:16:43 2018
@@ -152,9 +152,6 @@ get_vsn_options(apr_pool_t *p, apr_text_
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INHERITED_PROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INLINE_PROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_REVERSE_FILE_REVS);
-  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_SVNDIFF1);
-  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_SVNDIFF2);
-  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PUT_RESULT_CHECKSUM);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_LIST);
   /* Mergeinfo is a special case: here we merely say that the server
    * knows how to handle mergeinfo -- whether the repository does too
@@ -179,11 +176,29 @@ get_option(const dav_resource *resource,
            const apr_xml_elem *elem,
            apr_text_header *option)
 {
+  int i;
   request_rec *r = resource->info->r;
   const char *repos_root_uri =
     dav_svn__build_uri(resource->info->repos, DAV_SVN__BUILD_URI_PUBLIC,
                        SVN_IGNORED_REVNUM, "", FALSE /* add_href */,
                        resource->pool);
+  svn_version_t *master_version = dav_svn__get_master_version(r);
+
+  /* These capabilities are used during commit and when configured as
+     a WebDAV slave (SVNMasterURI is set) their availablity should
+     depend on the master version (SVNMasterVersion is set) if it is
+     older than our own version.  Also, although SVNDIFF1 is available
+     before 1.10 none of those earlier servers advertised it so for
+     consistency we don't advertise it for masters older than 1.10. */
+  struct capability_versions_t {
+    const char *capability_name;
+    svn_version_t min_version;
+  } capabilities[] = {
+    { SVN_DAV_NS_DAV_SVN_EPHEMERAL_TXNPROPS,  { 1,  8, 0, ""} },
+    { SVN_DAV_NS_DAV_SVN_SVNDIFF1,            { 1, 10, 0, ""} },
+    { SVN_DAV_NS_DAV_SVN_SVNDIFF2,            { 1, 10, 0, ""} },
+    { SVN_DAV_NS_DAV_SVN_PUT_RESULT_CHECKSUM, { 1, 10, 0, ""} },
+  };
 
   /* ### DAV:version-history-collection-set */
   if (elem->ns != APR_XML_NS_DAV_ID
@@ -209,14 +224,6 @@ get_option(const dav_resource *resource,
   apr_text_append(resource->pool, option,
                   "</D:activity-collection-set>");
 
-  /* If we're allowed (by configuration) to do so, advertise support
-     for ephemeral transaction properties. */
-  if (dav_svn__check_ephemeral_txnprops_support(r))
-    {
-      apr_table_addn(r->headers_out, "DAV",
-                     SVN_DAV_NS_DAV_SVN_EPHEMERAL_TXNPROPS);
-    }
-
   if (resource->info->repos->fs)
     {
       svn_error_t *serr;
@@ -277,8 +284,6 @@ get_option(const dav_resource *resource,
      DeltaV-free!  If we're configured to advise this support, do so.  */
   if (resource->info->repos->v2_protocol)
     {
-      int i;
-      svn_version_t *master_version = dav_svn__get_master_version(r);
       dav_svn__bulk_upd_conf bulk_upd_conf = dav_svn__get_bulk_updates_flag(r);
 
       /* The list of Subversion's custom POSTs and which versions of
@@ -349,6 +354,22 @@ get_option(const dav_resource *resource,
         }
     }
 
+  /* Report commit capabilites. */
+  for (i = 0; i < sizeof(capabilities)/sizeof(capabilities[0]); ++i)
+    {
+      /* If a master version is declared filter out unsupported
+         capabilities. */
+      if (master_version
+          && (!svn_version__at_least(master_version,
+                                     capabilities[i].min_version.major,
+                                     capabilities[i].min_version.minor,
+                                     capabilities[i].min_version.patch)))
+        continue;
+
+      apr_table_addn(r->headers_out, "DAV",
+                     apr_pstrdup(r->pool, capabilities[i].capability_name));
+    }
+
   return NULL;
 }
 

Modified: subversion/branches/swig-py3/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/cl.h?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/cl.h (original)
+++ subversion/branches/swig-py3/subversion/svn/cl.h Wed Jan 31 04:16:43 2018
@@ -304,6 +304,13 @@ svn_opt_subcommand_t
   svn_cl__revert,
   svn_cl__resolve,
   svn_cl__resolved,
+  svn_cl__shelf_diff,
+  svn_cl__shelf_drop,
+  svn_cl__shelf_list,
+  svn_cl__shelf_log,
+  svn_cl__shelf_save,
+  svn_cl__shelf_shelve,
+  svn_cl__shelf_unshelve,
   svn_cl__shelve,
   svn_cl__unshelve,
   svn_cl__shelves,

Modified: subversion/branches/swig-py3/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/diff-cmd.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/swig-py3/subversion/svn/diff-cmd.c Wed Jan 31 04:16:43 2018
@@ -463,7 +463,7 @@ svn_cl__diff(apr_getopt_t *os,
                                 ctx, iterpool));
             }
           else
-            SVN_ERR(svn_client_diff6(
+            SVN_ERR(svn_client_diff7(
                      options,
                      target1,
                      &(opt_state->start_revision),
@@ -479,6 +479,7 @@ svn_cl__diff(apr_getopt_t *os,
                      ignore_properties,
                      opt_state->diff.properties_only,
                      opt_state->diff.use_git_diff_format,
+                     TRUE /*pretty_print_mergeinfo*/,
                      svn_cmdline_output_encoding(pool),
                      outstream,
                      errstream,
@@ -515,7 +516,7 @@ svn_cl__diff(apr_getopt_t *os,
                                 ctx, iterpool));
             }
           else
-            SVN_ERR(svn_client_diff_peg6(
+            SVN_ERR(svn_client_diff_peg7(
                      options,
                      truepath,
                      &peg_revision,
@@ -531,6 +532,7 @@ svn_cl__diff(apr_getopt_t *os,
                      ignore_properties,
                      opt_state->diff.properties_only,
                      opt_state->diff.use_git_diff_format,
+                     TRUE /*pretty_print_mergeinfo*/,
                      svn_cmdline_output_encoding(pool),
                      outstream,
                      errstream,

Modified: subversion/branches/swig-py3/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/log-cmd.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/log-cmd.c (original)
+++ subversion/branches/swig-py3/subversion/svn/log-cmd.c Wed Jan 31 04:16:43 2018
@@ -88,7 +88,7 @@ display_diff(const svn_log_entry_t *log_
   end_revision.value.number = log_entry->revision;
 
   SVN_ERR(svn_stream_puts(outstream, "\n"));
-  SVN_ERR(svn_client_diff_peg6(diff_options,
+  SVN_ERR(svn_client_diff_peg7(diff_options,
                                target_path_or_url,
                                target_peg_revision,
                                &start_revision, &end_revision,
@@ -102,6 +102,7 @@ display_diff(const svn_log_entry_t *log_
                                FALSE /* ignore prop diff */,
                                FALSE /* properties only */,
                                FALSE /* use git diff format */,
+                               TRUE  /* pretty_print_mergeinfo */,
                                svn_cmdline_output_encoding(pool),
                                outstream,
                                errstream,

Modified: subversion/branches/swig-py3/subversion/svn/revert-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/revert-cmd.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/revert-cmd.c (original)
+++ subversion/branches/swig-py3/subversion/svn/revert-cmd.c Wed Jan 31 04:16:43 2018
@@ -67,10 +67,11 @@ svn_cl__revert(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__check_targets_are_local_paths(targets));
 
-  err = svn_client_revert3(targets, opt_state->depth,
+  err = svn_client_revert4(targets, opt_state->depth,
                            opt_state->changelists,
                            FALSE /* clear_changelists */,
                            FALSE /* metadata_only */,
+                           TRUE /*added_keep_local*/,
                            ctx, scratch_pool);
   if (err
       && (err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH)

Modified: subversion/branches/swig-py3/subversion/svn/shelve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/shelve-cmd.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/shelve-cmd.c (original)
+++ subversion/branches/swig-py3/subversion/svn/shelve-cmd.c Wed Jan 31 04:16:43 2018
@@ -121,7 +121,7 @@ shelves_list(const char *local_abspath,
         {
 #ifndef WIN32
           int result = system(apr_psprintf(scratch_pool,
-                                           "diffstat %s 2> /dev/null",
+                                           "diffstat -p0 %s 2> /dev/null",
                                            info->patch_path));
           if (result == 0)
             SVN_ERR(svn_cmdline_printf(scratch_pool,
@@ -316,6 +316,7 @@ svn_cl__shelves(apr_getopt_t *os,
                 void *baton,
                 apr_pool_t *pool)
 {
+  svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
   const char *local_abspath;
 
@@ -324,7 +325,8 @@ svn_cl__shelves(apr_getopt_t *os,
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, "", pool));
-  SVN_ERR(shelves_list(local_abspath, TRUE /*diffstat*/, ctx, pool));
+  SVN_ERR(shelves_list(local_abspath, ! opt_state->quiet /*diffstat*/,
+                       ctx, pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/swig-py3/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/svn.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/svn.c (original)
+++ subversion/branches/swig-py3/subversion/svn/svn.c Wed Jan 31 04:16:43 2018
@@ -61,6 +61,8 @@
 #include "svn_private_config.h"
 
 
+/*#define WITH_SHELVE_V1*/
+
 /*** Option Processing ***/
 
 /* Add an identifier here for long options that don't have a short
@@ -146,9 +148,11 @@ 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
 } svn_cl__longopt_t;
 
 
@@ -474,9 +478,11 @@ 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
 
   /* Long-opt Aliases
    *
@@ -1690,6 +1696,116 @@ 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"
+     "\n"
+     "  Show the changes in shelf NAME:VERSION (default: latest) as a diff.\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"
+    ),
+  },
+
+  { "shelf-drop", svn_cl__shelf_drop, {0}, N_
+    ("Delete a shelf.\n"
+     "usage: shelf-drop NAME\n"
+     "\n"
+     "  Delete the shelf named NAME.\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"
+    ),
+  },
+
+  { "shelf-list", svn_cl__shelf_list, {"shelves"}, N_
+    ("List shelves.\n"
+     "usage: shelf-list\n"
+     "\n"
+     "  List shelves. Include the first line of any log message\n"
+     "  and some details about the contents of the shelf, unless '-q' is\n"
+     "  given.\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', 'v'}
+  },
+
+  { "shelf-log", svn_cl__shelf_log, {0}, N_
+    ("Show the versions of a shelf.\n"
+     "usage: shelf-log NAME\n"
+     "\n"
+     "  Show all versions of shelf NAME.\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', 'v'}
+  },
+
+  { "shelf-save", svn_cl__shelf_save, {0}, N_
+    ("Copy local changes onto a new version of a shelf.\n"
+     "usage: shelf-save NAME [PATH...]\n"
+     "\n"
+     "  Save local changes in the given PATHs as a new version of shelf NAME.\n"
+     "  The shelf's log message can be set with -m, -F, etc.\n"
+     "\n"
+     "  The same as 'svn shelve --keep-local'.\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', opt_dry_run,
+     opt_depth, opt_targets, opt_changelist,
+     SVN_CL__LOG_MSG_OPTIONS,
+    }
+  },
+
+  { "shelve", svn_cl__shelf_shelve, {0}, N_
+    ("Move local changes onto a shelf.\n"
+     "usage: shelve [--keep-local] NAME [PATH...]\n"
+     "\n"
+     "  Save the local changes in the given PATHs to a shelf named NAME.\n"
+     "  Revert those changes from the WC unless '--keep-local' is given.\n"
+     "  The shelf's log message can be set with -m, -F, etc.\n"
+     "\n"
+     "  'svn shelve --keep-local' is the same as 'svn shelf-save'.\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"
+     "     copies, moves, mkdir, rmdir,\n"
+     "     'binary' content, uncommittable states\n"
+     "\n"
+     "  To bring back shelved changes, use 'svn unshelve NAME'.\n"
+     "\n"
+     "  Shelves are stored in <WC>/.svn/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', opt_dry_run, opt_keep_local,
+     opt_depth, opt_targets, opt_changelist,
+     SVN_CL__LOG_MSG_OPTIONS,
+    } },
+
+  { "unshelve", svn_cl__shelf_unshelve, {0}, N_
+    ("Copy shelved changes back into the WC.\n"
+     "usage: unshelve [NAME [VERSION]]\n"
+     "\n"
+     "  Apply the shelf named NAME to the working copy.\n"
+     "  NAME defaults to the newest shelf.\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"
+    ),
+    {'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"
@@ -1756,7 +1872,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  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"
@@ -2308,9 +2425,11 @@ 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;
@@ -2494,7 +2613,9 @@ 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:
@@ -2510,7 +2631,9 @@ 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:
@@ -3024,7 +3147,13 @@ 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
-          || subcommand->cmd_func == svn_cl__shelve))
+#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,
          that's probably not what the user intended. */
@@ -3165,7 +3294,7 @@ sub_main(int *exit_code, int argc, const
   /* Get password from stdin if necessary */
   if (read_pass_from_stdin)
     {
-      SVN_ERR(svn_io_stdin_readline(&opt_state.auth_password, pool, pool));
+      SVN_ERR(svn_cmdline__stdin_readline(&opt_state.auth_password, pool, pool));
     }
 
   /* Set up our cancellation support. */

Modified: subversion/branches/swig-py3/subversion/svnbench/svnbench.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svnbench/svnbench.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svnbench/svnbench.c (original)
+++ subversion/branches/swig-py3/subversion/svnbench/svnbench.c Wed Jan 31 04:16:43 2018
@@ -938,7 +938,7 @@ sub_main(int *exit_code, int argc, const
   /* Get password from stdin if necessary */
   if (read_pass_from_stdin)
     {
-      SVN_ERR(svn_io_stdin_readline(&opt_state.auth_password, pool, pool));
+      SVN_ERR(svn_cmdline__stdin_readline(&opt_state.auth_password, pool, pool));
     }
 
   /* Set up our cancellation support. */

Modified: subversion/branches/swig-py3/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svnmucc/svnmucc.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/swig-py3/subversion/svnmucc/svnmucc.c Wed Jan 31 04:16:43 2018
@@ -740,7 +740,7 @@ sub_main(int *exit_code, int argc, const
   /* Get password from stdin if necessary */
   if (read_pass_from_stdin)
     {
-      SVN_ERR(svn_io_stdin_readline(&password, pool, pool));
+      SVN_ERR(svn_cmdline__stdin_readline(&password, pool, pool));
     }
 
   SVN_ERR(svn_client_create_context2(&ctx, cfg_hash, pool));

Modified: subversion/branches/swig-py3/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svnrdump/svnrdump.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/swig-py3/subversion/svnrdump/svnrdump.c Wed Jan 31 04:16:43 2018
@@ -1093,7 +1093,7 @@ sub_main(int *exit_code, int argc, const
   /* Get password from stdin if necessary */
   if (read_pass_from_stdin)
     {
-      SVN_ERR(svn_io_stdin_readline(&password, pool, pool));
+      SVN_ERR(svn_cmdline__stdin_readline(&password, pool, pool));
     }
 
   non_interactive = !svn_cmdline__be_interactive(non_interactive,

Modified: subversion/branches/swig-py3/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/tests/cmdline/davautocheck.sh?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/swig-py3/subversion/tests/cmdline/davautocheck.sh Wed Jan 31 04:16:43 2018
@@ -79,8 +79,8 @@
 # environment.
 #
 # Passing --no-tests as argv[1] will have the script start a server
-# but not run any tests.  Passing --gdb will do the same, and in addition
-# spawn gdb in the foreground attached to the running server.
+# but not run any tests.  Passing --gdb or --lldb will do the same, and in
+# addition spawn gdb/lldb in the foreground attached to the running server.
 
 PYTHON=${PYTHON:-python}
 
@@ -763,6 +763,12 @@ if [ $# -eq 1 ] && [ "x$1" = 'x--no-test
   exit
 fi
 
+if [ $# -eq 1 ] && [ "x$1" = 'x--lldb' ]; then
+  echo "http://localhost:$HTTPD_PORT/svn-test-work/repositories"
+  $STOPSCRIPT && lldb --one-line=run -- $START -X
+  exit
+fi
+
 if [ $# -eq 1 ] && [ "x$1" = 'x--gdb' ]; then
   echo "http://localhost:$HTTPD_PORT/svn-test-work/repositories"
   $STOPSCRIPT && gdb -silent -ex r -args $START -X

Modified: subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout (original)
+++ subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout Wed Jan 31 04:16:43 2018
@@ -42,9 +42,13 @@ Available subcommands:
    resolve
    resolved
    revert
+   shelf-diff
+   shelf-drop
+   shelf-list (shelves)
+   shelf-log
+   shelf-save
    shelve
    unshelve
-   shelves
    status (stat, st)
    switch (sw)
    unlock

Modified: subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout (original)
+++ subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout Wed Jan 31 04:16:43 2018
@@ -42,9 +42,13 @@ Available subcommands:
    resolve
    resolved
    revert
+   shelf-diff
+   shelf-drop
+   shelf-list (shelves)
+   shelf-log
+   shelf-save
    shelve
    unshelve
-   shelves
    status (stat, st)
    switch (sw)
    unlock

Modified: subversion/branches/swig-py3/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/tests/cmdline/patch_tests.py?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/swig-py3/subversion/tests/cmdline/patch_tests.py Wed Jan 31 04:16:43 2018
@@ -7791,6 +7791,68 @@ def patch_merge(sbox):
                                        expected_disk, None,
                                        expected_skip)
 
+def patch_mergeinfo_in_regular_prop_format(sbox):
+  "patch mergeinfo in regular prop format"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  strip_count = wc_dir.count(os.path.sep)+1
+
+  sbox.simple_copy('A/B/E', 'E')
+  sbox.simple_append('A/B/E/alpha', 'extra\nlines\n')
+  sbox.simple_commit()
+
+  sbox.simple_propset('a', 'A', 'E') # 'a' < 'svn:mergeinfo'
+  sbox.simple_propset('z', 'Z', 'E') # 'z' > 'svn:mergeinfo'
+
+  svntest.actions.run_and_verify_svn(None, [],
+                                     'merge', '^/A/B/E', sbox.ospath('E'))
+  # Rename 'svn:mergeinfo' to 'svn_mergeinfo' so that 'diff' doesn't
+  # pretty-print it; then rename it back before we run it through 'patch'.
+  # (Alternatively, we could disable pretty-printing when we implement a
+  # command-line switch to do so.)
+  mergeinfo_value = sbox.simple_propget('svn:mergeinfo', 'E')
+  sbox.simple_propdel('svn:mergeinfo', 'E')
+  sbox.simple_propset('svn_mergeinfo', mergeinfo_value, 'E')
+
+  _, diff, _ = svntest.actions.run_and_verify_svn(None, [],
+                                                  'diff', wc_dir)
+  diff = re.sub('svn_mergeinfo', 'svn:mergeinfo', ''.join(diff))
+
+  sbox.simple_revert('E', 'E/alpha')
+
+  patch = sbox.get_tempname('recurse.patch')
+  svntest.main.file_write(patch, diff, mode='wb')
+
+  expected_output = wc.State(wc_dir, {
+    'E'                 : Item(status=' U'),
+    'E/alpha'           : Item(status='U '),
+  })
+  expected_skip = wc.State(wc_dir, {})
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+    'E'                 : Item(status=' M', wc_rev='2'),
+    'E/alpha'           : Item(status='M ', wc_rev='2'),
+    'E/beta'            : Item(status='  ', wc_rev='2'),
+  })
+  expected_status.tweak('A/B/E/alpha', wc_rev=2)
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('A/B/E/alpha', contents="This is the file 'alpha'.\nextra\nlines\n")
+  expected_disk.add({
+    'E'                 : Item(props={'a': 'A',
+                                      # here is the correctly patched mergeinfo
+                                      'svn:mergeinfo': '/A/B/E:2',
+                                      'z': 'Z'}),
+    'E/beta'            : Item(contents="This is the file 'beta'.\n"),
+    'E/alpha'           : Item(contents="This is the file 'alpha'.\nextra\nlines\n"),
+  })
+
+  svntest.actions.run_and_verify_patch(wc_dir, patch,
+                                       expected_output, expected_disk,
+                                       expected_status, expected_skip,
+                                       [], True, True,
+                                       '--strip', strip_count)
+
 ########################################################################
 #Run the tests
 
@@ -7874,6 +7936,7 @@ test_list = [ None,
               missing_trailing_context,
               patch_missed_trail,
               patch_merge,
+              patch_mergeinfo_in_regular_prop_format,
             ]
 
 if __name__ == '__main__':

Modified: subversion/branches/swig-py3/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/tests/cmdline/svntest/main.py?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/swig-py3/subversion/tests/cmdline/svntest/main.py Wed Jan 31 04:16:43 2018
@@ -1748,6 +1748,8 @@ class TestSpawningThread(threading.Threa
       args.append('--fsfs-compression=' + options.fsfs_compression)
     if options.fsfs_dir_deltification:
       args.append('--fsfs-dir-deltification=' + options.fsfs_dir_deltification)
+    if options.svn_bin:
+      args.append('--bin=' + options.svn_bin)
 
     result, stdout_lines, stderr_lines = spawn_process(command, 0, False, None,
                                                        *args)

Modified: subversion/branches/swig-py3/subversion/tests/cmdline/svntest/verify.py
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/tests/cmdline/svntest/verify.py?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/tests/cmdline/svntest/verify.py (original)
+++ subversion/branches/swig-py3/subversion/tests/cmdline/svntest/verify.py Wed Jan 31 04:16:43 2018
@@ -280,7 +280,7 @@ class UnorderedOutput(ExpectedOutput):
 
   def display_differences(self, message, label, actual):
     display_lines(message, self.expected, actual, label + ' (unordered)', label)
-    display_lines_diff(self.expected, actual, label + ' (unordered)', label)
+    display_lines_diff(sorted(self.expected), sorted(actual), label + ' (unordered)', label)
 
 
 class UnorderedRegexListOutput(ExpectedOutput):

Modified: subversion/branches/swig-py3/subversion/tests/libsvn_subr/config-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/tests/libsvn_subr/config-test.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/tests/libsvn_subr/config-test.c (original)
+++ subversion/branches/swig-py3/subversion/tests/libsvn_subr/config-test.c Wed Jan 31 04:16:43 2018
@@ -70,12 +70,12 @@ get_config_file_path(const char **cfg_fi
 }
 
 static const char *config_keys[] = { "foo", "a", "b", "c", "d", "e", "f", "g",
-                                     "h", "i", NULL };
+                                     "h", "i", "m", NULL };
 static const char *config_values[] = { "bar", "Aa", "100", "bar",
                                        "a %(bogus)s oyster bar",
                                        "%(bogus)s shmoo %(",
                                        "%Aa", "lyrical bard", "%(unterminated",
-                                       "Aa 100", NULL };
+                                       "Aa 100", "foo bar baz", NULL };
 
 static svn_error_t *
 test_text_retrieval(const svn_test_opts_t *opts,

Modified: subversion/branches/swig-py3/subversion/tests/libsvn_subr/config-test.cfg
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/tests/libsvn_subr/config-test.cfg?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/tests/libsvn_subr/config-test.cfg (original)
+++ subversion/branches/swig-py3/subversion/tests/libsvn_subr/config-test.cfg Wed Jan 31 04:16:43 2018
@@ -45,6 +45,10 @@ j=some %(k)scle
 k=c%(j)sy
 # Depends on a cyclic definition
 l=depends on a %(j)scycle!
+# line continuation
+m = foo
+ bar
+  baz
 
 [UpperCaseSection]
 a=Aa

Modified: subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svnbuild.sh
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svnbuild.sh?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svnbuild.sh (original)
+++ subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svnbuild.sh Wed Jan 31 04:16:43 2018
@@ -22,7 +22,7 @@
 set -e
 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")
+url="$(svn info --show-item url)"
+branch="${url##*/}"
+(test -h ../GNUmakefile || ln -s ../unix-build/Makefile.svn ../GNUmakefile)
+(cd .. && gmake BRANCH="$branch" THREADING="no" JAVA="no" MAKE_JOBS=8)

Modified: subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh (original)
+++ subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh Wed Jan 31 04:16:43 2018
@@ -22,11 +22,11 @@
 set -e
 set -x
 
-branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"
+url="$(svn info --show-item url)"
+branch="${url##*/}"
 export MALLOC_OPTIONS=S
-(cd .. && gmake BRANCH="$branch" THREADING="no" svn-check-bindings)
+(cd .. && gmake BRANCH="$branch" THREADING="no" JAVA="no" svn-check-bindings)
 grep -q "^Result: PASS$" tests.log.bindings.pl || exit 1
 grep -q "^OK$" tests.log.bindings.py || exit 1
 grep -q ", 0 failures, 0 errors" tests.log.bindings.rb || exit 1
-#TODO javahl
 exit 0

Modified: subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svncheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svncheck.sh?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svncheck.sh (original)
+++ subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svncheck.sh Wed Jan 31 04:16:43 2018
@@ -22,10 +22,10 @@
 set -e
 set -x
 
-branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"
+url="$(svn info --show-item url)"
+branch="${url##*/}"
 export MALLOC_OPTIONS=S
-(cd .. && gmake BRANCH="$branch" PARALLEL="" THREADING="no" \
-                MEMCACHED_SERVER="127.0.0.1:11211" \
+(cd .. && gmake BRANCH="$branch" PARALLEL="4" THREADING="no" JAVA="no" \
                 EXCLUSIVE_WC_LOCKS=1 \
                                   svn-check-local \
                                   svn-check-svn \

Modified: subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svnclean.sh
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svnclean.sh?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svnclean.sh (original)
+++ subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svnclean.sh Wed Jan 31 04:16:43 2018
@@ -22,12 +22,20 @@
 set -e
 set -x
 
-branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"
+url="$(svn info --show-item url)"
+branch="${url##*/}"
 (test -h ../svn-trunk || ln -s build ../svn-trunk)
-for i in 6 7 8 9 10; do
+for i in $(jot - 6 12); do
   (test -h ../svn-1.${i}.x || ln -s build ../svn-1.${i}.x)
 done
+lastchangedrev="$(svn info --show-item=last-changed-revision ../../unix-build/Makefile.svn)"
 svn update ../../unix-build
+newlastchangedrev="$(svn info --show-item=last-changed-revision ../../unix-build/Makefile.svn)"
 (test -h ../GNUmakefile || ln -s ../unix-build/Makefile.svn ../GNUmakefile)
-(cd .. && gmake BRANCH="$branch" reset clean)
+# always rebuild svn, but only rebuild dependencies if Makefile.svn has changed
+if [ "$lastchangedrev" != "$newlastchangedrev" ]; then
+  (cd .. && gmake BRANCH="$branch" reset clean)
+else
+  (cd .. && gmake BRANCH="$branch" svn-reset svn-bindings-reset svn-clean)
+fi
 rm -f tests.log* fails.log*

Modified: subversion/branches/swig-py3/tools/client-side/bash_completion
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/tools/client-side/bash_completion?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/tools/client-side/bash_completion (original)
+++ subversion/branches/swig-py3/tools/client-side/bash_completion Wed Jan 31 04:16:43 2018
@@ -248,6 +248,7 @@ _svn()
 	cmds="$cmds patch propdel pdel propedit pedit propget pget proplist"
 	cmds="$cmds plist propset pset relocate resolve resolved revert status"
 	cmds="$cmds switch unlock update upgrade"
+	cmds="$cmds shelf-diff shelf-drop shelf-list shelf-log shelf-save"
 	cmds="$cmds shelve shelves unshelve"
 
 	# help options have a strange command status...
@@ -845,9 +846,11 @@ _svn()
 
 	# otherwise build possible options for the command
 	pOpts="--username --password --no-auth-cache --non-interactive \
+	       --password-from-stdin \
 	       --trust-server-cert-failures \
 	       --force-interactive"
-	mOpts="-m --message -F --file --encoding --force-log --with-revprop"
+	mOpts="-m --message -F --file --encoding --force-log --with-revprop \
+               --editor-cmd"
 	rOpts="-r --revision"
 	qOpts="-q --quiet"
 	nOpts="-N --non-recursive --depth"
@@ -886,16 +889,16 @@ _svn()
 			--remove-ignored --remove-unversioned --vacuum-pristines"
 		;;
 	commit|ci)
-		cmdOpts="$mOpts $qOpts $nOpts --targets --editor-cmd $pOpts \
+		cmdOpts="$mOpts $qOpts $nOpts --targets $pOpts \
 		         --no-unlock $cOpts --keep-changelists \
 		         --include-externals"
 		;;
 	copy|cp)
-		cmdOpts="$mOpts $rOpts $qOpts --editor-cmd $pOpts --parents \
+		cmdOpts="$mOpts $rOpts $qOpts $pOpts --parents \
 		         --ignore-externals --pin-externals"
 		;;
 	delete|del|remove|rm)
-		cmdOpts="--force $mOpts $qOpts --targets --editor-cmd $pOpts \
+		cmdOpts="--force $mOpts $qOpts --targets $pOpts \
                          --keep-local"
 		;;
 	diff|di)
@@ -915,7 +918,7 @@ _svn()
 		;;
 	import)
 		cmdOpts="--auto-props --no-auto-props $mOpts $qOpts $nOpts \
-		         --no-ignore --editor-cmd $pOpts --force"
+		         --no-ignore $pOpts --force"
 		;;
 	info)
 		cmdOpts="$pOpts $rOpts --targets -R --recursive --depth \
@@ -949,10 +952,10 @@ _svn()
 		         $qOpts -v --verbose --incremental --log"
 		;;
 	mkdir)
-		cmdOpts="$mOpts $qOpts --editor-cmd $pOpts --parents"
+		cmdOpts="$mOpts $qOpts $pOpts --parents"
 		;;
 	move|mv|rename|ren)
-		cmdOpts="$mOpts $qOpts --force --editor-cmd $pOpts \
+		cmdOpts="$mOpts $qOpts --force $pOpts \
                          --parents --allow-mixed-revisions"
 		;;
 	patch)
@@ -965,7 +968,7 @@ _svn()
 		[[ $isRevProp || ! $prop ]] && cmdOpts="$cmdOpts --revprop"
 		;;
 	propedit|pedit|pe)
-		cmdOpts="--editor-cmd $pOpts $mOpts --force"
+		cmdOpts="$pOpts $mOpts --force"
 		[[ $isRevProp || ! $prop ]] && \
 		    cmdOpts="$cmdOpts --revprop $rOpts"
 		;;
@@ -1021,14 +1024,33 @@ _svn()
 	upgrade)
 		cmdOpts="$qOpts $pOpts"
 		;;
+	shelf-diff)
+		cmdOpts="$pOpts"
+		;;
+	shelf-drop)
+		cmdOpts="$pOpts"
+		;;
+	shelf-list|shelves)
+		cmdOpts="$qOpts $pOpts"
+		;;
+	shelf-log)
+		cmdOpts="$qOpts $pOpts"
+		;;
+	shelf-save)
+		cmdOpts="--dry-run \
+                         --depth --targets $cOpts \
+                         $mOpts \
+                         $qOpts $pOpts"
+		;;
 	shelve)
-		cmdOpts="$qOpts --keep-local --delete --list -m --message -F --file --encoding --force-log --editor-cmd --dry-run --depth --targets $cOpts $pOpts"
+		cmdOpts="--keep-local --dry-run \
+                         --depth --targets $cOpts \
+                         $mOpts \
+                         $qOpts $pOpts"
 		;;
 	unshelve)
-		cmdOpts="$qOpts --keep-shelved --list --dry-run $pOpts"
-		;;
-	shelves)
-		cmdOpts="$pOpts"
+		cmdOpts="--dry-run \
+                         $qOpts $pOpts"
 		;;
 	*)
 		;;

Modified: subversion/branches/swig-py3/tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c (original)
+++ subversion/branches/swig-py3/tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c Wed Jan 31 04:16:43 2018
@@ -807,7 +807,7 @@ sub_main(int *exit_code, int argc, const
   /* Get password from stdin if necessary */
   if (read_pass_from_stdin)
     {
-      SVN_ERR(svn_io_stdin_readline(&opt_state.auth_password, pool, pool));
+      SVN_ERR(svn_cmdline__stdin_readline(&opt_state.auth_password, pool, pool));
     }
 
   /* Create a client context object. */

Modified: subversion/branches/swig-py3/tools/client-side/svnconflict/svnconflict.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/tools/client-side/svnconflict/svnconflict.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/tools/client-side/svnconflict/svnconflict.c (original)
+++ subversion/branches/swig-py3/tools/client-side/svnconflict/svnconflict.c Wed Jan 31 04:16:43 2018
@@ -858,7 +858,7 @@ sub_main(int *exit_code, int argc, const
   /* Get password from stdin if necessary */
   if (read_pass_from_stdin)
     {
-      SVN_ERR(svn_io_stdin_readline(&opt_state.auth_password, pool, pool));
+      SVN_ERR(svn_cmdline__stdin_readline(&opt_state.auth_password, pool, pool));
     }
 
 

Modified: subversion/branches/swig-py3/tools/dev/svnmover/svnmover.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/tools/dev/svnmover/svnmover.c?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/tools/dev/svnmover/svnmover.c (original)
+++ subversion/branches/swig-py3/tools/dev/svnmover/svnmover.c Wed Jan 31 04:16:43 2018
@@ -4596,7 +4596,7 @@ sub_main(int *exit_code, int argc, const
   /* Get password from stdin if necessary */
   if (read_pass_from_stdin)
     {
-      SVN_ERR(svn_io_stdin_readline(&password, pool, pool));
+      SVN_ERR(svn_cmdline__stdin_readline(&password, pool, pool));
     }
 
   SVN_ERR(svn_client_create_context2(&ctx, cfg_hash, pool));

Modified: subversion/branches/swig-py3/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/tools/dev/unix-build/Makefile.svn?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/swig-py3/tools/dev/unix-build/Makefile.svn Wed Jan 31 04:16:43 2018
@@ -45,6 +45,7 @@ EXCLUSIVE_WC_LOCKS ?= 1
 USE_HTTPV1 ?= no
 USE_AUTHZ_SHORT_CIRCUIT ?= no
 RAMDISK ?= /ramdisk
+MAKE_JOBS ?= 4
 
 PWD		= $(shell pwd)
 UNAME		= $(shell uname)
@@ -174,7 +175,8 @@ APR_ICONV_URL	= https://www.apache.org/d
 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)
-NEON_URL	= http://webdav.org/neon/$(NEON_DIST)
+#NEON_URL	= http://webdav.org/neon/$(NEON_DIST)
+NEON_URL	= http://ftp.openbsd.org/pub/OpenBSD/distfiles/$(NEON_DIST)
 SERF_URL	= https://svn.apache.org/repos/asf/serf/tags/$(SERF_VER)
 SERF_OLD_URL	= https://svn.apache.org/repos/asf/serf/tags/$(SERF_OLD_VER)
 SQLITE_URL	= https://www.sqlite.org/2017/$(SQLITE_DIST)
@@ -338,7 +340,7 @@ $(BDB_OBJDIR)/.configured: $(BDB_OBJDIR)
 
 # compile bdb
 $(BDB_OBJDIR)/.compiled: $(BDB_OBJDIR)/.configured
-	(cd $(BDB_SRCDIR)/build_unix && env MAKEFLAGS= make)
+	(cd $(BDB_SRCDIR)/build_unix && env MAKEFLAGS= make -j${MAKE_JOBS})
 	touch $@
 
 # install bdb
@@ -397,7 +399,7 @@ $(APR_OBJDIR)/.configured: $(APR_OBJDIR)
 
 # compile apr
 $(APR_OBJDIR)/.compiled: $(APR_OBJDIR)/.configured
-	(cd $(APR_OBJDIR) && env MAKEFLAGS= make)
+	(cd $(APR_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS})
 	touch $@
 
 # install apr
@@ -445,7 +447,7 @@ $(APR_ICONV_OBJDIR)/.configured: $(APR_I
 # compile apr-iconv
 $(APR_ICONV_OBJDIR)/.compiled: $(APR_ICONV_OBJDIR)/.configured
 	(cd $(APR_ICONV_OBJDIR) \
-		&& env MAKEFLAGS= make CPPFLAGS="-D_OSD_POSIX" CFLAGS="-g -O0 $(PROFILE_CFLAGS)")
+		&& env MAKEFLAGS= make CPPFLAGS="-D_OSD_POSIX" CFLAGS="-g -O0 $(PROFILE_CFLAGS)" -j${MAKE_JOBS})
 	touch $@
 
 # install apr-iconv
@@ -527,7 +529,7 @@ $(GNU_ICONV_OBJDIR)/.configured: $(GNU_I
 
 # compile gnu-iconv
 $(GNU_ICONV_OBJDIR)/.compiled: $(GNU_ICONV_OBJDIR)/.configured
-	(cd $(GNU_ICONV_OBJDIR) && env MAKEFLAGS= make)
+	(cd $(GNU_ICONV_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS})
 	touch $@
 
 # install gnu-iconv
@@ -602,7 +604,7 @@ $(APR_UTIL_OBJDIR)/.configured: $(APR_UT
 
 # compile apr-util
 $(APR_UTIL_OBJDIR)/.compiled: $(APR_UTIL_OBJDIR)/.configured
-	(cd $(APR_UTIL_OBJDIR) && env MAKEFLAGS= make)
+	(cd $(APR_UTIL_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS})
 	touch $@
 
 # install apr-util
@@ -681,6 +683,13 @@ $(HTTPD_OBJDIR)/acinclude.diff:
 	echo >>$@.tmp '     AC_CHECK_FUNCS(SSL_set_state)'
 	mv -f $@.tmp $@
 
+# fix build without APR_HAS_THREADS (broken by r1750836)
+ifneq ($(THREADING),yes)
+HTTPD_REVERT_1750836_CMD = (cd $(HTTPD_SRCDIR)/modules/proxy && svn diff -c-1750836 https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c | patch)
+else
+HTTPD_REVERT_1750836_CMD = true
+endif
+
 # retrieve httpd
 $(HTTPD_OBJDIR)/.retrieved: $(DISTDIR)/$(HTTPD_DIST) \
 	$(HTTPD_OBJDIR)/chil-engine.diff $(HTTPD_OBJDIR)/ssl-set-state.diff \
@@ -709,6 +718,7 @@ $(HTTPD_OBJDIR)/.retrieved: $(DISTDIR)/$
 		< $(HTTPD_SRCDIR)/modules/ssl/${f}.orig \
 		> $(HTTPD_SRCDIR)/modules/ssl/${f};\
 	)
+	$(HTTPD_REVERT_1750836_CMD)
 	touch $@
 
 # configure httpd
@@ -731,7 +741,7 @@ $(HTTPD_OBJDIR)/.configured: $(HTTPD_OBJ
 
 # compile httpd
 $(HTTPD_OBJDIR)/.compiled: $(HTTPD_OBJDIR)/.configured
-	(cd $(HTTPD_OBJDIR) && env MAKEFLAGS= make)
+	(cd $(HTTPD_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS})
 	touch $@
 
 # install httpd
@@ -812,7 +822,7 @@ $(NEON_OBJDIR)/.configured: $(NEON_OBJDI
 
 # compile neon
 $(NEON_OBJDIR)/.compiled: $(NEON_OBJDIR)/.configured
-	(cd $(NEON_OBJDIR) && env MAKEFLAGS= make)
+	(cd $(NEON_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS})
 	touch $@
 
 # install neon
@@ -860,7 +870,7 @@ $(SERF_OBJDIR)/.retrieved:
 $(SERF_OBJDIR)/.compiled: $(SERF_OBJDIR)/.retrieved \
 	$(APR_UTIL_OBJDIR)/.installed
 	cd $(SERF_SRCDIR) && \
-		scons DEBUG=1 \
+		scons -j${MAKE_JOBS} DEBUG=1 \
 			CFLAGS="-O0 -g $(PROFILE_CFLAGS) -DAPR_POOL_DEBUG" \
 			APR=$(PREFIX)/apr \
 			APU=$(PREFIX)/apr \
@@ -963,7 +973,7 @@ $(SQLITE_OBJDIR)/.configured: $(SQLITE_O
 
 # compile sqlite
 $(SQLITE_OBJDIR)/.compiled: $(SQLITE_OBJDIR)/.configured
-	(cd $(SQLITE_OBJDIR) && env MAKEFLAGS= make)
+	(cd $(SQLITE_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS})
 	touch $@
 
 # install sqlite
@@ -1037,7 +1047,7 @@ $(CYRUS_SASL_OBJDIR)/.configured: $(CYRU
 		--prefix=$(PREFIX)/cyrus-sasl
 	touch $@
 
-# compile cyrus-sasl
+# compile cyrus-sasl (ignore MAKE_JOBS; multiple jobs cause random build failures)
 $(CYRUS_SASL_OBJDIR)/.compiled: $(CYRUS_SASL_OBJDIR)/.configured
 	(cd $(CYRUS_SASL_OBJDIR) && env MAKEFLAGS= make)
 	touch $@
@@ -1084,7 +1094,7 @@ $(LIBMAGIC_OBJDIR)/.configured: $(LIBMAG
 
 # compile libmagic
 $(LIBMAGIC_OBJDIR)/.compiled: $(LIBMAGIC_OBJDIR)/.configured
-	(cd $(LIBMAGIC_OBJDIR) && env MAKEFLAGS= make)
+	(cd $(LIBMAGIC_OBJDIR) && env MAKEFLAGS= make -j${MAKE_JOBS})
 	touch $@
 
 # install libmagic
@@ -1140,7 +1150,7 @@ $(RUBY_OBJDIR)/.configured: $(RUBY_OBJDI
 		--without-gmp
 	touch $@
 
-# compile ruby
+# compile ruby (ignore MAKE_JOBS; multiple jobs cause random build failures)
 $(RUBY_OBJDIR)/.compiled: $(RUBY_OBJDIR)/.configured
 	(cd $(RUBY_OBJDIR) && env MAKEFLAGS= make)
 	touch $@
@@ -1177,7 +1187,7 @@ $(BZ2_OBJDIR)/.retrieved: $(DISTDIR)/$(B
 
 # compile bz2
 $(BZ2_OBJDIR)/.compiled: $(BZ2_OBJDIR)/.retrieved
-	(cd $(BZ2_SRCDIR) && env MAKEFLAGS= make CFLAGS="-g $(PROFILE_CFLAGS) -fPIC")
+	(cd $(BZ2_SRCDIR) && env MAKEFLAGS= make CFLAGS="-g $(PROFILE_CFLAGS) -fPIC" -j${MAKE_JOBS})
 	touch $@
 
 # install bz2
@@ -1253,7 +1263,7 @@ $(PYTHON_OBJDIR)/.compiled: $(PYTHON_OBJ
 	(cd $(PYTHON_OBJDIR) && \
 		env MAKEFLAGS= \
 		LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \
-		make)
+		make -j${MAKE_JOBS})
 	touch $@
 
 # install python
@@ -1324,7 +1334,7 @@ $(GETTEXT_OBJDIR)/.configured: $(GETTEXT
 
 # compile gettext
 $(GETTEXT_OBJDIR)/.compiled: $(GETTEXT_OBJDIR)/.configured
-	(cd $(GETTEXT_SRCDIR) && env MAKEFLAGS= make)
+	(cd $(GETTEXT_SRCDIR) && env MAKEFLAGS= make -j${MAKE_JOBS})
 	touch $@
 
 # install gettext
@@ -1365,7 +1375,7 @@ $(LZ4_OBJDIR)/.configured: $(LZ4_OBJDIR)
 # compile lz4
 $(LZ4_OBJDIR)/.compiled: $(LZ4_OBJDIR)/.configured
 	(cd $(LZ4_SRCDIR)/lib && \
-		env MAKEFLAGS= $(MAKE) PREFIX=$(PREFIX)/lz4)
+		env MAKEFLAGS= $(MAKE) -j${MAKE_JOBS} PREFIX=$(PREFIX)/lz4)
 	touch $@
 
 # install lz4
@@ -1534,7 +1544,7 @@ $(SVN_OBJDIR)/.configured: $(SVN_OBJDIR)
 # compile svn
 $(SVN_OBJDIR)/.compiled: $(SVN_OBJDIR)/.configured
 	cd $(svn_builddir) \
-		&& env MAKEFLAGS= make EXTRA_CFLAGS="$(PROFILE_CFLAGS) $(W_NO_SYSTEM_HEADERS)"
+		&& env MAKEFLAGS= make -j${MAKE_JOBS} EXTRA_CFLAGS="$(PROFILE_CFLAGS) $(W_NO_SYSTEM_HEADERS)"
 	touch $@
 
 # install svn
@@ -1556,18 +1566,18 @@ $(SVN_OBJDIR)/.pre-generated-swig-cleane
 $(SVN_OBJDIR)/.bindings-compiled: $(SVN_OBJDIR)/.installed $(SVN_OBJDIR)/.pre-generated-swig-cleaned
 	cd $(svn_builddir) \
 		&& env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
-			env MAKEFLAGS= make swig-py
+			env MAKEFLAGS= make -j${MAKE_JOBS} swig-py
 	cd $(svn_builddir) && \
 		env PATH=$(PREFIX)/ruby/bin:$$PATH \
-		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) env MAKEFLAGS= make swig-rb
+		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) env MAKEFLAGS= make -j${MAKE_JOBS} swig-rb
 	if [ $(ENABLE_PERL_BINDINGS) = yes ]; then \
 		cd $(svn_builddir) \
 			&& env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
-				env MAKEFLAGS= make swig-pl; \
+				env MAKEFLAGS= make -j${MAKE_JOBS} swig-pl; \
 	fi
 	if [ $(ENABLE_JAVA_BINDINGS) = yes ]; then \
 		cd $(svn_builddir) \
-			&& env MAKEFLAGS= make javahl; \
+			&& env MAKEFLAGS= make -j${MAKE_JOBS} javahl; \
 	fi
 	touch $@
 
@@ -1972,6 +1982,7 @@ define do_check
     env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(LIB_PTHREAD_HACK) \
         env MAKEFLAGS= make check PARALLEL=$(PARALLEL) CLEANUP=$(CLEANUP) \
 	  EXCLUSIVE_WC_LOCKS=$(EXCLUSIVE_WC_LOCKS) \
+	  SVN_BIN_DIR=$(SVN_PREFIX)/bin \
 	  MEMCACHED_SERVER=$(MEMCACHED_SERVER) $1 FS_TYPE=$$fs; \
     for log in tests.log fails.log; do \
         test -f $$log && mv -f $$log $$log.$@-$$fs; \

Modified: subversion/branches/swig-py3/tools/dev/unix-build/README
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/tools/dev/unix-build/README?rev=1822736&r1=1822735&r2=1822736&view=diff
==============================================================================
--- subversion/branches/swig-py3/tools/dev/unix-build/README (original)
+++ subversion/branches/swig-py3/tools/dev/unix-build/README Wed Jan 31 04:16:43 2018
@@ -94,3 +94,22 @@ everything is "svn-check".
 Notes
 =====
 The script currently doesn't build Ctypes Python bindings.
+
+OpenBSD-specific notes
+======================
+On OpenBSD install the following packages to get dependencies and
+tools not covered by this Makefile:
+
+pkg_add autoconf automake bison coreutils gmake gperf groff libtool \
+	python ruby scons subversion swig wget
+
+Some of these packages are available in several versions. Tested at time
+of writing were: autoconf-2.68 automake-1.19 python-2.7.14 ruby-2.4.2
+
+OpenBSD's autoconf and automake wrappers require desired versions in
+environment variables and will raise errors if these aren't set:
+export AUTOCONF_VERSION=2.68
+export AUTOMAKE_VERSION=1.19
+
+A 'python' symlink is required; follow instructions printed by pkg_add
+when the python package is installed.