You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2017/12/07 14:42:10 UTC

svn commit: r1817375 [1/2] - in /subversion/branches/shelve-checkpoint: ./ build/generator/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_fs_fs/ subversion/libsvn_ra_serf/ subversion/libsvn_ra_svn/ subversi...

Author: julianfoad
Date: Thu Dec  7 14:42:10 2017
New Revision: 1817375

URL: http://svn.apache.org/viewvc?rev=1817375&view=rev
Log:
On the 'shelve-checkpoint' branch: catch up with trunk@1817373.

Added:
    subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/list.c
      - copied unchanged from r1817373, subversion/trunk/subversion/libsvn_ra_serf/list.c
    subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/reports/list.c
      - copied unchanged from r1817373, subversion/trunk/subversion/mod_dav_svn/reports/list.c
    subversion/branches/shelve-checkpoint/subversion/tests/templates/empty-fsfs-v1.zip
      - copied unchanged from r1817373, subversion/trunk/subversion/tests/templates/empty-fsfs-v1.zip
    subversion/branches/shelve-checkpoint/subversion/tests/templates/empty-fsfs-v2.zip
      - copied unchanged from r1817373, subversion/trunk/subversion/tests/templates/empty-fsfs-v2.zip
    subversion/branches/shelve-checkpoint/subversion/tests/templates/empty-fsfs-v3.zip
      - copied unchanged from r1817373, subversion/trunk/subversion/tests/templates/empty-fsfs-v3.zip
    subversion/branches/shelve-checkpoint/subversion/tests/templates/empty-fsfs-v7.zip
      - copied unchanged from r1817373, subversion/trunk/subversion/tests/templates/empty-fsfs-v7.zip
    subversion/branches/shelve-checkpoint/subversion/tests/templates/greek-fsfs-v1.zip
      - copied unchanged from r1817373, subversion/trunk/subversion/tests/templates/greek-fsfs-v1.zip
    subversion/branches/shelve-checkpoint/subversion/tests/templates/greek-fsfs-v2.zip
      - copied unchanged from r1817373, subversion/trunk/subversion/tests/templates/greek-fsfs-v2.zip
    subversion/branches/shelve-checkpoint/subversion/tests/templates/greek-fsfs-v3.zip
      - copied unchanged from r1817373, subversion/trunk/subversion/tests/templates/greek-fsfs-v3.zip
    subversion/branches/shelve-checkpoint/subversion/tests/templates/greek-fsfs-v7.zip
      - copied unchanged from r1817373, subversion/trunk/subversion/tests/templates/greek-fsfs-v7.zip
Modified:
    subversion/branches/shelve-checkpoint/   (props changed)
    subversion/branches/shelve-checkpoint/COMMITTERS
    subversion/branches/shelve-checkpoint/INSTALL
    subversion/branches/shelve-checkpoint/Makefile.in
    subversion/branches/shelve-checkpoint/build.conf
    subversion/branches/shelve-checkpoint/build/generator/gen_win_dependencies.py
    subversion/branches/shelve-checkpoint/configure.ac
    subversion/branches/shelve-checkpoint/get-deps.sh
    subversion/branches/shelve-checkpoint/subversion/include/private/svn_ra_svn_private.h
    subversion/branches/shelve-checkpoint/subversion/include/private/svn_wc_private.h
    subversion/branches/shelve-checkpoint/subversion/include/svn_dav.h
    subversion/branches/shelve-checkpoint/subversion/include/svn_delta.h
    subversion/branches/shelve-checkpoint/subversion/libsvn_client/conflicts.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_client/patch.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelve.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/fs.h
    subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/low_level.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/rep-cache-db.sql
    subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/rep-cache.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/structure
    subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/transaction.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/commit.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/options.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/serf.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/stat.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/util.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_ra_svn/editorp.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_ra_svn/marshal.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_repos/load-fs-vtable.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_subr/sqlite.c
    subversion/branches/shelve-checkpoint/subversion/libsvn_subr/utf8proc.c
    subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/dav_svn.h
    subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/liveprops.c
    subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/util.c
    subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/version.c
    subversion/branches/shelve-checkpoint/subversion/svn/conflict-callbacks.c
    subversion/branches/shelve-checkpoint/subversion/svn/shelve-cmd.c
    subversion/branches/shelve-checkpoint/subversion/svn/svn.c
    subversion/branches/shelve-checkpoint/subversion/svn/util.c
    subversion/branches/shelve-checkpoint/subversion/svnadmin/svnadmin.c
    subversion/branches/shelve-checkpoint/subversion/svnserve/serve.c
    subversion/branches/shelve-checkpoint/subversion/tests/cmdline/basic_tests.py
    subversion/branches/shelve-checkpoint/subversion/tests/cmdline/diff_tests.py
    subversion/branches/shelve-checkpoint/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
    subversion/branches/shelve-checkpoint/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/shelve-checkpoint/subversion/tests/cmdline/svntest/__init__.py
    subversion/branches/shelve-checkpoint/subversion/tests/cmdline/svntest/main.py
    subversion/branches/shelve-checkpoint/subversion/tests/cmdline/svntest/verify.py
    subversion/branches/shelve-checkpoint/subversion/tests/cmdline/svntest/wc.py
    subversion/branches/shelve-checkpoint/subversion/tests/cmdline/update_tests.py
    subversion/branches/shelve-checkpoint/subversion/tests/libsvn_ra/ra-test.c
    subversion/branches/shelve-checkpoint/subversion/tests/libsvn_subr/subst_translate-test.c
    subversion/branches/shelve-checkpoint/tools/client-side/bash_completion
    subversion/branches/shelve-checkpoint/tools/client-side/bash_completion_test

Propchange: subversion/branches/shelve-checkpoint/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  7 14:42:10 2017
@@ -98,4 +98,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1801593-1815228
+/subversion/trunk:1801593-1817373

Modified: subversion/branches/shelve-checkpoint/COMMITTERS
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/COMMITTERS?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/COMMITTERS [UTF-8] (original)
+++ subversion/branches/shelve-checkpoint/COMMITTERS [UTF-8] Thu Dec  7 14:42:10 2017
@@ -47,7 +47,7 @@ Blanket commit access:
            kou   Kouhei Sutou <ko...@cozmixng.org>
       danielsh   Daniel Shahaf <d....@daniel.shahaf.name>
         peters   Peter Samuelson <pe...@p12n.org>
