subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From troycurti...@apache.org
Subject svn commit: r1819203 [2/3] - in /subversion/branches/swig-py3: ./ build/ build/ac-macros/ build/generator/ notes/api-errata/1.10/ notes/commit-access-templates/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/swig/perl/...
Date Sun, 24 Dec 2017 05:23:09 GMT
Modified: subversion/branches/swig-py3/subversion/libsvn_fs_x/pack.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_fs_x/pack.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_fs_x/pack.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_fs_x/pack.c Sun Dec 24 05:23:08 2017
@@ -2204,9 +2204,9 @@ pack_body(void *baton,
   if (fully_packed)
     {
       if (pb->notify_func)
-        (*pb->notify_func)(pb->notify_baton,
-                           ffd->min_unpacked_rev / ffd->max_files_per_dir,
-                           svn_fs_pack_notify_noop, scratch_pool);
+        SVN_ERR(pb->notify_func(pb->notify_baton,
+                                ffd->min_unpacked_rev / ffd->max_files_per_dir,
+                                svn_fs_pack_notify_noop, scratch_pool));
 
       return SVN_NO_ERROR;
     }
@@ -2258,9 +2258,9 @@ svn_fs_x__pack(svn_fs_t *fs,
       svn_fs_x__data_t *ffd = fs->fsap_data;
 
       if (notify_func)
-        (*notify_func)(notify_baton,
-                       ffd->min_unpacked_rev / ffd->max_files_per_dir,
-                       svn_fs_pack_notify_noop, scratch_pool);
+        SVN_ERR(notify_func(notify_baton,
+                            ffd->min_unpacked_rev / ffd->max_files_per_dir,
+                            svn_fs_pack_notify_noop, scratch_pool));
 
       return SVN_NO_ERROR;
     }

Modified: subversion/branches/swig-py3/subversion/libsvn_fs_x/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_fs_x/transaction.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_fs_x/transaction.c Sun Dec 24 05:23:08 2017
@@ -1259,7 +1259,7 @@ get_and_increment_txn_key_body(void *bat
       SVN_ERR(svn_io_check_path(txn_dir, &kind, iterpool));
       if (kind == svn_node_none)
         {
-          svn_io_dir_make(txn_dir, APR_OS_DEFAULT, iterpool);
+          SVN_ERR(svn_io_dir_make(txn_dir, APR_OS_DEFAULT, iterpool));
           break;
         }
 

Modified: subversion/branches/swig-py3/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_ra_local/ra_plugin.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_ra_local/ra_plugin.c Sun Dec 24 05:23:08 2017
@@ -1387,7 +1387,7 @@ svn_ra_local__get_dir(svn_ra_session_t *
             {
               /* size  */
               if (fs_entry->kind == svn_node_dir)
-                entry->size = 0;
+                entry->size = SVN_INVALID_FILESIZE;
               else
                 SVN_ERR(svn_fs_file_length(&(entry->size), root,
                                            fullpath, iterpool));

Modified: subversion/branches/swig-py3/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_ra_serf/commit.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_ra_serf/commit.c Sun Dec 24 05:23:08 2017
@@ -687,7 +687,7 @@ maybe_set_lock_token_header(serf_bucket_
 {
   const char *token;
 
-  if (! (*relpath && commit_ctx->lock_tokens))
+  if (! commit_ctx->lock_tokens)
     return SVN_NO_ERROR;
 
   if (! svn_hash_gets(commit_ctx->deleted_entries, relpath))

Modified: subversion/branches/swig-py3/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_ra_serf/options.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_ra_serf/options.c Sun Dec 24 05:23:08 2017
@@ -232,6 +232,11 @@ capabilities_headers_iterator_callback(v
              advertise this capability (Subversion 1.10 and greater). */
           session->supports_svndiff1 = TRUE;
         }
+      if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_LIST, vals))
+        {
+          svn_hash_sets(session->capabilities,
+                        SVN_RA_CAPABILITY_LIST, capability_yes);
+        }
       if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_SVNDIFF2, vals))
         {
           /* Same for svndiff2. */
@@ -384,6 +389,8 @@ options_response_handler(serf_request_t
                     capability_no);
       svn_hash_sets(session->capabilities, SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE,
                     capability_no);
+      svn_hash_sets(session->capabilities, SVN_RA_CAPABILITY_LIST,
+                    capability_no);
 
       /* Then see which ones we can discover. */
       serf_bucket_headers_do(hdrs, capabilities_headers_iterator_callback,

Modified: subversion/branches/swig-py3/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_ra_serf/ra_serf.h?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/swig-py3/subversion/libsvn_ra_serf/ra_serf.h Sun Dec 24 05:23:08 2017
@@ -1431,6 +1431,18 @@ svn_ra_serf__get_locks(svn_ra_session_t
                        svn_depth_t depth,
                        apr_pool_t *pool);
 
+/* Implements svn_ra__vtable_t.list(). */
+svn_error_t *
+svn_ra_serf__list(svn_ra_session_t *ra_session,
+                  const char *path,
+                  svn_revnum_t revision,
+                  const apr_array_header_t *patterns,
+                  svn_depth_t depth,
+                  apr_uint32_t dirent_fields,
+                  svn_ra_dirent_receiver_t receiver,
+                  void *receiver_baton,
+                  apr_pool_t *scratch_pool);
+
 /* Request a mergeinfo-report from the URL attached to SESSION,
    and fill in the MERGEINFO hash with the results.
 
@@ -1590,6 +1602,16 @@ svn_ra_serf__setup_svndiff_accept_encodi
 svn_boolean_t
 svn_ra_serf__is_low_latency_connection(svn_ra_serf__session_t *session);
 
+/* Return an APR array of svn_ra_serf__dav_props_t containing the
+ * properties (names and namespaces) corresponding to the flegs set
+ * in DIRENT_FIELDS.  If SESSION does not support deadprops, only
+ * the generic "DAV:allprop" will be returned.  Allocate the result
+ * in RESULT_POOL. */
+apr_array_header_t *
+svn_ra_serf__get_dirent_props(apr_uint32_t dirent_fields,
+                              svn_ra_serf__session_t *session,
+                              apr_pool_t *result_pool);
+
 /* Default limit for in-memory size of a request body. */
 #define SVN_RA_SERF__REQUEST_BODY_IN_MEM_SIZE 256 * 1024
 

Modified: subversion/branches/swig-py3/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_ra_serf/serf.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_ra_serf/serf.c Sun Dec 24 05:23:08 2017
@@ -691,7 +691,7 @@ ra_serf_dup_session(svn_ra_session_t *ne
 
   if (new_sess->proxy_password)
     {
-      new_sess->proxy_username
+      new_sess->proxy_password
                 = apr_pstrdup(result_pool, new_sess->proxy_password);
     }
 
@@ -1063,7 +1063,7 @@ static const svn_ra__vtable_t serf_vtabl
   svn_ra_serf__get_deleted_rev,
   svn_ra_serf__get_inherited_props,
   NULL /* set_svn_ra_open */,
-  NULL /* svn_ra_list */,
+  svn_ra_serf__list,
   svn_ra_serf__register_editor_shim_callbacks,
   NULL /* commit_ev2 */,
   NULL /* replay_range_ev2 */

Modified: subversion/branches/swig-py3/subversion/libsvn_ra_serf/stat.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_ra_serf/stat.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_ra_serf/stat.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_ra_serf/stat.c Sun Dec 24 05:23:08 2017
@@ -216,64 +216,8 @@ get_dirent_props(apr_uint32_t dirent_fie
                  apr_pool_t *pool)
 {
   svn_ra_serf__dav_props_t *prop;
-  apr_array_header_t *props = apr_array_make
-    (pool, 7, sizeof(svn_ra_serf__dav_props_t));
-
-  if (session->supports_deadprop_count != svn_tristate_false
-      || ! (dirent_fields & SVN_DIRENT_HAS_PROPS))
-    {
-      if (dirent_fields & SVN_DIRENT_KIND)
-        {
-          prop = apr_array_push(props);
-          prop->xmlns = "DAV:";
-          prop->name = "resourcetype";
-        }
-
-      if (dirent_fields & SVN_DIRENT_SIZE)
-        {
-          prop = apr_array_push(props);
-          prop->xmlns = "DAV:";
-          prop->name = "getcontentlength";
-        }
-
-      if (dirent_fields & SVN_DIRENT_HAS_PROPS)
-        {
-          prop = apr_array_push(props);
-          prop->xmlns = SVN_DAV_PROP_NS_DAV;
-          prop->name = "deadprop-count";
-        }
-
-      if (dirent_fields & SVN_DIRENT_CREATED_REV)
-        {
-          svn_ra_serf__dav_props_t *p = apr_array_push(props);
-          p->xmlns = "DAV:";
-          p->name = SVN_DAV__VERSION_NAME;
-        }
-
-      if (dirent_fields & SVN_DIRENT_TIME)
-        {
-          prop = apr_array_push(props);
-          prop->xmlns = "DAV:";
-          prop->name = SVN_DAV__CREATIONDATE;
-        }
-
-      if (dirent_fields & SVN_DIRENT_LAST_AUTHOR)
-        {
-          prop = apr_array_push(props);
-          prop->xmlns = "DAV:";
-          prop->name = "creator-displayname";
-        }
-    }
-  else
-    {
-      /* We found an old subversion server that can't handle
-         the deadprop-count property in the way we expect.
-
-         The neon behavior is to retrieve all properties in this case */
-      prop = apr_array_push(props);
-      prop->xmlns = "DAV:";
-      prop->name = "allprop";
-    }
+  apr_array_header_t *props = svn_ra_serf__get_dirent_props(dirent_fields,
+                                                            session, pool);
 
   prop = apr_array_push(props);
   prop->xmlns = NULL;

Modified: subversion/branches/swig-py3/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_ra_serf/util.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_ra_serf/util.c Sun Dec 24 05:23:08 2017
@@ -2065,3 +2065,72 @@ svn_ra_serf__is_low_latency_connection(s
   return session->conn_latency >= 0 &&
          session->conn_latency < apr_time_from_msec(5);
 }
+
+apr_array_header_t *
+svn_ra_serf__get_dirent_props(apr_uint32_t dirent_fields,
+                              svn_ra_serf__session_t *session,
+                              apr_pool_t *result_pool)
+{
+  svn_ra_serf__dav_props_t *prop;
+  apr_array_header_t *props = apr_array_make
+    (result_pool, 7, sizeof(svn_ra_serf__dav_props_t));
+
+  if (session->supports_deadprop_count != svn_tristate_false
+      || ! (dirent_fields & SVN_DIRENT_HAS_PROPS))
+    {
+      if (dirent_fields & SVN_DIRENT_KIND)
+        {
+          prop = apr_array_push(props);
+          prop->xmlns = "DAV:";
+          prop->name = "resourcetype";
+        }
+
+      if (dirent_fields & SVN_DIRENT_SIZE)
+        {
+          prop = apr_array_push(props);
+          prop->xmlns = "DAV:";
+          prop->name = "getcontentlength";
+        }
+
+      if (dirent_fields & SVN_DIRENT_HAS_PROPS)
+        {
+          prop = apr_array_push(props);
+          prop->xmlns = SVN_DAV_PROP_NS_DAV;
+          prop->name = "deadprop-count";
+        }
+
+      if (dirent_fields & SVN_DIRENT_CREATED_REV)
+        {
+          svn_ra_serf__dav_props_t *p = apr_array_push(props);
+          p->xmlns = "DAV:";
+          p->name = SVN_DAV__VERSION_NAME;
+        }
+
+      if (dirent_fields & SVN_DIRENT_TIME)
+        {
+          prop = apr_array_push(props);
+          prop->xmlns = "DAV:";
+          prop->name = SVN_DAV__CREATIONDATE;
+        }
+
+      if (dirent_fields & SVN_DIRENT_LAST_AUTHOR)
+        {
+          prop = apr_array_push(props);
+          prop->xmlns = "DAV:";
+          prop->name = "creator-displayname";
+        }
+    }
+  else
+    {
+      /* We found an old subversion server that can't handle
+         the deadprop-count property in the way we expect.
+
+         The neon behavior is to retrieve all properties in this case */
+      prop = apr_array_push(props);
+      prop->xmlns = "DAV:";
+      prop->name = "allprop";
+    }
+
+  return props;
+}
+

Modified: subversion/branches/swig-py3/subversion/libsvn_ra_svn/editorp.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_ra_svn/editorp.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_ra_svn/editorp.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_ra_svn/editorp.c Sun Dec 24 05:23:08 2017
@@ -351,17 +351,9 @@ static svn_error_t *ra_svn_apply_textdel
   svn_stream_set_write(diff_stream, ra_svn_svndiff_handler);
   svn_stream_set_close(diff_stream, ra_svn_svndiff_close_handler);
 
-  /* If the connection does not support SVNDIFF1 or if we don't want to use
-   * compression, use the non-compressing "version 0" implementation */
- /* ### TODO: Check SVN_RA_SVN_CAP_SVNDIFF2_ACCEPTED and decide between
-  * ###       svndiff1[at compression_level] and svndiff2 */
-  if (   svn_ra_svn_compression_level(b->conn) > 0
-      && svn_ra_svn_has_capability(b->conn, SVN_RA_SVN_CAP_SVNDIFF1))
-    svn_txdelta_to_svndiff3(wh, wh_baton, diff_stream, 1,
-                            b->conn->compression_level, pool);
-  else
-    svn_txdelta_to_svndiff3(wh, wh_baton, diff_stream, 0,
-                            b->conn->compression_level, pool);
+  svn_txdelta_to_svndiff3(wh, wh_baton, diff_stream,
+                          svn_ra_svn__svndiff_version(b->conn),
+                          b->conn->compression_level, pool);
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/swig-py3/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_ra_svn/marshal.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_ra_svn/marshal.c Sun Dec 24 05:23:08 2017
@@ -265,6 +265,24 @@ svn_ra_svn__set_capabilities(svn_ra_svn_
   return SVN_NO_ERROR;
 }
 
+int
+svn_ra_svn__svndiff_version(svn_ra_svn_conn_t *conn)
+{
+  /* If we don't want to use compression, use the non-compressing
+   * "version 0" implementation. */
+  if (svn_ra_svn_compression_level(conn) <= 0)
+    return 0;
+
+  /* Prefer SVNDIFF2 over SVNDIFF1. */
+  if (svn_ra_svn_has_capability(conn, SVN_RA_SVN_CAP_SVNDIFF2_ACCEPTED))
+    return 2;
+  if (svn_ra_svn_has_capability(conn, SVN_RA_SVN_CAP_SVNDIFF1))
+    return 1;
+
+  /* The connection does not support SVNDIFF1/2; default to "version 0". */
+  return 0;
+}
+
 apr_pool_t *
 svn_ra_svn__get_pool(svn_ra_svn_conn_t *conn)
 {

Modified: subversion/branches/swig-py3/subversion/libsvn_ra_svn/protocol
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_ra_svn/protocol?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_ra_svn/protocol (original)
+++ subversion/branches/swig-py3/subversion/libsvn_ra_svn/protocol Sun Dec 24 05:23:08 2017
@@ -342,7 +342,7 @@ second place for auth-request point as n
   stat
     params:   ( path:string [ rev:number ] )
     response: ( ? entry:dirent )
-    dirent:   ( name:string kind:node-kind size:number has-props:bool
+    dirent:   ( kind:node-kind size:number has-props:bool
                 created-rev:number [ created-date:string ]
                 [ last-author:string ] )
     New in svn 1.2.  If path is non-existent, an empty response is returned.

Modified: subversion/branches/swig-py3/subversion/libsvn_repos/list.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_repos/list.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_repos/list.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_repos/list.c Sun Dec 24 05:23:08 2017
@@ -50,6 +50,8 @@ fill_dirent(svn_dirent_t *dirent,
 
   if (dirent->kind == svn_node_file)
     SVN_ERR(svn_fs_file_length(&(dirent->size), root, path, scratch_pool));
+  else
+    dirent->size = SVN_INVALID_FILESIZE;
 
   SVN_ERR(svn_fs_node_has_props(&dirent->has_props, root, path,
                                 scratch_pool));

Modified: subversion/branches/swig-py3/subversion/libsvn_repos/load-fs-vtable.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_repos/load-fs-vtable.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_repos/load-fs-vtable.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_repos/load-fs-vtable.c Sun Dec 24 05:23:08 2017
@@ -1260,8 +1260,8 @@ svn_repos_load_fs6(svn_repos_t *repos,
                    svn_boolean_t use_pre_commit_hook,
                    svn_boolean_t use_post_commit_hook,
                    svn_boolean_t validate_props,
-                   svn_boolean_t normalize_props,
                    svn_boolean_t ignore_dates,
+                   svn_boolean_t normalize_props,
                    svn_repos_notify_func_t notify_func,
                    void *notify_baton,
                    svn_cancel_func_t cancel_func,

Modified: subversion/branches/swig-py3/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_repos/reporter.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_repos/reporter.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_repos/reporter.c Sun Dec 24 05:23:08 2017
@@ -973,11 +973,11 @@ update_entry(report_baton_t *b, svn_revn
           if (s_root == NULL)
             SVN_ERR(get_source_root(b, &s_root, s_rev));
 
-          SVN_ERR(svn_fs_props_different(&changed, s_root, s_path,
-                                         b->t_root, t_path, pool));
+          SVN_ERR(svn_fs_props_changed(&changed, s_root, s_path,
+                                       b->t_root, t_path, pool));
           if (!changed)
-            SVN_ERR(svn_fs_contents_different(&changed, s_root, s_path,
-                                              b->t_root, t_path, pool));
+            SVN_ERR(svn_fs_contents_changed(&changed, s_root, s_path,
+                                            b->t_root, t_path, pool));
         }
 
       if ((distance == 0 || !changed) && !any_path_info(b, e_path)

Modified: subversion/branches/swig-py3/subversion/libsvn_subr/compress_lz4.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/compress_lz4.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/compress_lz4.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/compress_lz4.c Sun Dec 24 05:23:08 2017
@@ -126,3 +126,19 @@ svn__decompress_lz4(const void *data, ap
 
   return SVN_NO_ERROR;
 }
+
+const char *
+svn_lz4__compiled_version(void)
+{
+  static const char lz4_version_str[] = APR_STRINGIFY(LZ4_VERSION_MAJOR) "." \
+                                        APR_STRINGIFY(LZ4_VERSION_MINOR) "." \
+                                        APR_STRINGIFY(LZ4_VERSION_RELEASE);
+
+  return lz4_version_str;
+}
+
+int
+svn_lz4__runtime_version(void)
+{
+  return LZ4_versionNumber();
+}

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=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/io.c Sun Dec 24 05:23:08 2017
@@ -5440,3 +5440,20 @@ 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/object_pool.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/object_pool.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/object_pool.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/object_pool.c Sun Dec 24 05:23:08 2017
@@ -172,9 +172,11 @@ add_object_ref(object_ref_t *object_ref,
   if (svn_atomic_inc(&object_ref->ref_count) == 0)
     svn_atomic_dec(&object_ref->object_pool->unused_count);
 
-  /* make sure the reference gets released automatically */
-  apr_pool_cleanup_register(pool, object_ref, object_ref_cleanup,
-                            apr_pool_cleanup_null);
+  /* Make sure the reference gets released automatically.
+     Since POOL might be a parent pool of OBJECT_REF->OBJECT_POOL,
+     to the reference counting update before destroing any of the
+     pool hierarchy. */
+  apr_pool_pre_cleanup_register(pool, object_ref, object_ref_cleanup);
 }
 
 /* Actual implementation of svn_object_pool__lookup.

Modified: subversion/branches/swig-py3/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/sqlite.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/sqlite.c Sun Dec 24 05:23:08 2017
@@ -65,8 +65,8 @@ extern int (*const svn_sqlite3__api_conf
 #  include <sqlite3.h>
 #endif
 
-#if !SQLITE_VERSION_AT_LEAST(3,7,12)
-#error SQLite is too old -- version 3.7.12 is the minimum required version
+#if !SQLITE_VERSION_AT_LEAST(3,8,2)
+#error SQLite is too old -- version 3.8.2 is the minimum required version
 #endif
 
 #ifndef SQLITE_DETERMINISTIC

Modified: subversion/branches/swig-py3/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/stream.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/stream.c Sun Dec 24 05:23:08 2017
@@ -1468,10 +1468,10 @@ seek_handler_checksum(void *baton, const
   else
     {
       if (btn->read_ctx)
-        svn_checksum_ctx_reset(btn->read_ctx);
+        SVN_ERR(svn_checksum_ctx_reset(btn->read_ctx));
 
       if (btn->write_ctx)
-        svn_checksum_ctx_reset(btn->write_ctx);
+        SVN_ERR(svn_checksum_ctx_reset(btn->write_ctx));
 
       SVN_ERR(svn_stream_reset(btn->proxy));
     }

Modified: subversion/branches/swig-py3/subversion/libsvn_subr/sysinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/sysinfo.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/sysinfo.c Sun Dec 24 05:23:08 2017
@@ -127,7 +127,8 @@ const apr_array_header_t *
 svn_sysinfo__linked_libs(apr_pool_t *pool)
 {
   svn_version_ext_linked_lib_t *lib;
-  apr_array_header_t *array = apr_array_make(pool, 6, sizeof(*lib));
+  apr_array_header_t *array = apr_array_make(pool, 7, sizeof(*lib));
+  int lz4_version = svn_lz4__runtime_version();
 
   lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
   lib->name = "APR";
@@ -167,6 +168,15 @@ svn_sysinfo__linked_libs(apr_pool_t *poo
   lib->compiled_version = apr_pstrdup(pool, svn_zlib__compiled_version());
   lib->runtime_version = apr_pstrdup(pool, svn_zlib__runtime_version());
 
+  lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
+  lib->name = "LZ4";
+  lib->compiled_version = apr_pstrdup(pool, svn_lz4__compiled_version());
+
+  lib->runtime_version = apr_psprintf(pool, "%d.%d.%d",
+                                      lz4_version / 100 / 100,
+                                      (lz4_version / 100) % 100,
+                                      lz4_version % 100);
+
   return array;
 }
 

Propchange: subversion/branches/swig-py3/subversion/libsvn_subr/utf8proc/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 24 05:23:08 2017
@@ -75,6 +75,8 @@
 /subversion/branches/revprop-cache/subversion/libsvn_subr/utf8proc:1298521-1326293
 /subversion/branches/revprop-caching-ng/subversion/libsvn_subr/utf8proc:1620597,1620599
 /subversion/branches/revprop-packing/subversion/libsvn_subr/utf8proc:1143907,1143971,1143997,1144017,1144499,1144568,1146145
+/subversion/branches/shelve/subversion/libsvn_subr/utf8proc:1802592-1815226
+/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/utf8proc:1801593-1801923,1801970
 /subversion/branches/subtree-mergeinfo/subversion/libsvn_subr/utf8proc:876734-878766
 /subversion/branches/svn-auth-x509/subversion/libsvn_subr/utf8proc:1603509-1655900
 /subversion/branches/svn-info-detail/subversion/libsvn_subr/utf8proc:1660035-1662618
@@ -96,5 +98,6 @@
 /subversion/branches/uris-as-urls/subversion/libsvn_subr/utf8proc:1060426-1064427
 /subversion/branches/verify-at-commit/subversion/libsvn_subr/utf8proc:1462039-1462408
 /subversion/branches/verify-keep-going/subversion/libsvn_subr/utf8proc:1439280-1546110
-/subversion/branches/wc-collate-path/subversion/libsvn_subr/utf8proc:1402685-1480384
+/subversion/branches/wc-collate-path/subversion/libsvn_subr/utf8proc:1402685-1405765
+/subversion/trunk/subversion/libsvn_subr/utf8proc:1813660-1819202
 /subversion/upstream/utf8proc:1405750-1809082

Modified: subversion/branches/swig-py3/subversion/libsvn_subr/utf8proc.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/utf8proc.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/utf8proc.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/utf8proc.c Sun Dec 24 05:23:08 2017
@@ -59,7 +59,9 @@ svn_utf__utf8proc_runtime_version(void)
   SVN_UNUSED(utf8proc_grapheme_break);
   SVN_UNUSED(utf8proc_tolower);
   SVN_UNUSED(utf8proc_toupper);
+#if UTF8PROC_VERSION_MAJOR >= 2
   SVN_UNUSED(utf8proc_totitle);
+#endif
   SVN_UNUSED(utf8proc_charwidth);
   SVN_UNUSED(utf8proc_category_string);
   SVN_UNUSED(utf8proc_NFD);

Modified: subversion/branches/swig-py3/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_wc/wc_db.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_wc/wc_db.c Sun Dec 24 05:23:08 2017
@@ -16525,8 +16525,8 @@ db_process_commit_queue(svn_wc__db_t *db
                                                         iterpool),
                                                     iterpool, iterpool));
 
-              lock_remove_txn(queue->wcroot, cqi->local_relpath, work_item,
-                              iterpool);
+              SVN_ERR(lock_remove_txn(queue->wcroot, cqi->local_relpath,
+                                      work_item, iterpool));
             }
           if (cqi->remove_changelist)
             SVN_ERR(svn_wc__db_op_set_changelist(db,

Modified: subversion/branches/swig-py3/subversion/libsvn_wc/wcroot_anchor.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_wc/wcroot_anchor.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_wc/wcroot_anchor.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_wc/wcroot_anchor.c Sun Dec 24 05:23:08 2017
@@ -183,6 +183,26 @@ svn_wc__get_wcroot(const char **wcroot_a
 
 
 svn_error_t *
+svn_wc__get_shelves_dir(char **dir,
+                        svn_wc_context_t *wc_ctx,
+                        const char *local_abspath,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
+{
+  const char *wcroot_abspath;
+
+  SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, wc_ctx, local_abspath,
+                             scratch_pool, scratch_pool));
+  *dir = svn_dirent_join(wcroot_abspath, ".svn/shelves", result_pool);
+  
+  /* Ensure the directory exists. (Other versions of svn don't create it.) */
+  SVN_ERR(svn_io_make_dir_recursively(*dir, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
 svn_wc_get_actual_target2(const char **anchor,
                           const char **target,
                           svn_wc_context_t *wc_ctx,

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=1819203&r1=1819202&r2=1819203&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 Sun Dec 24 05:23:08 2017
@@ -705,6 +705,7 @@ static const dav_report_elem dav_svn__re
   { SVN_XML_NAMESPACE, "get-deleted-rev-report" },
   { SVN_XML_NAMESPACE, SVN_DAV__MERGEINFO_REPORT },
   { SVN_XML_NAMESPACE, SVN_DAV__INHERITED_PROPS_REPORT },
+  { SVN_XML_NAMESPACE, "list-report" },
   { NULL, NULL },
 };
 
@@ -757,6 +758,11 @@ dav_svn__get_inherited_props_report(cons
                                     const apr_xml_doc *doc,
                                     dav_svn__output *output);
 
+dav_error *
+dav_svn__list_report(const dav_resource *resource,
+                     const apr_xml_doc *doc,
+                     dav_svn__output *output);
+
 /*** posts/ ***/
 
 /* The various POST handlers, defined in posts/, and used by repos.c.  */
@@ -1114,6 +1120,19 @@ dav_svn__get_youngest_rev(svn_revnum_t *
                           dav_svn_repos *repos,
                           apr_pool_t *scratch_pool);
 
+/* Return the liveprop-encoded form of AUTHOR, allocated in RESULT_POOL.
+ * If IS_SVN_CLIENT is set, assume that the data will be sent to a SVN
+ * client.  This mainly sanitizes AUTHOR strings with control chars in
+ * them without converting them to escape sequences etc.
+ *
+ * Use SCRATCH_POOL for temporary allocations.
+ */
+const char *
+dav_svn__fuzzy_escape_author(const char *author,
+                             svn_boolean_t is_svn_client,
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool);
+
 /*** mirror.c ***/
 
 /* Perform the fixup hook for the R request.  */

Modified: subversion/branches/swig-py3/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/mod_dav_svn/liveprops.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/swig-py3/subversion/mod_dav_svn/liveprops.c Sun Dec 24 05:23:08 2017
@@ -423,43 +423,10 @@ insert_prop_internal(const dav_resource
         if (last_author == NULL)
           return DAV_PROP_INSERT_NOTDEF;
 
-        if (svn_xml_is_xml_safe(last_author->data, last_author->len)
-            || !resource->info->repos->is_svn_client)
-          value = apr_xml_quote_string(scratch_pool, last_author->data, 1);
-        else
-          {
-            /* We are talking to a Subversion client, which will (like any proper
-               xml parser) error out if we produce control characters in XML.
-
-               However Subversion clients process both the generic
-               <creator-displayname /> as the custom element for svn:author.
-
-               Let's skip outputting the invalid characters here to make the XML
-               valid, so clients can see the custom element.
-
-               Subversion Clients will then either use a slightly invalid
-               author (unlikely) or more likely use the second result, which
-               will be transferred with full escaping capabilities.
-
-               We have tests in place to assert proper behavior over the RA layer.
-             */
-            apr_size_t i;
-            svn_stringbuf_t *buf;
-
-            buf = svn_stringbuf_create_from_string(last_author, scratch_pool);
-
-            for (i = 0; i < buf->len; i++)
-              {
-                char c = buf->data[i];
-
-                if (svn_ctype_iscntrl(c))
-                  {
-                    svn_stringbuf_remove(buf, i--, 1);
-                  }
-              }
-
-            value = apr_xml_quote_string(scratch_pool, buf->data, 1);
-          }
+        /* We need to sanitize the LAST_AUTHOR. */
+        value = dav_svn__fuzzy_escape_author(last_author->data,
+                                      resource->info->repos->is_svn_client,
+                                      scratch_pool, scratch_pool);
         break;
       }
 

Modified: subversion/branches/swig-py3/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/mod_dav_svn/util.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/swig-py3/subversion/mod_dav_svn/util.c Sun Dec 24 05:23:08 2017
@@ -37,6 +37,7 @@
 #include "svn_fs.h"
 #include "svn_dav.h"
 #include "svn_base64.h"
+#include "svn_ctype.h"
 
 #include "dav_svn.h"
 #include "private/svn_fspath.h"
@@ -954,3 +955,48 @@ dav_svn__get_youngest_rev(svn_revnum_t *
    *youngest_p = repos->youngest_rev;
    return SVN_NO_ERROR;
 }
+
+const char *
+dav_svn__fuzzy_escape_author(const char *author,
+                             svn_boolean_t is_svn_client,
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool)
+{
+  apr_size_t len = strlen(author);
+  if (is_svn_client && !svn_xml_is_xml_safe(author, len))
+    {
+      /* We are talking to a Subversion client, which will (like any proper
+         xml parser) error out if we produce control characters in XML.
+
+         However Subversion clients process both the generic
+         <creator-displayname /> as the custom element for svn:author.
+
+         Let's skip outputting the invalid characters here to make the XML
+         valid, so clients can see the custom element.
+
+         Subversion Clients will then either use a slightly invalid
+         author (unlikely) or more likely use the second result, which
+         will be transferred with full escaping capabilities.
+
+         We have tests in place to assert proper behavior over the RA layer.
+       */
+      apr_size_t i;
+      svn_stringbuf_t *buf;
+
+      buf = svn_stringbuf_ncreate(author, len, scratch_pool);
+
+      for (i = 0; i < buf->len; i++)
+        {
+          char c = buf->data[i];
+
+          if (svn_ctype_iscntrl(c))
+            {
+              svn_stringbuf_remove(buf, i--, 1);
+            }
+        }
+
+      author = buf->data;
+    }
+
+  return apr_xml_quote_string(result_pool, author, 1);
+}

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=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/swig-py3/subversion/mod_dav_svn/version.c Sun Dec 24 05:23:08 2017
@@ -155,6 +155,7 @@ get_vsn_options(apr_pool_t *p, apr_text_
   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
    * is a separate matter.
@@ -1154,6 +1155,10 @@ deliver_report(request_rec *r,
         {
           return dav_svn__get_inherited_props_report(resource, doc, output);
         }
+      else if (strcmp(doc->root->name, "list-report") == 0)
+        {
+          return dav_svn__list_report(resource, doc, output);
+        }
       /* NOTE: if you add a report, don't forget to add it to the
        *       dav_svn__reports_list[] array.
        */

Modified: subversion/branches/swig-py3/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/cl.h?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/cl.h (original)
+++ subversion/branches/swig-py3/subversion/svn/cl.h Sun Dec 24 05:23:08 2017
@@ -178,6 +178,7 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t help;            /* print usage message */
   const char *auth_username;     /* auth username */
   const char *auth_password;     /* auth password */
+  svn_boolean_t auth_password_from_stdin; /* read password from stdin */
   const char *extensions;        /* subprocess extension args */
   apr_array_header_t *targets;   /* target list from file */
   svn_boolean_t xml;             /* output in xml, e.g., "svn log --xml" */
@@ -255,6 +256,7 @@ typedef struct svn_cl__opt_state_t
   const char *show_item;           /* print only the given item */
   svn_boolean_t adds_as_modification; /* update 'add vs add' no tree conflict */
   svn_boolean_t vacuum_pristines; /* remove unreferenced pristines */
+  svn_boolean_t list;
 } svn_cl__opt_state_t;
 
 /* Conflict stats for operations such as update and merge. */
@@ -302,6 +304,9 @@ svn_opt_subcommand_t
   svn_cl__revert,
   svn_cl__resolve,
   svn_cl__resolved,
+  svn_cl__shelve,
+  svn_cl__unshelve,
+  svn_cl__shelves,
   svn_cl__status,
   svn_cl__switch,
   svn_cl__unlock,

Modified: subversion/branches/swig-py3/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/conflict-callbacks.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/swig-py3/subversion/svn/conflict-callbacks.c Sun Dec 24 05:23:08 2017
@@ -115,7 +115,7 @@ show_diff(svn_client_conflict_t *conflic
        * as it appears after the merge operation).
        *
        * For conflicts recorded by the 'update' and 'switch' operations,
-       * show a diff beween 'theirs' (the new pristine version of the
+       * show a diff between 'theirs' (the new pristine version of the
        * file) and 'merged' (the version of the file as it appears with
        * local changes merged with the new pristine version).
        *
@@ -1654,8 +1654,8 @@ prompt_move_target_path(int *preferred_m
         {
           char buf[1024];
 
-          svn_cmdline_fprintf(stderr, iterpool, "%s\n",
-                              svn_err_best_message(err, buf, sizeof(buf)));
+          SVN_ERR(svn_cmdline_fprintf(stderr, iterpool, "%s\n",
+                                      svn_err_best_message(err, buf, sizeof(buf))));
           svn_error_clear(err);
           continue;
         }

Modified: subversion/branches/swig-py3/subversion/svn/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/help-cmd.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/help-cmd.c (original)
+++ subversion/branches/swig-py3/subversion/svn/help-cmd.c Sun Dec 24 05:23:08 2017
@@ -148,21 +148,24 @@ svn_cl__help(apr_getopt_t *os,
                            _("\nThe following authentication credential caches are available:\n\n"));
 
   /*### There is no API to query available providers at run time. */
+  if (config_path)
+    {
 #if (defined(WIN32) && !defined(__MINGW32__))
-  version_footer =
-    svn_stringbuf_create(apr_psprintf(pool, _("%s* Wincrypt cache in %s\n"),
-                                      version_footer->data,
-                                      svn_dirent_local_style(config_path,
-                                                             pool)),
-                         pool);
+      version_footer =
+        svn_stringbuf_create(apr_psprintf(pool, _("%s* Wincrypt cache in %s\n"),
+                                          version_footer->data,
+                                          svn_dirent_local_style(config_path,
+                                                                 pool)),
+                             pool);
 #elif !defined(SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE)
-  version_footer =
-    svn_stringbuf_create(apr_psprintf(pool, _("%s* Plaintext cache in %s\n"),
-                                      version_footer->data,
-                                      svn_dirent_local_style(config_path,
-                                                             pool)),
-                         pool);
+      version_footer =
+        svn_stringbuf_create(apr_psprintf(pool, _("%s* Plaintext cache in %s\n"),
+                                          version_footer->data,
+                                          svn_dirent_local_style(config_path,
+                                                                 pool)),
+                             pool);
 #endif
+    }
 #ifdef SVN_HAVE_GNOME_KEYRING
   svn_stringbuf_appendcstr(version_footer, "* Gnome Keyring\n");
 #endif

Modified: subversion/branches/swig-py3/subversion/svn/list-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/list-cmd.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/list-cmd.c (original)
+++ subversion/branches/swig-py3/subversion/svn/list-cmd.c Sun Dec 24 05:23:08 2017
@@ -385,14 +385,20 @@ svn_cl__list(apr_getopt_t *os,
               apr_array_header_t *pattern_group
                 = APR_ARRAY_IDX(opt_state->search_patterns, k,
                                 apr_array_header_t *);
+              const char *pattern;
 
               /* Should never fail but ... */
               if (pattern_group->nelts != 1)
                 return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                                   _("'search-and' option is not supported"));
 
-              APR_ARRAY_PUSH(patterns, const char *)
-                = APR_ARRAY_IDX(pattern_group, 0, const char *);
+              pattern = APR_ARRAY_IDX(pattern_group, 0, const char *);
+#if defined(WIN32)
+              /* As we currently can't pass glob patterns via the Windows
+                 CLI, fall back to sub-string search. */
+              pattern = apr_psprintf(subpool, "*%s*", pattern);
+#endif
+              APR_ARRAY_PUSH(patterns, const char *) = pattern;
             }
         }
 

Modified: subversion/branches/swig-py3/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/notify.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/notify.c (original)
+++ subversion/branches/swig-py3/subversion/svn/notify.c Sun Dec 24 05:23:08 2017
@@ -210,7 +210,7 @@ svn_cl__conflict_stats_get_paths(apr_arr
         }
     }
 
-  svn_hash_keys(conflicted_paths, all_conflicts, result_pool);
+  SVN_ERR(svn_hash_keys(conflicted_paths, all_conflicts, result_pool));
   svn_sort__array(*conflicted_paths, svn_sort_compare_paths);
 
   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=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/svn.c (original)
+++ subversion/branches/swig-py3/subversion/svn/svn.c Sun Dec 24 05:23:08 2017
@@ -68,6 +68,7 @@
    use the short option letter as identifier.  */
 typedef enum svn_cl__longopt_t {
   opt_auth_password = SVN_OPT_FIRST_LONGOPT_ID,
+  opt_auth_password_from_stdin,
   opt_auth_username,
   opt_autoprops,
   opt_changelist,
@@ -145,6 +146,9 @@ typedef enum svn_cl__longopt_t {
   opt_show_item,
   opt_adds_as_modification,
   opt_vacuum_pristines,
+  opt_delete,
+  opt_keep_shelved,
+  opt_list
 } svn_cl__longopt_t;
 
 
@@ -200,6 +204,9 @@ const apr_getopt_option_t svn_cl__option
                     N_("specify a password ARG (caution: on many operating\n"
                        "                             "
                        "systems, other users will be able to see this)")},
+  {"password-from-stdin",
+                    opt_auth_password_from_stdin, 0,
+                    N_("read password from stdin")},
   {"extensions",    'x', 1,
                     N_("Specify differencing options for external diff or\n"
                        "                             "
@@ -404,7 +411,9 @@ const apr_getopt_option_t svn_cl__option
   {"search", opt_search, 1,
                        N_("use ARG as search pattern (glob syntax, case-\n"
                        "                             "
-                       "and accent-insensitive)")},
+                       "and accent-insensitive, may require quotation marks\n"
+                       "                             "
+                       "to prevent shell expansion)")},
   {"search-and", opt_search_and, 1,
                        N_("combine ARG with the previous search pattern")},
   {"log", opt_mergeinfo_log, 0,
@@ -454,7 +463,7 @@ const apr_getopt_option_t svn_cl__option
                           "   'wc-root'    root of TARGET's working copy")},
 
   {"adds-as-modification", opt_adds_as_modification, 0,
-                       N_("Local additions are merged with incoming additions "
+                       N_("Local additions are merged with incoming additions\n"
                        "                             "
                        "instead of causing a tree conflict. Use of this\n"
                        "                             "
@@ -465,6 +474,10 @@ const apr_getopt_option_t svn_cl__option
   {"vacuum-pristines", opt_vacuum_pristines, 0,
                        N_("remove unreferenced pristines from .svn directory")},
 
+  {"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")},
+
   /* Long-opt Aliases
    *
    * These have NULL desriptions, but an option code that matches some
@@ -495,7 +508,8 @@ const apr_getopt_option_t svn_cl__option
    command to take these arguments allows scripts to just pass them
    willy-nilly to every invocation of 'svn') . */
 const int svn_cl__global_options[] =
-{ opt_auth_username, opt_auth_password, opt_no_auth_cache, opt_non_interactive,
+{ opt_auth_username, opt_auth_password, opt_auth_password_from_stdin,
+  opt_no_auth_cache, opt_non_interactive,
   opt_force_interactive, opt_trust_server_cert,
   opt_trust_server_cert_failures,
   opt_config_dir, opt_config_options, 0
@@ -792,7 +806,34 @@ const svn_opt_subcommand_desc2_t svn_cl_
      opt_changelist, opt_include_externals, opt_show_item, opt_no_newline}
   },
 
-  { "list", svn_cl__list, {"ls"}, N_
+  { "list", svn_cl__list, {"ls"},
+#if defined(WIN32)
+    N_
+    ("List directory entries in the repository.\n"
+     "usage: list [TARGET[@REV]...]\n"
+     "\n"
+     "  List each TARGET file and the contents of each TARGET directory as\n"
+     "  they exist in the repository.  If TARGET is a working copy path, the\n"
+     "  corresponding repository URL will be used. If specified, REV determines\n"
+     "  in which revision the target is first looked up.\n"
+     "\n"
+     "  The default TARGET is '.', meaning the repository URL of the current\n"
+     "  working directory.\n"
+     "\n"
+     "  Multiple --search patterns may be specified and the output will be\n"
+     "  reduced to those paths whose last segment - i.e. the file or directory\n"
+     "  name - contains a sub-string matching at least one of these patterns\n"
+     "  (Windows only).\n"
+     "\n"
+     "  With --verbose, the following fields will be shown for each item:\n"
+     "\n"
+     "    Revision number of the last commit\n"
+     "    Author of the last commit\n"
+     "    If locked, the letter 'O'.  (Use 'svn info URL' to see details)\n"
+     "    Size (in bytes)\n"
+     "    Date and time of the last commit\n"),
+#else
+    N_
     ("List directory entries in the repository.\n"
      "usage: list [TARGET[@REV]...]\n"
      "\n"
@@ -815,6 +856,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "    If locked, the letter 'O'.  (Use 'svn info URL' to see details)\n"
      "    Size (in bytes)\n"
      "    Date and time of the last commit\n"),
+#endif
     {'r', 'v', 'R', opt_depth, opt_incremental, opt_xml,
      opt_include_externals, opt_search}, },
 
@@ -1648,6 +1690,74 @@ 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} },
 
+  { "shelve", svn_cl__shelve, {0}, N_
+    ("Put a local change aside, as if putting it on a shelf.\n"
+     "usage: 1. shelve [--keep-local] NAME [PATH...]\n"
+     "       2. shelve --delete NAME\n"
+     "       3. shelve --list\n"
+     "\n"
+     "  1. Save the local change in the given PATHs to a patch file, and\n"
+     "     revert that change from the WC unless '--keep-local' is given.\n"
+     "     If a log message is given with '-m' or '-F', include it at the\n"
+     "     beginning of the patch file.\n"
+     "\n"
+     "  2. Delete the shelved change NAME.\n"
+     "     (A backup is kept, named with a '.bak' extension.)\n"
+     "\n"
+     "  3. List shelved changes. Include the first line of any log message\n"
+     "     and some details about the contents of the change, unless '-q' is\n"
+     "     given.\n"
+     "\n"
+     "  The kinds of change you can shelve are those supported by 'svn diff'\n"
+     "  and 'svn patch'. The following are currently NOT supported:\n"
+     "     mergeinfo changes, copies, moves, mkdir, rmdir,\n"
+     "     'binary' content, uncommittable states\n"
+     "\n"
+     "  To bring back a shelved change, use 'svn unshelve NAME'.\n"
+     "\n"
+     "  A shelved change is stored as a patch file, .svn/shelves/NAME.patch\n"
+     "\n"
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    ),
+    {opt_delete, opt_list, 'q', opt_dry_run, opt_keep_local,
+     opt_depth, opt_targets, opt_changelist,
+     /* almost SVN_CL__LOG_MSG_OPTIONS but not currently opt_with_revprop: */
+     'm', 'F', opt_force_log, opt_editor_cmd, opt_encoding,
+    } },
+
+  { "unshelve", svn_cl__unshelve, {0}, N_
+    ("Bring a shelved change back to a local change in the WC.\n"
+     "usage: 1. unshelve [--keep-shelved] [NAME]\n"
+     "       2. unshelve --list\n"
+     "\n"
+     "  1. Apply the shelved change NAME to the working copy.\n"
+     "     Delete the patch unless the '--keep-shelved' option is given.\n"
+     "     (A backup is kept, named with a '.bak' extension.)\n"
+     "     NAME defaults to the most recent shelved change.\n"
+     "\n"
+     "  2. List shelved changes. Include the first line of any log message\n"
+     "     and some details about the contents of the change, unless '-q' is\n"
+     "     given.\n"
+     "\n"
+     "  Any conflict between the change being unshelved and a change\n"
+     "  already in the WC is handled the same way as by 'svn patch',\n"
+     "  creating a 'reject' file.\n"
+     "\n"
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    ),
+    {opt_keep_shelved, opt_list, 'q', opt_dry_run} },
+
+  { "shelves", svn_cl__shelves, {0}, N_
+    ("List shelved changes.\n"
+     "usage: shelves\n"
+     "\n"
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    ),
+    },
+
   { "status", svn_cl__status, {"stat", "st"}, N_
     ("Print the status of working copy files and directories.\n"
      "usage: status [PATH...]\n"
@@ -1959,6 +2069,7 @@ sub_main(int *exit_code, int argc, const
   apr_hash_t *changelists;
   apr_hash_t *cfg_hash;
   svn_membuf_t buf;
+  svn_boolean_t read_pass_from_stdin = FALSE;
 
   received_opts = apr_array_make(pool, SVN_OPT_MAX_OPTIONS, sizeof(int));
 
@@ -2197,6 +2308,9 @@ sub_main(int *exit_code, int argc, const
       case opt_dry_run:
         opt_state.dry_run = TRUE;
         break;
+      case opt_list:
+        opt_state.list = TRUE;
+        break;
       case opt_revprop:
         opt_state.revprop = TRUE;
         break;
@@ -2251,6 +2365,9 @@ sub_main(int *exit_code, int argc, const
         SVN_ERR(svn_utf_cstring_to_utf8(&opt_state.auth_password,
                                         opt_arg, pool));
         break;
+      case opt_auth_password_from_stdin:
+        read_pass_from_stdin = TRUE;
+        break;
       case opt_encoding:
         opt_state.encoding = apr_pstrdup(pool, opt_arg);
         break;
@@ -2377,6 +2494,7 @@ sub_main(int *exit_code, int argc, const
         opt_state.diff.summarize = TRUE;
         break;
       case opt_remove:
+      case opt_delete:
         opt_state.remove = TRUE;
         break;
       case opt_changelist:
@@ -2392,6 +2510,7 @@ sub_main(int *exit_code, int argc, const
         opt_state.keep_changelists = TRUE;
         break;
       case opt_keep_local:
+      case opt_keep_shelved:
         opt_state.keep_local = TRUE;
         break;
       case opt_with_all_revprops:
@@ -2745,6 +2864,14 @@ sub_main(int *exit_code, int argc, const
                                   "--non-interactive"));
     }
 
+  /* --password-from-stdin can only be used with --non-interactive */
+  if (read_pass_from_stdin && !opt_state.non_interactive)
+    {
+      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                              _("--password-from-stdin requires "
+                                "--non-interactive"));
+    }
+
   /* Disallow simultaneous use of both --diff-cmd and
      --internal-diff.  */
   if (opt_state.diff.diff_cmd && opt_state.diff.internal_diff)
@@ -2896,7 +3023,8 @@ sub_main(int *exit_code, int argc, const
           || subcommand->cmd_func == svn_cl__mkdir
           || subcommand->cmd_func == svn_cl__move
           || subcommand->cmd_func == svn_cl__lock
-          || subcommand->cmd_func == svn_cl__propedit))
+          || subcommand->cmd_func == svn_cl__propedit
+          || subcommand->cmd_func == svn_cl__shelve))
     {
       /* If the -F argument is a file that's under revision control,
          that's probably not what the user intended. */
@@ -3034,6 +3162,12 @@ sub_main(int *exit_code, int argc, const
                                    conflict_stats, pool));
     }
 
+  /* Get password from stdin if necessary */
+  if (read_pass_from_stdin)
+    {
+      SVN_ERR(svn_io_stdin_readline(&opt_state.auth_password, pool, pool));
+    }
+
   /* Set up our cancellation support. */
   svn_cl__check_cancel = svn_cmdline__setup_cancellation_handler();
   ctx->cancel_func = svn_cl__check_cancel;

Modified: subversion/branches/swig-py3/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/util.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/util.c (original)
+++ subversion/branches/swig-py3/subversion/svn/util.c Sun Dec 24 05:23:08 2017
@@ -614,6 +614,7 @@ svn_cl__try(svn_error_t *err,
               if (! quiet)
                 svn_handle_warning2(stderr, err, "svn: ");
               svn_error_clear(err);
+              va_end(ap);
               return SVN_NO_ERROR;
             }
         }

Modified: subversion/branches/swig-py3/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svnadmin/svnadmin.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/swig-py3/subversion/svnadmin/svnadmin.c Sun Dec 24 05:23:08 2017
@@ -1646,8 +1646,8 @@ subcommand_load(apr_getopt_t *os, void *
                            opt_state->use_pre_commit_hook,
                            opt_state->use_post_commit_hook,
                            !opt_state->bypass_prop_validation,
-                           opt_state->normalize_props,
                            opt_state->ignore_dates,
+                           opt_state->normalize_props,
                            opt_state->quiet ? NULL : repos_notify_handler,
                            feedback_stream, check_cancel, NULL, pool);
 
@@ -1703,8 +1703,8 @@ subcommand_load_revprops(apr_getopt_t *o
 
   err = svn_repos_load_fs_revprops(repos, in_stream, lower, upper,
                                    !opt_state->bypass_prop_validation,
-                                   opt_state->normalize_props,
                                    opt_state->ignore_dates,
+                                   opt_state->normalize_props,
                                    opt_state->quiet ? NULL
                                                     : repos_notify_handler,
                                    feedback_stream, check_cancel, NULL, pool);

Modified: subversion/branches/swig-py3/subversion/svnbench/svnbench.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svnbench/svnbench.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svnbench/svnbench.c (original)
+++ subversion/branches/swig-py3/subversion/svnbench/svnbench.c Sun Dec 24 05:23:08 2017
@@ -53,6 +53,7 @@
    use the short option letter as identifier.  */
 typedef enum svn_cl__longopt_t {
   opt_auth_password = SVN_OPT_FIRST_LONGOPT_ID,
+  opt_auth_password_from_stdin,
   opt_auth_username,
   opt_config_dir,
   opt_config_options,
@@ -112,6 +113,8 @@ const apr_getopt_option_t svn_cl__option
   {"verbose",       'v', 0, N_("print extra information")},
   {"username",      opt_auth_username, 1, N_("specify a username ARG")},
   {"password",      opt_auth_password, 1, N_("specify a password ARG")},
+  {"password-from-stdin",
+                    opt_auth_password_from_stdin, 0, N_("read password from stdin")},
   {"targets",       opt_targets, 1,
                     N_("pass contents of file ARG as additional args")},
   {"depth",         opt_depth, 1,
@@ -197,7 +200,8 @@ const apr_getopt_option_t svn_cl__option
    command to take these arguments allows scripts to just pass them
    willy-nilly to every invocation of 'svn') . */
 const int svn_cl__global_options[] =
-{ opt_auth_username, opt_auth_password, opt_no_auth_cache, opt_non_interactive,
+{ opt_auth_username, opt_auth_password, opt_auth_password_from_stdin,
+  opt_no_auth_cache, opt_non_interactive,
   opt_trust_server_cert, opt_trust_server_cert_failures,
   opt_config_dir, opt_config_options, 0
 };
@@ -394,6 +398,7 @@ sub_main(int *exit_code, int argc, const
   apr_time_t start_time, time_taken;
   ra_progress_baton_t ra_progress_baton = {0};
   svn_membuf_t buf;
+  svn_boolean_t read_pass_from_stdin = FALSE;
 
   received_opts = apr_array_make(pool, SVN_OPT_MAX_OPTIONS, sizeof(int));
 
@@ -625,6 +630,9 @@ sub_main(int *exit_code, int argc, const
         SVN_ERR(svn_utf_cstring_to_utf8(&opt_state.auth_password,
                                             opt_arg, pool));
         break;
+      case opt_auth_password_from_stdin:
+        read_pass_from_stdin = TRUE;
+        break;
       case opt_stop_on_copy:
         opt_state.stop_on_copy = TRUE;
         break;
@@ -842,6 +850,14 @@ sub_main(int *exit_code, int argc, const
                                   "--non-interactive"));
     }
 
+  /* --password-from-stdin can only be used with --non-interactive */
+  if (read_pass_from_stdin && !opt_state.non_interactive)
+    {
+      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                              _("--password-from-stdin requires "
+                                "--non-interactive"));
+    }
+
   /* Ensure that 'revision_ranges' has at least one item, and make
      'start_revision' and 'end_revision' match that item. */
   if (opt_state.revision_ranges->nelts == 0)
@@ -919,6 +935,12 @@ sub_main(int *exit_code, int argc, const
                                        pool));
     }
 
+  /* Get password from stdin if necessary */
+  if (read_pass_from_stdin)
+    {
+      SVN_ERR(svn_io_stdin_readline(&opt_state.auth_password, pool, pool));
+    }
+
   /* Set up our cancellation support. */
   svn_cl__check_cancel = svn_cmdline__setup_cancellation_handler();
   ctx->cancel_func = svn_cl__check_cancel;

Modified: subversion/branches/swig-py3/subversion/svnfsfs/load-index-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svnfsfs/load-index-cmd.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svnfsfs/load-index-cmd.c (original)
+++ subversion/branches/swig-py3/subversion/svnfsfs/load-index-cmd.c Sun Dec 24 05:23:08 2017
@@ -147,7 +147,7 @@ load_index(const char *path,
 
       /* Get the next line from the input and stop if there is none. */
       svn_pool_clear(iterpool);
-      svn_stream_readline(input, &line, "\n", &eol, iterpool);
+      SVN_ERR(svn_stream_readline(input, &line, "\n", &eol, iterpool));
       if (eol)
         break;
 

Modified: subversion/branches/swig-py3/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svnmucc/svnmucc.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/swig-py3/subversion/svnmucc/svnmucc.c Sun Dec 24 05:23:08 2017
@@ -297,6 +297,7 @@ help(FILE *stream, apr_pool_t *pool)
       "  -F [--file] ARG        : read log message from file ARG\n"
       "  -u [--username] ARG    : commit the changes as username ARG\n"
       "  -p [--password] ARG    : use ARG as the password\n"
+      "  --password-from-stdin  : read password from stdin\n"
       "  -U [--root-url] ARG    : interpret all action URLs relative to ARG\n"
       "  -r [--revision] ARG    : use revision ARG as baseline for changes\n"
       "  --with-revprop ARG     : set revision property in the following format:\n"
@@ -480,13 +481,15 @@ sub_main(int *exit_code, int argc, const
     non_interactive_opt,
     force_interactive_opt,
     trust_server_cert_opt,
-    trust_server_cert_failures_opt
+    trust_server_cert_failures_opt,
+    password_from_stdin_opt
   };
   static const apr_getopt_option_t options[] = {
     {"message", 'm', 1, ""},
     {"file", 'F', 1, ""},
     {"username", 'u', 1, ""},
     {"password", 'p', 1, ""},
+    {"password-from-stdin", password_from_stdin_opt, 0, ""},
     {"root-url", 'U', 1, ""},
     {"revision", 'r', 1, ""},
     {"with-revprop",  with_revprop_opt, 1, ""},
@@ -527,6 +530,7 @@ sub_main(int *exit_code, int argc, const
   svn_client_ctx_t *ctx;
   struct log_message_baton lmb;
   int i;
+  svn_boolean_t read_pass_from_stdin = FALSE;
 
   /* Check library versions */
   SVN_ERR(check_lib_versions());
@@ -572,6 +576,9 @@ sub_main(int *exit_code, int argc, const
         case 'p':
           password = apr_pstrdup(pool, arg);
           break;
+        case password_from_stdin_opt:
+          read_pass_from_stdin = TRUE;
+          break;
         case 'U':
           SVN_ERR(svn_utf_cstring_to_utf8(&root_url, arg, pool));
           if (! svn_path_is_url(root_url))
@@ -672,6 +679,15 @@ sub_main(int *exit_code, int argc, const
                                   "--non-interactive"));
     }
 
+  /* --password-from-stdin can only be used with --non-interactive */
+  if (read_pass_from_stdin && !non_interactive)
+    {
+      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                              _("--password-from-stdin requires "
+                                "--non-interactive"));
+    }
+
+
   /* Copy the rest of our command-line arguments to an array,
      UTF-8-ing them along the way. */
   action_args = apr_array_make(pool, opts->argc, sizeof(const char *));
@@ -721,6 +737,12 @@ sub_main(int *exit_code, int argc, const
                                             "svnmucc: ", "--config-option"));
     }
 
+  /* Get password from stdin if necessary */
+  if (read_pass_from_stdin)
+    {
+      SVN_ERR(svn_io_stdin_readline(&password, pool, pool));
+    }
+
   SVN_ERR(svn_client_create_context2(&ctx, cfg_hash, pool));
 
   cfg_config = svn_hash_gets(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG);

Modified: subversion/branches/swig-py3/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svnrdump/svnrdump.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/swig-py3/subversion/svnrdump/svnrdump.c Sun Dec 24 05:23:08 2017
@@ -59,6 +59,7 @@ enum svn_svnrdump__longopt_t
     opt_config_option,
     opt_auth_username,
     opt_auth_password,
+    opt_auth_password_from_stdin,
     opt_auth_nocache,
     opt_non_interactive,
     opt_skip_revprop,
@@ -73,6 +74,7 @@ enum svn_svnrdump__longopt_t
                                    opt_config_option, \
                                    opt_auth_username, \
                                    opt_auth_password, \
+                                   opt_auth_password_from_stdin, \
                                    opt_auth_nocache, \
                                    opt_trust_server_cert, \
                                    opt_trust_server_cert_failures, \
@@ -114,6 +116,8 @@ static const apr_getopt_option_t svnrdum
                       N_("specify a username ARG")},
     {"password",      opt_auth_password, 1,
                       N_("specify a password ARG")},
+    {"password-from-stdin",   opt_auth_password_from_stdin, 0,
+                      N_("read password from stdin")},
     {"non-interactive", opt_non_interactive, 0,
                       N_("do no interactive prompting (default is to prompt\n"
                          "                             "
@@ -154,6 +158,7 @@ static const apr_getopt_option_t svnrdum
                        "valid certificate) and 'other' (all other not\n"
                        "                             "
                        "separately classified certificate errors).")},
+    {"dumpfile", 'F', 1, N_("Read or write to a dumpfile instead of stdin/stdout")},
     {0, 0, 0, 0}
   };
 
@@ -174,6 +179,7 @@ typedef struct opt_baton_t {
   svn_client_ctx_t *ctx;
   svn_ra_session_t *session;
   const char *url;
+  const char *dumpfile;
   svn_boolean_t help;
   svn_boolean_t version;
   svn_opt_revision_t start_revision;
@@ -463,31 +469,39 @@ replay_revisions(svn_ra_session_t *sessi
                  svn_revnum_t end_revision,
                  svn_boolean_t quiet,
                  svn_boolean_t incremental,
+                 const char *dumpfile,
                  apr_pool_t *pool)
 {
   struct replay_baton *replay_baton;
   const char *uuid;
-  svn_stream_t *stdout_stream;
+  svn_stream_t *output_stream;
 
-  SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool));
+  if (dumpfile)
+    {
+      SVN_ERR(svn_stream_open_writable(&output_stream, dumpfile, pool, pool));
+    }
+  else
+    {
+      SVN_ERR(svn_stream_for_stdout(&output_stream, pool));
+    }
 
   replay_baton = apr_pcalloc(pool, sizeof(*replay_baton));
-  replay_baton->stdout_stream = stdout_stream;
+  replay_baton->stdout_stream = output_stream;
   replay_baton->extra_ra_session = extra_ra_session;
   replay_baton->quiet = quiet;
 
   /* Write the magic header and UUID */
-  SVN_ERR(svn_stream_printf(stdout_stream, pool,
+  SVN_ERR(svn_stream_printf(output_stream, pool,
                             SVN_REPOS_DUMPFILE_MAGIC_HEADER ": %d\n\n",
                             SVN_REPOS_DUMPFILE_FORMAT_VERSION));
   SVN_ERR(svn_ra_get_uuid2(session, &uuid, pool));
-  SVN_ERR(svn_stream_printf(stdout_stream, pool,
+  SVN_ERR(svn_stream_printf(output_stream, pool,
                             SVN_REPOS_DUMPFILE_UUID ": %s\n\n", uuid));
 
   /* Fake revision 0 if necessary */
   if (start_revision == 0)
     {
-      SVN_ERR(dump_revision_header(session, stdout_stream,
+      SVN_ERR(dump_revision_header(session, output_stream,
                                    start_revision, pool));
 
       /* Revision 0 has no tree changes, so we're done. */
@@ -506,7 +520,7 @@ replay_revisions(svn_ra_session_t *sessi
   if (!incremental)
     {
       SVN_ERR(dump_initial_full_revision(session, extra_ra_session,
-                                         stdout_stream, start_revision,
+                                         output_stream, start_revision,
                                          quiet, pool));
       start_revision++;
     }
@@ -538,16 +552,23 @@ replay_revisions(svn_ra_session_t *sessi
 static svn_error_t *
 load_revisions(svn_ra_session_t *session,
                svn_ra_session_t *aux_session,
-               const char *url,
+               const char *dumpfile,
                svn_boolean_t quiet,
                apr_hash_t *skip_revprops,
                apr_pool_t *pool)
 {
-  svn_stream_t *stdin_stream;
+  svn_stream_t *output_stream;
 
-  SVN_ERR(svn_stream_for_stdin2(&stdin_stream, TRUE, pool));
+  if (dumpfile)
+    {
+      SVN_ERR(svn_stream_open_readonly(&output_stream, dumpfile, pool, pool));
+    }
+  else
+    {
+      SVN_ERR(svn_stream_for_stdin2(&output_stream, TRUE, pool));
+    }
 
-  SVN_ERR(svn_rdump__load_dumpstream(stdin_stream, session, aux_session,
+  SVN_ERR(svn_rdump__load_dumpstream(output_stream, session, aux_session,
                                      quiet, skip_revprops,
                                      check_cancel, NULL, pool));
 
@@ -616,7 +637,8 @@ dump_cmd(apr_getopt_t *os,
   return replay_revisions(opt_baton->session, extra_ra_session,
                           opt_baton->start_revision.value.number,
                           opt_baton->end_revision.value.number,
-                          opt_baton->quiet, opt_baton->incremental, pool);
+                          opt_baton->quiet, opt_baton->incremental,
+                          opt_baton->dumpfile, pool);
 }
 
 /* Handle the "load" subcommand.  Implements `svn_opt_subcommand_t'.  */
@@ -630,8 +652,9 @@ load_cmd(apr_getopt_t *os,
 
   SVN_ERR(svn_client_open_ra_session2(&aux_session, opt_baton->url, NULL,
                                       opt_baton->ctx, pool, pool));
-  return load_revisions(opt_baton->session, aux_session, opt_baton->url,
-                        opt_baton->quiet, opt_baton->skip_revprops, pool);
+  return load_revisions(opt_baton->session, aux_session,
+                        opt_baton->dumpfile, opt_baton->quiet,
+                        opt_baton->skip_revprops, pool);
 }
 
 /* Handle the "help" subcommand.  Implements `svn_opt_subcommand_t'.  */
@@ -772,12 +795,14 @@ sub_main(int *exit_code, int argc, const
   apr_getopt_t *os;
   apr_array_header_t *received_opts;
   int i;
+  svn_boolean_t read_pass_from_stdin = FALSE;
 
   opt_baton = apr_pcalloc(pool, sizeof(*opt_baton));
   opt_baton->start_revision.kind = svn_opt_revision_unspecified;
   opt_baton->end_revision.kind = svn_opt_revision_unspecified;
   opt_baton->url = NULL;
   opt_baton->skip_revprops = apr_hash_make(pool);
+  opt_baton->dumpfile = NULL;
 
   SVN_ERR(svn_cmdline__getopt_init(&os, argc, argv, pool));
 
@@ -850,6 +875,9 @@ sub_main(int *exit_code, int argc, const
         case opt_auth_password:
           SVN_ERR(svn_utf_cstring_to_utf8(&password, opt_arg, pool));
           break;
+        case opt_auth_password_from_stdin:
+          read_pass_from_stdin = TRUE;
+          break;
         case opt_auth_nocache:
           no_auth_cache = TRUE;
           break;
@@ -890,6 +918,11 @@ sub_main(int *exit_code, int argc, const
                                                      opt_arg, 
                                                      "svnrdump: ",
                                                      pool));
+          break;
+        case 'F':
+          SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
+          opt_baton->dumpfile = opt_arg;
+          break;
         }
     }
 
@@ -1005,6 +1038,24 @@ sub_main(int *exit_code, int argc, const
                                   "--non-interactive"));
     }
 
+  if (read_pass_from_stdin && !non_interactive)
+    {
+      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                              _("--password-from-stdin requires "
+                                "--non-interactive"));
+    }
+
+  if (strcmp(subcommand->name, "load") == 0)
+    {
+      if (read_pass_from_stdin && opt_baton->dumpfile == NULL)
+        {
+          /* error here, since load cannot process a password over stdin */
+          return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                  _("load subcommand with "
+                                    "--password-from-stdin requires -F"));
+        }
+    }
+
   /* Expect one more non-option argument:  the repository URL. */
   if (os->ind != os->argc - 1)
     {
@@ -1039,6 +1090,12 @@ sub_main(int *exit_code, int argc, const
         force_interactive = (username == NULL || password == NULL);
     }
 
+  /* Get password from stdin if necessary */
+  if (read_pass_from_stdin)
+    {
+      SVN_ERR(svn_io_stdin_readline(&password, pool, pool));
+    }
+
   non_interactive = !svn_cmdline__be_interactive(non_interactive,
                                                  force_interactive);
 

Modified: subversion/branches/swig-py3/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svnserve/serve.c?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svnserve/serve.c (original)
+++ subversion/branches/swig-py3/subversion/svnserve/serve.c Sun Dec 24 05:23:08 2017
@@ -2821,17 +2821,9 @@ static svn_error_t *file_rev_handler(voi
       svn_stream_set_write(stream, svndiff_handler);
       svn_stream_set_close(stream, svndiff_close_handler);
 
-      /* If the connection does not support SVNDIFF1 or if we don't want to use
-       * compression, use the non-compressing "version 0" implementation */
-      /* ### TODO: Check SVN_RA_SVN_CAP_SVNDIFF2_ACCEPTED and decide between
-       * ###       svndiff1[at compression_level] and svndiff2 */
-      if (   svn_ra_svn_compression_level(frb->conn) > 0
-          && svn_ra_svn_has_capability(frb->conn, SVN_RA_SVN_CAP_SVNDIFF1))
-        svn_txdelta_to_svndiff3(d_handler, d_baton, stream, 1,
-                                svn_ra_svn_compression_level(frb->conn), pool);
-      else
-        svn_txdelta_to_svndiff3(d_handler, d_baton, stream, 0,
-                                svn_ra_svn_compression_level(frb->conn), pool);
+      svn_txdelta_to_svndiff3(d_handler, d_baton, stream,
+                              svn_ra_svn__svndiff_version(frb->conn),
+                              svn_ra_svn_compression_level(frb->conn), pool);
     }
   else
     SVN_ERR(svn_ra_svn__write_cstring(frb->conn, pool, ""));

Modified: subversion/branches/swig-py3/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/tests/cmdline/basic_tests.py?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/swig-py3/subversion/tests/cmdline/basic_tests.py Sun Dec 24 05:23:08 2017
@@ -3114,7 +3114,7 @@ def plaintext_password_storage_disabled(
       f.close()
 
 
-
+@Skip(svntest.main.is_os_windows)
 def filtered_ls(sbox):
   "filtered 'svn ls'"
 
@@ -3140,6 +3140,64 @@ def filtered_ls(sbox):
   exit_code, output, error = svntest.actions.run_and_verify_svn(
     [], [], 'ls', path, '--depth=infinity', '--search=*/*')
 
+@Issue(4700)
+@XFail(svntest.main.is_fs_type_fsx)
+def null_update_last_changed_revision(sbox):
+  "null 'update' updates last changed rev"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # r2: Random text change.
+  old_contents = open(sbox.path("iota")).read()
+  sbox.simple_append("iota", "Line 2.\n")
+  sbox.simple_commit(message='r2')
+  sbox.simple_update()
+
+  # r3: Revert r2.
+  sbox.simple_append("iota", old_contents, truncate=True)
+  sbox.simple_commit(message='r3')
+  sbox.simple_update()
+
+  # Perform a null update.
+  #
+  # This used to say '3'; probably because iota@3 and iota@1 were textually
+  # identical. It seems this problem was introduced in r1760570.
+  sbox.simple_update(revision='1')
+  svntest.actions.run_and_verify_svn(["1\n"], [],
+                                     'info', sbox.path('iota'),
+                                     '--show-item', 'last-changed-revision')
+
+@Issue(4700)
+@XFail(svntest.main.is_fs_type_bdb)
+@XFail(svntest.main.is_fs_type_fsx)
+def null_prop_update_last_changed_revision(sbox):
+  "null 'property update' updates last changed rev"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  sbox.simple_propset("prop", "value", "iota")
+  sbox.simple_commit(message='r2')
+  sbox.simple_update()
+
+  # r3: change the property
+  sbox.simple_propset("prop", "changed", "iota")
+  sbox.simple_commit(message='r3')
+  sbox.simple_update()
+
+  # r4: Revert r3.
+  sbox.simple_propset("prop", "value", "iota")
+  sbox.simple_commit(message='r4')
+  sbox.simple_update()
+
+  # Perform a null update.
+  sbox.simple_update(revision='2')
+  svntest.actions.run_and_verify_svn(["2\n"], [],
+                                     'info', sbox.path('iota'),
+                                     '--show-item', 'last-changed-revision')
+
+
 ########################################################################
 # Run the tests
 
@@ -3211,6 +3269,8 @@ test_list = [ None,
               mkdir_parents_target_exists_on_disk,
               plaintext_password_storage_disabled,
               filtered_ls,
+              null_update_last_changed_revision,
+              null_prop_update_last_changed_revision,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/swig-py3/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/tests/cmdline/diff_tests.py?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/swig-py3/subversion/tests/cmdline/diff_tests.py Sun Dec 24 05:23:08 2017
@@ -5140,6 +5140,26 @@ def diff_peg_resolve(sbox):
                                      repo_url + '/branches/A2',
                                      wc_dir, '-r1:2')
 
+@XFail()
+@Issue(4706)
+def diff_unversioned_files_git(sbox):
+  "diff unversioned files in git format"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  svntest.main.file_write(sbox.ospath('foo'), "foo\n")
+  svntest.main.file_write(sbox.ospath('A/bar'), "bar\n")
+  expected_output = make_diff_header("foo", "working copy", "working copy",
+                                     "foo", "A/bar") + [
+                      "@@ -1 +1 @@\n",
+                      "-foo\n",
+                      "+bar\n"
+                    ]
+  svntest.actions.run_and_verify_svn(expected_output, [],
+                                     'diff', '--git',
+                                     '--old', sbox.ospath('foo'),
+                                     '--new', sbox.ospath('A/bar'))
+
 
 ########################################################################
 #Run the tests
@@ -5236,6 +5256,7 @@ test_list = [ None,
               diff_incomplete_props,
               diff_symlinks,
               diff_peg_resolve,
+              diff_unversioned_files_git,
               ]
 
 if __name__ == '__main__':

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=1819203&r1=1819202&r2=1819203&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 Sun Dec 24 05:23:08 2017
@@ -42,6 +42,9 @@ Available subcommands:
    resolve
    resolved
    revert
+   shelve
+   unshelve
+   shelves
    status (stat, st)
    switch (sw)
    unlock

Modified: subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1819203&r1=1819202&r2=1819203&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Sun Dec 24 05:23:08 2017
@@ -127,13 +127,15 @@ Valid options:
                                -U ARG, --context ARG: Show ARG lines of context
                                -p, --show-c-function: Show C function name
   --search ARG             : use ARG as search pattern (glob syntax, case-
-                             and accent-insensitive)
+                             and accent-insensitive, may require quotation marks
+                             to prevent shell expansion)
   --search-and ARG         : combine ARG with the previous search pattern
 
 Global options:
   --username ARG           : specify a username ARG
   --password ARG           : specify a password ARG (caution: on many operating
                              systems, other users will be able to see this)
+  --password-from-stdin    : read password from stdin
   --no-auth-cache          : do not cache authentication tokens
   --non-interactive        : do no interactive prompting (default is to prompt
                              only if standard input is a terminal device)
@@ -224,6 +226,7 @@ Global options:
   --username ARG           : specify a username ARG
   --password ARG           : specify a password ARG (caution: on many operating
                              systems, other users will be able to see this)
+  --password-from-stdin    : read password from stdin
   --no-auth-cache          : do not cache authentication tokens
   --non-interactive        : do no interactive prompting (default is to prompt
                              only if standard input is a terminal device)

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=1819203&r1=1819202&r2=1819203&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 Sun Dec 24 05:23:08 2017
@@ -42,6 +42,9 @@ Available subcommands:
    resolve
    resolved
    revert
+   shelve
+   unshelve
+   shelves
    status (stat, st)
    switch (sw)
    unlock



Mime
View raw message