You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by fu...@apache.org on 2019/09/20 11:18:27 UTC

svn commit: r1867214 [1/2] - in /subversion/branches/swig-py3: ./ build/generator/ build/generator/templates/ contrib/client-side/svn_load_dirs/ notes/commit-access-templates/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/incl...

Author: futatuki
Date: Fri Sep 20 11:18:26 2019
New Revision: 1867214

URL: http://svn.apache.org/viewvc?rev=1867214&view=rev
Log:
On branch swig-py3: Catchup to trunk @r1867213

Modified:
    subversion/branches/swig-py3/   (props changed)
    subversion/branches/swig-py3/CHANGES
    subversion/branches/swig-py3/COMMITTERS
    subversion/branches/swig-py3/build/generator/gen_base.py
    subversion/branches/swig-py3/build/generator/gen_make.py
    subversion/branches/swig-py3/build/generator/templates/pkg-config.in.ezt
    subversion/branches/swig-py3/configure.ac
    subversion/branches/swig-py3/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in
    subversion/branches/swig-py3/notes/commit-access-templates/full-committer.tmpl
    subversion/branches/swig-py3/notes/commit-access-templates/partial-committer.tmpl
    subversion/branches/swig-py3/notes/commit-access-templates/pmc-member.tmpl
    subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
    subversion/branches/swig-py3/subversion/include/svn_version.h
    subversion/branches/swig-py3/subversion/libsvn_client/patch.c
    subversion/branches/swig-py3/subversion/libsvn_fs_fs/low_level.c
    subversion/branches/swig-py3/subversion/libsvn_fs_fs/verify.c
    subversion/branches/swig-py3/subversion/libsvn_fs_x/   (props changed)
    subversion/branches/swig-py3/subversion/libsvn_fs_x/low_level.c
    subversion/branches/swig-py3/subversion/libsvn_ra_serf/options.c
    subversion/branches/swig-py3/subversion/libsvn_ra_serf/util.c
    subversion/branches/swig-py3/subversion/libsvn_repos/commit.c
    subversion/branches/swig-py3/subversion/libsvn_repos/delta.c
    subversion/branches/swig-py3/subversion/libsvn_repos/dump.c
    subversion/branches/swig-py3/subversion/libsvn_repos/dump_editor.c
    subversion/branches/swig-py3/subversion/libsvn_repos/load-fs-vtable.c
    subversion/branches/swig-py3/subversion/libsvn_repos/load.c
    subversion/branches/swig-py3/subversion/libsvn_subr/io.c
    subversion/branches/swig-py3/subversion/libsvn_subr/opt.c
    subversion/branches/swig-py3/subversion/libsvn_subr/sqlite3wrapper.c
    subversion/branches/swig-py3/subversion/libsvn_subr/stream.c
    subversion/branches/swig-py3/subversion/libsvn_subr/win32_crypto.c
    subversion/branches/swig-py3/subversion/libsvn_wc/diff_local.c
    subversion/branches/swig-py3/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/branches/swig-py3/subversion/mod_dav_svn/repos.c
    subversion/branches/swig-py3/subversion/svn/svn.c
    subversion/branches/swig-py3/subversion/svnserve/serve.c
    subversion/branches/swig-py3/subversion/tests/cmdline/changelist_tests.py
    subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
    subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
    subversion/branches/swig-py3/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
    subversion/branches/swig-py3/subversion/tests/cmdline/mod_dav_svn_tests.py
    subversion/branches/swig-py3/subversion/tests/cmdline/shelf_tests.py
    subversion/branches/swig-py3/subversion/tests/cmdline/svntest/main.py
    subversion/branches/swig-py3/subversion/tests/libsvn_subr/   (props changed)
    subversion/branches/swig-py3/subversion/tests/libsvn_subr/stream-test.c
    subversion/branches/swig-py3/subversion/tests/libsvn_wc/wc-queries-test.c
    subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svnbuild.sh
    subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svncheck.sh
    subversion/branches/swig-py3/tools/buildbot/slaves/bb-openbsd/svnclean.sh
    subversion/branches/swig-py3/tools/dev/unix-build/Makefile.svn
    subversion/branches/swig-py3/tools/dist/release.py
    subversion/branches/swig-py3/tools/dist/templates/rc-release-ann.ezt
    subversion/branches/swig-py3/tools/dist/templates/stable-release-ann.ezt

Propchange: subversion/branches/swig-py3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 20 11:18:26 2019
@@ -102,4 +102,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1813660-1862712
+/subversion/trunk:1813660-1867212

Modified: subversion/branches/swig-py3/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/CHANGES?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/CHANGES (original)
+++ subversion/branches/swig-py3/CHANGES Fri Sep 20 11:18:26 2019
@@ -4,10 +4,64 @@
 # To view an issue listed as (issue #XXXX), visit:
 #   https://issues.apache.org/jira/browse/SVN-XXXX
 
+Version 1.14.0
+(?? ??? 20XX, from /branches/1.14.x)
+https://svn.apache.org/repos/asf/subversion/tags/1.14.0
+
 Version 1.13.0
-(?? ??? 20XX, from /branches/1.13.x)
+(16 Oct 2019, from /branches/1.13.x)
 https://svn.apache.org/repos/asf/subversion/tags/1.13.0
 