-      rhuijben   Bert Huijben <rh...@collab.net>
+      rhuijben   Bert Huijben <rh...@apache.org>
       stylesen   Senthil Kumaran S <st...@gmail.com>
      steveking   Stefan Küng <to...@gmail.com>
          neels   Neels J. Hofmeyr <ne...@hofmeyr.de>

Modified: subversion/branches/shelve-checkpoint/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/INSTALL?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/INSTALL (original)
+++ subversion/branches/shelve-checkpoint/INSTALL Thu Dec  7 14:42:10 2017
@@ -430,7 +430,7 @@ I.    INTRODUCTION
 
       12. SQLite  (REQUIRED)
 
-      Subversion requires SQLite version 3.7.12 or above.  You can meet this
+      Subversion requires SQLite version 3.8.2 or above.  You can meet this
       dependency several ways:
         * Use an SQLite amalgamation file.
         * Specify an SQLite installation to use.
@@ -727,8 +727,8 @@ II.   INSTALLATION
         1.3 or later (1.2 for apr-iconv). If you are building from a Subversion
         checkout and have not downloaded Apache 2, then get these 3 libraries
         from https://www.apache.org/dist/apr/.
-      * SQLite 3.7.12 or higher from https://www.sqlite.org/download.html
-        (3.8.0 or higher recommended)
+      * SQLite 3.8.2 or higher from https://www.sqlite.org/download.html
+        (3.8.11.1 or higher recommended)
       * ZLib 1.2 or higher is required and can be obtained from
         http://www.zlib.net/
       * Either a Subversion client binary from

Modified: subversion/branches/shelve-checkpoint/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/Makefile.in?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/Makefile.in (original)
+++ subversion/branches/shelve-checkpoint/Makefile.in Thu Dec  7 14:42:10 2017
@@ -190,7 +190,10 @@ CXXMAINTAINERFLAGS = @CXXMAINTAINERFLAGS
 CPPFLAGS = @CPPFLAGS@ $(EXTRA_CPPFLAGS)
 LDFLAGS = @LDFLAGS@ $(EXTRA_LDFLAGS)
 SWIG_LDFLAGS = @SWIG_LDFLAGS@ $(EXTRA_SWIG_LDFLAGS)
-SWIG_CPPFLAGS = @SWIG_CPPFLAGS@ $(EXTRA_CPPFLAGS)
+SWIG_FEATURES = @SWIG_FEATURES@
+SWIG_PY_FEATURES = @SWIG_PY_FEATURES@
+SWIG_PL_FEATURES = @SWIG_PL_FEATURES@
+SWIG_RB_FEATURES = @SWIG_RB_FEATURES@
 
 COMPILE = $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CMAINTAINERFLAGS) $(CFLAGS) $(INCLUDES)
 COMPILE_NOWARN = $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CNOWARNFLAGS) $(CFLAGS) $(INCLUDES)

Modified: subversion/branches/shelve-checkpoint/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/build.conf?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/build.conf (original)
+++ subversion/branches/shelve-checkpoint/build.conf Thu Dec  7 14:42:10 2017
@@ -98,9 +98,9 @@ test-scripts =
 
 bdb-test-scripts =
 
-swig-python-opts = $(SWIG_CPPFLAGS) -python -classic
-swig-perl-opts = $(SWIG_CPPFLAGS) -perl -nopm -noproxy
-swig-ruby-opts = $(SWIG_CPPFLAGS) -ruby
+swig-python-opts = $(SWIG_FEATURES) -python $(SWIG_PY_FEATURES) -classic
+swig-perl-opts = $(SWIG_FEATURES) -perl $(SWIG_PL_FEATURES) -nopm -noproxy
+swig-ruby-opts = $(SWIG_FEATURES) -ruby $(SWIG_RB_FEATURES)
 swig-languages = python perl ruby
 swig-dirs = 
         subversion/bindings/swig/python

