subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1829257 [3/11] - in /subversion/branches/shelve-checkpoint: ./ build/ build/ac-macros/ subversion/bindings/javahl/native/ subversion/bindings/javahl/native/jniwrapper/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion...
Date Mon, 16 Apr 2018 12:21:14 GMT
Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_delta/debug_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_delta/debug_editor.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_delta/debug_editor.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_delta/debug_editor.c Mon Apr 16 12:21:02 2018
@@ -71,9 +71,11 @@ set_target_revision(void *edit_baton,
   SVN_ERR(svn_stream_printf(eb->out, pool, "set_target_revision : %ld\n",
                             target_revision));
 
-  return eb->wrapped_editor->set_target_revision(eb->wrapped_edit_baton,
-                                                 target_revision,
-                                                 pool);
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->set_target_revision(eb->wrapped_edit_baton,
+                                                    target_revision,
+                                                    pool));
+  return SVN_NO_ERROR;
 }
 
 static svn_error_t *
@@ -90,10 +92,11 @@ open_root(void *edit_baton,
                             base_revision));
   eb->indent_level++;
 
-  SVN_ERR(eb->wrapped_editor->open_root(eb->wrapped_edit_baton,
-                                        base_revision,
-                                        pool,
-                                        &dir_baton->wrapped_dir_baton));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->open_root(eb->wrapped_edit_baton,
+                                          base_revision,
+                                          pool,
+                                          &dir_baton->wrapped_dir_baton));
 
   dir_baton->edit_baton = edit_baton;
 
@@ -115,10 +118,12 @@ delete_entry(const char *path,
   SVN_ERR(svn_stream_printf(eb->out, pool, "delete_entry : %s:%ld\n",
                             path, base_revision));
 
-  return eb->wrapped_editor->delete_entry(path,
-                                          base_revision,
-                                          pb->wrapped_dir_baton,
-                                          pool);
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->delete_entry(path,
+                                             base_revision,
+                                             pb->wrapped_dir_baton,
+                                             pool));
+  return SVN_NO_ERROR;
 }
 
 static svn_error_t *
@@ -139,12 +144,13 @@ add_directory(const char *path,
                             path, copyfrom_path, copyfrom_revision));
   eb->indent_level++;
 
-  SVN_ERR(eb->wrapped_editor->add_directory(path,
-                                            pb->wrapped_dir_baton,
-                                            copyfrom_path,
-                                            copyfrom_revision,
-                                            pool,
-                                            &b->wrapped_dir_baton));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->add_directory(path,
+                                              pb->wrapped_dir_baton,
+                                              copyfrom_path,
+                                              copyfrom_revision,
+                                              pool,
+                                              &b->wrapped_dir_baton));
 
   b->edit_baton = eb;
   *child_baton = b;
@@ -168,11 +174,12 @@ open_directory(const char *path,
                             path, base_revision));
   eb->indent_level++;
 
-  SVN_ERR(eb->wrapped_editor->open_directory(path,
-                                             pb->wrapped_dir_baton,
-                                             base_revision,
-                                             pool,
-                                             &db->wrapped_dir_baton));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->open_directory(path,
+                                               pb->wrapped_dir_baton,
+                                               base_revision,
+                                               pool,
+                                               &db->wrapped_dir_baton));
 
   db->edit_baton = eb;
   *child_baton = db;
@@ -199,12 +206,13 @@ add_file(const char *path,
 
   eb->indent_level++;
 
-  SVN_ERR(eb->wrapped_editor->add_file(path,
-                                       pb->wrapped_dir_baton,
-                                       copyfrom_path,
-                                       copyfrom_revision,
-                                       pool,
-                                       &fb->wrapped_file_baton));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->add_file(path,
+                                         pb->wrapped_dir_baton,
+                                         copyfrom_path,
+                                         copyfrom_revision,
+                                         pool,
+                                         &fb->wrapped_file_baton));
 
   fb->edit_baton = eb;
   *file_baton = fb;
@@ -229,11 +237,12 @@ open_file(const char *path,
 
   eb->indent_level++;
 
-  SVN_ERR(eb->wrapped_editor->open_file(path,
-                                        pb->wrapped_dir_baton,
-                                        base_revision,
-                                        pool,
-                                        &fb->wrapped_file_baton));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->open_file(path,
+                                          pb->wrapped_dir_baton,
+                                          base_revision,
+                                          pool,
+                                          &fb->wrapped_file_baton));
 
   fb->edit_baton = eb;
   *file_baton = fb;
@@ -255,11 +264,38 @@ apply_textdelta(void *file_baton,
   SVN_ERR(svn_stream_printf(eb->out, pool, "apply_textdelta : %s\n",
                             base_checksum));
 
-  SVN_ERR(eb->wrapped_editor->apply_textdelta(fb->wrapped_file_baton,
-                                              base_checksum,
-                                              pool,
-                                              handler,
-                                              handler_baton));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->apply_textdelta(fb->wrapped_file_baton,
+                                                base_checksum,
+                                                pool,
+                                                handler,
+                                                handler_baton));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+apply_textdelta_stream(const struct svn_delta_editor_t *editor,
+                       void *file_baton,
+                       const char *base_checksum,
+                       svn_txdelta_stream_open_func_t open_func,
+                       void *open_baton,
+                       apr_pool_t *scratch_pool)
+{
+  struct file_baton *fb = file_baton;
+  struct edit_baton *eb = fb->edit_baton;
+
+  SVN_ERR(write_indent(eb, scratch_pool));
+  SVN_ERR(svn_stream_printf(eb->out, scratch_pool,
+                            "apply_textdelta_stream : %s\n",
+                            base_checksum));
+
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->apply_textdelta_stream(eb->wrapped_editor,
+                                                       fb->wrapped_file_baton,
+                                                       base_checksum,
+                                                       open_func, open_baton,
+                                                       scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -278,8 +314,9 @@ close_file(void *file_baton,
   SVN_ERR(svn_stream_printf(eb->out, pool, "close_file : %s\n",
                             text_checksum));
 
-  SVN_ERR(eb->wrapped_editor->close_file(fb->wrapped_file_baton,
-                                         text_checksum, pool));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->close_file(fb->wrapped_file_baton,
+                                           text_checksum, pool));
 
   return SVN_NO_ERROR;
 }
@@ -295,8 +332,9 @@ absent_file(const char *path,
   SVN_ERR(write_indent(eb, pool));
   SVN_ERR(svn_stream_printf(eb->out, pool, "absent_file : %s\n", path));
 
-  SVN_ERR(eb->wrapped_editor->absent_file(path, fb->wrapped_file_baton,
-                                          pool));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->absent_file(path, fb->wrapped_file_baton,
+                                            pool));
 
   return SVN_NO_ERROR;
 }
@@ -312,8 +350,9 @@ close_directory(void *dir_baton,
   SVN_ERR(write_indent(eb, pool));
   SVN_ERR(svn_stream_printf(eb->out, pool, "close_directory\n"));
 
-  SVN_ERR(eb->wrapped_editor->close_directory(db->wrapped_dir_baton,
-                                              pool));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->close_directory(db->wrapped_dir_baton,
+                                                pool));
 
   return SVN_NO_ERROR;
 }
@@ -330,8 +369,9 @@ absent_directory(const char *path,
   SVN_ERR(svn_stream_printf(eb->out, pool, "absent_directory : %s\n",
                             path));
 
-  SVN_ERR(eb->wrapped_editor->absent_directory(path, db->wrapped_dir_baton,
-                                               pool));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->absent_directory(path, db->wrapped_dir_baton,
+                                                 pool));
 
   return SVN_NO_ERROR;
 }
@@ -349,10 +389,11 @@ change_file_prop(void *file_baton,
   SVN_ERR(svn_stream_printf(eb->out, pool, "change_file_prop : %s -> %s\n",
                             name, value ? value->data : "<deleted>"));
 
-  SVN_ERR(eb->wrapped_editor->change_file_prop(fb->wrapped_file_baton,
-                                               name,
-                                               value,
-                                               pool));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->change_file_prop(fb->wrapped_file_baton,
+                                                 name,
+                                                 value,
+                                                 pool));
 
   return SVN_NO_ERROR;
 }
@@ -370,10 +411,11 @@ change_dir_prop(void *dir_baton,
   SVN_ERR(svn_stream_printf(eb->out, pool, "change_dir_prop : %s -> %s\n",
                             name, value ? value->data : "<deleted>"));
 
-  SVN_ERR(eb->wrapped_editor->change_dir_prop(db->wrapped_dir_baton,
-                                              name,
-                                              value,
-                                              pool));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->change_dir_prop(db->wrapped_dir_baton,
+                                                name,
+                                                value,
+                                                pool));
 
   return SVN_NO_ERROR;
 }