+ User-visible changes:
+  - Minor new features and improvements:
+    * New 'svnadmin rev-size' command to report revision size (r1857624)
+    * In 'svn help', hide experimental commands and global options (issue #4828)
+    * Add a hint about mod_dav_svn misconfiguration (r1866738)
+    * Performance improvement for 'svn st' etc., in WC SQLite DB (r1865523)
+
+  - Client-side bugfixes:
+    * Windows: avoid delays in SSL certificate validation override (r1863018)
+    * Fix 'svn patch' setting mode 0600 on patched files with props (r1864440)
+    * Fix "svn diff --changelist ARG" broken in subdirectories (issue #4822)
+    * Fix misleading 'redirect cycle' error on a non-repository URL (r1866899)
+
+  - Server-side bugfixes:
+    * svnserve: Report some errors that we previously ignored (r1866062)
+    * Make server code more resilient to malformed paths and URLs (r1866318 et al)
+    * Make dump stream parser more resilient to malformed dump stream (r1866951)
+    * mod_dav_svn: Fix missing Last-Modified header on 'external' GET requests (r1866425)
+
+  - Client-side and server-side bugfixes:
+    * Fix excessive memory usage in some cases reading binary data (r1866950)
+    * Win32: fix svn_io_file_rename2() spinning in a retry loop (r1865518)
+
+  - Other tool improvements and bugfixes:
+    * svn_load_dirs.pl: do not show password; fix cleanup (r1863262, r1863392)
+
+ Developer-visible changes:
+    * New svn_fs_ioctl() API for FSFS stats, dump/load index, rev-size (r1857435)
+
+
+Version 1.12.2
+(24 Jul 2019, from /branches/1.12.x)
+https://svn.apache.org/repos/asf/subversion/tags/1.12.2
+
+ User-visible changes:
+    * Fix conflict resolver bug: local and incoming edits swapped. (r1863285)
+    * Fix memory lifetime problem in a libsvn_wc error code path. (r1863287)
+    * Faster Windows file existence checks, improving 'svn st' etc. (r1863289)
+
+ Developer-visible changes:
+    * Allow generating Visual Studio 2019 projects (r1863286)
+    * Fix build with APR 1.7.0. (r1860377)
+    * Fix building Subversion with Visual Studio 2005 and 2008. (r1863288)
+    * Allow svnserve's 'get-deleted-rev' API to return 'not deleted'. (r1863290)
+
+
+Version 1.12.1
+(Not released; see changes for 1.12.2.)
+
+
 Version 1.12.0
 (12 Apr 2019, from /branches/1.12.x)
 https://svn.apache.org/repos/asf/subversion/tags/1.12.0
@@ -136,6 +190,35 @@ http://svn.apache.org/repos/asf/subversi
     * Fix a potential crash in JavaHL (issue #4764)
 
 
+Version 1.10.6
+(24 Jul 2019, from /branches/1.10.x)
+https://svn.apache.org/repos/asf/subversion/tags/1.10.6
+
+ User-visible changes:
+    * Allow the use of empty groups in authz rules. (r1854883)
+    * Fix conflict resolver case with move vs move conflicts. (r1863297)
+    * Fix #4760: Missing children in svnadmin dump --include/exclude. (r1863298)
+    * Fix #4793: authz rights from inverted access selectors. (r1854882)
+    * Fix conflict resolver bug: local and incoming edits swapped. (r1863300)
+    * Fix #4806: Remove on-disk trees with read-only dirs. (r1863299)
+    * Fix memory lifetime problem in a libsvn_wc error code path. (r1863302)
+    * No tree conflict when 'svn up' deletes unmodified dir with unversioned items. (r1863296)
+    * Remove a useless common ancestor search from conflict resolver. (r1863294)
+
+ Developer-visible changes:
+    * Allow generating Visual Studio 2019 projects (r1863304)
+    * Fix a use-after-free in mod_dav_svn's logging of FS warnings. (r1863292)
+    * Fix "unused static function" warning in release-mode builds. (r1854884)
+    * Fix build with APR 1.7.0. (r1863303)
+    * Fix issue #4804: spurious SQLite-related test failures. (r1863295)
+    * Allow svnserve's 'get-deleted-rev' API to return 'not deleted'. (r1863305)
+    * Silence a deprecation warning from amalgamated SQLite on macOS. (r1863291)
+
+
+Version 1.10.5
+(Not released; see changes for 1.10.6.)
+
+
 Version 1.10.4
 (11 Jan 2019, from /branches/1.10.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.10.4
@@ -521,6 +604,27 @@ the 1.9 release:  https://subversion.apa
     * Ruby: Detect versions up to 2.4 (r1806570)
 
 
+Version 1.9.12
+(24 Jul 2019, from /branches/1.9.x)
+https://svn.apache.org/repos/asf/subversion/tags/1.9.12
+
+ User-visible changes:
+    * No tree conflict when 'svn up' deletes unmodified dir with unversioned items. (r1863309)
+
+ Developer-visible changes:
+    * Allow generating Visual Studio 2019 projects (r1863311)
+    * Fix a use-after-free in mod_dav_svn's logging of FS warnings. (r1863307)
+    * Fix "unused static function" warning in release-mode builds. (r1854881)
+    * Fix build with APR 1.7.0. (r1863310)
+    * Fix issue #4804: spurious SQLite-related test failures. (r1863308)
+    * Allow svnserve's 'get-deleted-rev' API to return 'not deleted'. (r1863312)
+    * Silence a deprecation warning from amalgamated SQLite on macOS. (r1863306)
+
+
+Version 1.9.11
+(Not released; see changes for 1.9.12.)
+
+
 Version 1.9.10
 (11 Jan 2019, from /branches/1.9.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.9.10

Modified: subversion/branches/swig-py3/COMMITTERS
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/COMMITTERS?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/COMMITTERS [UTF-8] (original)
+++ subversion/branches/swig-py3/COMMITTERS [UTF-8] Fri Sep 20 11:18:26 2019
@@ -62,6 +62,7 @@ Blanket commit access:
       jamessan   James McCoy <ja...@jamessan.com>
       luke1410   Stefan Hett <lu...@posteo.de>
   troycurtisjr   Troy Curtis, Jr <tr...@gmail.com>
+ hartmannathan   Nathan Hartman <ha...@gmail.com>
 
 [[END ACTIVE FULL COMMITTERS.  LEAVE THIS LINE HERE; SCRIPTS LOOK FOR IT.]]
 

Modified: subversion/branches/swig-py3/build/generator/gen_base.py
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/build/generator/gen_base.py?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/build/generator/gen_base.py (original)
+++ subversion/branches/swig-py3/build/generator/gen_base.py Fri Sep 20 11:18:26 2019
@@ -663,7 +663,7 @@ class TargetExe(TargetLinked):
     TargetLinked.add_dependencies(self)
 
     # collect test programs
-    if 'svnauthz' in self.name: # special case
+    if 'svnauthz' in self.name or 'svnmover' in self.name: # special case
       self.gen_obj.test_deps.append(self.filename)
       self.gen_obj.test_helpers.append(self.filename)
     elif self.install == 'test':

Modified: subversion/branches/swig-py3/build/generator/gen_make.py
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/build/generator/gen_make.py?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/build/generator/gen_make.py (original)
+++ subversion/branches/swig-py3/build/generator/gen_make.py Fri Sep 20 11:18:26 2019
@@ -635,9 +635,10 @@ DIR=`pwd`
         lib_deps=[],
         lib_required=[],
         lib_required_private=[],
+        version=self.version,
         )
-      # libsvn_foo -> -lsvn_foo
-      data.lib_deps.append('-l%s' % lib_name.replace('lib', '', 1))
+      # libsvn_foo -> -lsvn_foo-1
+      data.lib_deps.append('-l%s-%s' % (lib_name.replace('lib', '', 1), data.version))
       for lib_dep in lib_deps.split():
         if lib_dep == 'apriconv':
           # apriconv is part of apr-util, skip it

Modified: subversion/branches/swig-py3/build/generator/templates/pkg-config.in.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/build/generator/templates/pkg-config.in.ezt?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/build/generator/templates/pkg-config.in.ezt (original)
+++ subversion/branches/swig-py3/build/generator/templates/pkg-config.in.ezt Fri Sep 20 11:18:26 2019
@@ -6,7 +6,7 @@ includedir=@includedir@
 Name: [lib_name]
 Description: [lib_desc]
 Version: @PACKAGE_VERSION@
-Requires: [for lib_required] [lib_required][end]
-Requires.private: [for lib_required_private] [lib_required_private][end]
+Requires: [for lib_required][if-index lib_required first][else], [end][lib_required][end]
+Requires.private: [for lib_required_private][if-index lib_required_private first][else], [end][lib_required_private][end]
 Libs: -L${libdir} [for lib_deps] [lib_deps][end]
-Cflags: -I${includedir}
+Cflags: -I${includedir}/subversion-[version]

Modified: subversion/branches/swig-py3/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/configure.ac?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/configure.ac (original)
+++ subversion/branches/swig-py3/configure.ac Fri Sep 20 11:18:26 2019
@@ -593,7 +593,7 @@ if test "$with_old_gnome_keyring" != "no
                         [Is GNOME Keyring support enabled?])
               CPPFLAGS="$old_CPPFLAGS"
               SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
-              SVN_GNOME_KEYRING_PCLIBS="glib-2.0 gnome-keyring-1"
+              SVN_GNOME_KEYRING_PCLIBS="glib-2.0, gnome-keyring-1"
             else
               AC_MSG_RESULT([no])
               if test "$with_old_gnome_keyring" = "yes"; then

Modified: subversion/branches/swig-py3/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in (original)
+++ subversion/branches/swig-py3/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in Fri Sep 20 11:18:26 2019
@@ -196,7 +196,7 @@ elsif ( -f "$ENV{HOME}/.subversion/confi
       {
         if ( /^global-ignores\s*=\s*(.*?)\s*$/ )
           {
-	    $ignores_str = $1;
+            $ignores_str = $1;
             last;
           }
       }
@@ -1344,6 +1344,8 @@ sub usage
       "  -p filename    table listing properties to apply to matching files\n",
       "  -svn_username  username to perform commits as\n",
       "  -svn_password  password to supply to svn commit\n",
+      "                 WARNING: passing the password in a command-line argument\n",
+      "                 may make it visible to other local OS users\n",
       "  -t tag_dir     create a tag copy in tag_dir, relative to svn_url\n",
       "  -v             increase program verbosity, multiple -v's allowed\n",
       "  -wc path       use the already checked-out working copy at path\n",
@@ -1500,6 +1502,18 @@ sub file_info
   return '?';
 }
 
+# Copy arguments and replace what follows --password with '*'s.
+sub sanitize_pwd
+{
+  my @str = @_;
+  my $hide_next = 0;
+  foreach(@str) {
+    $_ = '*' x length if ( $hide_next );
+    $hide_next = ($_ eq '--password');
+  }
+  @str;
+}
+
 # Start a child process safely without using /bin/sh.
 sub safe_read_from_pipe
 {
@@ -1511,7 +1525,7 @@ sub safe_read_from_pipe
   my $openfork_available = "MSWin32" ne $OSNAME;
   if ($openfork_available)
     {
-      print "Running @_\n";
+      print join(' ', &sanitize_pwd("Running", @_, "\n") );
       my $pid = open(SAFE_READ, "-|");
       unless (defined $pid)
         {
@@ -1523,7 +1537,9 @@ sub safe_read_from_pipe
           open(STDERR, ">&STDOUT")
             or die "$0: cannot dup STDOUT: $!\n";
           exec(@_)
-            or die "$0: cannot exec '@_': $!\n";
+            or die "$0: cannot exec '"
+              . join(' ', &sanitize_pwd(@_) )
+              . "': $!\n";
         }
     }
   else
@@ -1560,7 +1576,7 @@ sub safe_read_from_pipe
             }
         }
 
-      print "Running @commandline\n";
+      print join(' ', &sanitize_pwd("Running", @commandline, "\n") );
       if ( $comment ) { print $comment; }
 
       # Now do the pipe.
@@ -1582,7 +1598,9 @@ sub safe_read_from_pipe
   my $cd     = $result & 128 ? "with core dump" : "";
   if ($signal or $cd)
     {
-      warn "$0: pipe from '@_' failed $cd: exit=$exit signal=$signal\n";
+      warn "$0: pipe from '"
+        . join(' ', &sanitize_pwd(@_) )
+        . "' failed $cd: exit=$exit signal=$signal\n";
     }
   if (wantarray)
     {
@@ -1605,8 +1623,9 @@ sub read_from_process
   my ($status, @output) = &safe_read_from_pipe(@_);
   if ($status)
     {
-      print STDERR "$0: @_ failed with this output:\n", join("\n", @output),
-                   "\n";
+      print STDERR
+        join(' ', &sanitize_pwd("$0:", @_, "failed with this output:\n") ),
+        join("\n", @output), "\n";
       unless ($opt_no_user_input)
         {
           print STDERR
@@ -1658,7 +1677,7 @@ sub recursive_ls_and_hash
     };
   find({no_chdir   => 1,
         preprocess => sub
-	  {
+          {
             grep
               {
                 my $ok=1;
@@ -2054,5 +2073,6 @@ sub new
 sub DESTROY
 {
   print "Cleaning up $temp_dir\n";
+  chdir( $temp_dir . "/.." );
   File::Path::rmtree([$temp_dir], 0, 0);
 }

Modified: subversion/branches/swig-py3/notes/commit-access-templates/full-committer.tmpl
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/notes/commit-access-templates/full-committer.tmpl?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/notes/commit-access-templates/full-committer.tmpl (original)
+++ subversion/branches/swig-py3/notes/commit-access-templates/full-committer.tmpl Fri Sep 20 11:18:26 2019
@@ -5,7 +5,7 @@ of "{AT}" with real "@" signs.  It's jus
 fool the spam address harvesters.
 ]]]
 
-### see http://www.apache.org/dev/pmc.html#newpmc for procedure
+### see https://www.apache.org/dev/pmc.html#newpmc for procedure
 
 From: "Some Committer" <a....@wherever.example.com>
 To: New Full Committer <ne...@wherever.new.committers.live>

Modified: subversion/branches/swig-py3/notes/commit-access-templates/partial-committer.tmpl
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/notes/commit-access-templates/partial-committer.tmpl?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/notes/commit-access-templates/partial-committer.tmpl (original)
+++ subversion/branches/swig-py3/notes/commit-access-templates/partial-committer.tmpl Fri Sep 20 11:18:26 2019
@@ -5,6 +5,8 @@ instances of "{AT}" with real "@" signs.
 template to fool the spam address harvesters.
 ]]]
 
+### see https://www.apache.org/dev/pmc.html#newcommitter for procedure
+
 From: "Some Committer" <a....@wherever.example.com>
 To: New Partial Committer <ne...@wherever.new.committers.live>
 Cc: private{AT}subversion.apache.org

Modified: subversion/branches/swig-py3/notes/commit-access-templates/pmc-member.tmpl
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/notes/commit-access-templates/pmc-member.tmpl?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/notes/commit-access-templates/pmc-member.tmpl (original)
+++ subversion/branches/swig-py3/notes/commit-access-templates/pmc-member.tmpl Fri Sep 20 11:18:26 2019
@@ -5,7 +5,7 @@ real "@" signs.  It's just masked in thi
 address harvesters.
 ]]]
 