Modified: subversion/branches/shelve-checkpoint/build/generator/gen_win_dependencies.py
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/build/generator/gen_win_dependencies.py?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/build/generator/gen_win_dependencies.py (original)
+++ subversion/branches/shelve-checkpoint/build/generator/gen_win_dependencies.py Thu Dec  7 14:42:10 2017
@@ -1383,7 +1383,7 @@ class GenDependenciesBase(gen_base.Gener
   def _find_sqlite(self, show_warnings):
     "Find the Sqlite library and version"
 
-    minimal_sqlite_version = (3, 7, 12)
+    minimal_sqlite_version = (3, 8, 2)
 
     # For SQLite we support 3 scenarios:
     # - Installed in standard directory layout

Modified: subversion/branches/shelve-checkpoint/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/configure.ac?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/configure.ac (original)
+++ subversion/branches/shelve-checkpoint/configure.ac Thu Dec  7 14:42:10 2017
@@ -152,9 +152,11 @@ SVN_FIND_APACHE(20051115, $apache_whitel
 dnl Search for SQLite.  If you change SQLITE_URL from a .zip to
 dnl something else also update build/ac-macros/sqlite.m4 to reflect
 dnl the correct command to unpack the downloaded file.
-SQLITE_MINIMUM_VER="3.7.12"
-SQLITE_RECOMMENDED_VER="3.7.15.1"
-SQLITE_URL="http://www.sqlite.org/sqlite-amalgamation-$(printf %d%02d%02d%02d $(echo ${SQLITE_RECOMMENDED_VER} | sed -e 's/\./ /g')).zip"
+SQLITE_MINIMUM_VER="3.8.2"
+SQLITE_RECOMMENDED_VER="3.8.11.1"
+dnl Used to construct the SQLite download URL.
+SQLITE_RECOMMENDED_VER_REL_YEAR="2015"
+SQLITE_URL="https://www.sqlite.org/$SQLITE_RECOMMENDED_VER_REL_YEAR/sqlite-amalgamation-$(printf %d%02d%02d%02d $(echo ${SQLITE_RECOMMENDED_VER} | sed -e 's/\./ /g')).zip"
 
 SVN_LIB_SQLITE(${SQLITE_MINIMUM_VER}, ${SQLITE_RECOMMENDED_VER},
                ${SQLITE_URL})
@@ -1358,6 +1360,10 @@ if test "$RUBY" != "none"; then
 fi
 
 SVN_CHECK_SWIG
+AC_ARG_VAR(SWIG_FEATURES, [SWIG feature flags common to all bindings])
+AC_ARG_VAR(SWIG_RB_FEATURES, [SWIG feature flags specific to Ruby bindings])
+AC_ARG_VAR(SWIG_PL_FEATURES, [SWIG feature flags specific to Perl bindings])
+AC_ARG_VAR(SWIG_PY_FEATURES, [SWIG feature flags specific to Python bindings])
 
 SVN_CHECK_CTYPESGEN
 
@@ -1534,12 +1540,6 @@ if test "$CC" = "clang"; then
   SVN_STRIP_FLAG(CPPFLAGS, [-no-cpp-precomp ])
 fi
 
-# Need to strip '-no-cpp-precomp' from CPPFLAGS for SWIG as well.
-SWIG_CPPFLAGS="$CPPFLAGS"
-SVN_STRIP_FLAG(SWIG_CPPFLAGS, [-no-cpp-precomp ])
-SVN_STRIP_FLAG(SWIG_CPPFLAGS, [-Wdate-time ])
-AC_SUBST([SWIG_CPPFLAGS])
-
 dnl Since this is used only on Unix-y systems, define the path separator as '/'
 AC_DEFINE_UNQUOTED(SVN_PATH_LOCAL_SEPARATOR, '/',
         [Defined to be the path separator used on your local filesystem])

Modified: subversion/branches/shelve-checkpoint/get-deps.sh
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/get-deps.sh?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/get-deps.sh (original)
+++ subversion/branches/shelve-checkpoint/get-deps.sh Thu Dec  7 14:42:10 2017
@@ -35,7 +35,9 @@ APR_VERSION=${APR_VERSION:-"1.4.6"}
 APU_VERSION=${APU_VERSION:-"1.5.1"}
 SERF_VERSION=${SERF_VERSION:-"1.3.8"}
 ZLIB_VERSION=${ZLIB_VERSION:-"1.2.8"}
-SQLITE_VERSION=${SQLITE_VERSION:-"3.7.15.1"}
+SQLITE_VERSION=${SQLITE_VERSION:-"3.8.11.1"}
+# Used to construct the SQLite download URL.
+SQLITE_VERSION_REL_YEAR=2015
 GTEST_VERSION=${GMOCK_VERSION:-"1.7.0"}
 GMOCK_VERSION=${GMOCK_VERSION:-"1.7.0"}
 HTTPD_VERSION=${HTTPD_VERSION:-"2.4.10"}
@@ -116,7 +118,7 @@ get_sqlite() {
     test -d $BASEDIR/sqlite-amalgamation && return
 
     cd $TEMPDIR
-    $HTTP_FETCH http://www.sqlite.org/$SQLITE.zip
+    $HTTP_FETCH https://www.sqlite.org/$SQLITE_VERSION_REL_YEAR/$SQLITE.zip
     cd $BASEDIR
 
     unzip -q $TEMPDIR/$SQLITE.zip

Modified: subversion/branches/shelve-checkpoint/subversion/include/private/svn_ra_svn_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/include/private/svn_ra_svn_private.h?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/include/private/svn_ra_svn_private.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/include/private/svn_ra_svn_private.h Thu Dec  7 14:42:10 2017
@@ -127,6 +127,11 @@ svn_error_t *
 svn_ra_svn__set_capabilities(svn_ra_svn_conn_t *conn,
                              const svn_ra_svn__list_t *list);
 
+/** Returns the preferred svndiff version to be used with connection @a conn.
+ */
+int
+svn_ra_svn__svndiff_version(svn_ra_svn_conn_t *conn);
+
 
 /**
  * Set the shim callbacks to be used by @a conn to @a shim_callbacks.

Modified: subversion/branches/shelve-checkpoint/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/include/private/svn_wc_private.h?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/include/private/svn_wc_private.h Thu Dec  7 14:42:10 2017
@@ -354,6 +354,7 @@ svn_wc__get_wcroot(const char **wcroot_a
  *
  * @a local_abspath is any path in the WC, and is used to find the WC root.
  */
+SVN_EXPERIMENTAL
 svn_error_t *
 svn_wc__get_shelves_dir(char **dir,
                         svn_wc_context_t *wc_ctx,

Modified: subversion/branches/shelve-checkpoint/subversion/include/svn_dav.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/include/svn_dav.h?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/include/svn_dav.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/include/svn_dav.h Thu Dec  7 14:42:10 2017
@@ -397,6 +397,15 @@ extern "C" {
 
 /** Presence of this in a DAV header in an OPTIONS response indicates
  * that the transmitter (in this case, the server) knows how to handle
+ * 'list' requests.
+ *
+ * @since New in 1.10.
+ */
+#define SVN_DAV_NS_DAV_SVN_LIST\
+            SVN_DAV_PROP_NS_DAV "svn/list"
+
+/** Presence of this in a DAV header in an OPTIONS response indicates
+ * that the transmitter (in this case, the server) knows how to handle
  * svndiff2 format encoding.
  *
  * @since New in 1.10.

Modified: subversion/branches/shelve-checkpoint/subversion/include/svn_delta.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/include/svn_delta.h?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/include/svn_delta.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/include/svn_delta.h Thu Dec  7 14:42:10 2017
@@ -693,12 +693,11 @@ svn_txdelta_skip_svndiff_window(apr_file
 /** A structure full of callback functions the delta source will invoke
  * as it produces the delta.
  *
- * @note Fields may be added to the end of this structure in future
- * versions.  Therefore, users shouldn't allocate structures of this
- * type, to preserve binary compatibility.
- *
- * @note It is recommended to use svn_delta_default_editor() or some other
- * constructor, to ensure that unused slots are filled in with no-op functions.
+ * @note Don't try to allocate one of these yourself.  Instead, always
+ * use svn_delta_default_editor() or some other constructor, to avoid
+ * backwards compatibility problems if the structure is extended in
+ * future releases and to ensure that unused slots are filled in with
+ * no-op functions.
  *
  * <h3>Function Usage</h3>
  *
@@ -769,10 +768,11 @@ svn_txdelta_skip_svndiff_window(apr_file
  *
  * The @c add_file and @c open_file callbacks each return a baton
  * for the file being created or changed.  This baton can then be
- * passed to @c apply_textdelta to change the file's contents, or
- * @c change_file_prop to change the file's properties.  When the
- * producer is finished making changes to a file, it should call
- * @c close_file, to let the consumer clean up and free the baton.
+ * passed to @c apply_textdelta or @c apply_textdelta_stream to change
+ * the file's contents, or @c change_file_prop to change the file's
+ * properties.  When the producer is finished making changes to a
+ * file, it should call @c close_file, to let the consumer clean up
+ * and free the baton.
  *
  * The @c add_file and @c add_directory functions each take arguments
  * @a copyfrom_path and @a copyfrom_revision.  If @a copyfrom_path is
@@ -814,15 +814,16 @@ svn_txdelta_skip_svndiff_window(apr_file
  * 5. When the producer calls @c open_file or @c add_file, either:
  *
  *    (a) The producer must follow with any changes to the file
- *    (@c change_file_prop and/or @c apply_textdelta, as applicable),
- *    followed by a @c close_file call, before issuing any other file
- *    or directory calls, or
+ *    (@c change_file_prop and/or @c apply_textdelta /
+ *    @c apply_textdelta_stream, as applicable), followed by
+ *    a @c close_file call, before issuing any other file or
+ *    directory calls, or
  *
  *    (b) The producer must follow with a @c change_file_prop call if
  *    it is applicable, before issuing any other file or directory
  *    calls; later, after all directory batons including the root
- *    have been closed, the producer must issue @c apply_textdelta
- *    and @c close_file calls.
+ *    have been closed, the producer must issue @c apply_textdelta /
+ *    @c apply_textdelta_stream and @c close_file calls.
  *
  * 6. When the producer calls @c apply_textdelta, it must make all of
  *    the window handler calls (including the @c NULL window at the
@@ -831,7 +832,7 @@ svn_txdelta_skip_svndiff_window(apr_file
  * So, the producer needs to use directory and file batons as if it
  * is doing a single depth-first traversal of the tree, with the
  * exception that the producer may keep file batons open in order to
- * make @c apply_textdelta calls at the end.
+ * make @c apply_textdelta / @c apply_textdelta_stream calls at the end.
  *
  *
  * <h3>Pool Usage</h3>
@@ -855,12 +856,13 @@ svn_txdelta_skip_svndiff_window(apr_file
  * Note that close_directory can be called *before* a file in that
  * directory has been closed. That is, the directory's baton is
  * closed before the file's baton. The implication is that
- * @c apply_textdelta and @c close_file should not refer to a parent
- * directory baton UNLESS the editor has taken precautions to
- * allocate it in a pool of the appropriate lifetime (the @a dir_pool
- * passed to @c open_directory and @c add_directory definitely does not
- * have the proper lifetime). In general, it is recommended to simply
- * avoid keeping a parent directory baton in a file baton.
+ * @c apply_textdelta / @c apply_textdelta_stream and @c close_file
+ * should not refer to a parent directory baton UNLESS the editor has
+ * taken precautions to allocate it in a pool of the appropriate
+ * lifetime (the @a dir_pool passed to @c open_directory and
+ * @c add_directory definitely does not have the proper lifetime).
+ * In general, it is recommended to simply avoid keeping a parent
+ * directory baton in a file baton.
  *
  *
  * <h3>Errors</h3>
@@ -1008,7 +1010,8 @@ typedef struct svn_delta_editor_t
   /** We are going to add a new file at @a path, a child of the
    * directory represented by @a parent_baton.  The callback can
    * store a baton for this new file in @a **file_baton; whatever value
-   * it stores there should be passed through to @c apply_textdelta.
+   * it stores there should be passed through to @c apply_textdelta or
+   * @c apply_textdelta_stream.
    *
    * If @a copyfrom_path is non-@c NULL, this add has history (i.e., is a
    * copy), and the origin of the copy may be recorded as
@@ -1040,8 +1043,8 @@ typedef struct svn_delta_editor_t
    *
    * The callback can store a baton for this new file in @a **file_baton;
    * whatever value it stores there should be passed through to
-   * @c apply_textdelta.  If a valid revnum, @a base_revision is the
-   * current revision of the file.
+   * @c apply_textdelta or @c apply_textdelta_stream.  If a valid revnum,
+   * @a base_revision is the current revision of the file.
    *
    * Allocations for the returned @a file_baton should be performed in
    * @a result_pool. It is also typical to save this pool for later usage
@@ -1106,11 +1109,11 @@ typedef struct svn_delta_editor_t
    * more, so whatever resources it refers to may now be freed.
    *
    * @a text_checksum is the hex MD5 digest for the fulltext that
-   * resulted from a delta application, see @c apply_textdelta.  The
-   * checksum is ignored if NULL.  If not null, it is compared to the
-   * checksum of the new fulltext, and the error
-   * SVN_ERR_CHECKSUM_MISMATCH is returned if they do not match.  If
-   * there is no new fulltext, @a text_checksum is ignored.
+   * resulted from a delta application, see @c apply_textdelta and
+   * @c apply_textdelta_stream.  The checksum is ignored if NULL.
+   * If not null, it is compared to the checksum of the new fulltext,
+   * and the error SVN_ERR_CHECKSUM_MISMATCH is returned if they do
+   * not match.  If there is no new fulltext, @a text_checksum is ignored.
    *
    * Any temporary allocations may be performed in @a scratch_pool.
    */
@@ -1147,6 +1150,7 @@ typedef struct svn_delta_editor_t
                              apr_pool_t *scratch_pool);
 
   /** Apply a text delta stream, yielding the new revision of a file.
+   * This callback operates on the passed-in @a editor instance.
    *
    * @a file_baton indicates the file we're creating or updating, and the
    * ancestor file on which it is based; it is the baton set by some
@@ -1166,6 +1170,8 @@ typedef struct svn_delta_editor_t
    * empty string).
    *
    * Any temporary allocations may be performed in @a scratch_pool.
+   *
+   * @since New in 1.10.
    */
   svn_error_t *(*apply_textdelta_stream)(
     const struct svn_delta_editor_t *editor,

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_client/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_client/conflicts.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_client/conflicts.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_client/conflicts.c Thu Dec  7 14:42:10 2017
@@ -5011,7 +5011,7 @@ conflict_tree_get_details_incoming_delet
 
   conflict->tree_conflict_incoming_details = details;
 
-  if (details->moves)
+  if (details && details->moves)
     SVN_ERR(init_wc_move_targets(details, conflict, ctx, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -5711,15 +5711,12 @@ find_modified_rev(void *baton,
         details->children_modified = svn_tristate_true;
     }
 
-  if (details)
-    {
-      if (b->node_kind == svn_node_dir &&
-          details->children_modified == svn_tristate_unknown)
-            details->children_modified = svn_tristate_false;
+  if (b->node_kind == svn_node_dir &&
+      details->children_modified == svn_tristate_unknown)
+        details->children_modified = svn_tristate_false;
 
-      APR_ARRAY_PUSH(b->edits, struct conflict_tree_incoming_edit_details *) =
-        details;
-    }
+  APR_ARRAY_PUSH(b->edits, struct conflict_tree_incoming_edit_details *) =
+    details;
 
   svn_pool_destroy(iterpool);
 

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_client/patch.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_client/patch.c Thu Dec  7 14:42:10 2017
@@ -2511,7 +2511,8 @@ sort_matched_hunks(const void *a, const
  * in RESULT_POOL. Use WC_CTX as the working copy context.
  * STRIP_COUNT specifies the number of leading path components
  * which should be stripped from target paths in the patch.
- * REMOVE_TEMPFILES, PATCH_FUNC, and PATCH_BATON as in svn_client_patch().
+ * REMOVE_TEMPFILES is as in svn_client_patch().
+ * TARGETS_INFO is for preserving info across calls.
  * IGNORE_WHITESPACE tells whether whitespace should be considered when
  * doing the matching.
  * Call cancel CANCEL_FUNC with baton CANCEL_BATON to trigger cancellation.

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelve.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelve.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelve.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelve.c Thu Dec  7 14:42:10 2017
@@ -547,7 +547,7 @@ svn_client_shelves_list(apr_hash_t **she
     {
       const char *filename = apr_hash_this_key(hi);
       svn_io_dirent2_t *dirent = apr_hash_this_val(hi);
-      int len = strlen(filename);
+      size_t len = strlen(filename);
 
       if (len > 6 && strcmp(filename + len - 8, ".current") == 0)
         {

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/fs.h?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/fs.h Thu Dec  7 14:42:10 2017
@@ -188,6 +188,18 @@ extern "C" {
 /* The minimum format number that supports svndiff version 2. */
 #define SVN_FS_FS__MIN_SVNDIFF2_FORMAT 8
 
+/* The minimum format number that supports the special notation ("-")
+   for optional values that are not present in the representation strings,
+   such as SHA1 or the uniquifier.  For example:
+
+     15 0 563 7809 28ef320a82e7bd11eebdf3502d69e608 - 14-g/_5
+ */
+#define SVN_FS_FS__MIN_REP_STRING_OPTIONAL_VALUES_FORMAT 8
+
+ /* The minimum format number that supports V2 schema of the rep-cache.db
+    database. */
+#define SVN_FS_FS__MIN_REP_CACHE_SCHEMA_V2_FORMAT 8
+
 /* On most operating systems apr implements file locks per process, not
    per file.  On Windows apr implements the locking as per file handle
    locks, so we don't have to add our own mutex for just in-process

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=1817375&r1=1817374&r2=1817375&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 Thu Dec  7 14:42:10 2017
@@ -1470,7 +1470,10 @@ svn_fs_fs__min_unpacked_rev(svn_revnum_t
 {
   fs_fs_data_t *ffd = fs->fsap_data;
 
-  SVN_ERR(svn_fs_fs__update_min_unpacked_rev(fs, pool));
+  /* Calling this for pre-v4 repos is illegal. */
+  if (ffd->format >= SVN_FS_FS__MIN_PACKED_FORMAT)
+    SVN_ERR(svn_fs_fs__update_min_unpacked_rev(fs, pool));
+
   *min_unpacked = ffd->min_unpacked_rev;
 
   return SVN_NO_ERROR;

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/low_level.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/low_level.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/low_level.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/low_level.c Thu Dec  7 14:42:10 2017
@@ -741,6 +741,9 @@ read_header_block(apr_hash_t **headers,
   return SVN_NO_ERROR;
 }
 
+/* ### Ouch!  The implementation of this function currently modifies
+   ### the input string when tokenizing it (so the input cannot be
+   ### used after that). */
 svn_error_t *
 svn_fs_fs__parse_representation(representation_t **rep_p,
                                 svn_stringbuf_t *text,
@@ -811,13 +814,21 @@ svn_fs_fs__parse_representation(represen
   if (str == NULL)
     return SVN_NO_ERROR;
 
-  /* Read the SHA1 hash. */
-  if (strlen(str) != (APR_SHA1_DIGESTSIZE * 2))
-    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                            _("Malformed text representation offset line in node-rev"));
+  /* Is the SHA1 hash present? */
+  if (str[0] == '-' && str[1] == 0)
+    {
+      checksum = NULL;
+    }
+  else
+    {
+      /* Read the SHA1 hash. */
+      if (strlen(str) != (APR_SHA1_DIGESTSIZE * 2))
+        return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
+                                _("Malformed text representation offset line in node-rev"));
 
-  SVN_ERR(svn_checksum_parse_hex(&checksum, svn_checksum_sha1, str,
-                                 scratch_pool));
+      SVN_ERR(svn_checksum_parse_hex(&checksum, svn_checksum_sha1, str,
+                                     scratch_pool));
+    }
 
   /* We do have a valid SHA1 but it might be all 0.
      We cannot be sure where that came from (Alas! legacy), so let's not
@@ -829,21 +840,36 @@ svn_fs_fs__parse_representation(represen
   if (checksum)
     memcpy(rep->sha1_digest, checksum->digest, sizeof(rep->sha1_digest));
 
-  /* Read the uniquifier. */
-  str = svn_cstring_tokenize("/", &string);
+  str = svn_cstring_tokenize(" ", &string);
   if (str == NULL)
     return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                             _("Malformed text representation offset line in node-rev"));
 
-  SVN_ERR(svn_fs_fs__id_txn_parse(&rep->uniquifier.noderev_txn_id, str));
+  /* Is the uniquifier present? */
+  if (str[0] == '-' && str[1] == 0)
+    {
+      end = string;
+    }
+  else
+    {
+      char *substring = str;
 
-  str = svn_cstring_tokenize(" ", &string);
-  if (str == NULL || *str != '_')
-    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                            _("Malformed text representation offset line in node-rev"));
+      /* Read the uniquifier. */
+      str = svn_cstring_tokenize("/", &substring);
+      if (str == NULL)
+        return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
+                                _("Malformed text representation offset line in node-rev"));
+
+      SVN_ERR(svn_fs_fs__id_txn_parse(&rep->uniquifier.noderev_txn_id, str));
+
+      str = svn_cstring_tokenize(" ", &substring);
+      if (str == NULL || *str != '_')
+        return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
+                                _("Malformed text representation offset line in node-rev"));
 
-  ++str;
-  rep->uniquifier.number = svn__base36toui64(&end, str);
+      ++str;
+      rep->uniquifier.number = svn__base36toui64(&end, str);
+    }
 
   if (*end)
     return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
@@ -1034,25 +1060,37 @@ svn_fs_fs__read_noderev(node_revision_t
 }
 
 /* Return a textual representation of the DIGEST of given KIND.
- * If IS_NULL is TRUE, no digest is available.
  * Allocate the result in RESULT_POOL.
  */
 static const char *
 format_digest(const unsigned char *digest,
               svn_checksum_kind_t kind,
-              svn_boolean_t is_null,
               apr_pool_t *result_pool)
 {
   svn_checksum_t checksum;
   checksum.digest = digest;
   checksum.kind = kind;
 
-  if (is_null)
-    return "(null)";
-
   return svn_checksum_to_cstring_display(&checksum, result_pool);
 }
 
+/* Return a textual representation of the uniquifier represented
+ * by NODEREV_TXN_ID and NUMBER.  Use POOL for the allocations.
+ */
+static const char *
+format_uniquifier(const svn_fs_fs__id_part_t *noderev_txn_id,
+                  apr_uint64_t number,
+                  apr_pool_t *pool)
+{
+  char buf[SVN_INT64_BUFFER_SIZE];
+  const char *txn_id_str;
+
+  txn_id_str = svn_fs_fs__id_txn_unparse(noderev_txn_id, pool);
+  svn__ui64tobase36(buf, number);
+
+  return apr_psprintf(pool, "%s/_%s", txn_id_str, buf);
+}
+
 svn_stringbuf_t *
 svn_fs_fs__unparse_representation(representation_t *rep,
                                   int format,
@@ -1060,32 +1098,80 @@ svn_fs_fs__unparse_representation(repres
                                   apr_pool_t *result_pool,
                                   apr_pool_t *scratch_pool)
 {
-  char buffer[SVN_INT64_BUFFER_SIZE];
+  svn_stringbuf_t *str;
+  const char *sha1_str;
+  const char *uniquifier_str;
+
   if (svn_fs_fs__id_txn_used(&rep->txn_id) && mutable_rep_truncated)
     return svn_stringbuf_ncreate("-1", 2, result_pool);
 
-  if (format < SVN_FS_FS__MIN_REP_SHARING_FORMAT || !rep->has_sha1)
-    return svn_stringbuf_createf
-            (result_pool, "%ld %" APR_UINT64_T_FMT " %" SVN_FILESIZE_T_FMT
-             " %" SVN_FILESIZE_T_FMT " %s",
-             rep->revision, rep->item_index, rep->size,
-             rep->expanded_size,
-             format_digest(rep->md5_digest, svn_checksum_md5, FALSE,
-                           scratch_pool));
-
-  svn__ui64tobase36(buffer, rep->uniquifier.number);
-  return svn_stringbuf_createf
-          (result_pool, "%ld %" APR_UINT64_T_FMT " %" SVN_FILESIZE_T_FMT
-           " %" SVN_FILESIZE_T_FMT " %s %s %s/_%s",
-           rep->revision, rep->item_index, rep->size,
-           rep->expanded_size,
-           format_digest(rep->md5_digest, svn_checksum_md5,
-                         FALSE, scratch_pool),
-           format_digest(rep->sha1_digest, svn_checksum_sha1,
-                         !rep->has_sha1, scratch_pool),
-           svn_fs_fs__id_txn_unparse(&rep->uniquifier.noderev_txn_id,
-                                     scratch_pool),
-           buffer);
+  /* Format of the string:
+     <rev> <item_index> <size> <expanded-size> <md5> [<sha1>] [<uniquifier>]
+   */
+  str = svn_stringbuf_createf(
+          result_pool,
+          "%ld"
+          " %" APR_UINT64_T_FMT
+          " %" SVN_FILESIZE_T_FMT
+          " %" SVN_FILESIZE_T_FMT
+          " %s",
+          rep->revision,
+          rep->item_index,
+          rep->size,
+          rep->expanded_size,
+          format_digest(rep->md5_digest, svn_checksum_md5, scratch_pool));
+
+  /* Compatibility: these formats don't understand <sha1> and <uniquifier>. */
+  if (format < SVN_FS_FS__MIN_REP_SHARING_FORMAT)
+    return str;
+
+  if (format < SVN_FS_FS__MIN_REP_STRING_OPTIONAL_VALUES_FORMAT)
+    {
+      /* Compatibility: these formats can only have <sha1> and <uniquifier>
+         present simultaneously, or don't have them at all. */
+      if (rep->has_sha1)
+        {
+          sha1_str = format_digest(rep->sha1_digest, svn_checksum_sha1,
+                                   scratch_pool);
+          uniquifier_str = format_uniquifier(&rep->uniquifier.noderev_txn_id,
+                                             rep->uniquifier.number,
+                                             scratch_pool);
+          svn_stringbuf_appendbyte(str, ' ');
+          svn_stringbuf_appendcstr(str, sha1_str);
+          svn_stringbuf_appendbyte(str, ' ');
+          svn_stringbuf_appendcstr(str, uniquifier_str);
+        }
+      return str;
+    }
+
+  /* The most recent formats support optional <sha1> and <uniquifier> values. */
+  if (rep->has_sha1)
+    {
+      sha1_str = format_digest(rep->sha1_digest, svn_checksum_sha1,
+                               scratch_pool);
+    }
+  else
+    sha1_str = "-";
+
+  if (rep->uniquifier.number == 0 &&
+      rep->uniquifier.noderev_txn_id.number == 0 &&
+      rep->uniquifier.noderev_txn_id.revision == 0)
+    {
+      uniquifier_str = "-";
+    }
+  else
+    {
+      uniquifier_str = format_uniquifier(&rep->uniquifier.noderev_txn_id,
+                                         rep->uniquifier.number,
+                                         scratch_pool);
+    }
+
+  svn_stringbuf_appendbyte(str, ' ');
+  svn_stringbuf_appendcstr(str, sha1_str);
+  svn_stringbuf_appendbyte(str, ' ');
+  svn_stringbuf_appendcstr(str, uniquifier_str);
+
+  return str;
 }
 
 

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/rep-cache-db.sql
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/rep-cache-db.sql?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/rep-cache-db.sql (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/rep-cache-db.sql Thu Dec  7 14:42:10 2017
@@ -21,7 +21,7 @@
  * ====================================================================
  */
 
--- STMT_CREATE_SCHEMA
+-- STMT_CREATE_SCHEMA_V1
 /* A table mapping representation hashes to locations in a rev file. */
 CREATE TABLE rep_cache (
   hash TEXT NOT NULL PRIMARY KEY,
@@ -33,36 +33,63 @@ CREATE TABLE rep_cache (
 
 PRAGMA USER_VERSION = 1;
 
+-- STMT_CREATE_SCHEMA_V2
+/* A table mapping representation hashes to locations in a rev file.
+   Same as in V1 schema, except that it uses the `WITHOUT ROWID` optimization:
+   https://sqlite.org/withoutrowid.html
+
+   Note that this optimization is only supported starting from SQLite version
+   3.8.2 (2013-12-06).  To keep compatibility with existing binaries, it is
+   only used for newer filesystem formats that were released together with
+   bumping the minimum required SQLite version.
+ */
+CREATE TABLE rep_cache (
+  hash TEXT NOT NULL PRIMARY KEY,
+  revision INTEGER NOT NULL,
+  offset INTEGER NOT NULL,
+  size INTEGER NOT NULL,
+  expanded_size INTEGER NOT NULL
+  ) WITHOUT ROWID;
+
+PRAGMA USER_VERSION = 2;
 
 -- STMT_GET_REP
+/* Works for both V1 and V2 schemas. */
 SELECT revision, offset, size, expanded_size
 FROM rep_cache
 WHERE hash = ?1
 
 -- STMT_SET_REP
+/* Works for both V1 and V2 schemas. */
 INSERT OR FAIL INTO rep_cache (hash, revision, offset, size, expanded_size)
 VALUES (?1, ?2, ?3, ?4, ?5)
 
 -- STMT_GET_REPS_FOR_RANGE
+/* Works for both V1 and V2 schemas. */
 SELECT hash, revision, offset, size, expanded_size
 FROM rep_cache
 WHERE revision >= ?1 AND revision <= ?2
 
 -- STMT_GET_MAX_REV
+/* Works for both V1 and V2 schemas. */
 SELECT MAX(revision)
 FROM rep_cache
 
 -- STMT_DEL_REPS_YOUNGER_THAN_REV
+/* Works for both V1 and V2 schemas. */
 DELETE FROM rep_cache
 WHERE revision > ?1
 
 /* An INSERT takes an SQLite reserved lock that prevents other writes
    but doesn't block reads.  The incomplete transaction means that no
    permanent change is made to the database and the transaction is
-   removed when the database is closed.  */
+   removed when the database is closed.
+
+   Works for both V1 and V2 schemas.  */
 -- STMT_LOCK_REP
 BEGIN TRANSACTION;
 INSERT INTO rep_cache VALUES ('dummy', 0, 0, 0, 0)
 
 -- STMT_UNLOCK_REP
+/* Works for both V1 and V2 schemas. */
 ROLLBACK TRANSACTION;

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/rep-cache.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/rep-cache.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/rep-cache.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/rep-cache.c Thu Dec  7 14:42:10 2017
@@ -36,9 +36,6 @@
 
 #include "rep-cache-db.h"
 
-/* A few magic values */
-#define REP_CACHE_SCHEMA_FORMAT   1
-
 REP_CACHE_DB_SQL_DECLARE_STATEMENTS(statements);
 
 
@@ -102,13 +99,17 @@ open_rep_cache(void *baton,
 
   SVN_SQLITE__ERR_CLOSE(svn_sqlite__read_schema_version(&version, sdb, pool),
                         sdb);
-  if (version < REP_CACHE_SCHEMA_FORMAT)
+  /* If we have an uninitialized database, go ahead and create the schema. */
+  if (version <= 0)
     {
-      /* Must be 0 -- an uninitialized (no schema) database. Create
-         the schema. Results in schema version of 1.  */
-      SVN_SQLITE__ERR_CLOSE(svn_sqlite__exec_statements(sdb,
-                                                        STMT_CREATE_SCHEMA),
-                            sdb);
+      int stmt;
+
+      if (ffd->format >= SVN_FS_FS__MIN_REP_CACHE_SCHEMA_V2_FORMAT)
+        stmt = STMT_CREATE_SCHEMA_V2;
+      else
+        stmt = STMT_CREATE_SCHEMA_V1;
+
+      SVN_SQLITE__ERR_CLOSE(svn_sqlite__exec_statements(sdb, stmt), sdb);
     }
 
   /* This is used as a flag that the database is available so don't

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/structure
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/structure?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/structure (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/structure Thu Dec  7 14:42:10 2017
@@ -568,6 +568,9 @@ defined:
             ### in formats >=4, also present:
             <sha1-digest> gives hex SHA1 digest of expanded rep
             <uniquifier> see representation_t->uniquifier in fs.h
+            ### Starting from format 8, a special notation "-"
+            can be used for optional values that are not present
+            (<sha1-digest> and <uniquifier>).
   cpath     FS pathname node was created at
   copyfrom  "<rev> <path>" of copyfrom data
   copyroot  "<rev> <created-path>" of the root of this copy

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/transaction.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/transaction.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_fs_fs/transaction.c Thu Dec  7 14:42:10 2017
@@ -3336,6 +3336,24 @@ write_final_rev(const svn_fs_id_t **new_
   if (noderev->data_rep && noderev->kind == svn_node_dir)
     noderev->data_rep->has_sha1 = FALSE;
 
+  /* Compatibility: while we don't need to serialize SHA1 for props (it is
+     not used), older formats can only have representation strings that either
+     have both the SHA1 value *and* the uniquifier, or don't have them at all.
+     For such formats, both values get written to the disk only if the SHA1
+     is present.
+
+     We cannot omit the uniquifier, as doing so breaks svn_fs_props_changed()
+     for properties with shared representations, see issues #4623 and #4700.
+     Therefore, we skip writing SHA1, but only for the newer formats where
+     this dependency is untied and we can write the uniquifier to the disk
+     without the SHA1.
+   */
+  if (ffd->format >= SVN_FS_FS__MIN_REP_STRING_OPTIONAL_VALUES_FORMAT &&
+      noderev->prop_rep)
+    {
+      noderev->prop_rep->has_sha1 = FALSE;
+    }
+
   /* Workaround issue #4031: is-fresh-txn-root in revision files. */
   noderev->is_fresh_txn_root = FALSE;
 

Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/commit.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/commit.c Thu Dec  7 14:42:10 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/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=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/options.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/ra_serf.h?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/ra_serf.h Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/serf.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/serf.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/libsvn_ra_serf/stat.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/stat.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/stat.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/stat.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/util.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_ra_serf/util.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/libsvn_ra_svn/editorp.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_ra_svn/editorp.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_ra_svn/editorp.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_ra_svn/editorp.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_ra_svn/marshal.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_ra_svn/marshal.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/libsvn_repos/load-fs-vtable.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_repos/load-fs-vtable.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_repos/load-fs-vtable.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_repos/load-fs-vtable.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/sqlite.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_subr/sqlite.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/libsvn_subr/utf8proc.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_subr/utf8proc.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_subr/utf8proc.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_subr/utf8proc.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/dav_svn.h?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/dav_svn.h Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/liveprops.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/liveprops.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/util.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/util.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/version.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/mod_dav_svn/version.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svn/conflict-callbacks.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/svn/conflict-callbacks.c Thu Dec  7 14:42:10 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).
        *

Modified: subversion/branches/shelve-checkpoint/subversion/svn/shelve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svn/shelve-cmd.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svn/shelve-cmd.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/svn/shelve-cmd.c Thu Dec  7 14:42:10 2017
@@ -130,7 +130,7 @@ shelves_list(const char *local_abspath,
       SVN_ERR(svn_client_shelf_version_get_info(&info,
                                                 shelf, shelf->max_version,
                                                 scratch_pool, scratch_pool));
-      age_mins = (apr_time_now() - info->mtime) / 1000000 / 60;
+      age_mins = (int)((apr_time_now() - info->mtime) / 1000000 / 60);
       age_str = friendly_duration_str(age_mins, scratch_pool);
 
       SVN_ERR(svn_client_shelf_get_paths(&paths,
@@ -151,9 +151,11 @@ shelves_list(const char *local_abspath,
       if (with_diffstat)
         {
 #ifndef WIN32
-          system(apr_psprintf(scratch_pool, "diffstat %s 2> /dev/null",
-                              info->patch_abspath));
-          SVN_ERR(svn_cmdline_printf(scratch_pool, "\n"));
+          int result = system(apr_psprintf(scratch_pool,
+                                           "diffstat %s 2> /dev/null",
+                                           info->patch_abspath));
+          if (result == 0)
+            SVN_ERR(svn_cmdline_printf(scratch_pool, "\n"));
 #endif
         }
       SVN_ERR(svn_client_shelf_close(shelf, scratch_pool));
@@ -195,9 +197,13 @@ checkpoint_list(const char *name,
 
       if (diffstat)
         {
-          system(apr_psprintf(scratch_pool, "diffstat %s 2> /dev/null",
-                              info->patch_abspath));
-          SVN_ERR(svn_cmdline_printf(scratch_pool, "\n"));
+#ifndef WIN32
+          int result = system(apr_psprintf(scratch_pool,
+                                           "diffstat %s 2> /dev/null",
+                                           info->patch_abspath));
+          if (result == 0)
+            SVN_ERR(svn_cmdline_printf(scratch_pool, "\n"));
+#endif
         }
     }
 

Modified: subversion/branches/shelve-checkpoint/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svn/svn.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svn/svn.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/svn/svn.c Thu Dec  7 14:42:10 2017
@@ -406,7 +406,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,
@@ -1670,7 +1672,11 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "\n"
      "  3. List all versions of shelf NAME.\n"
      "\n"
-     "The default PATH is the current working directory.\n"),
+     "The default PATH is the current working directory.\n"
+     "\n"
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    ),
     {'q', opt_dry_run,
      opt_depth, opt_targets, opt_changelist,
      SVN_CL__LOG_MSG_OPTIONS,
@@ -1705,6 +1711,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  To bring back shelved changes, use 'svn unshelve NAME'.\n"
      "\n"
      "  Shelves are stored in <WC>/.svn/shelves/\n"
+     "\n"
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
     ),
     {opt_delete, opt_list, 'q', opt_dry_run, opt_keep_local,
      opt_depth, opt_targets, opt_changelist,
@@ -1729,12 +1738,19 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  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_list, 'q', opt_dry_run} },
 
   { "shelves", svn_cl__shelves, {0}, N_
     ("List shelves.\n"
-     "usage: shelves\n"),
+     "usage: shelves\n"
+     "\n"
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    ),
     {'q'} },
 
   { "status", svn_cl__status, {"stat", "st"}, N_

Modified: subversion/branches/shelve-checkpoint/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svn/util.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svn/util.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/svn/util.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnadmin/svnadmin.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/svnadmin/svnadmin.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svnserve/serve.c?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svnserve/serve.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/svnserve/serve.c Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/tests/cmdline/basic_tests.py?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/shelve-checkpoint/subversion/tests/cmdline/basic_tests.py Thu Dec  7 14:42:10 2017
@@ -3141,6 +3141,7 @@ def filtered_ls(sbox):
     [], [], '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"
 
@@ -3169,6 +3170,7 @@ def null_update_last_changed_revision(sb
 
 @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"
 

Modified: subversion/branches/shelve-checkpoint/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/tests/cmdline/diff_tests.py?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/shelve-checkpoint/subversion/tests/cmdline/diff_tests.py Thu Dec  7 14:42:10 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/shelve-checkpoint/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1817375&r1=1817374&r2=1817375&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/shelve-checkpoint/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Thu Dec  7 14:42:10 2017
@@ -127,7 +127,8 @@ 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: