From 9ad24fed74375bb89474f27f48216397dd019e9c Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 3 Dec 2016 20:30:25 +0000 Subject: [PATCH] MFC r309356: svn 1.9.4 -> 1.9.5 git-svn-id: svn://svn.freebsd.org/base/stable/10@309512 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- contrib/subversion/CHANGES | 90 ++++++- contrib/subversion/README | 6 +- contrib/subversion/build-outputs.mk | 4 +- contrib/subversion/configure | 242 +++++++++--------- contrib/subversion/configure.ac | 6 +- contrib/subversion/get-deps.sh | 2 +- .../subversion/include/private/svn_sqlite.h | 3 + .../subversion/include/svn_version.h | 6 +- .../subversion/libsvn_client/merge.c | 71 ++++- .../subversion/libsvn_fs_fs/cached_data.c | 26 +- .../subversion/libsvn_fs_fs/caching.c | 4 +- .../subversion/subversion/libsvn_fs_fs/fs.c | 2 +- .../subversion/libsvn_fs_fs/fs_fs.c | 1 + .../subversion/libsvn_fs_fs/low_level.c | 16 +- .../subversion/subversion/libsvn_fs_fs/pack.c | 58 +++-- .../subversion/subversion/libsvn_fs_fs/pack.h | 8 +- .../subversion/libsvn_fs_fs/rep-cache-db.h | 2 +- .../subversion/libsvn_fs_fs/rep-cache.c | 26 +- .../subversion/libsvn_fs_fs/rep-cache.h | 4 + .../subversion/libsvn_fs_fs/transaction.c | 27 +- .../subversion/subversion/libsvn_fs_fs/tree.c | 2 +- .../subversion/libsvn_fs_x/rep-cache-db.h | 2 +- .../subversion/libsvn_ra_serf/xml.c | 30 +++ .../subversion/libsvn_repos/reporter.c | 23 +- .../subversion/libsvn_repos/repos.c | 2 +- .../subversion/libsvn_subr/config_file.c | 22 +- .../subversion/libsvn_subr/deprecated.c | 10 + .../subversion/libsvn_subr/gpg_agent.c | 20 +- .../libsvn_subr/internal_statements.h | 2 +- .../subversion/libsvn_subr/sqlite.c | 142 ++++++---- .../subversion/libsvn_subr/sysinfo.c | 2 + .../subversion/libsvn_subr/win32_crashrpt.c | 82 +++--- .../subversion/subversion/libsvn_subr/xml.c | 39 +++ .../subversion/libsvn_wc/conflicts.c | 18 +- .../subversion/libsvn_wc/update_editor.c | 61 +++-- .../subversion/libsvn_wc/wc-checks.h | 2 +- .../subversion/libsvn_wc/wc-metadata.h | 2 +- .../subversion/libsvn_wc/wc-queries.h | 2 +- contrib/subversion/subversion/svn/info-cmd.c | 2 +- contrib/subversion/subversion/svn/merge-cmd.c | 5 + .../subversion/subversion/svnserve/serve.c | 1 + 41 files changed, 766 insertions(+), 309 deletions(-) diff --git a/contrib/subversion/CHANGES b/contrib/subversion/CHANGES index ddaef6799..084bc36c8 100644 --- a/contrib/subversion/CHANGES +++ b/contrib/subversion/CHANGES @@ -1,3 +1,54 @@ +Version 1.9.5 +(29 Nov 2016, from /branches/1.9.x) +http://svn.apache.org/repos/asf/subversion/tags/1.9.5 + + User-visible changes: + - Client-side bugfixes: + * fix accessing non-existent paths during reintegrate merge (r1766699 et al) + * fix handling of newly secured subdirectories in working copy (r1724448) + * info: remove trailing whitespace in --show-item=revision (issue #4660) + * fix recording wrong revisions for tree conflicts (r1734106) + * gpg-agent: improve discovery of gpg-agent sockets (r1766327) + * gpg-agent: fix file descriptor leak (r1766323) + * resolve: fix --accept=mine-full for binary files (issue #4647) + * merge: fix possible crash (issue #4652) + * resolve: fix possible crash (r1748514) + * fix potential crash in Win32 crash reporter (r1663253 et al) + + - Server-side bugfixes: + * fsfs: fix "offset too large" error during pack (issue #4657) + * svnserve: enable hook script environments (r1769152) + * fsfs: fix possible data reconstruction error (issue #4658) + * fix source of spurious 'incoming edit' tree conflicts (r1770108) + * fsfs: improve caching for large directories (r1721285) + * fsfs: fix crash when encountering all-zero checksums (r1759686) + * fsfs: fix potential source of repository corruptions (r1756266) + * mod_dav_svn: fix excessive memory usage with mod_headers/mod_deflate + (issue #3084) + * mod_dav_svn: reduce memory usage during GET requests (r1757529 et al) + * fsfs: fix unexpected "database is locked" errors (r1741096 et al) + * fsfs: fix opening old repositories without db/format files (r1720015) + + - Client-side and server-side bugfixes: + * fix possible crash when reading invalid configuration files (r1715777) + + - Bindings bugfixes: + * swig-pl: do not corrupt "{DATE}" revision variable (r1767768) + * javahl: fix temporary accepting SSL server certificates (r1764851) + * swig-pl: fix possible stack corruption (r1683266, r1683267) + + Developer-visible changes: + - General: + * add zlib discovery through pkg-config (issue #4655) + * fix potential build issue with invalid SVN_LOCALE_DIR (issue #4653) + * ruby: fix test failures with ruby >= 2.2 (r1766621) + * fix link error with --disable-keychain on OS X (r1765385) + * swig: enable building with SWIG >= 3.0.6 (r1721488 et al) + * swig: fix building with -Wdate-time in $CPPFLAGS (r1722164) + * update serf download URI in build scripts (r1700130 et al) + * raise minimal httpd version from 2.0 to 2.2 (r1754193) + + Version 1.9.4 (28 Apr 2016, from /branches/1.9.x) http://svn.apache.org/repos/asf/subversion/tags/1.9.4 @@ -14,6 +65,8 @@ http://svn.apache.org/repos/asf/subversion/tags/1.9.4 * ra_serf: fix deleting directories with many files (issue #4557) - Server-side bugfixes: + * mod_authz_svn: fix crash in COPY/MOVE authorization check (CVE-2016-2168) + * svnserve/sasl: fix authenticating users with wrong realm (CVE-2016-2167) * improve documentation for AuthzSVNGroupsFile and groups-db (r1730856) * fsfs: reduce peak memory usage when listing large directories (r1725180) * fsfs: fix a rare source of incomplete dump files and reports (r1717876) @@ -31,8 +84,7 @@ http://svn.apache.org/repos/asf/subversion/tags/1.9.4 * fix ruby test suite to work with test-unit gem (r1714790) * allow building against KDE4 without conflict with KDE5 (r1734926) * fix update_tests.py#76 with SVNPathAuthz short_circuit (r1736432) - * build system tweaks: - * tweak how symbolic error names in maintainer mode (r1735179) + * tweak getting symbolic error names in maintainer mode (r1735179) * fix inconsistent behavior of inherited property API (r1717874 et al) - API changes: @@ -882,12 +934,44 @@ http://svn.apache.org/repos/asf/subversion/tags/1.9.0 * javahl: allow compiling with a C++11 compiler (r1684412) +Version 1.8.17 +(29 Nov 2016, from /branches/1.8.x) +http://svn.apache.org/repos/asf/subversion/tags/1.8.17 + + User-visible changes: + - Client-side bugfixes: + * fix handling of newly secured subdirectories in working copy (r1724448) + * ra_serf: fix deleting directories with many files (issue #4557) + * svnlook: properly remove tempfiles on diff errors (r1711346) + * gpg-agent: properly handle passwords with percent characters (issue #4611) + * merge: fix crash when merging to a local add (r1702299 et al) + + - Server-side bugfixes: + * fsfs: fix possible data reconstruction error (issue #4658) + + - Client-side and server-side bugfixes: + * fix potential memory access bugs (r1722860 et al) + + - Bindings bugfixes: + * javahl: fix temporary accepting SSL server certificates (r1764851) + * swig-pl: do not corrupt "{DATE}" revision variable (r1767768) + * swig-pl: fix possible stack corruption (r1683266) + + Developer-visible changes: + - General: + * fix inconsistent behavior of inherited property API (r1717875, r1717878) + * fix patch filter invocation in svn_client_patch() (r1706783) + * fix potential build issue with invalid SVN_LOCALE_DIR (issue #4653) + + Version 1.8.16 (28 Apr 2016, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.16 User-visible changes: - Server-side bugfixes: + * mod_authz_svn: fix crash in COPY/MOVE authorization check (CVE-2016-2168) + * svnserve/sasl: fix authenticating users with wrong realm (CVE-2016-2167) * mod_authz_svn: fix authz with mod_auth_kerb/mod_auth_ntlm (issue #4602) * dump: don't write broken dump files in some ambiguously encoded fsfs repositories (issue #4554) @@ -1641,7 +1725,7 @@ http://svn.apache.org/repos/asf/subversion/tags/1.8.0 * fix bug in mergeinfo recording during foreign-repos merge (r1430310) * fix spurious merge conflicts for binary files with keywords (issue #4221) * fix patching symlinks with 'svn patch' (issue #4273) - * make 'svn switch' refresh lock information (issue #3376) + * make 'svn switch' refresh lock information (issue #3378) * fix 'svn diff' output doesn't apply as patch without fuzz (issue #3362) * fix mergeinfo recording for multiple-revision-range merge (issue #4306) * fix diffs shown by 'show-diff' conflict prompt option (r1438879) diff --git a/contrib/subversion/README b/contrib/subversion/README index ae91c90b7..2350ceec3 100644 --- a/contrib/subversion/README +++ b/contrib/subversion/README @@ -2,7 +2,7 @@ Subversion, a version control system. ===================================== -$LastChangedDate: 2012-02-10 14:58:53 +0000 (Fri, 10 Feb 2012) $ +$LastChangedDate: 2016-05-31 16:08:20 +0000 (Tue, 31 May 2016) $ Contents: @@ -36,10 +36,10 @@ II. DOCUMENTATION It is written in DocBook XML, and the sources can be found at: - http://svnbook.googlecode.com/svn/trunk/ + http://svn.code.sf.net/p/svnbook/source/trunk/ If you wish to build the documentation from source, read the - src/en/README file within the book source. + en/README file within the book source. diff --git a/contrib/subversion/build-outputs.mk b/contrib/subversion/build-outputs.mk index 68acf271a..7660d313c 100644 --- a/contrib/subversion/build-outputs.mk +++ b/contrib/subversion/build-outputs.mk @@ -3351,7 +3351,7 @@ subversion/tests/libsvn_diff/diff-diff3-test.lo: subversion/tests/libsvn_diff/di subversion/tests/libsvn_diff/parse-diff-test.lo: subversion/tests/libsvn_diff/parse-diff-test.c subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/tests/svn_test.h -subversion/tests/libsvn_fs/fs-test.lo: subversion/tests/libsvn_fs/fs-test.c subversion/include/private/svn_debug.h subversion/include/private/svn_editor.h subversion/include/private/svn_fs_private.h subversion/include/private/svn_fs_util.h subversion/include/private/svn_fspath.h subversion/include/private/svn_mutex.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/libsvn_delta/delta.h subversion/libsvn_fs/fs-loader.h subversion/svn_private_config.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h +subversion/tests/libsvn_fs/fs-test.lo: subversion/tests/libsvn_fs/fs-test.c subversion/include/private/svn_debug.h subversion/include/private/svn_editor.h subversion/include/private/svn_fs_private.h subversion/include/private/svn_fs_util.h subversion/include/private/svn_fspath.h subversion/include/private/svn_mutex.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_token.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/libsvn_delta/delta.h subversion/libsvn_fs/fs-loader.h subversion/svn_private_config.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h subversion/tests/libsvn_fs/locks-test.lo: subversion/tests/libsvn_fs/locks-test.c subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h @@ -3363,7 +3363,7 @@ subversion/tests/libsvn_fs_base/strings-reps-test.lo: subversion/tests/libsvn_fs subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.lo: subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c subversion/include/private/svn_atomic.h subversion/include/private/svn_cache.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_editor.h subversion/include/private/svn_fs_fs_private.h subversion/include/private/svn_fs_private.h subversion/include/private/svn_mutex.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_string_private.h subversion/include/private/svn_token.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_iter.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/libsvn_fs_fs/fs.h subversion/libsvn_fs_fs/fs_fs.h subversion/libsvn_fs_fs/id.h subversion/libsvn_fs_fs/rev_file.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h -subversion/tests/libsvn_fs_fs/fs-fs-pack-test.lo: subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c subversion/include/private/svn_atomic.h subversion/include/private/svn_cache.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_editor.h subversion/include/private/svn_fs_fs_private.h subversion/include/private/svn_fs_private.h subversion/include/private/svn_mutex.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_string_private.h subversion/include/private/svn_token.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_iter.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/libsvn_fs/fs-loader.h subversion/libsvn_fs_fs/fs.h subversion/libsvn_fs_fs/fs_fs.h subversion/libsvn_fs_fs/id.h subversion/libsvn_fs_fs/low_level.h subversion/libsvn_fs_fs/util.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h +subversion/tests/libsvn_fs_fs/fs-fs-pack-test.lo: subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c subversion/include/private/svn_atomic.h subversion/include/private/svn_cache.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_editor.h subversion/include/private/svn_fs_fs_private.h subversion/include/private/svn_fs_private.h subversion/include/private/svn_mutex.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_string_private.h subversion/include/private/svn_token.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_iter.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/libsvn_fs/fs-loader.h subversion/libsvn_fs_fs/fs.h subversion/libsvn_fs_fs/fs_fs.h subversion/libsvn_fs_fs/id.h subversion/libsvn_fs_fs/low_level.h subversion/libsvn_fs_fs/pack.h subversion/libsvn_fs_fs/util.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h subversion/tests/libsvn_fs_fs/fs-fs-private-test.lo: subversion/tests/libsvn_fs_fs/fs-fs-private-test.c subversion/include/private/svn_atomic.h subversion/include/private/svn_cache.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_editor.h subversion/include/private/svn_fs_fs_private.h subversion/include/private/svn_fs_private.h subversion/include/private/svn_mutex.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_string_private.h subversion/include/private/svn_subr_private.h subversion/include/private/svn_token.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_iter.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/libsvn_fs_fs/fs.h subversion/libsvn_fs_fs/id.h subversion/libsvn_fs_fs/index.h subversion/libsvn_fs_fs/rev_file.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h diff --git a/contrib/subversion/configure b/contrib/subversion/configure index 19fee6eb8..844ec1a18 100755 --- a/contrib/subversion/configure +++ b/contrib/subversion/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for subversion 1.9.4. +# Generated by GNU Autoconf 2.69 for subversion 1.9.5. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='subversion' PACKAGE_TARNAME='subversion' -PACKAGE_VERSION='1.9.4' -PACKAGE_STRING='subversion 1.9.4' +PACKAGE_VERSION='1.9.5' +PACKAGE_STRING='subversion 1.9.5' PACKAGE_BUGREPORT='http://subversion.apache.org/' PACKAGE_URL='' @@ -1471,7 +1471,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures subversion 1.9.4 to adapt to many kinds of systems. +\`configure' configures subversion 1.9.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1537,7 +1537,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of subversion 1.9.4:";; + short | recursive ) echo "Configuration of subversion 1.9.5:";; esac cat <<\_ACEOF @@ -1751,7 +1751,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -subversion configure 1.9.4 +subversion configure 1.9.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2295,7 +2295,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by subversion $as_me 1.9.4, which was +It was created by subversion $as_me 1.9.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2675,8 +2675,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.9.4" >&5 -$as_echo "$as_me: Configuring Subversion 1.9.4" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.9.5" >&5 +$as_echo "$as_me: Configuring Subversion 1.9.5" >&6;} abs_srcdir="`cd $srcdir && pwd`" @@ -7422,7 +7422,10 @@ _ACEOF localedir='${datadir}/locale' -if test "${datadir}" = '${prefix}/share' && test "${prefix}" = "NONE"; then +if test "${prefix}" = "NONE" \ + && ( test "${datadir}" = '${prefix}/share' \ + || ( test "${datadir}" = '${datarootdir}' \ + && test "${datarootdir}" = '${prefix}/share' ) ); then exp_localedir='${ac_default_prefix}/share/locale' else exp_localedir=$localedir @@ -22550,68 +22553,34 @@ fi zlib_found=no + zlib_skip=no # Check whether --with-zlib was given. if test "${with_zlib+set}" = set; then : withval=$with_zlib; - if test "$withval" = "yes" ; then - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = xyes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 -$as_echo_n "checking for inflate in -lz... " >&6; } -if ${ac_cv_lib_z_inflate+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + if test "$withval" = "yes"; then + zlib_skip=no + elif test "$withval" = "no"; then + zlib_skip=yes + else + zlib_skip=no + zlib_prefix="$withval" + fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char inflate (); -int -main () -{ -return inflate (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_inflate=yes -else - ac_cv_lib_z_inflate=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 -$as_echo "$ac_cv_lib_z_inflate" >&6; } -if test "x$ac_cv_lib_z_inflate" = xyes; then : - zlib_found="builtin" fi -fi - + if test "$zlib_skip" = "yes"; then + as_fn_error $? "subversion requires zlib" "$LINENO" 5 + fi - elif test "$withval" = "no" ; then - as_fn_error $? "cannot compile without zlib." "$LINENO" 5 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library configuration" >&5 -$as_echo "$as_me: zlib library configuration" >&6;} - zlib_prefix=$withval - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$zlib_prefix/include" - for ac_header in zlib.h + if test -n "$zlib_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library configuration via prefix" >&5 +$as_echo "$as_me: zlib library configuration via prefix" >&6;} + save_cppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$zlib_prefix/include" + for ac_header in zlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = xyes; then : @@ -22619,9 +22588,9 @@ if test "x$ac_cv_header_zlib_h" = xyes; then : #define HAVE_ZLIB_H 1 _ACEOF - save_ldflags="$LDFLAGS" - LDFLAGS="$LDFLAGS -L$zlib_prefix/lib" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 + save_ldflags="$LDFLAGS" + LDFLAGS="$LDFLAGS -L$zlib_prefix/lib" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 $as_echo_n "checking for inflate in -lz... " >&6; } if ${ac_cv_lib_z_inflate+:} false; then : $as_echo_n "(cached) " >&6 @@ -22658,24 +22627,86 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 $as_echo "$ac_cv_lib_z_inflate" >&6; } if test "x$ac_cv_lib_z_inflate" = xyes; then : - zlib_found="yes" + + zlib_found="yes" + SVN_ZLIB_INCLUDES="-I$zlib_prefix/include" + SVN_ZLIB_LIBS="` + input_flags="-L$zlib_prefix/lib" + output_flags="" + filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" + for flag in $input_flags; do + filter="no" + for dir in $filtered_dirs; do + if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then + filter="yes" + break + fi + done + if test "$filter" = "no"; then + output_flags="$output_flags $flag" + fi + done + if test -n "$output_flags"; then + printf "%s" "${output_flags# }" + fi +` -lz" + fi - LDFLAGS="$save_ldflags" + LDFLAGS="$save_ldflags" fi done - CPPFLAGS="$save_cppflags" + CPPFLAGS="$save_cppflags" + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library configuration via pkg-config" >&5 +$as_echo "$as_me: zlib library configuration via pkg-config" >&6;} + if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib library" >&5 +$as_echo_n "checking for zlib library... " >&6; } + if $PKG_CONFIG zlib --exists; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + zlib_found=yes + SVN_ZLIB_INCLUDES=`$PKG_CONFIG zlib --cflags` + SVN_ZLIB_LIBS=`$PKG_CONFIG zlib --libs` + SVN_ZLIB_LIBS="` + input_flags="$SVN_ZLIB_LIBS" + output_flags="" + filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" + for flag in $input_flags; do + filter="no" + for dir in $filtered_dirs; do + if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then + filter="yes" + break + fi + done + if test "$filter" = "no"; then + output_flags="$output_flags $flag" + fi + done + if test -n "$output_flags"; then + printf "%s" "${output_flags# }" + fi +`" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi -else - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" + if test "$zlib_found" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library configuration" >&5 +$as_echo "$as_me: zlib library configuration" >&6;} + ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 $as_echo_n "checking for inflate in -lz... " >&6; } if ${ac_cv_lib_z_inflate+:} false; then : $as_echo_n "(cached) " >&6 @@ -22712,46 +22743,22 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 $as_echo "$ac_cv_lib_z_inflate" >&6; } if test "x$ac_cv_lib_z_inflate" = xyes; then : - zlib_found="builtin" -fi + zlib_found="builtin" + SVN_ZLIB_LIBS="-lz" fi - fi - if test "$zlib_found" = "no"; then - as_fn_error $? "subversion requires zlib" "$LINENO" 5 - fi - - if test "$zlib_found" = "yes"; then - SVN_ZLIB_INCLUDES="-I$zlib_prefix/include" - LDFLAGS="$LDFLAGS ` - input_flags="-L$zlib_prefix/lib" - output_flags="" - filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" - for flag in $input_flags; do - filter="no" - for dir in $filtered_dirs; do - if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then - filter="yes" - break - fi - done - if test "$filter" = "no"; then - output_flags="$output_flags $flag" fi - done - if test -n "$output_flags"; then - printf "%s" "${output_flags# }" - fi -`" fi - SVN_ZLIB_LIBS="-lz" + if test "$zlib_found" = "no"; then + as_fn_error $? "subversion requires zlib" "$LINENO" 5 + fi @@ -23785,15 +23792,14 @@ $as_echo "$SWIG_VERSION_RAW" >&6; } # packages/rpm/redhat-7.x/subversion.spec # packages/rpm/rhel-3/subversion.spec # packages/rpm/rhel-4/subversion.spec - if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024" && \ - test "$SWIG_VERSION" -lt "300000"; then + if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024"; then SWIG_SUITABLE=yes else SWIG_SUITABLE=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&5 $as_echo "$as_me: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion requires SWIG >= 1.3.24 and < 3.0.0 " >&5 -$as_echo "$as_me: WARNING: Subversion requires SWIG >= 1.3.24 and < 3.0.0 " >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion requires SWIG >= 1.3.24" >&5 +$as_echo "$as_me: WARNING: Subversion requires SWIG >= 1.3.24" >&2;} fi fi @@ -24274,15 +24280,14 @@ $as_echo "$SWIG_VERSION_RAW" >&6; } # packages/rpm/redhat-7.x/subversion.spec # packages/rpm/rhel-3/subversion.spec # packages/rpm/rhel-4/subversion.spec - if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024" && \ - test "$SWIG_VERSION" -lt "300000"; then + if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024"; then SWIG_SUITABLE=yes else SWIG_SUITABLE=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&5 $as_echo "$as_me: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion requires SWIG >= 1.3.24 and < 3.0.0 " >&5 -$as_echo "$as_me: WARNING: Subversion requires SWIG >= 1.3.24 and < 3.0.0 " >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion requires SWIG >= 1.3.24" >&5 +$as_echo "$as_me: WARNING: Subversion requires SWIG >= 1.3.24" >&2;} fi fi @@ -24763,15 +24768,14 @@ $as_echo "$SWIG_VERSION_RAW" >&6; } # packages/rpm/redhat-7.x/subversion.spec # packages/rpm/rhel-3/subversion.spec # packages/rpm/rhel-4/subversion.spec - if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024" && \ - test "$SWIG_VERSION" -lt "300000"; then + if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024"; then SWIG_SUITABLE=yes else SWIG_SUITABLE=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&5 $as_echo "$as_me: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion requires SWIG >= 1.3.24 and < 3.0.0 " >&5 -$as_echo "$as_me: WARNING: Subversion requires SWIG >= 1.3.24 and < 3.0.0 " >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion requires SWIG >= 1.3.24" >&5 +$as_echo "$as_me: WARNING: Subversion requires SWIG >= 1.3.24" >&2;} fi fi @@ -25255,15 +25259,14 @@ $as_echo "$SWIG_VERSION_RAW" >&6; } # packages/rpm/redhat-7.x/subversion.spec # packages/rpm/rhel-3/subversion.spec # packages/rpm/rhel-4/subversion.spec - if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024" && \ - test "$SWIG_VERSION" -lt "300000"; then + if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024"; then SWIG_SUITABLE=yes else SWIG_SUITABLE=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&5 $as_echo "$as_me: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion requires SWIG >= 1.3.24 and < 3.0.0 " >&5 -$as_echo "$as_me: WARNING: Subversion requires SWIG >= 1.3.24 and < 3.0.0 " >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion requires SWIG >= 1.3.24" >&5 +$as_echo "$as_me: WARNING: Subversion requires SWIG >= 1.3.24" >&2;} fi fi @@ -26152,6 +26155,9 @@ SWIG_CPPFLAGS="$CPPFLAGS" SWIG_CPPFLAGS=`echo "$SWIG_CPPFLAGS" | $SED -e 's/-no-cpp-precomp //'` + SWIG_CPPFLAGS=`echo "$SWIG_CPPFLAGS" | $SED -e 's/-Wdate-time //'` + + cat >>confdefs.h <<_ACEOF @@ -26750,7 +26756,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by subversion $as_me 1.9.4, which was +This file was extended by subversion $as_me 1.9.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -26816,7 +26822,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -subversion config.status 1.9.4 +subversion config.status 1.9.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/contrib/subversion/configure.ac b/contrib/subversion/configure.ac index 4ed66d4fe..1fe041478 100644 --- a/contrib/subversion/configure.ac +++ b/contrib/subversion/configure.ac @@ -199,7 +199,10 @@ localedir='${datadir}/locale' AC_SUBST(localedir) dnl For SVN_LOCALE_DIR, we have to expand it to something. See SVN_BINDIR. -if test "${datadir}" = '${prefix}/share' && test "${prefix}" = "NONE"; then +if test "${prefix}" = "NONE" \ + && ( test "${datadir}" = '${prefix}/share' \ + || ( test "${datadir}" = '${datarootdir}' \ + && test "${datarootdir}" = '${prefix}/share' ) ); then exp_localedir='${ac_default_prefix}/share/locale' else exp_localedir=$localedir @@ -1504,6 +1507,7 @@ 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 '/' diff --git a/contrib/subversion/get-deps.sh b/contrib/subversion/get-deps.sh index d371fa090..1a6f09d9f 100755 --- a/contrib/subversion/get-deps.sh +++ b/contrib/subversion/get-deps.sh @@ -89,7 +89,7 @@ get_serf() { test -d $BASEDIR/serf && return cd $TEMPDIR - $HTTP_FETCH http://serf.googlecode.com/svn/src_releases/$SERF.tar.bz2 + $HTTP_FETCH https://archive.apache.org/dist/serf/$SERF.tar.bz2 cd $BASEDIR bzip2 -dc $TEMPDIR/$SERF.tar.bz2 | tar -xf - diff --git a/contrib/subversion/subversion/include/private/svn_sqlite.h b/contrib/subversion/subversion/include/private/svn_sqlite.h index 6faa5b384..4c6cb97cd 100644 --- a/contrib/subversion/subversion/include/private/svn_sqlite.h +++ b/contrib/subversion/subversion/include/private/svn_sqlite.h @@ -555,6 +555,9 @@ svn_sqlite__hotcopy(const char *src_path, const char *dst_path, apr_pool_t *scratch_pool); +/* Backported version of SVN_ERR_SQLITE_ROLLBACK_FAILED. */ +#define SVN_SQLITE__ERR_ROLLBACK_FAILED (SVN_ERR_MISC_CATEGORY_START + 44) + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/contrib/subversion/subversion/include/svn_version.h b/contrib/subversion/subversion/include/svn_version.h index 92ce825ce..79e37d9a9 100644 --- a/contrib/subversion/subversion/include/svn_version.h +++ b/contrib/subversion/subversion/include/svn_version.h @@ -70,7 +70,7 @@ extern "C" { * * @since New in 1.1. */ -#define SVN_VER_PATCH 4 +#define SVN_VER_PATCH 5 /** @deprecated Provided for backward compatibility with the 1.0 API. */ @@ -93,7 +93,7 @@ extern "C" { * * Always change this at the same time as SVN_VER_NUMTAG. */ -#define SVN_VER_TAG " (r1740329)" +#define SVN_VER_TAG " (r1770682)" /** Number tag: a string describing the version. @@ -117,7 +117,7 @@ extern "C" { * file version. Its value remains 0 in the repository except in release * tags where it is the revision from which the tag was created. */ -#define SVN_VER_REVISION 1740329 +#define SVN_VER_REVISION 1770682 /* Version strings composed from the above definitions. */ diff --git a/contrib/subversion/subversion/libsvn_client/merge.c b/contrib/subversion/subversion/libsvn_client/merge.c index e2435754e..fed848904 100644 --- a/contrib/subversion/subversion/libsvn_client/merge.c +++ b/contrib/subversion/subversion/libsvn_client/merge.c @@ -1295,6 +1295,15 @@ record_skip(merge_cmd_baton_t *merge_b, return SVN_NO_ERROR; } +/* Forward declaration */ +static svn_client__merge_path_t * +find_nearest_ancestor_with_intersecting_ranges( + svn_revnum_t *start, + svn_revnum_t *end, + const apr_array_header_t *children_with_mergeinfo, + svn_boolean_t path_is_own_ancestor, + const char *local_abspath); + /* Record a tree conflict in the WC, unless this is a dry run or a record- * only merge, or if a tree conflict is already flagged for the VICTIM_PATH. * (The latter can happen if a merge-tracking-aware merge is doing multiple @@ -1366,11 +1375,45 @@ record_tree_conflict(merge_cmd_baton_t *merge_b, reason = svn_wc_conflict_reason_moved_here; } - SVN_ERR(make_conflict_versions(&left, &right, local_abspath, - merge_left_node_kind, - merge_right_node_kind, - &merge_b->merge_source, merge_b->target, - result_pool, scratch_pool)); + if (HONOR_MERGEINFO(merge_b) && merge_b->merge_source.ancestral) + { + struct merge_source_t *source; + svn_client__pathrev_t *loc1; + svn_client__pathrev_t *loc2; + svn_merge_range_t range = + {SVN_INVALID_REVNUM, SVN_INVALID_REVNUM, TRUE}; + + /* We are honoring mergeinfo so do not blindly record + * a conflict describing the merge of + * SOURCE->LOC1->URL@SOURCE->LOC1->REV through + * SOURCE->LOC2->URL@SOURCE->LOC2->REV + * but figure out the actual revision range merged. */ + (void)find_nearest_ancestor_with_intersecting_ranges( + &(range.start), &(range.end), + merge_b->notify_begin.nodes_with_mergeinfo, + action != svn_wc_conflict_action_delete, + local_abspath); + loc1 = svn_client__pathrev_dup(merge_b->merge_source.loc1, + scratch_pool); + loc2 = svn_client__pathrev_dup(merge_b->merge_source.loc2, + scratch_pool); + loc1->rev = range.start; + loc2->rev = range.end; + source = merge_source_create(loc1, loc2, + merge_b->merge_source.ancestral, + scratch_pool); + SVN_ERR(make_conflict_versions(&left, &right, local_abspath, + merge_left_node_kind, + merge_right_node_kind, + source, merge_b->target, + result_pool, scratch_pool)); + } + else + SVN_ERR(make_conflict_versions(&left, &right, local_abspath, + merge_left_node_kind, + merge_right_node_kind, + &merge_b->merge_source, merge_b->target, + result_pool, scratch_pool)); /* Fix up delete of file, add of dir replacement (or other way around) */ if (existing_conflict != NULL && existing_conflict->src_left_version) @@ -10956,7 +10999,7 @@ find_unsynced_ranges(const svn_client__pathrev_t *source_loc, potentially_unmerged_ranges->nelts - 1, svn_merge_range_t *))->end; log_find_operative_baton_t log_baton; - const char *old_session_url; + const char *old_session_url = NULL; svn_error_t *err; log_baton.merged_catalog = merged_catalog; @@ -10967,14 +11010,22 @@ find_unsynced_ranges(const svn_client__pathrev_t *source_loc, = svn_client__pathrev_fspath(target_loc, scratch_pool); log_baton.result_pool = result_pool; - SVN_ERR(svn_client__ensure_ra_session_url( - &old_session_url, ra_session, target_loc->url, scratch_pool)); + /* Reparent the session to TARGET_LOC if this target location + * exists within the unmerged revision range. */ + if (target_loc->rev <= youngest_rev && target_loc->rev >= oldest_rev) + SVN_ERR(svn_client__ensure_ra_session_url( + &old_session_url, ra_session, target_loc->url, scratch_pool)); + err = get_log(ra_session, "", youngest_rev, oldest_rev, TRUE, /* discover_changed_paths */ log_find_operative_revs, &log_baton, scratch_pool); - SVN_ERR(svn_error_compose_create( - err, svn_ra_reparent(ra_session, old_session_url, scratch_pool))); + if (old_session_url) + err = svn_error_compose_create(err, + svn_ra_reparent(ra_session, + old_session_url, + scratch_pool)); + SVN_ERR(err); } return SVN_NO_ERROR; diff --git a/contrib/subversion/subversion/libsvn_fs_fs/cached_data.c b/contrib/subversion/subversion/libsvn_fs_fs/cached_data.c index 948870e6b..6e61535f4 100644 --- a/contrib/subversion/subversion/libsvn_fs_fs/cached_data.c +++ b/contrib/subversion/subversion/libsvn_fs_fs/cached_data.c @@ -1571,6 +1571,17 @@ read_plain_window(svn_stringbuf_t **nwin, rep_state_t *rs, return SVN_NO_ERROR; } +/* Skip SIZE bytes from the PLAIN representation RS. */ +static svn_error_t * +skip_plain_window(rep_state_t *rs, + apr_size_t size) +{ + /* Update RS. */ + rs->current += (apr_off_t)size; + + return SVN_NO_ERROR; +} + /* Get the undeltified window that is a result of combining all deltas from the current desired representation identified in *RB with its base representation. Store the window in *RESULT. */ @@ -1628,9 +1639,18 @@ get_combined_window(svn_stringbuf_t **result, Also note that we may have short-cut reading the delta chain -- in which case SRC_OPS is 0 and it might not be a PLAIN rep. */ source = buf; - if (source == NULL && rb->src_state != NULL && window->src_ops) - SVN_ERR(read_plain_window(&source, rb->src_state, window->sview_len, - pool, iterpool)); + if (source == NULL && rb->src_state != NULL) + { + /* Even if we don't need the source rep now, we still must keep + * its read offset in sync with what we might need for the next + * window. */ + if (window->src_ops) + SVN_ERR(read_plain_window(&source, rb->src_state, + window->sview_len, + pool, iterpool)); + else + SVN_ERR(skip_plain_window(rb->src_state, window->sview_len)); + } /* Combine this window with the current one. */ new_pool = svn_pool_create(rb->pool); diff --git a/contrib/subversion/subversion/libsvn_fs_fs/caching.c b/contrib/subversion/subversion/libsvn_fs_fs/caching.c index 6775fab00..b54d69b30 100644 --- a/contrib/subversion/subversion/libsvn_fs_fs/caching.c +++ b/contrib/subversion/subversion/libsvn_fs_fs/caching.c @@ -430,7 +430,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *fs, svn_fs_fs__deserialize_dir_entries, sizeof(pair_cache_key_t), apr_pstrcat(pool, prefix, "DIR", SVN_VA_NULL), - SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY, + SVN_CACHE__MEMBUFFER_HIGH_PRIORITY, fs, no_handler, fs->pool, pool)); @@ -806,7 +806,7 @@ svn_fs_fs__initialize_txn_caches(svn_fs_t *fs, APR_HASH_KEY_STRING, apr_pstrcat(pool, prefix, "TXNDIR", SVN_VA_NULL), - 0, + SVN_CACHE__MEMBUFFER_HIGH_PRIORITY, fs, TRUE, pool, pool)); diff --git a/contrib/subversion/subversion/libsvn_fs_fs/fs.c b/contrib/subversion/subversion/libsvn_fs_fs/fs.c index 77c5d221c..197879891 100644 --- a/contrib/subversion/subversion/libsvn_fs_fs/fs.c +++ b/contrib/subversion/subversion/libsvn_fs_fs/fs.c @@ -452,7 +452,7 @@ fs_pack(svn_fs_t *fs, apr_pool_t *common_pool) { SVN_ERR(fs_open(fs, path, common_pool_lock, pool, common_pool)); - return svn_fs_fs__pack(fs, notify_func, notify_baton, + return svn_fs_fs__pack(fs, 0, notify_func, notify_baton, cancel_func, cancel_baton, pool); } diff --git a/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c b/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c index 1d32672b8..103458d8e 100644 --- a/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c +++ b/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c @@ -492,6 +492,7 @@ read_format(int *pformat, svn_error_clear(err); *pformat = 1; *max_files_per_dir = 0; + *use_log_addressing = FALSE; return SVN_NO_ERROR; } diff --git a/contrib/subversion/subversion/libsvn_fs_fs/low_level.c b/contrib/subversion/subversion/libsvn_fs_fs/low_level.c index a27bbcc35..d21e312fa 100644 --- a/contrib/subversion/subversion/libsvn_fs_fs/low_level.c +++ b/contrib/subversion/subversion/libsvn_fs_fs/low_level.c @@ -764,7 +764,11 @@ svn_fs_fs__parse_representation(representation_t **rep_p, SVN_ERR(svn_checksum_parse_hex(&checksum, svn_checksum_md5, str, scratch_pool)); - memcpy(rep->md5_digest, checksum->digest, sizeof(rep->md5_digest)); + + /* If STR is a all-zero checksum, CHECKSUM will be NULL and REP already + contains the correct value. */ + if (checksum) + memcpy(rep->md5_digest, checksum->digest, sizeof(rep->md5_digest)); /* The remaining fields are only used for formats >= 4, so check that. */ str = svn_cstring_tokenize(" ", &string); @@ -778,8 +782,16 @@ svn_fs_fs__parse_representation(representation_t **rep_p, 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 + claim we know the SHA1 in that case. */ rep->has_sha1 = checksum != NULL; - memcpy(rep->sha1_digest, checksum->digest, sizeof(rep->sha1_digest)); + + /* If STR is a all-zero checksum, CHECKSUM will be NULL and REP already + contains the correct value. */ + if (checksum) + memcpy(rep->sha1_digest, checksum->digest, sizeof(rep->sha1_digest)); /* Read the uniquifier. */ str = svn_cstring_tokenize("/", &string); diff --git a/contrib/subversion/subversion/libsvn_fs_fs/pack.c b/contrib/subversion/subversion/libsvn_fs_fs/pack.c index 50b8898c4..8c4ef37fb 100644 --- a/contrib/subversion/subversion/libsvn_fs_fs/pack.c +++ b/contrib/subversion/subversion/libsvn_fs_fs/pack.c @@ -335,21 +335,40 @@ static svn_error_t * reset_pack_context(pack_context_t *context, apr_pool_t *pool) { + const char *temp_dir; + apr_array_clear(context->changes); - SVN_ERR(svn_io_file_trunc(context->changes_file, 0, pool)); + SVN_ERR(svn_io_file_close(context->changes_file, pool)); apr_array_clear(context->file_props); - SVN_ERR(svn_io_file_trunc(context->file_props_file, 0, pool)); + SVN_ERR(svn_io_file_close(context->file_props_file, pool)); apr_array_clear(context->dir_props); - SVN_ERR(svn_io_file_trunc(context->dir_props_file, 0, pool)); + SVN_ERR(svn_io_file_close(context->dir_props_file, pool)); apr_array_clear(context->rev_offsets); apr_array_clear(context->path_order); apr_array_clear(context->references); apr_array_clear(context->reps); - SVN_ERR(svn_io_file_trunc(context->reps_file, 0, pool)); + SVN_ERR(svn_io_file_close(context->reps_file, pool)); svn_pool_clear(context->info_pool); + /* The new temporary files must live at least as long as any other info + * object in CONTEXT. */ + SVN_ERR(svn_io_temp_dir(&temp_dir, pool)); + SVN_ERR(svn_io_open_unique_file3(&context->changes_file, NULL, temp_dir, + svn_io_file_del_on_close, + context->info_pool, pool)); + SVN_ERR(svn_io_open_unique_file3(&context->file_props_file, NULL, temp_dir, + svn_io_file_del_on_close, + context->info_pool, pool)); + SVN_ERR(svn_io_open_unique_file3(&context->dir_props_file, NULL, temp_dir, + svn_io_file_del_on_close, + context->info_pool, pool)); + SVN_ERR(svn_io_open_unique_file3(&context->reps_file, NULL, temp_dir, + svn_io_file_del_on_close, + context->info_pool, pool)); + context->paths = svn_prefix_tree__create(context->info_pool); + return SVN_NO_ERROR; } @@ -1410,21 +1429,20 @@ append_revision(pack_context_t *context, apr_off_t offset = 0; apr_pool_t *iterpool = svn_pool_create(pool); svn_fs_fs__revision_file_t *rev_file; - apr_finfo_t finfo; + svn_filesize_t revdata_size; - /* Get the size of the file. */ - const char *path = svn_dirent_join(context->shard_dir, - apr_psprintf(iterpool, "%ld", - context->start_rev), - pool); - SVN_ERR(svn_io_stat(&finfo, path, APR_FINFO_SIZE, pool)); - - /* Copy all the bits from the rev file to the end of the pack file. */ + /* Copy all non-index contents the rev file to the end of the pack file. */ SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, context->fs, context->start_rev, pool, iterpool)); + + SVN_ERR(svn_fs_fs__auto_read_footer(rev_file)); + revdata_size = rev_file->l2p_offset; + + SVN_ERR(svn_io_file_aligned_seek(rev_file->file, ffd->block_size, NULL, 0, + iterpool)); SVN_ERR(copy_file_data(context, context->pack_file, rev_file->file, - finfo.size, iterpool)); + revdata_size, iterpool)); /* mark the start of a new revision */ SVN_ERR(svn_fs_fs__l2p_proto_index_add_revision(context->proto_l2p_index, @@ -1432,7 +1450,7 @@ append_revision(pack_context_t *context, /* read the phys-to-log index file until we covered the whole rev file. * That index contains enough info to build both target indexes from it. */ - while (offset < finfo.size) + while (offset < revdata_size) { /* read one cluster */ int i; @@ -1456,7 +1474,7 @@ append_revision(pack_context_t *context, /* process entry while inside the rev file */ offset = entry->offset; - if (offset < finfo.size) + if (offset < revdata_size) { entry->offset += context->pack_offset; offset += entry->size; @@ -1470,7 +1488,7 @@ append_revision(pack_context_t *context, } svn_pool_destroy(iterpool); - context->pack_offset += finfo.size; + context->pack_offset += revdata_size; SVN_ERR(svn_fs_fs__close_revision_file(rev_file)); @@ -1534,6 +1552,7 @@ pack_log_addressed(svn_fs_t *fs, for (i = 0; i < max_ids->nelts; ++i) if (APR_ARRAY_IDX(max_ids, i, apr_uint64_t) + item_count <= max_items) { + item_count += APR_ARRAY_IDX(max_ids, i, apr_uint64_t); context.end_rev++; } else @@ -1792,6 +1811,7 @@ struct pack_baton void *notify_baton; svn_cancel_func_t cancel_func; void *cancel_baton; + size_t max_mem; /* Additional entries valid when entering pack_shard(). */ const char *revs_dir; @@ -1913,7 +1933,7 @@ pack_shard(struct pack_baton *baton, /* pack the revision content */ SVN_ERR(pack_rev_shard(baton->fs, rev_pack_file_dir, baton->rev_shard_path, baton->shard, ffd->max_files_per_dir, - DEFAULT_MAX_MEM, baton->cancel_func, + baton->max_mem, baton->cancel_func, baton->cancel_baton, pool)); /* For newer repo formats, we only acquired the pack lock so far. @@ -2002,6 +2022,7 @@ pack_body(void *baton, svn_error_t * svn_fs_fs__pack(svn_fs_t *fs, + apr_size_t max_mem, svn_fs_pack_notify_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, @@ -2017,6 +2038,7 @@ svn_fs_fs__pack(svn_fs_t *fs, pb.notify_baton = notify_baton; pb.cancel_func = cancel_func; pb.cancel_baton = cancel_baton; + pb.max_mem = max_mem ? max_mem : DEFAULT_MAX_MEM; if (ffd->format >= SVN_FS_FS__MIN_PACK_LOCK_FORMAT) { diff --git a/contrib/subversion/subversion/libsvn_fs_fs/pack.h b/contrib/subversion/subversion/libsvn_fs_fs/pack.h index ce1ceb01e..b11f99951 100644 --- a/contrib/subversion/subversion/libsvn_fs_fs/pack.h +++ b/contrib/subversion/subversion/libsvn_fs_fs/pack.h @@ -26,13 +26,19 @@ #include "fs.h" /* Possibly pack the repository at PATH. This just take full shards, and - combines all the revision files into a single one, with a manifest header. + combines all the revision files into a single one, with a manifest header + when required by the repository format. + + MAX_MEM limits the size of in-memory data structures needed for reordering + items in format 7 repositories. 0 means use the built-in default. + If given, NOTIFY_FUNC will be called with NOTIFY_BATON to report progress. Use optional CANCEL_FUNC/CANCEL_BATON for cancellation support. Existing filesystem references need not change. */ svn_error_t * svn_fs_fs__pack(svn_fs_t *fs, + apr_size_t max_mem, svn_fs_pack_notify_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, diff --git a/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h b/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h index 56692c92e..804b669d1 100644 --- a/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h +++ b/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from rep-cache-db.sql and .dist_sandbox/subversion-1.9.4/subversion/libsvn_fs_fs/token-map.h. +/* This file is automatically generated from rep-cache-db.sql and .dist_sandbox/subversion-1.9.5/subversion/libsvn_fs_fs/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 diff --git a/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.c b/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.c index c2b42808b..663d11d6f 100644 --- a/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.c +++ b/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.c @@ -50,6 +50,13 @@ path_rep_cache_db(const char *fs_path, return svn_dirent_join(fs_path, REP_CACHE_DB_NAME, result_pool); } +#define SVN_ERR_CLOSE(x, db) do \ +{ \ + svn_error_t *svn__err = (x); \ + if (svn__err) \ + return svn_error_compose_create(svn__err, svn_sqlite__close(db)); \ +} while (0) + /** Library-private API's. **/ @@ -99,12 +106,12 @@ open_rep_cache(void *baton, 0, NULL, 0, fs->pool, pool)); - SVN_ERR(svn_sqlite__read_schema_version(&version, sdb, pool)); + SVN_ERR_CLOSE(svn_sqlite__read_schema_version(&version, sdb, pool), sdb); if (version < REP_CACHE_SCHEMA_FORMAT) { /* Must be 0 -- an uninitialized (no schema) database. Create the schema. Results in schema version of 1. */ - SVN_ERR(svn_sqlite__exec_statements(sdb, STMT_CREATE_SCHEMA)); + SVN_ERR_CLOSE(svn_sqlite__exec_statements(sdb, STMT_CREATE_SCHEMA), sdb); } /* This is used as a flag that the database is available so don't @@ -124,6 +131,21 @@ svn_fs_fs__open_rep_cache(svn_fs_t *fs, return svn_error_quick_wrap(err, _("Couldn't open rep-cache database")); } +svn_error_t * +svn_fs_fs__close_rep_cache(svn_fs_t *fs) +{ + fs_fs_data_t *ffd = fs->fsap_data; + + if (ffd->rep_cache_db) + { + SVN_ERR(svn_sqlite__close(ffd->rep_cache_db)); + ffd->rep_cache_db = NULL; + ffd->rep_cache_db_opened = 0; + } + + return SVN_NO_ERROR; +} + svn_error_t * svn_fs_fs__exists_rep_cache(svn_boolean_t *exists, svn_fs_t *fs, apr_pool_t *pool) diff --git a/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.h b/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.h index ce424e6ea..75072a03e 100644 --- a/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.h +++ b/contrib/subversion/subversion/libsvn_fs_fs/rep-cache.h @@ -40,6 +40,10 @@ svn_error_t * svn_fs_fs__open_rep_cache(svn_fs_t *fs, apr_pool_t *pool); +/* Close the rep cache database associated with FS. */ +svn_error_t * +svn_fs_fs__close_rep_cache(svn_fs_t *fs); + /* Set *EXISTS to TRUE iff the rep-cache DB file exists. */ svn_error_t * svn_fs_fs__exists_rep_cache(svn_boolean_t *exists, diff --git a/contrib/subversion/subversion/libsvn_fs_fs/transaction.c b/contrib/subversion/subversion/libsvn_fs_fs/transaction.c index 3968c6fa5..fabfe3e3e 100644 --- a/contrib/subversion/subversion/libsvn_fs_fs/transaction.c +++ b/contrib/subversion/subversion/libsvn_fs_fs/transaction.c @@ -2334,12 +2334,17 @@ rep_write_contents_close(void *baton) b->fnv1a_checksum_ctx, b->scratch_pool)); - SVN_ERR(store_sha1_rep_mapping(b->fs, b->noderev, b->scratch_pool)); SVN_ERR(store_p2l_index_entry(b->fs, &rep->txn_id, &entry, b->scratch_pool)); } SVN_ERR(svn_io_file_close(b->file, b->scratch_pool)); + + /* Write the sha1->rep mapping *after* we successfully written node + * revision to disk. */ + if (!old_rep) + SVN_ERR(store_sha1_rep_mapping(b->fs, b->noderev, b->scratch_pool)); + SVN_ERR(unlock_proto_rev(b->fs, &rep->txn_id, b->lockcookie, b->scratch_pool)); svn_pool_destroy(b->scratch_pool); @@ -3623,6 +3628,8 @@ svn_fs_fs__commit(svn_revnum_t *new_rev_p, if (ffd->rep_sharing_allowed) { + svn_error_t *err; + SVN_ERR(svn_fs_fs__open_rep_cache(fs, pool)); /* Write new entries to the rep-sharing database. @@ -3633,9 +3640,21 @@ svn_fs_fs__commit(svn_revnum_t *new_rev_p, /* ### A commit that touches thousands of files will starve other (reader/writer) commits for the duration of the below call. Maybe write in batches? */ - SVN_SQLITE__WITH_TXN( - write_reps_to_cache(fs, cb.reps_to_cache, pool), - ffd->rep_cache_db); + SVN_ERR(svn_sqlite__begin_transaction(ffd->rep_cache_db)); + err = write_reps_to_cache(fs, cb.reps_to_cache, pool); + err = svn_sqlite__finish_transaction(ffd->rep_cache_db, err); + + if (svn_error_find_cause(err, SVN_SQLITE__ERR_ROLLBACK_FAILED)) + { + /* Failed rollback means that our db connection is unusable, and + the only thing we can do is close it. The connection will be + reopened during the next operation with rep-cache.db. */ + return svn_error_trace( + svn_error_compose_create(err, + svn_fs_fs__close_rep_cache(fs))); + } + else if (err) + return svn_error_trace(err); } return SVN_NO_ERROR; diff --git a/contrib/subversion/subversion/libsvn_fs_fs/tree.c b/contrib/subversion/subversion/libsvn_fs_fs/tree.c index 0047bef25..5893da22b 100644 --- a/contrib/subversion/subversion/libsvn_fs_fs/tree.c +++ b/contrib/subversion/subversion/libsvn_fs_fs/tree.c @@ -2284,7 +2284,7 @@ svn_fs_fs__commit_txn(const char **conflict_p, if (ffd->pack_after_commit) { - SVN_ERR(svn_fs_fs__pack(fs, NULL, NULL, NULL, NULL, pool)); + SVN_ERR(svn_fs_fs__pack(fs, 0, NULL, NULL, NULL, NULL, pool)); } return SVN_NO_ERROR; diff --git a/contrib/subversion/subversion/libsvn_fs_x/rep-cache-db.h b/contrib/subversion/subversion/libsvn_fs_x/rep-cache-db.h index 21d56f141..68affb308 100644 --- a/contrib/subversion/subversion/libsvn_fs_x/rep-cache-db.h +++ b/contrib/subversion/subversion/libsvn_fs_x/rep-cache-db.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from rep-cache-db.sql and .dist_sandbox/subversion-1.9.4/subversion/libsvn_fs_x/token-map.h. +/* This file is automatically generated from rep-cache-db.sql and .dist_sandbox/subversion-1.9.5/subversion/libsvn_fs_x/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 diff --git a/contrib/subversion/subversion/libsvn_ra_serf/xml.c b/contrib/subversion/subversion/libsvn_ra_serf/xml.c index bedcbd302..1a988572b 100644 --- a/contrib/subversion/subversion/libsvn_ra_serf/xml.c +++ b/contrib/subversion/subversion/libsvn_ra_serf/xml.c @@ -988,6 +988,30 @@ expat_cdata(void *userData, const char *data, int len) #endif } +#if XML_VERSION_AT_LEAST(1, 95, 8) +static void +expat_entity_declaration(void *userData, + const XML_Char *entityName, + int is_parameter_entity, + const XML_Char *value, + int value_length, + const XML_Char *base, + const XML_Char *systemId, + const XML_Char *publicId, + const XML_Char *notationName) +{ + struct expat_ctx_t *ectx = userData; + + /* Stop the parser if an entity declaration is hit. */ + XML_StopParser(ectx->parser, 0 /* resumable */); +} +#else +/* A noop default_handler. */ +static void +expat_default_handler(void *userData, const XML_Char *s, int len) +{ +} +#endif /* Implements svn_ra_serf__response_handler_t */ static svn_error_t * @@ -1042,6 +1066,12 @@ expat_response_handler(serf_request_t *request, XML_SetUserData(ectx->parser, ectx); XML_SetElementHandler(ectx->parser, expat_start, expat_end); XML_SetCharacterDataHandler(ectx->parser, expat_cdata); + +#if XML_VERSION_AT_LEAST(1, 95, 8) + XML_SetEntityDeclHandler(ectx->parser, expat_entity_declaration); +#else + XML_SetDefaultHandler(ectx->parser, expat_default_handler); +#endif } while (1) diff --git a/contrib/subversion/subversion/libsvn_repos/reporter.c b/contrib/subversion/subversion/libsvn_repos/reporter.c index 7bc8d476d..76c720161 100644 --- a/contrib/subversion/subversion/libsvn_repos/reporter.c +++ b/contrib/subversion/subversion/libsvn_repos/reporter.c @@ -916,7 +916,7 @@ update_entry(report_baton_t *b, svn_revnum_t s_rev, const char *s_path, const char *e_path, path_info_t *info, svn_depth_t wc_depth, svn_depth_t requested_depth, apr_pool_t *pool) { - svn_fs_root_t *s_root; + svn_fs_root_t *s_root = NULL; svn_boolean_t allowed, related; void *new_baton; svn_checksum_t *checksum; @@ -959,7 +959,26 @@ update_entry(report_baton_t *b, svn_revnum_t s_rev, const char *s_path, if (s_entry && t_entry && s_entry->kind == t_entry->kind) { int distance = svn_fs_compare_ids(s_entry->id, t_entry->id); - if (distance == 0 && !any_path_info(b, e_path) + svn_boolean_t changed = TRUE; + + /* Check related files for content changes to avoid reporting + * unchanged copies of files to the client as an open_file() call + * and change_file_prop()/apply_textdelta() calls with no-op changes. + * The client will otherwise raise unnecessary tree conflicts. */ + if (!b->ignore_ancestry && t_entry->kind == svn_node_file && + distance == 1) + { + if (s_root == NULL) + SVN_ERR(get_source_root(b, &s_root, s_rev)); + + SVN_ERR(svn_fs_props_different(&changed, s_root, s_path, + b->t_root, t_path, pool)); + if (!changed) + SVN_ERR(svn_fs_contents_different(&changed, s_root, s_path, + b->t_root, t_path, pool)); + } + + if ((distance == 0 || !changed) && !any_path_info(b, e_path) && (requested_depth <= wc_depth || t_entry->kind == svn_node_file)) { if (!info) diff --git a/contrib/subversion/subversion/libsvn_repos/repos.c b/contrib/subversion/subversion/libsvn_repos/repos.c index dc0caf5b5..1d62aeb50 100644 --- a/contrib/subversion/subversion/libsvn_repos/repos.c +++ b/contrib/subversion/subversion/libsvn_repos/repos.c @@ -712,7 +712,7 @@ create_hooks(svn_repos_t *repos, apr_pool_t *pool) "# Because the locks have already been created and cannot be undone," NL "# the exit code of the hook program is ignored. The hook program" NL "# can use the 'svnlook' utility to examine the paths in the repository" NL -"# but since the hook is invoked asyncronously the newly-created locks" NL +"# but since the hook is invoked asynchronously the newly-created locks" NL "# may no longer be present." NL; script = "REPOS=\"$1\"" NL diff --git a/contrib/subversion/subversion/libsvn_subr/config_file.c b/contrib/subversion/subversion/libsvn_subr/config_file.c index eede71757..8b4d7a352 100644 --- a/contrib/subversion/subversion/libsvn_subr/config_file.c +++ b/contrib/subversion/subversion/libsvn_subr/config_file.c @@ -74,6 +74,9 @@ typedef struct parse_context_t char parser_buffer[SVN__STREAM_CHUNK_SIZE]; /* Larger than most config files */ size_t buffer_pos; /* Current position within parser_buffer */ size_t buffer_size; /* parser_buffer contains this many bytes */ + + /* Non-zero if we hit EOF on the stream. */ + svn_boolean_t hit_stream_eof; } parse_context_t; @@ -101,11 +104,15 @@ parser_getc(parse_context_t *ctx, int *c) } else { - ctx->buffer_pos = 0; - ctx->buffer_size = sizeof(ctx->parser_buffer); + if (!ctx->hit_stream_eof) + { + ctx->buffer_pos = 0; + ctx->buffer_size = sizeof(ctx->parser_buffer); - SVN_ERR(svn_stream_read_full(ctx->stream, ctx->parser_buffer, - &(ctx->buffer_size))); + SVN_ERR(svn_stream_read_full(ctx->stream, ctx->parser_buffer, + &(ctx->buffer_size))); + ctx->hit_stream_eof = (ctx->buffer_size != sizeof(ctx->parser_buffer)); + } if (ctx->buffer_pos < ctx->buffer_size) { @@ -224,8 +231,10 @@ skip_bom(parse_context_t *ctx) * of the BOM characters into the parse_context_t buffer. This can * safely be assumed as long as we only try to use skip_bom() at the * start of the stream and the buffer is longer than 3 characters. */ - SVN_ERR_ASSERT(ctx->buffer_size > ctx->buffer_pos + 1); - if (buf[ctx->buffer_pos] == 0xBB && buf[ctx->buffer_pos + 1] == 0xBF) + SVN_ERR_ASSERT(ctx->buffer_size > ctx->buffer_pos + 1 || + ctx->hit_stream_eof); + if (ctx->buffer_size > ctx->buffer_pos + 1 && + buf[ctx->buffer_pos] == 0xBB && buf[ctx->buffer_pos + 1] == 0xBF) ctx->buffer_pos += 2; else SVN_ERR(parser_ungetc(ctx, ch)); @@ -579,6 +588,7 @@ svn_config__parse_stream(svn_config_t *cfg, svn_stream_t *stream, ctx->value = svn_stringbuf_create_empty(scratch_pool); ctx->buffer_pos = 0; ctx->buffer_size = 0; + ctx->hit_stream_eof = FALSE; SVN_ERR(skip_bom(ctx)); diff --git a/contrib/subversion/subversion/libsvn_subr/deprecated.c b/contrib/subversion/subversion/libsvn_subr/deprecated.c index a0bf813ea..68e3bd2cb 100644 --- a/contrib/subversion/subversion/libsvn_subr/deprecated.c +++ b/contrib/subversion/subversion/libsvn_subr/deprecated.c @@ -1484,7 +1484,11 @@ void svn_auth_get_keychain_simple_provider(svn_auth_provider_object_t **provider, apr_pool_t *pool) { +#ifdef SVN_HAVE_KEYCHAIN_SERVICES svn_auth__get_keychain_simple_provider(provider, pool); +#else + svn_auth__get_dummmy_simple_provider(provider, pool); +#endif } void @@ -1492,7 +1496,13 @@ svn_auth_get_keychain_ssl_client_cert_pw_provider (svn_auth_provider_object_t **provider, apr_pool_t *pool) { +#ifdef SVN_HAVE_KEYCHAIN_SERVICES svn_auth__get_keychain_ssl_client_cert_pw_provider(provider, pool); +#else + /* Not really the right type of dummy provider, but doesn't throw NULL + errors as just returning NULL would */ + svn_auth__get_dummmy_simple_provider(provider, pool); +#endif } #endif /* DARWIN */ diff --git a/contrib/subversion/subversion/libsvn_subr/gpg_agent.c b/contrib/subversion/subversion/libsvn_subr/gpg_agent.c index d53eec44c..36fe30ddb 100644 --- a/contrib/subversion/subversion/libsvn_subr/gpg_agent.c +++ b/contrib/subversion/subversion/libsvn_subr/gpg_agent.c @@ -233,6 +233,7 @@ find_running_gpg_agent(int *new_sd, apr_pool_t *pool) { char *buffer; char *gpg_agent_info = NULL; + char *gnupghome = NULL; const char *socket_name = NULL; const char *request = NULL; const char *p = NULL; @@ -243,10 +244,9 @@ find_running_gpg_agent(int *new_sd, apr_pool_t *pool) /* This implements the method of finding the socket as described in * the gpg-agent man page under the --use-standard-socket option. - * The manage page misleadingly says the standard socket is - * "named 'S.gpg-agent' located in the home directory." The standard - * socket path is actually in the .gnupg directory in the home directory, - * i.e. ~/.gnupg/S.gpg-agent */ + * The manage page says the standard socket is "named 'S.gpg-agent' located + * in the home directory." GPG's home directory is either the directory + * specified by $GNUPGHOME or ~/.gnupg. */ gpg_agent_info = getenv("GPG_AGENT_INFO"); if (gpg_agent_info != NULL) { @@ -259,6 +259,11 @@ find_running_gpg_agent(int *new_sd, apr_pool_t *pool) pool); socket_name = APR_ARRAY_IDX(socket_details, 0, const char *); } + else if ((gnupghome = getenv("GNUPGHOME")) != NULL) + { + const char *homedir = svn_dirent_canonicalize(gnupghome, pool); + socket_name = svn_dirent_join(homedir, "S.gpg-agent", pool); + } else { const char *homedir = svn_user_get_homedir(pool); @@ -611,11 +616,10 @@ simple_gpg_agent_next_creds(void **credentials, return SVN_NO_ERROR; } + bye_gpg_agent(sd); + if (strncmp(buffer, "OK\n", 3) != 0) - { - bye_gpg_agent(sd); - return SVN_NO_ERROR; - } + return SVN_NO_ERROR; /* TODO: This attempt limit hard codes it at 3 attempts (or 2 retries) * which matches svn command line client's retry_limit as set in diff --git a/contrib/subversion/subversion/libsvn_subr/internal_statements.h b/contrib/subversion/subversion/libsvn_subr/internal_statements.h index 93251a47e..39b671964 100644 --- a/contrib/subversion/subversion/libsvn_subr/internal_statements.h +++ b/contrib/subversion/subversion/libsvn_subr/internal_statements.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from internal_statements.sql and .dist_sandbox/subversion-1.9.4/subversion/libsvn_subr/token-map.h. +/* This file is automatically generated from internal_statements.sql and .dist_sandbox/subversion-1.9.5/subversion/libsvn_subr/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_INTERNAL_SAVEPOINT_SVN 0 diff --git a/contrib/subversion/subversion/libsvn_subr/sqlite.c b/contrib/subversion/subversion/libsvn_subr/sqlite.c index 18d1c4928..18124a350 100644 --- a/contrib/subversion/subversion/libsvn_subr/sqlite.c +++ b/contrib/subversion/subversion/libsvn_subr/sqlite.c @@ -1261,6 +1261,55 @@ reset_all_statements(svn_sqlite__db_t *db, return err; } +static svn_error_t * +rollback_transaction(svn_sqlite__db_t *db, + svn_error_t *error_to_wrap) +{ + svn_sqlite__stmt_t *stmt; + svn_error_t *err; + + err = get_internal_statement(&stmt, db, STMT_INTERNAL_ROLLBACK_TRANSACTION); + if (!err) + { + err = svn_error_trace(svn_sqlite__step_done(stmt)); + + if (err && err->apr_err == SVN_ERR_SQLITE_BUSY) + { + /* ### Houston, we have a problem! + + We are trying to rollback but we can't because some + statements are still busy. This leaves the database + unusable for future transactions as the current transaction + is still open. + + As we are returning the actual error as the most relevant + error in the chain, our caller might assume that it can + retry/compensate on this error (e.g. SVN_WC_LOCKED), while + in fact the SQLite database is unusable until the statements + started within this transaction are reset and the transaction + aborted. + + We try to compensate by resetting all prepared but unreset + statements; but we leave the busy error in the chain anyway to + help diagnosing the original error and help in finding where + a reset statement is missing. */ + err = svn_error_trace(reset_all_statements(db, err)); + err = svn_error_compose_create( + svn_error_trace(svn_sqlite__step_done(stmt)), + err); + } + } + + if (err) + { + /* Rollback failed, use a specific error code. */ + err = svn_error_create(SVN_SQLITE__ERR_ROLLBACK_FAILED, err, + _("SQLite transaction rollback failed")); + } + + return svn_error_compose_create(error_to_wrap, err); +} + svn_error_t * svn_sqlite__begin_transaction(svn_sqlite__db_t *db) { @@ -1303,46 +1352,37 @@ svn_sqlite__finish_transaction(svn_sqlite__db_t *db, /* Commit or rollback the sqlite transaction. */ if (err) { - svn_error_t *err2; - - err2 = get_internal_statement(&stmt, db, - STMT_INTERNAL_ROLLBACK_TRANSACTION); - if (!err2) - err2 = svn_sqlite__step_done(stmt); - - if (err2 && err2->apr_err == SVN_ERR_SQLITE_BUSY) - { - /* ### Houston, we have a problem! - - We are trying to rollback but we can't because some - statements are still busy. This leaves the database - unusable for future transactions as the current transaction - is still open. - - As we are returning the actual error as the most relevant - error in the chain, our caller might assume that it can - retry/compensate on this error (e.g. SVN_WC_LOCKED), while - in fact the SQLite database is unusable until the statements - started within this transaction are reset and the transaction - aborted. - - We try to compensate by resetting all prepared but unreset - statements; but we leave the busy error in the chain anyway to - help diagnosing the original error and help in finding where - a reset statement is missing. */ - - err2 = reset_all_statements(db, err2); - err2 = svn_error_compose_create( - svn_sqlite__step_done(stmt), - err2); - } - - return svn_error_compose_create(err, - err2); + return svn_error_trace(rollback_transaction(db, err)); + } + else + { + err = get_internal_statement(&stmt, db, + STMT_INTERNAL_COMMIT_TRANSACTION); + if (!err) + err = svn_error_trace(svn_sqlite__step_done(stmt)); + + /* Need to rollback if the commit fails as well, because otherwise the + db connection will be left in an unusable state. + + One important case to keep in mind is trying to COMMIT with concurrent + readers. In case the commit fails, because someone else is holding a + shared lock, sqlite keeps the transaction, and *also* keeps the file + locks on the database. While the first part only prevents from using + this connection, the second part prevents everyone else from accessing + the database while the connection is open. + + See https://www.sqlite.org/lang_transaction.html + + COMMIT might also result in an SQLITE_BUSY return code if an another + thread or process has a shared lock on the database that prevented + the database from being updated. When COMMIT fails in this way, the + transaction remains active and the COMMIT can be retried later after + the reader has had a chance to clear. */ + if (err) + return svn_error_trace(rollback_transaction(db, err)); } - SVN_ERR(get_internal_statement(&stmt, db, STMT_INTERNAL_COMMIT_TRANSACTION)); - return svn_error_trace(svn_sqlite__step_done(stmt)); + return SVN_NO_ERROR; } svn_error_t * @@ -1359,18 +1399,22 @@ svn_sqlite__finish_savepoint(svn_sqlite__db_t *db, STMT_INTERNAL_ROLLBACK_TO_SAVEPOINT_SVN); if (!err2) - err2 = svn_sqlite__step_done(stmt); - - if (err2 && err2->apr_err == SVN_ERR_SQLITE_BUSY) { - /* Ok, we have a major problem. Some statement is still open, which - makes it impossible to release this savepoint. + err2 = svn_error_trace(svn_sqlite__step_done(stmt)); + + if (err2 && err2->apr_err == SVN_ERR_SQLITE_BUSY) + { + /* Ok, we have a major problem. Some statement is still open, + which makes it impossible to release this savepoint. - ### See huge comment in svn_sqlite__finish_transaction for - further details */ + ### See huge comment in svn_sqlite__finish_transaction for + further details */ - err2 = reset_all_statements(db, err2); - err2 = svn_error_compose_create(svn_sqlite__step_done(stmt), err2); + err2 = svn_error_trace(reset_all_statements(db, err2)); + err2 = svn_error_compose_create( + svn_error_trace(svn_sqlite__step_done(stmt)), + err2); + } } err = svn_error_compose_create(err, err2); @@ -1378,9 +1422,9 @@ svn_sqlite__finish_savepoint(svn_sqlite__db_t *db, STMT_INTERNAL_RELEASE_SAVEPOINT_SVN); if (!err2) - err2 = svn_sqlite__step_done(stmt); + err2 = svn_error_trace(svn_sqlite__step_done(stmt)); - return svn_error_trace(svn_error_compose_create(err, err2)); + return svn_error_compose_create(err, err2); } SVN_ERR(get_internal_statement(&stmt, db, diff --git a/contrib/subversion/subversion/libsvn_subr/sysinfo.c b/contrib/subversion/subversion/libsvn_subr/sysinfo.c index 067867224..4ac923c05 100644 --- a/contrib/subversion/subversion/libsvn_subr/sysinfo.c +++ b/contrib/subversion/subversion/libsvn_subr/sysinfo.c @@ -1143,6 +1143,8 @@ release_name_from_version(const char *osver) case 8: return "Mountain Lion"; case 9: return "Mavericks"; case 10: return "Yosemite"; + case 11: return "El Capitan"; + case 12: return "Sierra"; } return NULL; diff --git a/contrib/subversion/subversion/libsvn_subr/win32_crashrpt.c b/contrib/subversion/subversion/libsvn_subr/win32_crashrpt.c index 680b944b9..1349d84c9 100644 --- a/contrib/subversion/subversion/libsvn_subr/win32_crashrpt.c +++ b/contrib/subversion/subversion/libsvn_subr/win32_crashrpt.c @@ -53,9 +53,9 @@ HANDLE dbghelp_dll = INVALID_HANDLE_VALUE; #define LOGFILE_PREFIX "svn-crash-log" #if defined(_M_IX86) -#define FORMAT_PTR "0x%08x" +#define FORMAT_PTR "0x%08Ix" #elif defined(_M_X64) -#define FORMAT_PTR "0x%016I64x" +#define FORMAT_PTR "0x%016Ix" #endif /*** Code. ***/ @@ -171,7 +171,7 @@ write_module_info_callback(void *data, MINIDUMP_MODULE_CALLBACK module = callback_input->Module; char *buf = convert_wbcs_to_ansi(module.FullPath); - fprintf(log_file, FORMAT_PTR, module.BaseOfImage); + fprintf(log_file, FORMAT_PTR, (UINT_PTR)module.BaseOfImage); fprintf(log_file, " %s", buf); free(buf); @@ -260,18 +260,19 @@ write_process_info(EXCEPTION_RECORD *exception, CONTEXT *context, #endif } -/* Formats the value at address based on the specified basic type - * (char, int, long ...). */ +/* Writes the value at address based on the specified basic type + * (char, int, long ...) to LOG_FILE. */ static void -format_basic_type(char *buf, DWORD basic_type, DWORD64 length, void *address) +write_basic_type(FILE *log_file, DWORD basic_type, DWORD64 length, + void *address) { switch(length) { case 1: - sprintf(buf, "0x%02x", (int)*(unsigned char *)address); + fprintf(log_file, "0x%02x", (int)*(unsigned char *)address); break; case 2: - sprintf(buf, "0x%04x", (int)*(unsigned short *)address); + fprintf(log_file, "0x%04x", (int)*(unsigned short *)address); break; case 4: switch(basic_type) @@ -279,38 +280,38 @@ format_basic_type(char *buf, DWORD basic_type, DWORD64 length, void *address) case 2: /* btChar */ { if (!IsBadStringPtr(*(PSTR*)address, 32)) - sprintf(buf, "\"%.31s\"", *(const char **)address); + fprintf(log_file, "\"%.31s\"", *(const char **)address); else - sprintf(buf, FORMAT_PTR, *(DWORD_PTR *)address); + fprintf(log_file, FORMAT_PTR, *(DWORD_PTR *)address); } case 6: /* btInt */ - sprintf(buf, "%d", *(int *)address); + fprintf(log_file, "%d", *(int *)address); break; case 8: /* btFloat */ - sprintf(buf, "%f", *(float *)address); + fprintf(log_file, "%f", *(float *)address); break; default: - sprintf(buf, FORMAT_PTR, *(DWORD_PTR *)address); + fprintf(log_file, FORMAT_PTR, *(DWORD_PTR *)address); break; } break; case 8: if (basic_type == 8) /* btFloat */ - sprintf(buf, "%lf", *(double *)address); + fprintf(log_file, "%lf", *(double *)address); else - sprintf(buf, "0x%016I64X", *(unsigned __int64 *)address); + fprintf(log_file, "0x%016I64X", *(unsigned __int64 *)address); break; default: - sprintf(buf, "[unhandled type 0x%08x of length " FORMAT_PTR "]", - basic_type, length); + fprintf(log_file, "[unhandled type 0x%08x of length " FORMAT_PTR "]", + basic_type, (UINT_PTR)length); break; } } -/* Formats the value at address based on the type (pointer, user defined, - * basic type). */ +/* Writes the value at address based on the type (pointer, user defined, + * basic type) to LOG_FILE. */ static void -format_value(char *value_str, DWORD64 mod_base, DWORD type, void *value_addr) +write_value(FILE *log_file, DWORD64 mod_base, DWORD type, void *value_addr) { DWORD tag = 0; int ptr = 0; @@ -340,19 +341,19 @@ format_value(char *value_str, DWORD64 mod_base, DWORD type, void *value_addr) LocalFree(type_name_wbcs); if (ptr == 0) - sprintf(value_str, "(%s) " FORMAT_PTR, - type_name, (DWORD_PTR *)value_addr); + fprintf(log_file, "(%s) " FORMAT_PTR, + type_name, (UINT_PTR)(DWORD_PTR *)value_addr); else if (ptr == 1) - sprintf(value_str, "(%s *) " FORMAT_PTR, + fprintf(log_file, "(%s *) " FORMAT_PTR, type_name, *(DWORD_PTR *)value_addr); else - sprintf(value_str, "(%s **) " FORMAT_PTR, + fprintf(log_file, "(%s **) " FORMAT_PTR, type_name, *(DWORD_PTR *)value_addr); free(type_name); } else - sprintf(value_str, "[no symbol tag]"); + fprintf(log_file, "[no symbol tag]"); } break; case 16: /* SymTagBaseType */ @@ -364,27 +365,27 @@ format_value(char *value_str, DWORD64 mod_base, DWORD type, void *value_addr) /* print a char * as a string */ if (ptr == 1 && length == 1) { - sprintf(value_str, FORMAT_PTR " \"%s\"", + fprintf(log_file, FORMAT_PTR " \"%s\"", *(DWORD_PTR *)value_addr, *(const char **)value_addr); } else if (ptr >= 1) { - sprintf(value_str, FORMAT_PTR, *(DWORD_PTR *)value_addr); + fprintf(log_file, FORMAT_PTR, *(DWORD_PTR *)value_addr); } else if (SymGetTypeInfo_(proc, mod_base, type, TI_GET_BASETYPE, &bt)) { - format_basic_type(value_str, bt, length, value_addr); + write_basic_type(log_file, bt, length, value_addr); } } break; case 12: /* SymTagEnum */ - sprintf(value_str, "%d", *(DWORD_PTR *)value_addr); + fprintf(log_file, "%d", *(DWORD_PTR *)value_addr); break; case 13: /* SymTagFunctionType */ - sprintf(value_str, FORMAT_PTR, *(DWORD_PTR *)value_addr); + fprintf(log_file, FORMAT_PTR, *(DWORD_PTR *)value_addr); break; default: - sprintf(value_str, "[unhandled tag: %d]", tag); + fprintf(log_file, "[unhandled tag: %d]", tag); break; } } @@ -408,7 +409,6 @@ write_var_values(PSYMBOL_INFO sym_info, ULONG sym_size, void *baton) FILE *log_file = ((symbols_baton_t*)baton)->log_file; int nr_of_frame = ((symbols_baton_t*)baton)->nr_of_frame; BOOL log_params = ((symbols_baton_t*)baton)->log_params; - char value_str[256] = ""; /* get the variable's data */ if (sym_info->Flags & SYMFLAG_REGREL) @@ -422,21 +422,21 @@ write_var_values(PSYMBOL_INFO sym_info, ULONG sym_size, void *baton) if (log_params && sym_info->Flags & SYMFLAG_PARAMETER) { if (last_nr_of_frame == nr_of_frame) - fprintf(log_file, ", ", 2); + fprintf(log_file, ", "); else last_nr_of_frame = nr_of_frame; - format_value(value_str, sym_info->ModBase, sym_info->TypeIndex, - (void *)var_data); - fprintf(log_file, "%.*s=%s", (int)sym_info->NameLen, sym_info->Name, - value_str); + fprintf(log_file, "%.*s=", (int)sym_info->NameLen, sym_info->Name); + write_value(log_file, sym_info->ModBase, sym_info->TypeIndex, + (void *)var_data); } if (!log_params && sym_info->Flags & SYMFLAG_LOCAL) { - format_value(value_str, sym_info->ModBase, sym_info->TypeIndex, - (void *)var_data); - fprintf(log_file, " %.*s = %s\n", (int)sym_info->NameLen, - sym_info->Name, value_str); + fprintf(log_file, " %.*s = ", (int)sym_info->NameLen, + sym_info->Name); + write_value(log_file, sym_info->ModBase, sym_info->TypeIndex, + (void *)var_data); + fprintf(log_file, "\n"); } return TRUE; diff --git a/contrib/subversion/subversion/libsvn_subr/xml.c b/contrib/subversion/subversion/libsvn_subr/xml.c index 7f66b4531..edf21aae6 100644 --- a/contrib/subversion/subversion/libsvn_subr/xml.c +++ b/contrib/subversion/subversion/libsvn_subr/xml.c @@ -46,6 +46,14 @@ #error Expat is unusable -- it has been compiled for wide characters #endif +#ifndef XML_VERSION_AT_LEAST +#define XML_VERSION_AT_LEAST(major,minor,patch) \ +(((major) < XML_MAJOR_VERSION) \ + || ((major) == XML_MAJOR_VERSION && (minor) < XML_MINOR_VERSION) \ + || ((major) == XML_MAJOR_VERSION && (minor) == XML_MINOR_VERSION && \ + (patch) <= XML_MICRO_VERSION)) +#endif /* XML_VERSION_AT_LEAST */ + const char * svn_xml__compiled_version(void) { @@ -361,6 +369,28 @@ static void expat_data_handler(void *userData, const XML_Char *s, int len) (*svn_parser->data_handler)(svn_parser->baton, s, (apr_size_t)len); } +#if XML_VERSION_AT_LEAST(1, 95, 8) +static void expat_entity_declaration(void *userData, + const XML_Char *entityName, + int is_parameter_entity, + const XML_Char *value, + int value_length, + const XML_Char *base, + const XML_Char *systemId, + const XML_Char *publicId, + const XML_Char *notationName) +{ + svn_xml_parser_t *svn_parser = userData; + + /* Stop the parser if an entity declaration is hit. */ + XML_StopParser(svn_parser->parser, 0 /* resumable */); +} +#else +/* A noop default_handler. */ +static void expat_default_handler(void *userData, const XML_Char *s, int len) +{ +} +#endif /*** Making a parser. ***/ @@ -382,6 +412,12 @@ svn_xml_make_parser(void *baton, XML_SetCharacterDataHandler(parser, data_handler ? expat_data_handler : NULL); +#if XML_VERSION_AT_LEAST(1, 95, 8) + XML_SetEntityDeclHandler(parser, expat_entity_declaration); +#else + XML_SetDefaultHandler(parser, expat_default_handler); +#endif + /* ### we probably don't want this pool; or at least we should pass it ### to the callbacks and clear it periodically. */ subpool = svn_pool_create(pool); @@ -463,6 +499,9 @@ void svn_xml_signal_bailout(svn_error_t *error, /* This will cause the current XML_Parse() call to finish quickly! */ XML_SetElementHandler(svn_parser->parser, NULL, NULL); XML_SetCharacterDataHandler(svn_parser->parser, NULL); +#if XML_VERSION_AT_LEAST(1, 95, 8) + XML_SetEntityDeclHandler(svn_parser->parser, NULL); +#endif /* Once outside of XML_Parse(), the existence of this field will cause svn_delta_parse()'s main read-loop to return error. */ diff --git a/contrib/subversion/subversion/libsvn_wc/conflicts.c b/contrib/subversion/subversion/libsvn_wc/conflicts.c index ae0b348c3..f04c6de59 100644 --- a/contrib/subversion/subversion/libsvn_wc/conflicts.c +++ b/contrib/subversion/subversion/libsvn_wc/conflicts.c @@ -1622,7 +1622,14 @@ build_text_conflict_resolve_items(svn_skel_t **work_items, } case svn_wc_conflict_choose_mine_full: { - install_from_abspath = mine_abspath; + /* In case of selecting to resolve the conflict choosing the full + own file, allow the text conflict resolution to just take the + existing local file if no merged file was present (case: binary + file conflicts do not generate a locally merge file). + */ + install_from_abspath = mine_abspath + ? mine_abspath + : local_abspath; break; } case svn_wc_conflict_choose_theirs_conflict: @@ -1633,6 +1640,15 @@ build_text_conflict_resolve_items(svn_skel_t **work_items, ? svn_diff_conflict_display_latest : svn_diff_conflict_display_modified; + if (mine_abspath == NULL) + return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, + _("Conflict on '%s' cannot be resolved to " + "'theirs-conflict' or 'mine-conflict' " + "because a merged version of the file " + "cannot be created."), + svn_dirent_local_style(local_abspath, + scratch_pool)); + SVN_ERR(merge_showing_conflicts(&install_from_abspath, db, local_abspath, style, merge_options, diff --git a/contrib/subversion/subversion/libsvn_wc/update_editor.c b/contrib/subversion/subversion/libsvn_wc/update_editor.c index 5f4d64826..4dca3af7e 100644 --- a/contrib/subversion/subversion/libsvn_wc/update_editor.c +++ b/contrib/subversion/subversion/libsvn_wc/update_editor.c @@ -2883,10 +2883,7 @@ absent_node(const char *path, if (pb->skip_this) return SVN_NO_ERROR; - SVN_ERR(mark_directory_edited(pb, scratch_pool)); - local_abspath = svn_dirent_join(pb->local_abspath, name, scratch_pool); - /* If an item by this name is scheduled for addition that's a genuine tree-conflict. */ err = svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL, NULL, NULL, @@ -2906,6 +2903,10 @@ absent_node(const char *path, kind = svn_node_unknown; } + if (status != svn_wc__db_status_server_excluded) + SVN_ERR(mark_directory_edited(pb, scratch_pool)); + /* Else fall through as we should update the revision anyway */ + if (status == svn_wc__db_status_normal) { svn_boolean_t wcroot; @@ -2929,31 +2930,53 @@ absent_node(const char *path, } else { - /* The server asks us to replace a file external - (Existing BASE node; not reported by the working copy crawler or - there would have been a delete_entry() call. - - There is no way we can store this state in the working copy as - the BASE layer is already filled. + svn_boolean_t file_external; + svn_revnum_t revnum; - We could error out, but that is not helping anybody; the user is not - even seeing with what the file external would be replaced, so let's - report a skip and continue the update. - */ + SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, &revnum, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + &file_external, + eb->db, local_abspath, + scratch_pool, scratch_pool)); - if (eb->notify_func) + if (file_external) { - svn_wc_notify_t *notify; - notify = svn_wc_create_notify( + /* The server asks us to replace a file external + (Existing BASE node; not reported by the working copy crawler + or there would have been a delete_entry() call. + + There is no way we can store this state in the working copy as + the BASE layer is already filled. + We could error out, but that is not helping anybody; the user is not + even seeing with what the file external would be replaced, so let's + report a skip and continue the update. + */ + + if (eb->notify_func) + { + svn_wc_notify_t *notify; + notify = svn_wc_create_notify( local_abspath, svn_wc_notify_update_skip_obstruction, scratch_pool); - eb->notify_func(eb->notify_baton, notify, scratch_pool); + eb->notify_func(eb->notify_baton, notify, scratch_pool); + } + + svn_pool_destroy(scratch_pool); + return SVN_NO_ERROR; } + else + { + /* We have a normal local node that will now be hidden for the + user. Let's try to delete what is there. This may introduce + tree conflicts if there are local changes */ + SVN_ERR(delete_entry(path, revnum, pb, scratch_pool)); - svn_pool_destroy(scratch_pool); - return SVN_NO_ERROR; + /* delete_entry() promises that BASE is empty after the operation, + so we can just fall through now */ + } } } else if (status == svn_wc__db_status_not_present diff --git a/contrib/subversion/subversion/libsvn_wc/wc-checks.h b/contrib/subversion/subversion/libsvn_wc/wc-checks.h index 35f15336f..09d43fb53 100644 --- a/contrib/subversion/subversion/libsvn_wc/wc-checks.h +++ b/contrib/subversion/subversion/libsvn_wc/wc-checks.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-checks.sql and .dist_sandbox/subversion-1.9.4/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-checks.sql and .dist_sandbox/subversion-1.9.5/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_VERIFICATION_TRIGGERS 0 diff --git a/contrib/subversion/subversion/libsvn_wc/wc-metadata.h b/contrib/subversion/subversion/libsvn_wc/wc-metadata.h index 7b74d8374..5ff8744e0 100644 --- a/contrib/subversion/subversion/libsvn_wc/wc-metadata.h +++ b/contrib/subversion/subversion/libsvn_wc/wc-metadata.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-metadata.sql and .dist_sandbox/subversion-1.9.4/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-metadata.sql and .dist_sandbox/subversion-1.9.5/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 diff --git a/contrib/subversion/subversion/libsvn_wc/wc-queries.h b/contrib/subversion/subversion/libsvn_wc/wc-queries.h index ad5ccb573..8621cb8b5 100644 --- a/contrib/subversion/subversion/libsvn_wc/wc-queries.h +++ b/contrib/subversion/subversion/libsvn_wc/wc-queries.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.9.4/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.9.5/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_SELECT_NODE_INFO 0 diff --git a/contrib/subversion/subversion/svn/info-cmd.c b/contrib/subversion/subversion/svn/info-cmd.c index 004098620..fafc398c5 100644 --- a/contrib/subversion/subversion/svn/info-cmd.c +++ b/contrib/subversion/subversion/svn/info-cmd.c @@ -764,7 +764,7 @@ print_info_item_revision(svn_revnum_t rev, const char *target_path, if (target_path) SVN_ERR(svn_cmdline_printf(pool, "%-10ld %s", rev, target_path)); else - SVN_ERR(svn_cmdline_printf(pool, "%-10ld", rev)); + SVN_ERR(svn_cmdline_printf(pool, "%ld", rev)); } else if (target_path) SVN_ERR(svn_cmdline_printf(pool, "%-10s %s", "", target_path)); diff --git a/contrib/subversion/subversion/svn/merge-cmd.c b/contrib/subversion/subversion/svn/merge-cmd.c index 6feda4cd1..cbc818b89 100644 --- a/contrib/subversion/subversion/svn/merge-cmd.c +++ b/contrib/subversion/subversion/svn/merge-cmd.c @@ -123,6 +123,11 @@ run_merge(svn_boolean_t two_sources_specified, _("Merge sources must both be " "either paths or URLs")); + if (svn_path_is_url(targetpath)) + return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, + _("Merge target '%s' must be a local path " + "but looks like a URL"), targetpath); + if (opt_state->verbose) SVN_ERR(svn_cmdline_printf(scratch_pool, _("--- Merging\n"))); merge_err = svn_client_merge5(sourcepath1, diff --git a/contrib/subversion/subversion/svnserve/serve.c b/contrib/subversion/subversion/svnserve/serve.c index c66764bd0..91f1d5af9 100644 --- a/contrib/subversion/subversion/svnserve/serve.c +++ b/contrib/subversion/subversion/svnserve/serve.c @@ -3588,6 +3588,7 @@ find_repos(const char *url, if (hooks_env) hooks_env = svn_dirent_internal_style(hooks_env, scratch_pool); + SVN_ERR(svn_repos_hooks_setenv(repository->repos, hooks_env, scratch_pool)); repository->hooks_env = apr_pstrdup(result_pool, hooks_env); return SVN_NO_ERROR; -- 2.45.0