-### see http://www.apache.org/dev/pmc.html#newpmc for procedure
+### see https://www.apache.org/dev/pmc.html#newpmc for procedure
 
 From: "Some PMC Member" <a....@wherever.example.com>
 To: New PMC Member <ne...@wherever.new.pmcers.live>

Modified: subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java (original)
+++ subversion/branches/swig-py3/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java Fri Sep 20 11:18:26 2019
@@ -142,7 +142,7 @@ public class NativeResources
     private static final void init()
     {
         final int SVN_VER_MAJOR = 1;
-        final int SVN_VER_MINOR = 13;
+        final int SVN_VER_MINOR = 14;
         initNativeLibrary();
         version = new Version();
         if (!version.isAtLeast(SVN_VER_MAJOR, SVN_VER_MINOR, 0))

Modified: subversion/branches/swig-py3/subversion/include/svn_version.h
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/svn_version.h?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/include/svn_version.h (original)
+++ subversion/branches/swig-py3/subversion/include/svn_version.h Fri Sep 20 11:18:26 2019
@@ -61,7 +61,7 @@ extern "C" {
  * Modify when new functionality is added or new interfaces are
  * defined, but all changes are backward compatible.
  */
-#define SVN_VER_MINOR      13
+#define SVN_VER_MINOR      14
 
 /**
  * Patch number.

Modified: subversion/branches/swig-py3/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_client/patch.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_client/patch.c Fri Sep 20 11:18:26 2019
@@ -1020,6 +1020,7 @@ init_patch_target(patch_target_t **patch
   target_content_t *content;
   svn_boolean_t has_text_changes = FALSE;
   svn_boolean_t follow_moves;
+  const char *tempdir_abspath;
 
   has_text_changes = ((patch->hunks && patch->hunks->nelts > 0)
                       || patch->binary_patch);
@@ -1225,8 +1226,10 @@ init_patch_target(patch_target_t **patch
         }
 
       /* Open a temporary file to write the patched result to. */
+      SVN_ERR(svn_wc__get_tmpdir(&tempdir_abspath, wc_ctx,
+          target->local_abspath, scratch_pool, scratch_pool));
       SVN_ERR(svn_io_open_unique_file3(&target->patched_file,
-                                       &target->patched_path, NULL,
+                                       &target->patched_path, tempdir_abspath,
                                        remove_tempfiles ?
                                          svn_io_file_del_on_pool_cleanup :
                                          svn_io_file_del_none,
@@ -1238,7 +1241,7 @@ init_patch_target(patch_target_t **patch
 
       /* Open a temporary stream to write rejected hunks to. */
       SVN_ERR(svn_stream_open_unique(&target->reject_stream,
-                                     &target->reject_path, NULL,
+                                     &target->reject_path, tempdir_abspath,
                                      remove_tempfiles ?
                                          svn_io_file_del_on_pool_cleanup :
                                          svn_io_file_del_none,

Modified: subversion/branches/swig-py3/subversion/libsvn_fs_fs/low_level.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_fs_fs/low_level.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_fs_fs/low_level.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_fs_fs/low_level.c Fri Sep 20 11:18:26 2019
@@ -254,10 +254,10 @@ svn_fs_fs__parse_footer(apr_off_t *l2p_o
                              "P2L offset %s must be larger than L2P offset %s"
                              " in r%ld footer",
                              apr_psprintf(result_pool,
-                                          "%" APR_UINT64_T_HEX_FMT,
+                                          "0x%" APR_UINT64_T_HEX_FMT,
                                           (apr_uint64_t)*p2l_offset),
                              apr_psprintf(result_pool,
-                                          "%" APR_UINT64_T_HEX_FMT,
+                                          "0x%" APR_UINT64_T_HEX_FMT,
                                           (apr_uint64_t)*l2p_offset),
                              rev);
 

Modified: subversion/branches/swig-py3/subversion/libsvn_fs_fs/verify.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_fs_fs/verify.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_fs_fs/verify.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_fs_fs/verify.c Fri Sep 20 11:18:26 2019
@@ -681,10 +681,10 @@ compare_p2l_to_rev(svn_fs_t *fs,
                                      NULL,
                                      _("p2l index entry for revision r%ld"
                                        " at offset %s contains invalid item"
-                                       " type %d"),
+                                       " type %u"),
                                      start,
                                      apr_off_t_toa(pool, offset),
-                                     entry->type);
+                                     (unsigned int)entry->type);
 
           /* There can be only one changes entry and that has a fixed type
            * and item number.  Its presence and parse-ability will be checked
@@ -694,11 +694,12 @@ compare_p2l_to_rev(svn_fs_t *fs,
             return svn_error_createf(SVN_ERR_FS_INDEX_CORRUPTION,
                                      NULL,
                                      _("p2l index entry for changes in"
-                                       " revision r%ld is item %ld of type"
-                                       " %d at offset %s"),
+                                       " revision r%ld is item"
+                                       " %"APR_UINT64_T_FMT
+                                       " of type %u at offset %s"),
                                      entry->item.revision,
                                      entry->item.number,
-                                     entry->type,
+                                     (unsigned int)entry->type,
                                      apr_off_t_toa(pool, offset));
 
           /* Check contents. */

Propchange: subversion/branches/swig-py3/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 20 11:18:26 2019
@@ -96,4 +96,4 @@
 /subversion/branches/verify-keep-going/subversion/libsvn_fs_x:1439280-1492639,1546002-1546110
 /subversion/branches/wc-collate-path/subversion/libsvn_fs_x:1402685-1480384
 /subversion/trunk/subversion/libsvn_fs_fs:1415133-1596500,1596567,1597414,1597989,1598273,1599140,1600872,1601633,1603485-1603487,1603499,1603605,1604128,1604188,1604413-1604414,1604416-1604417,1604421,1604442,1604700,1604717,1604720,1604726,1604755,1604794,1604802,1604824,1604836,1604844,1604902-1604903,1604911,1604925,1604933,1604947,1605059-1605060,1605064-1605065,1605068,1605071-1605073,1605075,1605123,1605188-1605189,1605191,1605197,1605444,1605633,1606132,1606142,1606144,1606514,1606526,1606528,1606551,1606554,1606564,1606598-1606599,1606656,1606658,1606662,1606744,1606840,1607085,1607572,1612407,1612810,1613339,1613872,1614611,1615348,1615351-1615352,1615356,1616338-1616339,1616613,1617586,1617688,1618138,1618151,1618153,1618226,1618641,1618653,1618662,1619068,1619358,1619413,1619769,1619774,1620602,1620909,1620912,1620928,1620930,1621275,1621635,1622931,1622937,1622942,1622946,1622959-1622960,1622963,1622987,1623007,1623368,1623373,1623377,1623379,1623381,1623398,1623402,162
 4011,1624265,1624512,1626246,1626871,1626873,1626886,1627497-1627498,1627502,1627947-1627949,1627966,1628083,1628093,1628158-1628159,1628161,1628392-1628393,1628415,1628427,1628676,1628738,1628762,1628764,1629854-1629855,1629857,1629865,1629873,1629875,1629879,1630067,1630070,1631049-1631051,1631075,1631115,1631171,1631180,1631185-1631186,1631196-1631197,1631239-1631240,1631548,1631550,1631563,1631567,1631588,1631598,1632646,1632776,1632849,1632851-1632853,1632856-1632857,1632868,1632908,1632926,1633232,1633617-1633618,1634872,1634875,1634879-1634880,1634920,1636478,1636483,1636629,1636644,1637184,1637186,1637330,1637358,1637363,1637393,1639319,1639322,1639335,1639348,1639352,1639355,1639358,1639414,1639419,1639426,1639430,1639436,1639440,1639549,1640061-1640062,1640197,1640915,1640966,1641013,1643139,1643233,1645567,1646021,1646712,1646716,1647537,1647540-1647541,1647820,1647905,1648230,1648238,1648241-1648243,1648253,1648272,1648532,1648537-1648539,1648542,1648591,1648612,1649590,
 1651567,1652068,1652076,1652441,1652451,1653608,1654932,1654934,1654937,1655635,1655649,1655651,1655664,1656176,1657525,1657972,1657978,1658482,1659212,1659217,1659314,1659509,1662668,1665318,1665854,1665894,1667090,1667101,1667538,1669743,1669746,1669749,1669945,1670139,1670953,1673170,1673197,1673202,1673204,1673445,1673454,1673685,1673689,1673875,1674165,1674341,1674400,1674404,1674631,1674669,1674673,1675396,1676667,1677431,1678149,1678151,1678718,1678725,1679169,1679907,1679920-1679924,1679926,1680347,1680460,1680464,1680476,1680819,1681949,1681966,1681974,1681994,1682008,1682076,1682086,1682093,1682259,1682265,1682739,1682864,1683311,1683330,1683378,1683544,1683553,1684047,1686232,1686542,1686546,1686554,1686557,1687061,1687064,1687070-1687071,1687074,1687078-1687079,1688270,1688425,1692650,1693886,1694489,1694848,1696171,1696185,1696627-1696628,1696630,1696758,1697372,1697381,1697387,1697393,1697403,1697405,1701017,1701053,1702600,1702922,1703069,1703142,1703237,1703240,17052
 66,1705638,1705643,1705646,1705724,1705730,1705739,1706612,1706615,1706617,1706619,1706675-1706676,1706679,1706979-1706980,1707308,1707971-1707973,1707986,1707988-1707989,1708004,1709388,1709799,1710017,1710359,1710368,1710370,1711507,1711582,1711672,1712927,1715793,1715947,1716047,1716067,1716784,1716973-1716974,1717332,1717334,1717864,1719269,1719336,1719413,1719730,1720015,1721285,1723715,1723720,1723834,1723839,1725179-1725180,1726004,1726099,1726116,1726897,1726995,1727006-1727007,1727028,1727040,1727707,1727822,1730491,1735916,1736357,1736359,1737355-1737356,1740721-1740722,1741096,1741200,1741206,1741214,1741224,1742540,1745055,1745107,1745852,1746006,1746012,1746026,1756258-1756266,1756364,1756377,1759117,1759122-1759126,1759135,1759404-1759405,1759686,1764340,1764481,1764676,1766352,1780810,1781655,1781694,1785053,1785737-1785738,1785741,1785754,1785904,1786445-1786446,1786515
-/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1813660-1862712
+/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1813660-1867212

Modified: subversion/branches/swig-py3/subversion/libsvn_fs_x/low_level.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_fs_x/low_level.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_fs_x/low_level.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_fs_x/low_level.c Fri Sep 20 11:18:26 2019
@@ -167,10 +167,10 @@ svn_fs_x__parse_footer(apr_off_t *l2p_of
                              "P2L offset %s must be larger than L2P offset %s"
                              " in r%ld footer",
                              apr_psprintf(result_pool,
-                                          "%" APR_UINT64_T_HEX_FMT,
+                                          "0x%" APR_UINT64_T_HEX_FMT,
                                           (apr_uint64_t)*p2l_offset),
                              apr_psprintf(result_pool,
-                                          "%" APR_UINT64_T_HEX_FMT,
+                                          "0x%" APR_UINT64_T_HEX_FMT,
                                           (apr_uint64_t)*l2p_offset),
                              rev);
 

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=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_ra_serf/options.c Fri Sep 20 11:18:26 2019
@@ -575,8 +575,7 @@ svn_ra_serf__exchange_capabilities(svn_r
         }
       else if (svn_path_is_url(opt_ctx->handler->location))
         {
-          *corrected_url = svn_uri_canonicalize(opt_ctx->handler->location,
-                                                result_pool);
+          *corrected_url = apr_pstrdup(result_pool, opt_ctx->handler->location);
         }
       else
         {
@@ -589,9 +588,7 @@ svn_ra_serf__exchange_capabilities(svn_r
           apr_uri_t corrected_URI = serf_sess->session_url;
 
           corrected_URI.path = (char *)corrected_url;
-          *corrected_url = svn_uri_canonicalize(
-                              apr_uri_unparse(scratch_pool, &corrected_URI, 0),
-                              result_pool);
+          *corrected_url = apr_uri_unparse(result_pool, &corrected_URI, 0);
         }
 
       return SVN_NO_ERROR;

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=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_ra_serf/util.c Fri Sep 20 11:18:26 2019
@@ -1116,19 +1116,17 @@ response_get_location(serf_bucket_t *res
         return NULL;
 
       /* Replace the path path with what we got */
-      uri.path = (char*)svn_urlpath__canonicalize(location, scratch_pool);
+      uri.path = apr_pstrdup(scratch_pool, location);
 
       /* And make APR produce a proper full url for us */
-      location = apr_uri_unparse(scratch_pool, &uri, 0);
-
-      /* Fall through to ensure our canonicalization rules */
+      return apr_uri_unparse(result_pool, &uri, 0);
     }
   else if (!svn_path_is_url(location))
     {
       return NULL; /* Any other formats we should support? */
     }
 
-  return svn_uri_canonicalize(location, result_pool);
+  return apr_pstrdup(result_pool, location);
 }
 
 

Modified: subversion/branches/swig-py3/subversion/libsvn_repos/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_repos/commit.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_repos/commit.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_repos/commit.c Fri Sep 20 11:18:26 2019
@@ -306,13 +306,14 @@ add_file_or_directory(const char *path,
   struct edit_baton *eb = pb->edit_baton;
   apr_pool_t *subpool = svn_pool_create(pool);
   svn_boolean_t was_copied = FALSE;
-  const char *full_path;
+  const char *full_path, *canonicalized_path;
 
   /* Reject paths which contain control characters (related to issue #4340). */
   SVN_ERR(svn_path_check_valid(path, pool));
 
-  full_path = svn_fspath__join(eb->base_path,
-                               svn_relpath_canonicalize(path, pool), pool);
+  SVN_ERR(svn_relpath_canonicalize_safe(&canonicalized_path, NULL, path,
+                                        pool, pool));
+  full_path = svn_fspath__join(eb->base_path, canonicalized_path, pool);
 
   /* Sanity check. */
   if (copy_path && (! SVN_IS_VALID_REVNUM(copy_revision)))
@@ -477,10 +478,11 @@ delete_entry(const char *path,
   struct edit_baton *eb = parent->edit_baton;
   svn_node_kind_t kind;
   svn_repos_authz_access_t required = svn_authz_write;
-  const char *full_path;
+  const char *full_path, *canonicalized_path;
 
-  full_path = svn_fspath__join(eb->base_path,
-                               svn_relpath_canonicalize(path, pool), pool);
+  SVN_ERR(svn_relpath_canonicalize_safe(&canonicalized_path, NULL, path,
+                                        pool, pool));
+  full_path = svn_fspath__join(eb->base_path, canonicalized_path, pool);
 
   /* Check PATH in our transaction.  */
   SVN_ERR(svn_fs_check_path(&kind, eb->txn_root, full_path, pool));
@@ -538,10 +540,11 @@ open_directory(const char *path,
   struct dir_baton *pb = parent_baton;
   struct edit_baton *eb = pb->edit_baton;
   svn_node_kind_t kind;
-  const char *full_path;
+  const char *full_path, *canonicalized_path;
 
-  full_path = svn_fspath__join(eb->base_path,
-                               svn_relpath_canonicalize(path, pool), pool);
+  SVN_ERR(svn_relpath_canonicalize_safe(&canonicalized_path, NULL, path,
+                                        pool, pool));
+  full_path = svn_fspath__join(eb->base_path, canonicalized_path, pool);
 
   /* Check PATH in our transaction.  If it does not exist,
      return a 'Path not present' error. */
@@ -611,10 +614,11 @@ open_file(const char *path,
   struct edit_baton *eb = pb->edit_baton;
   svn_revnum_t cr_rev;
   apr_pool_t *subpool = svn_pool_create(pool);
-  const char *full_path;
+  const char *full_path, *canonicalized_path;
 
-  full_path = svn_fspath__join(eb->base_path,
-                               svn_relpath_canonicalize(path, pool), pool);
+  SVN_ERR(svn_relpath_canonicalize_safe(&canonicalized_path, NULL, path,
+                                        pool, pool));
+  full_path = svn_fspath__join(eb->base_path, canonicalized_path, pool);
 
   /* Check for read authorization. */
   SVN_ERR(check_authz(eb, full_path, eb->txn_root,

Modified: subversion/branches/swig-py3/subversion/libsvn_repos/delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_repos/delta.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_repos/delta.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_repos/delta.c Fri Sep 20 11:18:26 2019
@@ -215,7 +215,7 @@ svn_repos_dir_delta2(svn_fs_root_t *src_
 {
   void *root_baton = NULL;
   struct context c;
-  const char *src_fullpath;
+  const char *src_fullpath, *canonicalized_path;
   svn_node_kind_t src_kind, tgt_kind;
   svn_revnum_t rootrev;
   svn_fs_node_relation_t relation;
@@ -223,14 +223,22 @@ svn_repos_dir_delta2(svn_fs_root_t *src_
 
   /* SRC_PARENT_DIR must be valid. */
   if (src_parent_dir)
-    src_parent_dir = svn_relpath_canonicalize(src_parent_dir, pool);
+    {
+      SVN_ERR(svn_relpath_canonicalize_safe(&canonicalized_path, NULL,
+                                            src_parent_dir, pool, pool));
+      src_parent_dir = canonicalized_path;
+    }
   else
     return svn_error_create(SVN_ERR_FS_NOT_DIRECTORY, 0,
                             "Invalid source parent directory '(null)'");
 
   /* TGT_FULLPATH must be valid. */
   if (tgt_fullpath)
-    tgt_fullpath = svn_relpath_canonicalize(tgt_fullpath, pool);
+    {
+      SVN_ERR(svn_relpath_canonicalize_safe(&canonicalized_path, NULL,
+                                            tgt_fullpath, pool, pool));
+      tgt_fullpath = canonicalized_path;
+    }
   else
     return svn_error_create(SVN_ERR_FS_PATH_SYNTAX, 0,
                             _("Invalid target path"));

Modified: subversion/branches/swig-py3/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_repos/dump.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_repos/dump.c Fri Sep 20 11:18:26 2019
@@ -738,8 +738,9 @@ struct dir_baton
    or NULL if this is the top-level directory of the edit.
 
    Perform all allocations in POOL.  */
-static struct dir_baton *
-make_dir_baton(const char *path,
+static struct svn_error_t *
+make_dir_baton(struct dir_baton **dbp,
+               const char *path,
                const char *cmp_path,
                svn_revnum_t cmp_rev,
                void *edit_baton,
@@ -748,10 +749,10 @@ make_dir_baton(const char *path,
 {
   struct edit_baton *eb = edit_baton;
   struct dir_baton *new_db = apr_pcalloc(pool, sizeof(*new_db));
-  const char *full_path;
+  const char *full_path, *canonicalized_path;
 
   /* A path relative to nothing?  I don't think so. */
-  SVN_ERR_ASSERT_NO_RETURN(!path || pb);
+  SVN_ERR_ASSERT(!path || pb);
 
   /* Construct the full path of this node. */
   if (pb)
@@ -761,7 +762,11 @@ make_dir_baton(const char *path,
 
   /* Remove leading slashes from copyfrom paths. */
   if (cmp_path)
-    cmp_path = svn_relpath_canonicalize(cmp_path, pool);
+    {
+      SVN_ERR(svn_relpath_canonicalize_safe(&canonicalized_path, NULL,
+                                            cmp_path, pool, pool));
+      cmp_path = canonicalized_path;
+    }
 
   new_db->edit_baton = eb;
   new_db->path = full_path;
@@ -772,7 +777,8 @@ make_dir_baton(const char *path,
   new_db->check_name_collision = FALSE;
   new_db->pool = pool;
 
-  return new_db;
+  *dbp = new_db;
+  return SVN_NO_ERROR;
 }
 
 static svn_error_t *
@@ -1168,7 +1174,12 @@ dump_node(struct edit_baton *eb,
 
   /* Remove leading slashes from copyfrom paths. */
   if (cmp_path)
-    cmp_path = svn_relpath_canonicalize(cmp_path, pool);
+    {
+      const char *canonicalized_path;
+      SVN_ERR(svn_relpath_canonicalize_safe(&canonicalized_path, NULL,
+                                            cmp_path, pool, pool));
+      cmp_path = canonicalized_path;
+    }
 
   /* Validate the comparison path/rev. */
   if (ARE_VALID_COPY_ARGS(cmp_path, cmp_rev))
@@ -1538,9 +1549,9 @@ open_root(void *edit_baton,
           apr_pool_t *pool,
           void **root_baton)
 {
-  *root_baton = make_dir_baton(NULL, NULL, SVN_INVALID_REVNUM,
-                               edit_baton, NULL, pool);
-  return SVN_NO_ERROR;
+  return svn_error_trace(make_dir_baton((struct dir_baton **)root_baton,
+                                        NULL, NULL, SVN_INVALID_REVNUM,
+                                        edit_baton, NULL, pool));
 }
 
 
@@ -1572,8 +1583,10 @@ add_directory(const char *path,
   struct edit_baton *eb = pb->edit_baton;
   void *was_deleted;
   svn_boolean_t is_copy = FALSE;
-  struct dir_baton *new_db
-    = make_dir_baton(path, copyfrom_path, copyfrom_rev, eb, pb, pool);
+  struct dir_baton *new_db;
+
+  SVN_ERR(make_dir_baton(&new_db, path, copyfrom_path, copyfrom_rev, eb,
+                         pb, pool));
 
   /* This might be a replacement -- is the path already deleted? */
   was_deleted = svn_hash_gets(pb->deleted_entries, path);
@@ -1630,7 +1643,7 @@ open_directory(const char *path,
       cmp_rev = pb->cmp_rev;
     }
 
-  new_db = make_dir_baton(path, cmp_path, cmp_rev, eb, pb, pool);
+  SVN_ERR(make_dir_baton(&new_db, path, cmp_path, cmp_rev, eb, pb, pool));
   *child_baton = new_db;
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/swig-py3/subversion/libsvn_repos/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_repos/dump_editor.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_repos/dump_editor.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_repos/dump_editor.c Fri Sep 20 11:18:26 2019
@@ -178,8 +178,9 @@ struct dump_edit_baton {
  * this is the top-level directory of the edit.
  *
  * Perform all allocations in POOL.  */
-static struct dir_baton *
-make_dir_baton(const char *path,
+static struct svn_error_t *
+make_dir_baton(struct dir_baton **dbp,
+               const char *path,
                const char *copyfrom_path,
                svn_revnum_t copyfrom_rev,
                void *edit_baton,
@@ -192,7 +193,8 @@ make_dir_baton(const char *path,
 
   /* Construct the full path of this node. */
   if (pb)
-    repos_relpath = svn_relpath_canonicalize(path, pool);
+    SVN_ERR(svn_relpath_canonicalize_safe(&repos_relpath, NULL, path,
+                                          pool, pool));
   else
     repos_relpath = "";
 
@@ -213,7 +215,8 @@ make_dir_baton(const char *path,
   new_db->deleted_props = apr_hash_make(pool);
   new_db->deleted_entries = apr_hash_make(pool);
 
-  return new_db;
+  *dbp = new_db;
+  return SVN_NO_ERROR;
 }
 
 /* Make a file baton to represent the directory at PATH (relative to
@@ -577,8 +580,8 @@ open_root(void *edit_baton,
             {
               /* ... but for the source directory itself, we'll defer
                  to letting the typical plumbing handle this task. */
-              new_db = make_dir_baton(NULL, NULL, SVN_INVALID_REVNUM,
-                                      edit_baton, NULL, pool);
+              SVN_ERR(make_dir_baton(&new_db, NULL, NULL, SVN_INVALID_REVNUM,
+                                     edit_baton, NULL, pool));
               SVN_ERR(dump_node(&new_db->headers,
                                 eb, new_db->repos_relpath, new_db,
                                 NULL, svn_node_action_add, FALSE,
@@ -594,8 +597,8 @@ open_root(void *edit_baton,
 
   if (! new_db)
     {
-      new_db = make_dir_baton(NULL, NULL, SVN_INVALID_REVNUM,
-                              edit_baton, NULL, pool);
+      SVN_ERR(make_dir_baton(&new_db, NULL, NULL, SVN_INVALID_REVNUM,
+                             edit_baton, NULL, pool));
     }
 
   *root_baton = new_db;
@@ -636,8 +639,8 @@ add_directory(const char *path,
 
   SVN_ERR(dump_pending_dir(pb->eb, pool));
 
-  new_db = make_dir_baton(path, copyfrom_path, copyfrom_rev, pb->eb,
-                          pb, pb->pool);
+  SVN_ERR(make_dir_baton(&new_db, path, copyfrom_path, copyfrom_rev, pb->eb,
+                         pb, pb->pool));
 
   /* This might be a replacement -- is the path already deleted? */
   was_deleted = svn_hash_gets(pb->deleted_entries, path);
@@ -690,8 +693,8 @@ open_directory(const char *path,
       copyfrom_rev = pb->copyfrom_rev;
     }
 
-  new_db = make_dir_baton(path, copyfrom_path, copyfrom_rev, pb->eb, pb,
-                          pb->pool);
+  SVN_ERR(make_dir_baton(&new_db, path, copyfrom_path, copyfrom_rev,
+                         pb->eb, pb, pb->pool));
 
   *child_baton = new_db;
   return SVN_NO_ERROR;

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=1867214&r1=1867213&r2=1867214&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 Fri Sep 20 11:18:26 2019
@@ -213,9 +213,11 @@ prefix_mergeinfo_paths(svn_string_t **me
     {
       const char *merge_source = apr_hash_this_key(hi);
       svn_rangelist_t *rangelist = apr_hash_this_val(hi);
-      const char *path;
+      const char *path, *canonicalized_path;
 
-      merge_source = svn_relpath_canonicalize(merge_source, pool);
+      SVN_ERR(svn_relpath_canonicalize_safe(&canonicalized_path, NULL,
+                                       merge_source, pool, pool));
+      merge_source = canonicalized_path;
 
       /* The svn:mergeinfo property syntax demands a repos abspath */
       path = svn_fspath__canonicalize(svn_relpath_join(parent_dir,
@@ -377,7 +379,10 @@ make_node_baton(struct node_baton **node
   /* Then add info from the headers.  */
   if ((val = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_PATH)))
   {
-    val = svn_relpath_canonicalize(val, pool);
+    const char *canonicalized_path;
+    SVN_ERR(svn_relpath_canonicalize_safe(&canonicalized_path, NULL,
+                                          val, pool, pool));
+    val = canonicalized_path;
     if (rb->pb->parent_dir)
       nb->path = svn_relpath_join(rb->pb->parent_dir, val, pool);
     else
@@ -1202,7 +1207,12 @@ svn_repos_get_fs_build_parser6(const svn
   struct parse_baton *pb = apr_pcalloc(pool, sizeof(*pb));
 
   if (parent_dir)
-    parent_dir = svn_relpath_canonicalize(parent_dir, pool);
+    {
+      const char *canonicalized_path;
+      SVN_ERR(svn_relpath_canonicalize_safe(&canonicalized_path, NULL,
+                                            parent_dir, pool, pool));
+      parent_dir = canonicalized_path;
+    }
 
   SVN_ERR_ASSERT((SVN_IS_VALID_REVNUM(start_rev) &&
                   SVN_IS_VALID_REVNUM(end_rev))

Modified: subversion/branches/swig-py3/subversion/libsvn_repos/load.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_repos/load.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_repos/load.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_repos/load.c Fri Sep 20 11:18:26 2019
@@ -355,24 +355,62 @@ parse_text_block(svn_stream_t *stream,
 
 
 
-/* Parse VERSIONSTRING and verify that we support the dumpfile format
-   version number, setting *VERSION appropriately. */
+/* Parse VERSIONSTRING from STREAM and verify that we support the dumpfile
+   format version number, setting *VERSION appropriately. */
 static svn_error_t *
 parse_format_version(int *version,
-                     const char *versionstring)
+                     svn_stream_t *stream,
+                     apr_pool_t *scratch_pool)
 {
   static const int magic_len = sizeof(SVN_REPOS_DUMPFILE_MAGIC_HEADER) - 1;
-  const char *p = strchr(versionstring, ':');
+  svn_stringbuf_t *linebuf;
+  const char *p;
   int value;
 
+  /* No svn_stream_readline() here, because malformed streams may not have
+     the EOL at all, and currently svn_stream_readline() keeps loading the
+     whole thing into memory until it encounters an EOL or the stream ends.
+     This is particularly troublesome, because users may incorrectly attempt
+     to load arbitrary large files instread of proper dump files.
+
+     As a workaround, parse the first line with a length limit.  While this
+     is not a complete solution, doing so handles the common case described
+     above.  For a complete solution, svn_stream_readline() may need to grow
+     a `limit` argument that would allow us to safely use it everywhere within
+     this parser.
+   */
+  linebuf = svn_stringbuf_create_empty(scratch_pool);
+  while (1)
+    {
+      apr_size_t len;
+      char c;
+
+      len = 1;
+      SVN_ERR(svn_stream_read_full(stream, &c, &len));
+      if (len != 1)
+        return stream_ran_dry();
+
+      if (c == '\n')
+        break;
+
+      if (linebuf->len + 1 > 80)
+        return svn_error_createf(SVN_ERR_STREAM_MALFORMED_DATA, NULL,
+                                 _("Malformed dumpfile header '%s'"),
+                                 linebuf->data);
+
+      svn_stringbuf_appendbyte(linebuf, c);
+    }
+
+  p = strchr(linebuf->data, ':');
+
   if (p == NULL
-      || p != (versionstring + magic_len)
-      || strncmp(versionstring,
+      || p != (linebuf->data + magic_len)
+      || strncmp(linebuf->data,
                  SVN_REPOS_DUMPFILE_MAGIC_HEADER,
                  magic_len))
     return svn_error_createf(SVN_ERR_STREAM_MALFORMED_DATA, NULL,
                              _("Malformed dumpfile header '%s'"),
-                             versionstring);
+                             linebuf->data);
 
   SVN_ERR(svn_cstring_atoi(&value, p + 1));
 
@@ -542,14 +580,10 @@ svn_repos_parse_dumpstream3(svn_stream_t
   parse_fns = complete_vtable(parse_fns, pool);
 
   /* Start parsing process. */
-  SVN_ERR(svn_stream_readline(stream, &linebuf, "\n", &eof, linepool));
-  if (eof)
-    return stream_ran_dry();
-
   /* The first two lines of the stream are the dumpfile-format version
      number, and a blank line.  To preserve backward compatibility,
      don't assume the existence of newer parser-vtable functions. */
-  SVN_ERR(parse_format_version(&version, linebuf->data));
+  SVN_ERR(parse_format_version(&version, stream, linepool));
   if (parse_fns->magic_header_record != NULL)
     SVN_ERR(parse_fns->magic_header_record(version, parse_baton, pool));
 

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=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/io.c Fri Sep 20 11:18:26 2019
@@ -4491,7 +4491,45 @@ win32_file_rename(const WCHAR *from_path
     }
 
   if (!MoveFileExW(from_path_w, to_path_w, flags))
-      return apr_get_os_error();
+    {
+      apr_status_t err = apr_get_os_error();
+      /* If the target file is read only NTFS reports EACCESS and
+         FAT/FAT32 reports EEXIST */
+      if (APR_STATUS_IS_EACCES(err) || APR_STATUS_IS_EEXIST(err))
+        {
+          DWORD attrs = GetFileAttributesW(to_path_w);
+          if (attrs == INVALID_FILE_ATTRIBUTES)
+            {
+              apr_status_t stat_err = apr_get_os_error();
+              if (!(APR_STATUS_IS_ENOENT(stat_err) || SVN__APR_STATUS_IS_ENOTDIR(stat_err)))
+                /* We failed to stat the file, propagate the original error */
+                return err;
+            }
+          else if (attrs & FILE_ATTRIBUTE_READONLY)
+            {
+              /* Try to set the destination file writable because Windows will
+                 not allow us to rename when to_path is read-only, but will
+                 allow renaming when from_path is read only. */
+              attrs &= ~FILE_ATTRIBUTE_READONLY;
+              if (!SetFileAttributesW(to_path_w, attrs))
+                {
+                  err = apr_get_os_error();
+                  if (!(APR_STATUS_IS_ENOENT(err) || SVN__APR_STATUS_IS_ENOTDIR(err)))
+                    /* We failed to set file attributes, propagate this new error */
+                    return err;
+                }
+            }
+
+          /* NOTE: If the file is not read-only, we don't know if the file did
+             not have the read-only attribute in the first place or if this
+             attribute disappeared due to a race, so try to rename it anyway.
+           */
+          if (!MoveFileExW(from_path_w, to_path_w, flags))
+            return apr_get_os_error();
+        }
+      else
+        return err;
+    }
 
   return APR_SUCCESS;
 }
@@ -4515,18 +4553,6 @@ svn_io_file_rename2(const char *from_pat
   SVN_ERR(svn_io__utf8_to_unicode_longpath(&from_path_w, from_path_apr, pool));
   SVN_ERR(svn_io__utf8_to_unicode_longpath(&to_path_w, to_path_apr, pool));
   status = win32_file_rename(from_path_w, to_path_w, flush_to_disk);
-
-  /* If the target file is read only NTFS reports EACCESS and
-     FAT/FAT32 reports EEXIST */
-  if (APR_STATUS_IS_EACCES(status) || APR_STATUS_IS_EEXIST(status))
-    {
-      /* Set the destination file writable because Windows will not
-         allow us to rename when to_path is read-only, but will
-         allow renaming when from_path is read only. */
-      SVN_ERR(svn_io_set_file_read_write(to_path, TRUE, pool));
-
-      status = win32_file_rename(from_path_w, to_path_w, flush_to_disk);
-    }
   WIN32_RETRY_LOOP(status, win32_file_rename(from_path_w, to_path_w,
                                              flush_to_disk));
 #elif defined(__OS2__)

Modified: subversion/branches/swig-py3/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/opt.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/opt.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/opt.c Fri Sep 20 11:18:26 2019
@@ -211,12 +211,16 @@ svn_opt_subcommand_takes_option4(const s
 
 /* Print the canonical command name for CMD, and all its aliases, to
    STREAM.  If HELP is set, print CMD's help string too, in which case
-   obtain option usage from OPTIONS_TABLE. */
+   obtain option usage from OPTIONS_TABLE.
+
+   Include global and experimental options iff VERBOSE is true.
+ */
 static svn_error_t *
 print_command_info3(const svn_opt_subcommand_desc3_t *cmd,
                     const apr_getopt_option_t *options_table,
                     const int *global_options,
                     svn_boolean_t help,
+                    svn_boolean_t verbose,
                     apr_pool_t *pool,
                     FILE *stream)
 {
@@ -251,6 +255,7 @@ print_command_info3(const svn_opt_subcom
       const apr_getopt_option_t *option;
       const char *long_alias;
       svn_boolean_t have_options = FALSE;
+      svn_boolean_t have_experimental = FALSE;
 
       SVN_ERR(svn_cmdline_fprintf(stream, pool, ": "));
 
@@ -279,6 +284,17 @@ print_command_info3(const svn_opt_subcom
               if (option && option->description)
                 {
                   const char *optstr;
+
+                  if (option->name && strncmp(option->name, "x-", 2) == 0)
+                    {
+                      if (verbose && !have_experimental)
+                        SVN_ERR(svn_cmdline_fputs(_("\nExperimental options:\n"),
+                                                  stream, pool));
+                      have_experimental = TRUE;
+                      if (!verbose)
+                        continue;
+                    }
+
                   format_option(&optstr, option, long_alias, TRUE, pool);
                   SVN_ERR(svn_cmdline_fprintf(stream, pool, "  %s\n",
                                               optstr));
@@ -286,7 +302,7 @@ print_command_info3(const svn_opt_subcom
             }
         }
       /* And global options too */
-      if (global_options && *global_options)
+      if (verbose && global_options && *global_options)
         {
           SVN_ERR(svn_cmdline_fputs(_("\nGlobal options:\n"),
                                     stream, pool));
@@ -310,6 +326,9 @@ print_command_info3(const svn_opt_subcom
             }
         }
 
+      if (!verbose)
+        SVN_ERR(svn_cmdline_fputs(_("\n(Use '-v' to show global and experimental options.)\n"),
+                                  stream, pool));
       if (have_options)
         SVN_ERR(svn_cmdline_fprintf(stream, pool, "\n"));
     }
@@ -324,23 +343,37 @@ print_generic_help_body3(const char *hea
                          const svn_opt_subcommand_desc3_t *cmd_table,
                          const apr_getopt_option_t *opt_table,
                          const char *footer,
+                         svn_boolean_t with_experimental,
                          apr_pool_t *pool, FILE *stream)
 {
-  int i = 0;
+  svn_boolean_t have_experimental = FALSE;
+  int i;
 
   if (header)
     SVN_ERR(svn_cmdline_fputs(header, stream, pool));
 
-  while (cmd_table[i].name)
+  for (i = 0; cmd_table[i].name; i++)
     {
+      if (strncmp(cmd_table[i].name, "x-", 2) == 0)
+        {
+          if (with_experimental && !have_experimental)
+            SVN_ERR(svn_cmdline_fputs(_("\nExperimental subcommands:\n"),
+                                      stream, pool));
+          have_experimental = TRUE;
+          if (!with_experimental)
+            continue;
+        }
       SVN_ERR(svn_cmdline_fputs("   ", stream, pool));
       SVN_ERR(print_command_info3(cmd_table + i, opt_table,
-                                  NULL, FALSE,
+                                  NULL, FALSE, FALSE,
                                   pool, stream));
       SVN_ERR(svn_cmdline_fputs("\n", stream, pool));
-      i++;
     }
 
+  if (have_experimental && !with_experimental)
+    SVN_ERR(svn_cmdline_fputs(_("\n(Use '-v' to show experimental subcommands.)\n"),
+                              stream, pool));
+
   SVN_ERR(svn_cmdline_fputs("\n", stream, pool));
 
   if (footer)
@@ -349,17 +382,19 @@ print_generic_help_body3(const char *hea
   return SVN_NO_ERROR;
 }
 
-void
-svn_opt_print_generic_help3(const char *header,
-                            const svn_opt_subcommand_desc3_t *cmd_table,
-                            const apr_getopt_option_t *opt_table,
-                            const char *footer,
-                            apr_pool_t *pool, FILE *stream)
+static void
+print_generic_help(const char *header,
+                   const svn_opt_subcommand_desc3_t *cmd_table,
+                   const apr_getopt_option_t *opt_table,
+                   const char *footer,
+                   svn_boolean_t with_experimental,
+                   apr_pool_t *pool, FILE *stream)
 {
   svn_error_t *err;
 
-  err = print_generic_help_body3(header, cmd_table, opt_table, footer, pool,
-                                 stream);
+  err = print_generic_help_body3(header, cmd_table, opt_table, footer,
+                                 with_experimental,
+                                 pool, stream);
 
   /* Issue #3014:
    * Don't print anything on broken pipes. The pipe was likely
@@ -373,13 +408,29 @@ svn_opt_print_generic_help3(const char *
   svn_error_clear(err);
 }
 
-
 void
-svn_opt_subcommand_help4(const char *subcommand,
-                         const svn_opt_subcommand_desc3_t *table,
-                         const apr_getopt_option_t *options_table,
-                         const int *global_options,
-                         apr_pool_t *pool)
+svn_opt_print_generic_help3(const char *header,
+                            const svn_opt_subcommand_desc3_t *cmd_table,
+                            const apr_getopt_option_t *opt_table,
+                            const char *footer,
+                            apr_pool_t *pool, FILE *stream)
+{
+  print_generic_help(header, cmd_table, opt_table, footer,
+                     TRUE, pool, stream);
+}
+
+
+/* The body of svn_opt_subcommand_help4(), which see.
+ *
+ * VERBOSE means show also the subcommand's global and experimental options.
+ */
+static void
+subcommand_help(const char *subcommand,
+                const svn_opt_subcommand_desc3_t *table,
+                const apr_getopt_option_t *options_table,
+                const int *global_options,
+                svn_boolean_t verbose,
+                apr_pool_t *pool)
 {
   const svn_opt_subcommand_desc3_t *cmd =
     svn_opt_get_canonical_subcommand3(table, subcommand);
@@ -387,7 +438,7 @@ svn_opt_subcommand_help4(const char *sub
 
   if (cmd)
     err = print_command_info3(cmd, options_table, global_options,
-                              TRUE, pool, stdout);
+                              TRUE, verbose, pool, stdout);
   else
     err = svn_cmdline_fprintf(stderr, pool,
                               _("\"%s\": unknown command.\n\n"), subcommand);
@@ -400,6 +451,17 @@ svn_opt_subcommand_help4(const char *sub
   }
 }
 
+void
+svn_opt_subcommand_help4(const char *subcommand,
+                         const svn_opt_subcommand_desc3_t *table,
+                         const apr_getopt_option_t *options_table,
+                         const int *global_options,
+                         apr_pool_t *pool)
+{
+  subcommand_help(subcommand, table, options_table, global_options,
+                  TRUE, pool);
+}
+
 
 
 /*** Parsing revision and date options. ***/
@@ -1185,9 +1247,9 @@ svn_opt_print_help5(apr_getopt_t *os,
 
       for (i = 0; i < targets->nelts; i++)
         {
-          svn_opt_subcommand_help4(APR_ARRAY_IDX(targets, i, const char *),
-                                   cmd_table, option_table,
-                                   global_options, pool);
+          subcommand_help(APR_ARRAY_IDX(targets, i, const char *),
+                          cmd_table, option_table, global_options,
+                          verbose, pool);
         }
     }
   else if (print_version)   /* just --version */
@@ -1197,12 +1259,9 @@ svn_opt_print_help5(apr_getopt_t *os,
                                           quiet, verbose, pool));
     }
   else if (os && !targets->nelts)            /* `-h', `--help', or `help' */
-    svn_opt_print_generic_help3(header,
-                                cmd_table,
-                                option_table,
-                                footer,
-                                pool,
-                                stdout);
+    print_generic_help(header, cmd_table, option_table, footer,
+                       verbose,
+                       pool, stdout);
   else                                       /* unknown option or cmd */
     SVN_ERR(svn_cmdline_fprintf(stderr, pool,
                                 _("Type '%s help' for usage.\n"), pgm_name));

Modified: subversion/branches/swig-py3/subversion/libsvn_subr/sqlite3wrapper.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/sqlite3wrapper.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/sqlite3wrapper.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/sqlite3wrapper.c Fri Sep 20 11:18:26 2019
@@ -25,6 +25,8 @@
 /* Include sqlite3 inline, making all symbols private. */
 #ifdef SVN_SQLITE_INLINE
 #  define SQLITE_OMIT_DEPRECATED 1
+#  define SQLITE_DEFAULT_MEMSTATUS 0
+#  define SQLITE_OMIT_WAL 1
 #  define SQLITE_API static
 #  if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
 #    pragma GCC diagnostic ignored "-Wunreachable-code"

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=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/stream.c Fri Sep 20 11:18:26 2019
@@ -922,7 +922,7 @@ readline_apr_lf(apr_file_t *file,
       }
 
     /* Otherwise, prepare to read the next chunk. */
-    svn_stringbuf_ensure(buf, buf->blocksize + SVN__LINE_CHUNK_SIZE);
+    svn_stringbuf_ensure(buf, buf->len + SVN__LINE_CHUNK_SIZE);
   }
 }
 
@@ -982,7 +982,7 @@ readline_apr_generic(apr_file_t *file,
         }
 
       /* Prepare to read the next chunk. */
-      svn_stringbuf_ensure(buf, buf->blocksize + SVN__LINE_CHUNK_SIZE);
+      svn_stringbuf_ensure(buf, buf->len + SVN__LINE_CHUNK_SIZE);
     }
 }
 

Modified: subversion/branches/swig-py3/subversion/libsvn_subr/win32_crypto.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_subr/win32_crypto.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_subr/win32_crypto.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_subr/win32_crypto.c Fri Sep 20 11:18:26 2019
@@ -395,16 +395,29 @@ windows_validate_certificate(svn_boolean
       memset(&chain_para, 0, sizeof(chain_para));
       chain_para.cbSize = sizeof(chain_para);
 
+      /* Don't hit the wire for URL based objects and revocation checks, as
+         that may cause stalls, network timeouts or spurious errors in cases
+         such as with the remote OCSP and CRL endpoints being inaccessible or
+         unreliable.
+
+         For this particular case of the SVN_AUTH_SSL_UNKNOWNCA cert failure
+         override we should be okay with just the data that we have immediately
+         available on the local machine.
+       */
       if (CertGetCertificateChain(NULL, cert_context, NULL, NULL, &chain_para,
                                   CERT_CHAIN_CACHE_END_CERT |
-                                  CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT,
+                                  CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL |
+                                  CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT |
+                                  CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY,
                                   NULL, &chain_context))
         {
           CERT_CHAIN_POLICY_PARA policy_para;
           CERT_CHAIN_POLICY_STATUS policy_status;
 
           policy_para.cbSize = sizeof(policy_para);
-          policy_para.dwFlags = 0;
+          /* We only use the local data for revocation checks, so they may
+             fail with errors like CRYPT_E_REVOCATION_OFFLINE; ignore those. */
+          policy_para.dwFlags = CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS;
           policy_para.pvExtraPolicyPara = NULL;
 
           policy_status.cbSize = sizeof(policy_status);

Modified: subversion/branches/swig-py3/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_wc/diff_local.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_wc/diff_local.c Fri Sep 20 11:18:26 2019
@@ -490,7 +490,7 @@ svn_wc__diff7(svn_boolean_t anchor_at_gi
       SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelist_filter,
                                          result_pool));
       diff_processor = svn_wc__changelist_filter_tree_processor_create(
-                         diff_processor, wc_ctx, local_abspath,
+                         diff_processor, wc_ctx, eb.anchor_abspath,
                          changelist_hash, result_pool);
     }
 

Modified: subversion/branches/swig-py3/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/mod_dav_svn/mod_dav_svn.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/swig-py3/subversion/mod_dav_svn/mod_dav_svn.c Fri Sep 20 11:18:26 2019
@@ -292,10 +292,14 @@ merge_dir_config(apr_pool_t *p, void *ba
   if (parent->fs_path)
     ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
                  "mod_dav_svn: Location '%s' hinders access to '%s' "
-                 "in parent SVNPath Location '%s'",
+                 "in parent SVNPath Location '%s'%s",
                  child->root_dir,
                  svn_urlpath__skip_ancestor(parent->root_dir, child->root_dir),
-                 parent->root_dir);
+                 parent->root_dir,
+                 (strcmp(child->root_dir, parent->root_dir) == 0)
+                   ? " (or the subversion-specific configuration"
+                     " is included twice into httpd.conf)"
+                   : "");
 
   return newconf;
 }

Modified: subversion/branches/swig-py3/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/mod_dav_svn/repos.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/swig-py3/subversion/mod_dav_svn/repos.c Fri Sep 20 11:18:26 2019
@@ -2514,6 +2514,14 @@ get_resource(request_rec *r,
   /* capture warnings during cleanup of the FS */
   svn_fs_set_warning_func(repos->fs, log_warning_req, r);
 
+  /* We must degrade the logging context when the request is freed. */
+  cleanup_req_logging_baton =
+    apr_pcalloc(r->pool, sizeof(*cleanup_req_logging_baton));
+  cleanup_req_logging_baton->fs = repos->fs;
+  cleanup_req_logging_baton->connection = r->connection;
+  apr_pool_pre_cleanup_register(r->pool, cleanup_req_logging_baton,
+                                cleanup_req_logging);
+
   /* if an authenticated username is present, attach it to the FS */
   if (r->user)
     {
@@ -2529,14 +2537,6 @@ get_resource(request_rec *r,
       apr_pool_cleanup_register(r->pool, cleanup_baton, cleanup_fs_access,
                                 apr_pool_cleanup_null);
 
-      /* We must degrade the logging context when the request is freed. */
-      cleanup_req_logging_baton =
-        apr_pcalloc(r->pool, sizeof(*cleanup_req_logging_baton));
-      cleanup_req_logging_baton->fs = repos->fs;
-      cleanup_req_logging_baton->connection = r->connection;
-      apr_pool_pre_cleanup_register(r->pool, cleanup_req_logging_baton,
-                                    cleanup_req_logging);
-
       /* Create an access context based on the authenticated username. */
       serr = svn_fs_create_access(&access_ctx, r->user, r->pool);
       if (serr)
@@ -3139,6 +3139,50 @@ seek_stream(dav_stream *stream, apr_off_
        && resource->baselined))
 
 
+/* Return the last modification time of RESOURCE, or -1 if the DAV
+   resource type is not handled, or if an error occurs.  Temporary
+   allocations are made from RESOURCE->POOL. */
+static apr_time_t
+get_last_modified(const dav_resource *resource)
+{
+  apr_time_t last_modified;
+  svn_error_t *serr;
+  svn_revnum_t created_rev;
+  svn_string_t *date_time;
+
+  if (RESOURCE_LACKS_ETAG_POTENTIAL(resource))
+    return -1;
+
+  if ((serr = svn_fs_node_created_rev(&created_rev, resource->info->root.root,
+                                      resource->info->repos_path,
+                                      resource->pool)))
+    {
+      svn_error_clear(serr);
+      return -1;
+    }
+
+  if ((serr = svn_fs_revision_prop2(&date_time, resource->info->repos->fs,
+                                    created_rev, SVN_PROP_REVISION_DATE,
+                                    TRUE, resource->pool, resource->pool)))
+    {
+      svn_error_clear(serr);
+      return -1;
+    }
+
+  if (date_time == NULL || date_time->data == NULL)
+    return -1;
+
+  if ((serr = svn_time_from_cstring(&last_modified, date_time->data,
+                                    resource->pool)))
+    {
+      svn_error_clear(serr);
+      return -1;
+    }
+
+  return last_modified;
+}
+
+
 const char *
 dav_svn__getetag(const dav_resource *resource, apr_pool_t *pool)
 {
@@ -3219,6 +3263,23 @@ set_headers(request_rec *r, const dav_re
   if (!resource->exists)
     return NULL;
 
+  if ((resource->type == DAV_RESOURCE_TYPE_REGULAR) 
+      && (resource->info->repos_path == resource->info->uri_path->data))
+    {
+      /* Include Last-Modified header for 'external' GET or HEAD requests
+         (i.e. requests to URI's not under /!svn), to support usage of an
+         SVN server as a file server, where the client needs timestamps
+         for instance to use as "last modification time" of files on disk. */
+      const apr_time_t last_modified = get_last_modified(resource);
+      if (last_modified != -1)
+        {
+          /* Note the modification time for the requested resource, and
+             include the Last-Modified header in the response. */
+          ap_update_mtime(r, last_modified);
+          ap_set_last_modified(r);
+        }  
+    }
+
   /* generate our etag and place it into the output */
   apr_table_setn(r->headers_out, "ETag",
                  dav_svn__getetag(resource, resource->pool));

Modified: subversion/branches/swig-py3/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/svn/svn.c?rev=1867214&r1=1867213&r2=1867214&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/svn/svn.c (original)
+++ subversion/branches/swig-py3/subversion/svn/svn.c Fri Sep 20 11:18:26 2019
@@ -828,7 +828,8 @@ const svn_opt_subcommand_desc3_t svn_cl_
      "Describe the usage of this program or its subcommands.\n"
      "usage: help [SUBCOMMAND...]\n"
     )},
-    {0} },
+    {'v'},
+    {{'v', N_("also show experimental subcommands and options")}} },
   /* This command is also invoked if we see option "--help", "-h" or "-?". */
 
   { "import", svn_cl__import, {0}, {N_(