@@ -387,7 +429,8 @@ close_edit(void *edit_baton,
   SVN_ERR(write_indent(eb, pool));
   SVN_ERR(svn_stream_printf(eb->out, pool, "close_edit\n"));
 
-  SVN_ERR(eb->wrapped_editor->close_edit(eb->wrapped_edit_baton, pool));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->close_edit(eb->wrapped_edit_baton, pool));
 
   return SVN_NO_ERROR;
 }
@@ -401,7 +444,8 @@ abort_edit(void *edit_baton,
   SVN_ERR(write_indent(eb, pool));
   SVN_ERR(svn_stream_printf(eb->out, pool, "abort_edit\n"));
 
-  SVN_ERR(eb->wrapped_editor->abort_edit(eb->wrapped_edit_baton, pool));
+  if (eb->wrapped_editor)
+    SVN_ERR(eb->wrapped_editor->abort_edit(eb->wrapped_edit_baton, pool));
 
   return SVN_NO_ERROR;
 }
@@ -414,7 +458,7 @@ svn_delta__get_debug_editor(const svn_de
                             const char *prefix,
                             apr_pool_t *pool)
 {
-  svn_delta_editor_t *tree_editor = apr_palloc(pool, sizeof(*tree_editor));
+  svn_delta_editor_t *tree_editor = svn_delta_default_editor(pool);
   struct edit_baton *eb = apr_palloc(pool, sizeof(*eb));
   apr_file_t *errfp;
   svn_stream_t *out;
@@ -436,6 +480,7 @@ svn_delta__get_debug_editor(const svn_de
   tree_editor->add_file = add_file;
   tree_editor->open_file = open_file;
   tree_editor->apply_textdelta = apply_textdelta;
+  tree_editor->apply_textdelta_stream = apply_textdelta_stream;
   tree_editor->change_file_prop = change_file_prop;
   tree_editor->close_file = close_file;
   tree_editor->absent_file = absent_file;

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_delta/svndiff.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_delta/svndiff.c Mon Apr 16 12:21:02 2018
@@ -1026,11 +1026,11 @@ svndiff_stream_read_fn(void *baton, char
   apr_size_t left = *len;
   apr_size_t read = 0;
 
-  while (left && !b->hit_eof)
+  while (left)
     {
       apr_size_t chunk_size;
 
-      if (b->read_pos == b->window_buffer->len)
+      if (b->read_pos == b->window_buffer->len && !b->hit_eof)
         {
           svn_txdelta_window_t *window;
 
@@ -1050,6 +1050,9 @@ svndiff_stream_read_fn(void *baton, char
       else
         chunk_size = left;
 
+      if (!chunk_size)
+          break;
+
       memcpy(buffer, b->window_buffer->data + b->read_pos, chunk_size);
       b->read_pos += chunk_size;
       buffer += chunk_size;

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/cached_data.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/cached_data.c Mon Apr 16 12:21:02 2018
@@ -1268,7 +1268,7 @@ parse_raw_window(void **out,
   stream = svn_stream_from_string(&raw_window, result_pool);
 
   /* parse it */
-  SVN_ERR(svn_txdelta_read_svndiff_window(&result->window, stream, 1,
+  SVN_ERR(svn_txdelta_read_svndiff_window(&result->window, stream, window->ver,
                                           result_pool));
 
   /* complete the window and return it */
@@ -2103,13 +2103,14 @@ skip_contents(struct rep_read_baton *bat
 
 /* BATON is of type `rep_read_baton'; read the next *LEN bytes of the
    representation and store them in *BUF.  Sum as we read and verify
-   the MD5 sum at the end. */
+   the MD5 sum at the end.  This is a READ_FULL_FN for svn_stream_t. */
 static svn_error_t *
 rep_read_contents(void *baton,
                   char *buf,
                   apr_size_t *len)
 {
   struct rep_read_baton *rb = baton;
+  apr_size_t len_requested = *len;
 
   /* Get data from the fulltext cache for as long as we can. */
   if (rb->fulltext_cache)
@@ -2150,6 +2151,28 @@ rep_read_contents(void *baton,
   if (rb->current_fulltext)
     svn_stringbuf_appendbytes(rb->current_fulltext, buf, *len);
 
+  /* This is a FULL_READ_FN so a short read implies EOF and we can
+     verify the length. */
+  rb->off += *len;
+  if (*len < len_requested && rb->off != rb->len)
+      {
+        /* A warning rather than an error to allow the data to be
+           retrieved when the length is wrong but the data is
+           present, i.e. if repository corruption has stored the wrong
+           expanded length. */
+        svn_error_t *err = svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
+                            _("Length mismatch while reading representation:"
+                              " expected %s,"
+                              " got %s"),
+                            apr_psprintf(rb->pool, "%" SVN_FILESIZE_T_FMT,
+                                         rb->len),
+                            apr_psprintf(rb->pool, "%" SVN_FILESIZE_T_FMT,
+                                         rb->off));
+
+        rb->fs->warning(rb->fs->warning_baton, err);
+        svn_error_clear(err);
+      }
+
   /* Perform checksumming.  We want to check the checksum as soon as
      the last byte of data is read, in case the caller never performs
      a short read, but we don't want to finalize the MD5 context
@@ -2157,7 +2180,6 @@ rep_read_contents(void *baton,
   if (!rb->checksum_finalized)
     {
       SVN_ERR(svn_checksum_update(rb->md5_checksum_ctx, buf, *len));
-      rb->off += *len;
       if (rb->off == rb->len)
         {
           svn_checksum_t *md5_checksum;
@@ -3206,7 +3228,7 @@ init_rep_state(rep_state_t *rs,
   rs->start = entry->offset + rs->header_size;
   rs->current = rep_header->type == svn_fs_fs__rep_plain ? 0 : 4;
   rs->size = entry->size - rep_header->header_size - 7;
-  rs->ver = 1;
+  rs->ver = -1;
   rs->chunk_index = 0;
   rs->raw_window_cache = ffd->raw_window_cache;
   rs->window_cache = ffd->txdelta_window_cache;
@@ -3264,6 +3286,9 @@ cache_windows(svn_fs_t *fs,
               apr_pool_t *pool)
 {
   apr_pool_t *iterpool = svn_pool_create(pool);
+
+  SVN_ERR(auto_read_diff_version(rs, iterpool));
+
   while (rs->current < rs->size)
     {
       apr_off_t end_offset;
@@ -3324,6 +3349,7 @@ cache_windows(svn_fs_t *fs,
           window.end_offset = rs->current;
           window.window.len = window_len;
           window.window.data = buf;
+          window.ver = rs->ver;
 
           /* cache the window now */
           SVN_ERR(svn_cache__set(rs->raw_window_cache, &key, &window,

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/cached_data.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/cached_data.h?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/cached_data.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/cached_data.h Mon Apr 16 12:21:02 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/shelve-checkpoint/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/dag.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/dag.c Mon Apr 16 12:21:02 2018
@@ -1166,7 +1166,7 @@ svn_fs_fs__dag_serialize(void **data,
                                 (const void * const *)&node->node_pool);
 
   /* serialize other sub-structures */
-  svn_fs_fs__id_serialize(context, (const svn_fs_id_t **)&node->id);
+  svn_fs_fs__id_serialize(context, (const svn_fs_id_t *const *)&node->id);
   svn_fs_fs__id_serialize(context, &node->fresh_root_predecessor_id);
   svn_temp_serializer__add_string(context, &node->created_path);
 

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/fs_fs.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/fs_fs.c Mon Apr 16 12:21:02 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/shelve-checkpoint/subversion/libsvn_fs_fs/id.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/id.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/id.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/id.c Mon Apr 16 12:21:02 2018
@@ -591,7 +591,8 @@ svn_fs_fs__id_parse(const svn_fs_id_t **
   svn_fs_id_t *id = id_parse(data, pool);
   if (id == NULL)
     return svn_error_createf(SVN_ERR_FS_MALFORMED_NODEREV_ID, NULL,
-                             "Malformed node revision ID string");
+                             "Malformed node revision ID string '%s'",
+                             data);
 
   *id_p = id;
 

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/index.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/index.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/index.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/index.c Mon Apr 16 12:21:02 2018
@@ -3191,9 +3191,9 @@ compare_p2l_entry_revision(const void *l
                            const void *rhs)
 {
   const svn_fs_fs__p2l_entry_t *lhs_entry
-    =*(const svn_fs_fs__p2l_entry_t **)lhs;
+    =*(const svn_fs_fs__p2l_entry_t *const *)lhs;
   const svn_fs_fs__p2l_entry_t *rhs_entry
-    =*(const svn_fs_fs__p2l_entry_t **)rhs;
+    =*(const svn_fs_fs__p2l_entry_t *const *)rhs;
 
   if (lhs_entry->item.revision < rhs_entry->item.revision)
     return -1;

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/load-index.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/load-index.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/load-index.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/load-index.c Mon Apr 16 12:21:02 2018
@@ -83,9 +83,9 @@ compare_p2l_entry_revision(const void *l
                            const void *rhs)
 {
   const svn_fs_fs__p2l_entry_t *lhs_entry
-    =*(const svn_fs_fs__p2l_entry_t **)lhs;
+    =*(const svn_fs_fs__p2l_entry_t *const *)lhs;
   const svn_fs_fs__p2l_entry_t *rhs_entry
-    =*(const svn_fs_fs__p2l_entry_t **)rhs;
+    =*(const svn_fs_fs__p2l_entry_t *const *)rhs;
 
   if (lhs_entry->offset < rhs_entry->offset)
     return -1;

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/temp_serializer.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/temp_serializer.h?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/temp_serializer.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/temp_serializer.h Mon Apr 16 12:21:02 2018
@@ -53,13 +53,16 @@ svn_fs_fs__noderev_deserialize(void *buf
 /**
  * Adds position information to the raw window data in WINDOW.
  */
-typedef struct
+typedef struct svn_fs_fs__raw_cached_window_t
 {
   /* the (unprocessed) txdelta window byte sequence cached / to be cached */
   svn_string_t window;
 
   /* the offset within the representation right after reading the window */
   apr_off_t end_offset;
+
+  /* svndiff version */
+  int ver;
 } svn_fs_fs__raw_cached_window_t;
 
 /**
@@ -86,7 +89,7 @@ svn_fs_fs__deserialize_raw_window(void *
  * #svn_txdelta_window_t is not sufficient for caching the data it
  * represents because data read process needs auxiliary information.
  */
-typedef struct
+typedef struct svn_fs_fs__txdelta_cached_window_t
 {
   /* the txdelta window information cached / to be cached */
   svn_txdelta_window_t *window;
@@ -374,7 +377,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/shelve-checkpoint/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/options.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/options.c Mon Apr 16 12:21:02 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/shelve-checkpoint/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_repos/repos.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_repos/repos.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_repos/repos.c Mon Apr 16 12:21:02 2018
@@ -1721,7 +1721,7 @@ svn_repos_recover4(const char *path,
 }
 
 struct freeze_baton_t {
-  apr_array_header_t *paths;
+  const apr_array_header_t *paths;
   int counter;
   svn_repos_freeze_func_t freeze_func;
   void *freeze_baton;
@@ -1788,7 +1788,7 @@ multi_freeze(void *baton,
    and an SQLite reserved lock which means the repository is readable
    while frozen. */
 svn_error_t *
-svn_repos_freeze(apr_array_header_t *paths,
+svn_repos_freeze(const apr_array_header_t *paths,
                  svn_repos_freeze_func_t freeze_func,
                  void *freeze_baton,
                  apr_pool_t *pool)

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_subr/compress_lz4.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/compress_lz4.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_subr/compress_lz4.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_subr/compress_lz4.c Mon Apr 16 12:21:02 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/shelve-checkpoint/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/deprecated.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_subr/deprecated.c Mon Apr 16 12:21:02 2018
@@ -390,6 +390,30 @@ print_command_info(const svn_opt_subcomm
   return SVN_NO_ERROR;
 }
 
+const svn_opt_subcommand_desc2_t *
+svn_opt_get_canonical_subcommand2(const svn_opt_subcommand_desc2_t *table,
+                                  const char *cmd_name)
+{
+  int i = 0;
+
+  if (cmd_name == NULL)
+    return NULL;
+
+  while (table[i].name) {
+    int j;
+    if (strcmp(cmd_name, table[i].name) == 0)
+      return table + i;
+    for (j = 0; (j < SVN_OPT_MAX_ALIASES) && table[i].aliases[j]; j++)
+      if (strcmp(cmd_name, table[i].aliases[j]) == 0)
+        return table + i;
+
+    i++;
+  }
+
+  /* If we get here, there was no matching subcommand name or alias. */
+  return NULL;
+}
+
 const svn_opt_subcommand_desc_t *
 svn_opt_get_canonical_subcommand(const svn_opt_subcommand_desc_t *table,
                                  const char *cmd_name)
@@ -414,6 +438,344 @@ svn_opt_get_canonical_subcommand(const s
   return NULL;
 }
 
+const apr_getopt_option_t *
+svn_opt_get_option_from_code2(int code,
+                              const apr_getopt_option_t *option_table,
+                              const svn_opt_subcommand_desc2_t *command,
+                              apr_pool_t *pool)
+{
+  apr_size_t i;
+
+  for (i = 0; option_table[i].optch; i++)
+    if (option_table[i].optch == code)
+      {
+        if (command)
+          {
+            int j;
+
+            for (j = 0; ((j < SVN_OPT_MAX_OPTIONS) &&
+                         command->desc_overrides[j].optch); j++)
+              if (command->desc_overrides[j].optch == code)
+                {
+                  apr_getopt_option_t *tmpopt =
+                      apr_palloc(pool, sizeof(*tmpopt));
+                  *tmpopt = option_table[i];
+                  tmpopt->description = command->desc_overrides[j].desc;
+                  return tmpopt;
+                }
+          }
+        return &(option_table[i]);
+      }
+
+  return NULL;
+}
+
+const apr_getopt_option_t *
+svn_opt_get_option_from_code(int code,
+                             const apr_getopt_option_t *option_table)
+{
+  apr_size_t i;
+
+  for (i = 0; option_table[i].optch; i++)
+    if (option_table[i].optch == code)
+      return &(option_table[i]);
+
+  return NULL;
+}
+
+/* Like svn_opt_get_option_from_code2(), but also, if CODE appears a second
+ * time in OPTION_TABLE with a different name, then set *LONG_ALIAS to that
+ * second name, else set it to NULL. */
+static const apr_getopt_option_t *
+get_option_from_code(const char **long_alias,
+                     int code,
+                     const apr_getopt_option_t *option_table,
+                     const svn_opt_subcommand_desc2_t *command,
+                     apr_pool_t *pool)
+{
+  const apr_getopt_option_t *i;
+  const apr_getopt_option_t *opt
+    = svn_opt_get_option_from_code2(code, option_table, command, pool);
+
+  /* Find a long alias in the table, if there is one. */
+  *long_alias = NULL;
+  for (i = option_table; i->optch; i++)
+    {
+      if (i->optch == code && i->name != opt->name)
+        {
+          *long_alias = i->name;
+          break;
+        }
+    }
+
+  return opt;
+}
+
+/* Print an option OPT nicely into a STRING allocated in POOL.
+ * If OPT has a single-character short form, then print OPT->name (if not
+ * NULL) as an alias, else print LONG_ALIAS (if not NULL) as an alias.
+ * If DOC is set, include the generic documentation string of OPT,
+ * localized to the current locale if a translation is available.
+ */
+static void
+format_option(const char **string,
+              const apr_getopt_option_t *opt,
+              const char *long_alias,
+              svn_boolean_t doc,
+              apr_pool_t *pool)
+{
+  char *opts;
+
+  if (opt == NULL)
+    {
+      *string = "?";
+      return;
+    }
+
+  /* We have a valid option which may or may not have a "short
+     name" (a single-character alias for the long option). */
+  if (opt->optch <= 255)
+    opts = apr_psprintf(pool, "-%c [--%s]", opt->optch, opt->name);
+  else if (long_alias)
+    opts = apr_psprintf(pool, "--%s [--%s]", opt->name, long_alias);
+  else
+    opts = apr_psprintf(pool, "--%s", opt->name);
+
+  if (opt->has_arg)
+    opts = apr_pstrcat(pool, opts, _(" ARG"), SVN_VA_NULL);
+
+  if (doc)
+    opts = apr_psprintf(pool, "%-24s : %s", opts, _(opt->description));
+
+  *string = opts;
+}
+
+/* Print the canonical command name for CMD, and all its aliases, to
+   STREAM.  If HELP is set, print CMD's help string too, in which case
+   obtain option usage from OPTIONS_TABLE. */
+static svn_error_t *
+print_command_info2(const svn_opt_subcommand_desc2_t *cmd,
+                    const apr_getopt_option_t *options_table,
+                    const int *global_options,
+                    svn_boolean_t help,
+                    apr_pool_t *pool,
+                    FILE *stream)
+{
+  svn_boolean_t first_time;
+  apr_size_t i;
+
+  /* Print the canonical command name. */
+  SVN_ERR(svn_cmdline_fputs(cmd->name, stream, pool));
+
+  /* Print the list of aliases. */
+  first_time = TRUE;
+  for (i = 0; i < SVN_OPT_MAX_ALIASES; i++)
+    {
+      if (cmd->aliases[i] == NULL)
+        break;
+
+      if (first_time) {
+        SVN_ERR(svn_cmdline_fputs(" (", stream, pool));
+        first_time = FALSE;
+      }
+      else
+        SVN_ERR(svn_cmdline_fputs(", ", stream, pool));
+
+      SVN_ERR(svn_cmdline_fputs(cmd->aliases[i], stream, pool));
+    }
+
+  if (! first_time)
+    SVN_ERR(svn_cmdline_fputs(")", stream, pool));
+
+  if (help)
+    {
+      const apr_getopt_option_t *option;
+      const char *long_alias;
+      svn_boolean_t have_options = FALSE;
+
+      SVN_ERR(svn_cmdline_fprintf(stream, pool, ": %s", _(cmd->help)));
+
+      /* Loop over all valid option codes attached to the subcommand */
+      for (i = 0; i < SVN_OPT_MAX_OPTIONS; i++)
+        {
+          if (cmd->valid_options[i])
+            {
+              if (!have_options)
+                {
+                  SVN_ERR(svn_cmdline_fputs(_("\nValid options:\n"),
+                                            stream, pool));
+                  have_options = TRUE;
+                }
+
+              /* convert each option code into an option */
+              option = get_option_from_code(&long_alias, cmd->valid_options[i],
+                                            options_table, cmd, pool);
+
+              /* print the option's docstring */
+              if (option && option->description)
+                {
+                  const char *optstr;
+                  format_option(&optstr, option, long_alias, TRUE, pool);
+                  SVN_ERR(svn_cmdline_fprintf(stream, pool, "  %s\n",
+                                              optstr));
+                }
+            }
+        }
+      /* And global options too */
+      if (global_options && *global_options)
+        {
+          SVN_ERR(svn_cmdline_fputs(_("\nGlobal options:\n"),
+                                    stream, pool));
+          have_options = TRUE;
+
+          for (i = 0; global_options[i]; i++)
+            {
+
+              /* convert each option code into an option */
+              option = get_option_from_code(&long_alias, global_options[i],
+                                            options_table, cmd, pool);
+
+              /* print the option's docstring */
+              if (option && option->description)
+                {
+                  const char *optstr;
+                  format_option(&optstr, option, long_alias, TRUE, pool);
+                  SVN_ERR(svn_cmdline_fprintf(stream, pool, "  %s\n",
+                                              optstr));
+                }
+            }
+        }
+
+      if (have_options)
+        SVN_ERR(svn_cmdline_fprintf(stream, pool, "\n"));
+    }
+
+  return SVN_NO_ERROR;
+}
+
+/* The body for svn_opt_print_generic_help2() function with standard error
+ * handling semantic. Handling of errors implemented at caller side. */
+static svn_error_t *
+print_generic_help_body(const char *header,
+                        const svn_opt_subcommand_desc2_t *cmd_table,
+                        const apr_getopt_option_t *opt_table,
+                        const char *footer,
+                        apr_pool_t *pool, FILE *stream)
+{
+  int i = 0;
+
+  if (header)
+    SVN_ERR(svn_cmdline_fputs(header, stream, pool));
+
+  while (cmd_table[i].name)
+    {
+      SVN_ERR(svn_cmdline_fputs("   ", stream, pool));
+      SVN_ERR(print_command_info2(cmd_table + i, opt_table,
+                                  NULL, FALSE,
+                                  pool, stream));
+      SVN_ERR(svn_cmdline_fputs("\n", stream, pool));
+      i++;
+    }
+
+  SVN_ERR(svn_cmdline_fputs("\n", stream, pool));
+
+  if (footer)
+    SVN_ERR(svn_cmdline_fputs(footer, stream, pool));
+
+  return SVN_NO_ERROR;
+}
+
+void
+svn_opt_print_generic_help2(const char *header,
+                            const svn_opt_subcommand_desc2_t *cmd_table,
+                            const apr_getopt_option_t *opt_table,
+                            const char *footer,
+                            apr_pool_t *pool, FILE *stream)
+{
+  svn_error_t *err;
+
+  err = print_generic_help_body(header, cmd_table, opt_table, footer, pool,
+                                stream);
+
+  /* Issue #3014:
+   * Don't print anything on broken pipes. The pipe was likely
+   * closed by the process at the other end. We expect that
+   * process to perform error reporting as necessary.
+   *
+   * ### This assumes that there is only one error in a chain for
+   * ### SVN_ERR_IO_PIPE_WRITE_ERROR. See svn_cmdline_fputs(). */
+  if (err && err->apr_err != SVN_ERR_IO_PIPE_WRITE_ERROR)
+    svn_handle_error2(err, stderr, FALSE, "svn: ");
+  svn_error_clear(err);
+}
+
+svn_boolean_t
+svn_opt_subcommand_takes_option3(const svn_opt_subcommand_desc2_t *command,
+                                 int option_code,
+                                 const int *global_options)
+{
+  apr_size_t i;
+
+  for (i = 0; i < SVN_OPT_MAX_OPTIONS; i++)
+    if (command->valid_options[i] == option_code)
+      return TRUE;
+
+  if (global_options)
+    for (i = 0; global_options[i]; i++)
+      if (global_options[i] == option_code)
+        return TRUE;
+
+  return FALSE;
+}
+
+svn_boolean_t
+svn_opt_subcommand_takes_option2(const svn_opt_subcommand_desc2_t *command,
+                                 int option_code)
+{
+  return svn_opt_subcommand_takes_option3(command,
+                                          option_code,
+                                          NULL);
+}
+
+svn_boolean_t
+svn_opt_subcommand_takes_option(const svn_opt_subcommand_desc_t *command,
+                                int option_code)
+{
+  apr_size_t i;
+
+  for (i = 0; i < SVN_OPT_MAX_OPTIONS; i++)
+    if (command->valid_options[i] == option_code)
+      return TRUE;
+
+  return FALSE;
+}
+
+void
+svn_opt_subcommand_help3(const char *subcommand,
+                         const svn_opt_subcommand_desc2_t *table,
+                         const apr_getopt_option_t *options_table,
+                         const int *global_options,
+                         apr_pool_t *pool)
+{
+  const svn_opt_subcommand_desc2_t *cmd =
+    svn_opt_get_canonical_subcommand2(table, subcommand);
+  svn_error_t *err;
+
+  if (cmd)
+    err = print_command_info2(cmd, options_table, global_options,
+                              TRUE, pool, stdout);
+  else
+    err = svn_cmdline_fprintf(stderr, pool,
+                              _("\"%s\": unknown command.\n\n"), subcommand);
+
+  if (err) {
+    /* Issue #3014: Don't print anything on broken pipes. */
+    if (err->apr_err != SVN_ERR_IO_PIPE_WRITE_ERROR)
+      svn_handle_error2(err, stderr, FALSE, "svn: ");
+    svn_error_clear(err);
+  }
+}
+
 void
 svn_opt_subcommand_help2(const char *subcommand,
                          const svn_opt_subcommand_desc2_t *table,
@@ -521,6 +883,56 @@ svn_opt_args_to_target_array(apr_array_h
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_opt_print_help4(apr_getopt_t *os,
+                    const char *pgm_name,
+                    svn_boolean_t print_version,
+                    svn_boolean_t quiet,
+                    svn_boolean_t verbose,
+                    const char *version_footer,
+                    const char *header,
+                    const svn_opt_subcommand_desc2_t *cmd_table,
+                    const apr_getopt_option_t *option_table,
+                    const int *global_options,
+                    const char *footer,
+                    apr_pool_t *pool)
+{
+  apr_array_header_t *targets = NULL;
+
+  if (os)
+    SVN_ERR(svn_opt_parse_all_args(&targets, os, pool));
+
+  if (os && targets->nelts)  /* help on subcommand(s) requested */
+    {
+      int i;
+
+      for (i = 0; i < targets->nelts; i++)
+        {
+          svn_opt_subcommand_help3(APR_ARRAY_IDX(targets, i, const char *),
+                                   cmd_table, option_table,
+                                   global_options, pool);
+        }
+    }
+  else if (print_version)   /* just --version */
+    {
+      SVN_ERR(svn_opt__print_version_info(pgm_name, version_footer,
+                                          svn_version_extended(verbose, pool),
+                                          quiet, verbose, pool));
+    }
+  else if (os && !targets->nelts)            /* `-h', `--help', or `help' */
+    svn_opt_print_generic_help2(header,
+                                cmd_table,
+                                option_table,
+                                footer,
+                                pool,
+                                stdout);
+  else                                       /* unknown option or cmd */
+    SVN_ERR(svn_cmdline_fprintf(stderr, pool,
+                                _("Type '%s help' for usage.\n"), pgm_name));
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_opt_print_help3(apr_getopt_t *os,
                     const char *pgm_name,

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_subr/lz4/lz4.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/lz4/lz4.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_subr/lz4/lz4.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_subr/lz4/lz4.c Mon Apr 16 12:21:02 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.
@@ -1471,4 +1471,11 @@ int LZ4_decompress_fast_withPrefix64k(co
 }
 
 #endif   /* LZ4_COMMONDEFS_ONLY */
+#else /* !SVN_INTERNAL_LZ4 */
+
+/* Silence OSX ranlib warnings about object files with no symbols. */
+#include <apr.h>
+extern const apr_uint32_t svn__fake__lz4internal;
+const apr_uint32_t svn__fake__lz4internal = 0xdeadbeef;
+
 #endif /* SVN_INTERNAL_LZ4 */

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_subr/lz4/lz4internal.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/lz4/lz4internal.h?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_subr/lz4/lz4internal.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_subr/lz4/lz4internal.h Mon Apr 16 12:21:02 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/shelve-checkpoint/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/mergeinfo.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_subr/mergeinfo.c Mon Apr 16 12:21:02 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/shelve-checkpoint/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/opt.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_subr/opt.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_subr/opt.c Mon Apr 16 12:21:02 2018
@@ -55,8 +55,8 @@
 
 /*** Code. ***/
 
-const svn_opt_subcommand_desc2_t *
-svn_opt_get_canonical_subcommand2(const svn_opt_subcommand_desc2_t *table,
+const svn_opt_subcommand_desc3_t *
+svn_opt_get_canonical_subcommand3(const svn_opt_subcommand_desc3_t *table,
                                   const char *cmd_name)
 {
   int i = 0;
@@ -80,9 +80,9 @@ svn_opt_get_canonical_subcommand2(const
 }
 
 const apr_getopt_option_t *
-svn_opt_get_option_from_code2(int code,
+svn_opt_get_option_from_code3(int code,
                               const apr_getopt_option_t *option_table,
-                              const svn_opt_subcommand_desc2_t *command,
+                              const svn_opt_subcommand_desc3_t *command,
                               apr_pool_t *pool)
 {
   apr_size_t i;
@@ -111,34 +111,19 @@ svn_opt_get_option_from_code2(int code,
   return NULL;
 }
 
-
-const apr_getopt_option_t *
-svn_opt_get_option_from_code(int code,
-                             const apr_getopt_option_t *option_table)
-{
-  apr_size_t i;
-
-  for (i = 0; option_table[i].optch; i++)
-    if (option_table[i].optch == code)
-      return &(option_table[i]);
-
-  return NULL;
-}
-
-
-/* Like svn_opt_get_option_from_code2(), but also, if CODE appears a second
+/* Like svn_opt_get_option_from_code3(), but also, if CODE appears a second
  * time in OPTION_TABLE with a different name, then set *LONG_ALIAS to that
  * second name, else set it to NULL. */
 static const apr_getopt_option_t *
-get_option_from_code(const char **long_alias,
-                     int code,
-                     const apr_getopt_option_t *option_table,
-                     const svn_opt_subcommand_desc2_t *command,
-                     apr_pool_t *pool)
+get_option_from_code3(const char **long_alias,
+                      int code,
+                      const apr_getopt_option_t *option_table,
+                      const svn_opt_subcommand_desc3_t *command,
+                      apr_pool_t *pool)
 {
   const apr_getopt_option_t *i;
   const apr_getopt_option_t *opt
-    = svn_opt_get_option_from_code2(code, option_table, command, pool);
+    = svn_opt_get_option_from_code3(code, option_table, command, pool);
 
   /* Find a long alias in the table, if there is one. */
   *long_alias = NULL;
@@ -205,7 +190,7 @@ svn_opt_format_option(const char **strin
 
 
 svn_boolean_t
-svn_opt_subcommand_takes_option3(const svn_opt_subcommand_desc2_t *command,
+svn_opt_subcommand_takes_option4(const svn_opt_subcommand_desc3_t *command,
                                  int option_code,
                                  const int *global_options)
 {
@@ -223,35 +208,12 @@ svn_opt_subcommand_takes_option3(const s
   return FALSE;
 }
 
-svn_boolean_t
-svn_opt_subcommand_takes_option2(const svn_opt_subcommand_desc2_t *command,
-                                 int option_code)
-{
-  return svn_opt_subcommand_takes_option3(command,
-                                          option_code,
-                                          NULL);
-}
-
-
-svn_boolean_t
-svn_opt_subcommand_takes_option(const svn_opt_subcommand_desc_t *command,
-                                int option_code)
-{
-  apr_size_t i;
-
-  for (i = 0; i < SVN_OPT_MAX_OPTIONS; i++)
-    if (command->valid_options[i] == option_code)
-      return TRUE;
-
-  return FALSE;
-}
-
 
 /* Print the canonical command name for CMD, and all its aliases, to
    STREAM.  If HELP is set, print CMD's help string too, in which case
    obtain option usage from OPTIONS_TABLE. */
 static svn_error_t *
-print_command_info2(const svn_opt_subcommand_desc2_t *cmd,
+print_command_info3(const svn_opt_subcommand_desc3_t *cmd,
                     const apr_getopt_option_t *options_table,
                     const int *global_options,
                     svn_boolean_t help,
@@ -290,7 +252,12 @@ print_command_info2(const svn_opt_subcom
       const char *long_alias;
       svn_boolean_t have_options = FALSE;
 
-      SVN_ERR(svn_cmdline_fprintf(stream, pool, ": %s", _(cmd->help)));
+      SVN_ERR(svn_cmdline_fprintf(stream, pool, ": "));
+
+      for (i = 0; i < SVN_OPT_MAX_PARAGRAPHS && cmd->help[i]; i++)
+        {
+          SVN_ERR(svn_cmdline_fprintf(stream, pool, "%s", _(cmd->help[i])));
+        }
 
       /* Loop over all valid option codes attached to the subcommand */
       for (i = 0; i < SVN_OPT_MAX_OPTIONS; i++)
@@ -305,8 +272,8 @@ print_command_info2(const svn_opt_subcom
                 }
 
               /* convert each option code into an option */
-              option = get_option_from_code(&long_alias, cmd->valid_options[i],
-                                            options_table, cmd, pool);
+              option = get_option_from_code3(&long_alias, cmd->valid_options[i],
+                                             options_table, cmd, pool);
 
               /* print the option's docstring */
               if (option && option->description)
@@ -329,8 +296,8 @@ print_command_info2(const svn_opt_subcom
             {
 
               /* convert each option code into an option */
-              option = get_option_from_code(&long_alias, global_options[i],
-                                            options_table, cmd, pool);
+              option = get_option_from_code3(&long_alias, global_options[i],
+                                             options_table, cmd, pool);
 
               /* print the option's docstring */
               if (option && option->description)
@@ -350,14 +317,14 @@ print_command_info2(const svn_opt_subcom
   return SVN_NO_ERROR;
 }
 
-/* The body for svn_opt_print_generic_help2() function with standard error
+/* The body for svn_opt_print_generic_help3() function with standard error
  * handling semantic. Handling of errors implemented at caller side. */
 static svn_error_t *
-print_generic_help_body(const char *header,
-                        const svn_opt_subcommand_desc2_t *cmd_table,
-                        const apr_getopt_option_t *opt_table,
-                        const char *footer,
-                        apr_pool_t *pool, FILE *stream)
+print_generic_help_body3(const char *header,
+                         const svn_opt_subcommand_desc3_t *cmd_table,
+                         const apr_getopt_option_t *opt_table,
+                         const char *footer,
+                         apr_pool_t *pool, FILE *stream)
 {
   int i = 0;
 
@@ -367,7 +334,7 @@ print_generic_help_body(const char *head
   while (cmd_table[i].name)
     {
       SVN_ERR(svn_cmdline_fputs("   ", stream, pool));
-      SVN_ERR(print_command_info2(cmd_table + i, opt_table,
+      SVN_ERR(print_command_info3(cmd_table + i, opt_table,
                                   NULL, FALSE,
                                   pool, stream));
       SVN_ERR(svn_cmdline_fputs("\n", stream, pool));
@@ -383,16 +350,16 @@ print_generic_help_body(const char *head
 }
 
 void
-svn_opt_print_generic_help2(const char *header,
-                            const svn_opt_subcommand_desc2_t *cmd_table,
+svn_opt_print_generic_help3(const char *header,
+                            const svn_opt_subcommand_desc3_t *cmd_table,
                             const apr_getopt_option_t *opt_table,
                             const char *footer,
                             apr_pool_t *pool, FILE *stream)
 {
   svn_error_t *err;
 
-  err = print_generic_help_body(header, cmd_table, opt_table, footer, pool,
-                                stream);
+  err = print_generic_help_body3(header, cmd_table, opt_table, footer, pool,
+                                 stream);
 
   /* Issue #3014:
    * Don't print anything on broken pipes. The pipe was likely
@@ -408,18 +375,18 @@ svn_opt_print_generic_help2(const char *
 
 
 void
-svn_opt_subcommand_help3(const char *subcommand,
-                         const svn_opt_subcommand_desc2_t *table,
+svn_opt_subcommand_help4(const char *subcommand,
+                         const svn_opt_subcommand_desc3_t *table,
                          const apr_getopt_option_t *options_table,
                          const int *global_options,
                          apr_pool_t *pool)
 {
-  const svn_opt_subcommand_desc2_t *cmd =
-    svn_opt_get_canonical_subcommand2(table, subcommand);
+  const svn_opt_subcommand_desc3_t *cmd =
+    svn_opt_get_canonical_subcommand3(table, subcommand);
   svn_error_t *err;
 
   if (cmd)
-    err = print_command_info2(cmd, options_table, global_options,
+    err = print_command_info3(cmd, options_table, global_options,
                               TRUE, pool, stdout);
   else
     err = svn_cmdline_fprintf(stderr, pool,
@@ -1200,14 +1167,14 @@ svn_opt__print_version_info(const char *
 }
 
 svn_error_t *
-svn_opt_print_help4(apr_getopt_t *os,
+svn_opt_print_help5(apr_getopt_t *os,
                     const char *pgm_name,
                     svn_boolean_t print_version,
                     svn_boolean_t quiet,
                     svn_boolean_t verbose,
                     const char *version_footer,
                     const char *header,
-                    const svn_opt_subcommand_desc2_t *cmd_table,
+                    const svn_opt_subcommand_desc3_t *cmd_table,
                     const apr_getopt_option_t *option_table,
                     const int *global_options,
                     const char *footer,
@@ -1224,7 +1191,7 @@ svn_opt_print_help4(apr_getopt_t *os,
 
       for (i = 0; i < targets->nelts; i++)
         {
-          svn_opt_subcommand_help3(APR_ARRAY_IDX(targets, i, const char *),
+          svn_opt_subcommand_help4(APR_ARRAY_IDX(targets, i, const char *),
                                    cmd_table, option_table,
                                    global_options, pool);
         }
@@ -1236,7 +1203,7 @@ svn_opt_print_help4(apr_getopt_t *os,
                                           quiet, verbose, pool));
     }
   else if (os && !targets->nelts)            /* `-h', `--help', or `help' */
-    svn_opt_print_generic_help2(header,
+    svn_opt_print_generic_help3(header,
                                 cmd_table,
                                 option_table,
                                 footer,

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_subr/sysinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/sysinfo.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_subr/sysinfo.c Mon Apr 16 12:21:02 2018
@@ -1155,6 +1155,7 @@ release_name_from_version(const char *os
     case 10: return "Yosemite";
     case 11: return "El Capitan";
     case 12: return "Sierra";
+    case 13: return "High Sierra";
     }
 
   return NULL;

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_subr/x509info.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/x509info.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_subr/x509info.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_subr/x509info.c Mon Apr 16 12:21:02 2018
@@ -128,7 +128,7 @@ typedef struct asn1_oid {
   const char *long_label;
 } asn1_oid;
 
-#define CONSTANT_PAIR(c) (unsigned char *)(c), sizeof((c)) - 1
+#define CONSTANT_PAIR(c) (const unsigned char *)(c), sizeof((c)) - 1
 
 static const asn1_oid asn1_oids[] = {
   { CONSTANT_PAIR(SVN_X509_OID_COMMON_NAME),  "CN", "commonName" },

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_subr/x509parse.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/x509parse.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_subr/x509parse.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_subr/x509parse.c Mon Apr 16 12:21:02 2018
@@ -262,13 +262,34 @@ x509_get_alg(const unsigned char **p, co
 
   if (*p == end)
     return SVN_NO_ERROR;
+  
+  /* The OID encoding of 1.2.840.113549.1.1.10 (id-RSASSA-PSS) */
+#define OID_RSASSA_PSS "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0a"
 
-  /*
-   * assume the algorithm parameters must be NULL
-   */
-  err = asn1_get_tag(p, end, &len, ASN1_NULL);
-  if (err)
-    return svn_error_create(SVN_ERR_X509_CERT_INVALID_ALG, err, NULL);
+  if (equal(alg->p, alg->len, OID_RSASSA_PSS, sizeof(OID_RSASSA_PSS) - 1))
+    {
+      /* Skip over algorithm parameters for id-RSASSA-PSS (RFC 8017)
+       *
+       * RSASSA-PSS-params ::= SEQUENCE {
+       *  hashAlgorithm      [0] HashAlgorithm    DEFAULT sha1,
+       *  maskGenAlgorithm   [1] MaskGenAlgorithm DEFAULT mgf1SHA1,
+       *  saltLength         [2] INTEGER          DEFAULT 20,
+       *  trailerField       [3] TrailerField     DEFAULT trailerFieldBC
+       * }
+       */
+      err = asn1_get_tag(p, end, &len, ASN1_CONSTRUCTED | ASN1_SEQUENCE);
+      if (err)
+        return svn_error_create(SVN_ERR_X509_CERT_INVALID_ALG, err, NULL);
+
+      *p += len;
+    }
+  else
+    {
+      /* Algorithm parameters must be NULL for other algorithms */
+      err = asn1_get_tag(p, end, &len, ASN1_NULL);
+      if (err)
+        return svn_error_create(SVN_ERR_X509_CERT_INVALID_ALG, err, NULL);
+    }
 
   if (*p != end)
     {

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_wc/conflicts.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_wc/conflicts.c Mon Apr 16 12:21:02 2018
@@ -539,6 +539,7 @@ svn_wc__conflict_skel_add_tree_conflict(
                                         svn_wc_conflict_reason_t reason,
                                         svn_wc_conflict_action_t action,
                                         const char *move_src_op_root_abspath,
+                                        const char *move_dst_op_root_abspath,
                                         apr_pool_t *result_pool,
                                         apr_pool_t *scratch_pool)
 {
@@ -555,18 +556,33 @@ svn_wc__conflict_skel_add_tree_conflict(
 
   tree_conflict = svn_skel__make_empty_list(result_pool);
 
-  if (reason == svn_wc_conflict_reason_moved_away
-      && move_src_op_root_abspath)
+  if (reason == svn_wc_conflict_reason_moved_away)
     {
-      const char *move_src_op_root_relpath;
+      if (move_dst_op_root_abspath)
+        {
+          const char *move_dst_op_root_relpath;
 
-      SVN_ERR(svn_wc__db_to_relpath(&move_src_op_root_relpath,
-                                    db, wri_abspath,
-                                    move_src_op_root_abspath,
-                                    result_pool, scratch_pool));
+          SVN_ERR(svn_wc__db_to_relpath(&move_dst_op_root_relpath,
+                                        db, wri_abspath,
+                                        move_dst_op_root_abspath,
+                                        result_pool, scratch_pool));
 
-      svn_skel__prepend_str(move_src_op_root_relpath, tree_conflict,
-                            result_pool);
+          svn_skel__prepend_str(move_dst_op_root_relpath, tree_conflict,
+                                result_pool);
+        }
+
+      if (move_src_op_root_abspath)
+        {
+          const char *move_src_op_root_relpath;
+
+          SVN_ERR(svn_wc__db_to_relpath(&move_src_op_root_relpath,
+                                        db, wri_abspath,
+                                        move_src_op_root_abspath,
+                                        result_pool, scratch_pool));
+
+          svn_skel__prepend_str(move_src_op_root_relpath, tree_conflict,
+                                result_pool);
+        }
     }
 
   svn_skel__prepend_str(svn_token__to_word(action_map, action),
@@ -932,6 +948,7 @@ svn_error_t *
 svn_wc__conflict_read_tree_conflict(svn_wc_conflict_reason_t *reason,
                                     svn_wc_conflict_action_t *action,
                                     const char **move_src_op_root_abspath,
+                                    const char **move_dst_op_root_abspath,
                                     svn_wc__db_t *db,
                                     const char *wri_abspath,
                                     const svn_skel_t *conflict_skel,
@@ -981,10 +998,10 @@ svn_wc__conflict_read_tree_conflict(svn_
 
   c = c->next;
 
-  if (move_src_op_root_abspath)
+  if (move_src_op_root_abspath || move_dst_op_root_abspath)
     {
       /* Only set for update and switch tree conflicts */
-      if (c && is_moved_away)
+      if (c && is_moved_away && move_src_op_root_abspath)
         {
           const char *move_src_op_root_relpath
                             = apr_pstrmemdup(scratch_pool, c->data, c->len);
@@ -994,8 +1011,25 @@ svn_wc__conflict_read_tree_conflict(svn_
                                           move_src_op_root_relpath,
                                           result_pool, scratch_pool));
         }
-      else
+      else if (move_src_op_root_abspath)
         *move_src_op_root_abspath = NULL;
+
+      if (c)
+        c = c->next;
+
+      if (c && is_moved_away && move_dst_op_root_abspath)
+        {
+          const char *move_dst_op_root_relpath
+                            = apr_pstrmemdup(scratch_pool, c->data, c->len);
+
+          SVN_ERR(svn_wc__db_from_relpath(move_dst_op_root_abspath,
+                                          db, wri_abspath,
+                                          move_dst_op_root_relpath,
+                                          result_pool, scratch_pool));
+        }
+      else if (move_dst_op_root_abspath)
+        *move_dst_op_root_abspath = NULL;
+
     }
 
   return SVN_NO_ERROR;
@@ -1801,7 +1835,7 @@ read_tree_conflict_desc(svn_wc_conflict_
   svn_wc_conflict_action_t action;
 
   SVN_ERR(svn_wc__conflict_read_tree_conflict(
-            &reason, &action, NULL,
+            &reason, &action, NULL, NULL,
             db, local_abspath, conflict_skel, scratch_pool, scratch_pool));
 
   if (reason == svn_wc_conflict_reason_missing)
@@ -2676,7 +2710,7 @@ resolve_tree_conflict_on_node(svn_boolea
 
   SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action,
                                               &src_op_root_abspath,
-                                              db, local_abspath,
+                                              NULL, db, local_abspath,
                                               conflicts,
                                               scratch_pool, scratch_pool));
 
@@ -2748,6 +2782,7 @@ resolve_tree_conflict_on_node(svn_boolea
 
               SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action,
                                                           &src_op_root_abspath,
+                                                          NULL,
                                                           db, local_abspath,
                                                           new_conflicts,
                                                           scratch_pool,
@@ -3483,7 +3518,7 @@ svn_wc__conflict_tree_update_break_moved
     return SVN_NO_ERROR;
 
   SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action,
-                                              &src_op_root_abspath,
+                                              &src_op_root_abspath, NULL,
                                               wc_ctx->db, local_abspath,
                                               conflict_skel,
                                               scratch_pool, scratch_pool));
@@ -3569,7 +3604,7 @@ svn_wc__conflict_tree_update_raise_moved
   if (!tree_conflicted)
     return SVN_NO_ERROR;
 
-  SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action, NULL,
+  SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action, NULL, NULL,
                                               wc_ctx->db, local_abspath,
                                               conflict_skel,
                                               scratch_pool, scratch_pool));
@@ -3648,7 +3683,7 @@ svn_wc__conflict_tree_update_moved_away_
     return SVN_NO_ERROR;
 
   SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action,
-                                              &src_op_root_abspath,
+                                              &src_op_root_abspath, NULL,
                                               wc_ctx->db, local_abspath,
                                               conflict_skel,
                                               scratch_pool, scratch_pool));
@@ -3734,8 +3769,8 @@ svn_wc__conflict_tree_update_incoming_mo
     return SVN_NO_ERROR;
 
   SVN_ERR(svn_wc__conflict_read_tree_conflict(&local_change, &incoming_change,
-                                              NULL, wc_ctx->db, local_abspath,
-                                              conflict_skel,
+                                              NULL, NULL, wc_ctx->db,
+                                              local_abspath, conflict_skel,
                                               scratch_pool, scratch_pool));
 
   /* Make sure the expected conflict is recorded. */
@@ -3803,8 +3838,8 @@ svn_wc__conflict_tree_update_local_add(s
     return SVN_NO_ERROR;
 
   SVN_ERR(svn_wc__conflict_read_tree_conflict(&local_change, &incoming_change,
-                                              NULL, wc_ctx->db, local_abspath,
-                                              conflict_skel,
+                                              NULL, NULL, wc_ctx->db,
+                                              local_abspath, conflict_skel,
                                               scratch_pool, scratch_pool));
 
   /* Make sure the expected conflict is recorded. */

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_wc/conflicts.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_wc/conflicts.h?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_wc/conflicts.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_wc/conflicts.h Mon Apr 16 12:21:02 2018
@@ -219,6 +219,11 @@ svn_wc__conflict_skel_add_prop_conflict(
    MOVE_SRC_OP_ROOT_ABSPATH should be A for a conflict associated
    with (1), MOVE_SRC_OP_ROOT_ABSPATH should be A/B for a conflict
    associated with (2).
+   MOVE_DST_OP_ROOT_ABSPATH is the op-root of the move target (i.e. the
+   op-root of the corresponding copy). This needs to be stored because 
+   moves in the NODE table do not always persist after an update, while
+   the conflict resolver may need information about the pre-update state
+   of the move.
 
    It is an error to add another tree conflict to a conflict skel that
    already contains a tree conflict.  (It is not an error, at this level,
@@ -233,6 +238,7 @@ svn_wc__conflict_skel_add_tree_conflict(
                                         svn_wc_conflict_reason_t local_change,
                                         svn_wc_conflict_action_t incoming_change,
                                         const char *move_src_op_root_abspath,
+                                        const char *move_dst_op_root_abspath,
                                         apr_pool_t *result_pool,
                                         apr_pool_t *scratch_pool);
 
@@ -364,6 +370,7 @@ svn_error_t *
 svn_wc__conflict_read_tree_conflict(svn_wc_conflict_reason_t *local_change,
                                     svn_wc_conflict_action_t *incoming_change,
                                     const char **move_src_op_root_abspath,
+                                    const char **move_dst_op_root_abspath,
                                     svn_wc__db_t *db,
                                     const char *wri_abspath,
                                     const svn_skel_t *conflict_skel,

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_wc/props.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_wc/props.c Mon Apr 16 12:21:02 2018
@@ -2236,7 +2236,9 @@ svn_wc_canonicalize_svn_prop(const svn_s
               if (duplicate_targets->nelts > 1)
                 {
                   more_str = apr_psprintf(/*scratch_*/pool,
-                               _(" (%d more duplicate targets found)"),
+                               Q_(" (%d more duplicate target found)",
+                                  " (%d more duplicate targets found)",
+                                  duplicate_targets->nelts - 1),
                                duplicate_targets->nelts - 1);
                 }
               return svn_error_createf(

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_wc/questions.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_wc/questions.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_wc/questions.c Mon Apr 16 12:21:02 2018
@@ -475,7 +475,7 @@ internal_conflicted_p(svn_boolean_t *tex
           svn_wc_conflict_action_t action;
 
           SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action, NULL,
-                                                      db, local_abspath,
+                                                      NULL, db, local_abspath,
                                                       conflicts,
                                                       scratch_pool,
                                                       scratch_pool));

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_wc/tree_conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_wc/tree_conflicts.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_wc/tree_conflicts.c Mon Apr 16 12:21:02 2018
@@ -442,7 +442,7 @@ svn_wc__add_tree_conflict(svn_wc_context
                                                   conflict->local_abspath,
                                                   conflict->reason,
                                                   conflict->action,
-                                                  NULL,
+                                                  NULL, NULL,
                                                   scratch_pool, scratch_pool));
 
   switch (conflict->operation)

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_wc/update_editor.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_wc/update_editor.c Mon Apr 16 12:21:02 2018
@@ -1235,9 +1235,11 @@ open_root(void *edit_baton,
     db->shadowed = TRUE;
   else if (have_work)
     {
+      const char *move_dst_op_root_abspath;
       const char *move_src_root_abspath;
 
-      SVN_ERR(svn_wc__db_base_moved_to(NULL, NULL, &move_src_root_abspath,
+      SVN_ERR(svn_wc__db_base_moved_to(NULL, &move_dst_op_root_abspath,
+                                       &move_src_root_abspath,
                                        NULL, eb->db, db->local_abspath,
                                        pool, pool));
 
@@ -1252,7 +1254,8 @@ open_root(void *edit_baton,
                     tree_conflict, eb->db, move_src_root_abspath,
                     svn_wc_conflict_reason_moved_away,
                     svn_wc_conflict_action_edit,
-                    move_src_root_abspath, pool, pool));
+                    move_src_root_abspath,
+                    move_dst_op_root_abspath, pool, pool));
 
           if (strcmp(db->local_abspath, move_src_root_abspath))
             {
@@ -1345,6 +1348,7 @@ check_tree_conflict(svn_skel_t **pconfli
   svn_wc_conflict_reason_t reason = SVN_WC_CONFLICT_REASON_NONE;
   svn_boolean_t modified = FALSE;
   const char *move_src_op_root_abspath = NULL;
+  const char *move_dst_op_root_abspath = NULL;
 
   *pconflict = NULL;
 
@@ -1397,8 +1401,8 @@ check_tree_conflict(svn_skel_t **pconfli
 
       case svn_wc__db_status_deleted:
         {
-          SVN_ERR(svn_wc__db_base_moved_to(NULL, NULL, NULL,
-                                           &move_src_op_root_abspath,
+          SVN_ERR(svn_wc__db_base_moved_to(NULL, &move_dst_op_root_abspath,
+                                           NULL, &move_src_op_root_abspath,
                                            eb->db, local_abspath,
                                            scratch_pool, scratch_pool));
           if (move_src_op_root_abspath)
@@ -1530,6 +1534,7 @@ check_tree_conflict(svn_skel_t **pconfli
                                                   reason,
                                                   action,
                                                   move_src_op_root_abspath,
+                                                  move_dst_op_root_abspath,
                                                   result_pool, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -2007,11 +2012,13 @@ add_directory(const char *path,
         {
           svn_wc_conflict_reason_t reason;
           const char *move_src_op_root_abspath;
+          const char *move_dst_op_root_abspath;
           /* So this deletion wasn't just a deletion, it is actually a
              replacement. Let's install a better tree conflict. */
 
           SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, NULL,
                                                       &move_src_op_root_abspath,
+                                                      &move_dst_op_root_abspath,
                                                       eb->db,
                                                       db->local_abspath,
                                                       tree_conflict,
@@ -2024,6 +2031,7 @@ add_directory(const char *path,
                                         eb->db, db->local_abspath,
                                         reason, svn_wc_conflict_action_replace,
                                         move_src_op_root_abspath,
+                                        move_dst_op_root_abspath,
                                         db->pool, scratch_pool));
 
           /* And now stop checking for conflicts here and just perform
@@ -2148,8 +2156,8 @@ add_directory(const char *path,
                                         tree_conflict,
                                         eb->db, db->local_abspath,
                                         svn_wc_conflict_reason_unversioned,
-                                        svn_wc_conflict_action_add, NULL,
-                                        db->pool, scratch_pool));
+                                        svn_wc_conflict_action_add,
+                                        NULL, NULL, db->pool, scratch_pool));
           db->edit_conflict = tree_conflict;
         }
     }
@@ -2336,7 +2344,7 @@ open_directory(const char *path,
       db->edit_conflict = tree_conflict;
       /* Other modifications wouldn't be a tree conflict */
 
-      SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, NULL, NULL,
+      SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, NULL, NULL, NULL,
                                                   eb->db, db->local_abspath,
                                                   tree_conflict,
                                                   db->pool, db->pool));
@@ -3220,11 +3228,13 @@ add_file(const char *path,
         {
           svn_wc_conflict_reason_t reason;
           const char *move_src_op_root_abspath;
+          const char *move_dst_op_root_abspath;
           /* So this deletion wasn't just a deletion, it is actually a
              replacement. Let's install a better tree conflict. */
 
           SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, NULL,
                                                       &move_src_op_root_abspath,
+                                                      &move_dst_op_root_abspath,
                                                       eb->db,
                                                       fb->local_abspath,
                                                       tree_conflict,
@@ -3237,6 +3247,7 @@ add_file(const char *path,
                                         eb->db, fb->local_abspath,
                                         reason, svn_wc_conflict_action_replace,
                                         move_src_op_root_abspath,
+                                        move_dst_op_root_abspath,
                                         fb->pool, scratch_pool));
 
           /* And now stop checking for conflicts here and just perform
@@ -3363,7 +3374,7 @@ add_file(const char *path,
                                         eb->db, fb->local_abspath,
                                         svn_wc_conflict_reason_unversioned,
                                         svn_wc_conflict_action_add,
-                                        NULL,
+                                        NULL, NULL,
                                         fb->pool, scratch_pool));
         }
     }
@@ -3528,7 +3539,7 @@ open_file(const char *path,
       fb->edit_conflict = tree_conflict;
       /* Other modifications wouldn't be a tree conflict */
 
-      SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, NULL, NULL,
+      SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, NULL, NULL, NULL,
                                                   eb->db, fb->local_abspath,
                                                   tree_conflict,
                                                   scratch_pool, scratch_pool));
@@ -3797,7 +3808,7 @@ change_file_prop(void *file_baton,
                                      eb->db, fb->local_abspath,
                                      svn_wc_conflict_reason_edited,
                                      svn_wc_conflict_action_replace,
-                                     NULL,
+                                     NULL, NULL,
                                      fb->pool, scratch_pool));
 
           SVN_ERR(complete_conflict(fb->edit_conflict, fb->edit_baton,

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_wc/upgrade.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_wc/upgrade.c Mon Apr 16 12:21:02 2018
@@ -1237,7 +1237,7 @@ svn_wc__upgrade_conflict_skel_from_raw(s
                                                       db, wri_abspath,
                                                       tc->reason,
                                                       tc->action,
-                                                      NULL,
+                                                      NULL, NULL,
                                                       scratch_pool,
                                                       scratch_pool));
 

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_wc/wc_db.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_wc/wc_db.c Mon Apr 16 12:21:02 2018
@@ -6839,7 +6839,7 @@ revert_maybe_raise_moved_away(svn_wc__db
     }
 
   SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action,
-                                              NULL,
+                                              NULL, NULL,
                                               db, wcroot->abspath,
                                               conflict,
                                               scratch_pool,

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_wc/wc_db_update_move.c?rev=1829257&r1=1829256&r2=1829257&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_wc/wc_db_update_move.c Mon Apr 16 12:21:02 2018
@@ -411,6 +411,11 @@ create_tree_conflict(svn_skel_t **confli
     ? svn_dirent_join(wcroot->abspath,
                       move_src_op_root_relpath, scratch_pool)
     : NULL;
+  const char *move_dst_op_root_abspath
+    = dst_op_root_relpath
+    ? svn_dirent_join(wcroot->abspath,
+                      dst_op_root_relpath, scratch_pool)
+    : NULL;
   const char *old_repos_relpath_part
     = old_repos_relpath && old_version
     ? svn_relpath_skip_ancestor(old_version->path_in_repos,
@@ -468,7 +473,7 @@ create_tree_conflict(svn_skel_t **confli
 
           SVN_ERR(svn_wc__conflict_read_tree_conflict(&existing_reason,
                                                       &existing_action,
-                                                      &existing_abspath,
+                                                      &existing_abspath, NULL,
                                                       db, wcroot->abspath,
                                                       conflict,
                                                       scratch_pool,
@@ -500,6 +505,7 @@ create_tree_conflict(svn_skel_t **confli
                      reason,
                      action,
                      move_src_op_root_abspath,
+                     move_dst_op_root_abspath,
                      result_pool,
                      scratch_pool));
 
@@ -4099,7 +4105,7 @@ fetch_conflict_details(int *src_op_depth
 
   SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason,
                                               action,
-                                              &move_src_op_root_abspath,
+                                              &move_src_op_root_abspath, NULL,
                                               db, local_abspath,
                                               conflict_skel, result_pool,
                                               scratch_pool));



Mime
View raw message