You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/01/07 12:29:11 UTC
svn commit: r1556183 - in /subversion/branches/javahl-1.8-extensions: ./
build/ build/generator/ subversion/bindings/swig/ subversion/include/
subversion/libsvn_client/ subversion/libsvn_fs_fs/ subversion/libsvn_subr/
subversion/libsvn_wc/ subversion/m...
Author: brane
Date: Tue Jan 7 11:29:10 2014
New Revision: 1556183
URL: http://svn.apache.org/r1556183
Log:
On the javahl-1.8-extensions branch: Synced from 1.8.x up to r1556175.
Added:
subversion/branches/javahl-1.8-extensions/subversion/tests/libsvn_subr/zlib.deflated
- copied unchanged from r1556175, subversion/branches/1.8.x/subversion/tests/libsvn_subr/zlib.deflated
Removed:
subversion/branches/javahl-1.8-extensions/tools/server-side/svnpubsub/notes/
Modified:
subversion/branches/javahl-1.8-extensions/ (props changed)
subversion/branches/javahl-1.8-extensions/CHANGES (contents, props changed)
subversion/branches/javahl-1.8-extensions/Makefile.in
subversion/branches/javahl-1.8-extensions/NOTICE
subversion/branches/javahl-1.8-extensions/build.conf
subversion/branches/javahl-1.8-extensions/build/generator/gen_win.py
subversion/branches/javahl-1.8-extensions/build/run_ctypesgen.sh
subversion/branches/javahl-1.8-extensions/configure.ac (contents, props changed)
subversion/branches/javahl-1.8-extensions/subversion/bindings/swig/core.i
subversion/branches/javahl-1.8-extensions/subversion/include/svn_auth.h
subversion/branches/javahl-1.8-extensions/subversion/include/svn_version.h
subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/externals.c
subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/util.c
subversion/branches/javahl-1.8-extensions/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/sysinfo.c
subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/diff.h
subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/diff_local.c
subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/upgrade.c
subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc-metadata.sql
subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc_db.c
subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc_db.h
subversion/branches/javahl-1.8-extensions/subversion/mod_authz_svn/mod_authz_svn.c
subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/dav_svn.h
subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/mod_dav_svn.c
subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/repos.c
subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/util.c
subversion/branches/javahl-1.8-extensions/subversion/svn/conflict-callbacks.c
subversion/branches/javahl-1.8-extensions/subversion/svn/status-cmd.c
subversion/branches/javahl-1.8-extensions/subversion/svn/svn.c (contents, props changed)
subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/diff_tests.py
subversion/branches/javahl-1.8-extensions/subversion/tests/libsvn_subr/checksum-test.c
subversion/branches/javahl-1.8-extensions/subversion/tests/libsvn_wc/wc-queries-test.c
subversion/branches/javahl-1.8-extensions/subversion/tests/svn_test.h
subversion/branches/javahl-1.8-extensions/subversion/tests/svn_test_main.c
subversion/branches/javahl-1.8-extensions/tools/server-side/mod_dontdothat/mod_dontdothat.c (contents, props changed)
Propchange: subversion/branches/javahl-1.8-extensions/
------------------------------------------------------------------------------
Merged /subversion/branches/1.8.x-openssl-dirs:r1535137-1540436
Merged /subversion/branches/1.8.x-r1541790:r1541791-1542075
Merged /subversion/branches/1.8.x-r1537193:r1537217-1541815
Merged /subversion/branches/1.8.x:r1535214-1556175
Merged /subversion/trunk:r1470221,1470650,1499470,1501656,1501702,1525902,1534860,1535115,1535161,1536537,1537147,1537190,1537193,1537221,1537263,1537360,1537415,1537555,1537700,1538516-1538517,1538519,1538574,1538581,1540044,1540417,1541432,1541635,1541705,1541790,1542042,1542069,1542071,1542119,1542129,1542138,1542146,1542151,1542765,1542767,1542774,1543145,1543413,1543961,1544295,1544316,1544878,1544895,1550803
Merged /subversion/branches/1.8.x-r1537147:r1537201-1537216
Merged /subversion/branches/1.8.x-issue4448:r1540420-1541802
Modified: subversion/branches/javahl-1.8-extensions/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/CHANGES?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/CHANGES (original)
+++ subversion/branches/javahl-1.8-extensions/CHANGES Tue Jan 7 11:29:10 2014
@@ -1,3 +1,33 @@
+Version 1.8.5
+(25 November 2013, from /branches/1.8.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.8.5
+
+ User-visible changes:
+ - Client-side bugfixes:
+ * fix externals that point at redirected locations (issues #4428, #4429)
+ * diff: fix assertion with move inside a copy (issue #4444)
+
+ - Server-side bugfixes:
+ * mod_dav_svn: Prevent crashes with some 3rd party modules (r1537360 et al)
+ * mod_dav_svn: canonicalize paths properly (r1542071)
+ * mod_authz_svn: fix crash of mod_authz_svn with invalid config (r1541432)
+ * hotcopy: fix hotcopy losing revprop files in packed repos (issue #4448)
+
+ - Other tool improvements and bugfixes:
+ * mod_dontdothat: Fix the uri parser (r1542069 et al)
+
+ Developer-visible changes:
+ - General:
+ * fix compilation with '--enable-optimize' with clang (r1534860)
+ * fix compilation with debug build of BDB on Windows (r1501656, r1501702)
+ * fix '--with-openssl' option when building on Windows (r1535139)
+ * add test to fail when built against broken ZLib (r1537193 et al)
+
+ - Bindings:
+ * swig-rb: fix tests to run without installing on OS X (r1535161)
+ * ctypes-python: build with compiler selected via configure (r1536537)
+
+
Version 1.8.4
(29 October 2013, from /branches/1.8.x)
http://svn.apache.org/repos/asf/subversion/tags/1.8.4
@@ -523,6 +553,36 @@ http://svn.apache.org/repos/asf/subversi
* fix some reference counting bugs in swig-py bindings (r1464899, r1466524)
+Version 1.7.14
+(25 Nov 2013, from /branches/1.7.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.7.14
+
+ User-visible changes:
+ - Client- and server-side bugfixes:
+ * fix assertion on urls of the form 'file://./' (r1516806)
+
+ - Client-side bugfixes:
+ * upgrade: fix an assertion when used with pre-1.3 wcs (r1530849)
+ * ra_local: fix error with repository in Windows drive root (r1518184)
+ * fix crash on windows when piped command is interrupted (r1522892)
+ * fix externals that point at redirected locations (issues #4428, #4429)
+ * diff: fix incorrect calculation of changes in some cases (issue #4283)
+ * diff: fix errors with added/deleted targets (issues #4153, #4421)
+
+ - Server-side bugfixes:
+ * mod_dav_svn: Prevent crashes with some 3rd party modules (r1537360 et al)
+ * fix OOM on concurrent requests at threaded server start (r1527103 et al)
+ * fsfs: limit commit time of files with deep change histories (r1536790)
+ * mod_dav_svn: canonicalize paths properly (r1542071)
+
+ - Other tool improvements and bugfixes:
+ * mod_dontdothat: Fix the uri parser (r1542069 et al)
+
+ Developer-visible changes:
+ - Bindings:
+ * javahl: canonicalize path for streamFileContent method (r1524869)
+
+
Version 1.7.13
(29 Aug 2013, from /branches/1.7.x)
http://svn.apache.org/repos/asf/subversion/tags/1.7.13
Propchange: subversion/branches/javahl-1.8-extensions/CHANGES
------------------------------------------------------------------------------
Merged /subversion/branches/1.8.x/CHANGES:r1535214-1556175
Merged /subversion/trunk/CHANGES:r1541705,1542119,1542129,1542138,1542146,1542151
Modified: subversion/branches/javahl-1.8-extensions/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/Makefile.in?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/Makefile.in (original)
+++ subversion/branches/javahl-1.8-extensions/Makefile.in Tue Jan 7 11:29:10 2014
@@ -108,6 +108,7 @@ PACKAGE_VERSION=@PACKAGE_VERSION@
CC = @CC@
CXX = @CXX@
+CPP = @CPP@
EXEEXT = @EXEEXT@
SHELL = @SHELL@
@@ -198,6 +199,19 @@ COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXF
COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
COMPILE_JAVAHL_JAVAH = $(JAVAH)
+# export an env variable so that the tests can run without being installed
+TEST_SHLIB_VAR_JAVAHL=\
+ if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \
+ for d in $(abs_builddir)/subversion/libsvn_*; do \
+ if [ -n "$$DYLD_LIBRARY_PATH" ]; then \
+ @SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \
+ else \
+ @SVN_APR_SHLIB_PATH_VAR@="$$d/.libs"; \
+ fi; \
+ done; \
+ export @SVN_APR_SHLIB_PATH_VAR@; \
+ fi;
+
# special compilation for files destined for cxxhl
COMPILE_CXXHL_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) $(LT_CFLAGS) $(CXXHL_INCLUDES) -o $@ -c
@@ -331,7 +345,7 @@ INSTALL_EXTRA_SWIG_RB=\
# export an env variable so that the tests can run without being installed
TEST_SHLIB_VAR_SWIG_RB=\
if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \
- for d in $(SWIG_PY_DIR)/libsvn_swig_rb $(SWIG_PY_DIR)/../../../libsvn_*; do \
+ for d in $(SWIG_RB_DIR)/libsvn_swig_ruby $(SWIG_RB_DIR)/../../../libsvn_*; do \
if [ -n "$$DYLD_LIBRARY_PATH" ]; then \
@SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \
else \
@@ -464,11 +478,13 @@ clean-javahl:
check-tigris-javahl: javahl-compat
@FIX_JAVAHL_LIB@
- $(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" -Djava.library.path=@JAVAHL_OBJDIR@:$(libdir) -classpath $(javahl_compat_tests_PATH):$(javahl_tests_CLASSPATH) "-Dtest.tests=$(JAVAHL_TESTS)" org.tigris.subversion.javahl.RunTests
+ $(TEST_SHLIB_VAR_JAVAHL) \
+ $(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_compat_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.tigris.subversion.javahl.RunTests
check-apache-javahl: javahl
@FIX_JAVAHL_LIB@
- $(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" -Djava.library.path=@JAVAHL_OBJDIR@:$(libdir) -classpath $(javahl_tests_PATH):$(javahl_tests_CLASSPATH) "-Dtest.tests=$(JAVAHL_TESTS)" org.apache.subversion.javahl.RunTests
+ $(TEST_SHLIB_VAR_JAVAHL) \
+ $(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.apache.subversion.javahl.RunTests
check-javahl: check-apache-javahl
@@ -873,7 +889,7 @@ install-swig-rb-doc:
# ctypes-python make targets
ctypes-python: local-all
- $(SHELL) $(abs_srcdir)/build/run_ctypesgen.sh "$(LT_EXECUTE)" "$(CPPFLAGS)" "$(EXTRA_CTYPES_LDFLAGS)" "$(PYTHON)" "$(CTYPESGEN)" "$(abs_srcdir)" "$(abs_builddir)" "$(libdir)" "$(SVN_APR_CONFIG)" "$(SVN_APRUTIL_CONFIG)"
+ $(SHELL) $(abs_srcdir)/build/run_ctypesgen.sh "$(LT_EXECUTE)" "$(CPPFLAGS)" "$(EXTRA_CTYPES_LDFLAGS)" "$(PYTHON)" "$(CTYPESGEN)" "$(abs_srcdir)" "$(abs_builddir)" "$(libdir)" "$(SVN_APR_CONFIG)" "$(SVN_APRUTIL_CONFIG)" "$(CPP)"
install-ctypes-python: ctypes-python
cd $(CTYPES_PYTHON_SRC_DIR); \
Modified: subversion/branches/javahl-1.8-extensions/NOTICE
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/NOTICE?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/NOTICE (original)
+++ subversion/branches/javahl-1.8-extensions/NOTICE Tue Jan 7 11:29:10 2014
@@ -1,5 +1,5 @@
-Subversion
-Copyright 2010 The Apache Software Foundation
+Apache Subversion
+Copyright 2013 The Apache Software Foundation
This product includes software developed by many people, and distributed
under Contributor License Agreements to The Apache Software Foundation
Modified: subversion/branches/javahl-1.8-extensions/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/build.conf?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/build.conf (original)
+++ subversion/branches/javahl-1.8-extensions/build.conf Tue Jan 7 11:29:10 2014
@@ -806,7 +806,7 @@ type = exe
path = subversion/tests/libsvn_subr
sources = checksum-test.c
install = test
-libs = libsvn_test libsvn_subr apr
+libs = libsvn_test libsvn_subr apr zlib
[compat-test]
description = Test compatibility functions
Modified: subversion/branches/javahl-1.8-extensions/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/build/generator/gen_win.py?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/build/generator/gen_win.py (original)
+++ subversion/branches/javahl-1.8-extensions/build/generator/gen_win.py Tue Jan 7 11:29:10 2014
@@ -220,6 +220,9 @@ class GeneratorBase(gen_base.GeneratorBa
if os.path.exists(os.path.join(path, lib + ".lib")):
self.bdb_lib = lib
break
+ elif os.path.exists(os.path.join(path, lib + "d.lib")):
+ self.bdb_lib = lib
+ break
else:
self.bdb_lib = None
@@ -238,7 +241,8 @@ class WinGeneratorBase(GeneratorBase):
GeneratorBase.__init__(self, fname, verfname, options)
if self.bdb_lib is not None:
- print("Found %s.lib in %s\n" % (self.bdb_lib, self.bdb_path))
+ print("Found %s.lib or %sd.lib in %s\n" % (self.bdb_lib, self.bdb_lib,
+ self.bdb_path))
else:
print("BDB not found, BDB fs will not be built\n")
@@ -943,6 +947,9 @@ class WinGeneratorBase(GeneratorBase):
if self.serf_lib:
fakeincludes.append(self.apath(self.serf_path))
+
+ if self.openssl_path and self.openssl_inc_dir:
+ fakeincludes.append(self.apath(self.openssl_inc_dir))
if self.swig_libdir \
and (isinstance(target, gen_base.TargetSWIG)
@@ -1002,6 +1009,9 @@ class WinGeneratorBase(GeneratorBase):
if self.serf_lib:
if (self.serf_ver_maj, self.serf_ver_min) >= (1, 3):
fakelibdirs.append(self.apath(self.serf_path))
+
+ if self.openssl_path and self.openssl_lib_dir:
+ fakelibdirs.append(self.apath(self.openssl_lib_dir))
else:
fakelibdirs.append(self.apath(msvc_path_join(self.serf_path, cfg)))
@@ -1465,6 +1475,24 @@ class WinGeneratorBase(GeneratorBase):
"Check if serf and its dependencies are available"
minimal_serf_version = (1, 2, 1)
+
+ if self.openssl_path and os.path.exists(self.openssl_path):
+ version_path = os.path.join(self.openssl_path, 'inc32/openssl/opensslv.h')
+ if os.path.isfile(version_path):
+ # We have an OpenSSL Source location (legacy handling)
+ self.openssl_inc_dir = os.path.join(self.openssl_path, 'inc32')
+ if self.static_openssl:
+ self.openssl_lib_dir = os.path.join(self.openssl_path, 'out32')
+ else:
+ self.openssl_lib_dir = os.path.join(self.openssl_path, 'out32dll')
+ elif os.path.isfile(os.path.join(self.openssl_path,
+ 'include/openssl/opensslv.h')):
+ self.openssl_inc_dir = os.path.join(self.openssl_path, 'include')
+ self.openssl_lib_dir = os.path.join(self.openssl_path, 'lib')
+ else:
+ print('WARNING: \'opensslv.h\' not found')
+ self.openssl_path = None
+
self.serf_lib = None
if self.serf_path and os.path.exists(self.serf_path):
if self.openssl_path and os.path.exists(self.openssl_path):
Modified: subversion/branches/javahl-1.8-extensions/build/run_ctypesgen.sh
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/build/run_ctypesgen.sh?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/build/run_ctypesgen.sh (original)
+++ subversion/branches/javahl-1.8-extensions/build/run_ctypesgen.sh Tue Jan 7 11:29:10 2014
@@ -36,6 +36,7 @@ abs_builddir="$7"
svn_libdir="$8"
apr_config="$9"
apu_config="${10}"
+cpp="${11}"
cp_relpath="subversion/bindings/ctypes-python"
output="$cp_relpath/svn_all.py"
@@ -57,7 +58,6 @@ apu_cppflags="`$apu_config --includes`"
apu_include_dir="`$apu_config --includedir`"
apu_ldflags="`$apu_config --ldflags --link-ld`"
-cpp="`$apr_config --cpp`"
### end
cppflags="$apr_cppflags $apu_cppflags -I$svn_includes"
Modified: subversion/branches/javahl-1.8-extensions/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/configure.ac?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/configure.ac (original)
+++ subversion/branches/javahl-1.8-extensions/configure.ac Tue Jan 7 11:29:10 2014
@@ -1089,7 +1089,6 @@ if test "$enable_optimization" = "yes";
SVN_CFLAGS_ADD_IFELSE([-O])])])])
SVN_CFLAGS_ADD_IFELSE([-Wno-clobbered])
SVN_CFLAGS_ADD_IFELSE([-flto])
- SVN_CFLAGS_ADD_IFELSE([-fwhole-program])
fi
fi
if test -z ["`echo $CXXUSERFLAGS' ' | $EGREP -- '-O[^ ]* '`"]; then
@@ -1106,7 +1105,6 @@ if test "$enable_optimization" = "yes";
SVN_CXXFLAGS_ADD_IFELSE([-O])])])])
SVN_CXXFLAGS_ADD_IFELSE([-Wno-clobbered])
SVN_CXXFLAGS_ADD_IFELSE([-flto])
- SVN_CXXFLAGS_ADD_IFELSE([-fwhole-program])
fi
fi
elif test "$enable_optimization" = "no"; then
Propchange: subversion/branches/javahl-1.8-extensions/configure.ac
------------------------------------------------------------------------------
Merged /subversion/trunk/configure.ac:r1534860
Merged /subversion/branches/1.8.x/configure.ac:r1507166-1556175
Modified: subversion/branches/javahl-1.8-extensions/subversion/bindings/swig/core.i
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/bindings/swig/core.i?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/bindings/swig/core.i (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/bindings/swig/core.i Tue Jan 7 11:29:10 2014
@@ -827,7 +827,6 @@ svn_swig_pl_set_current_pool (apr_pool_t
-#ifdef SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC
%inline %{
/* Helper function to set the gnome-keyring unlock prompt function. This
* C function accepts an auth baton, a function and a prompt baton, but
@@ -851,7 +850,6 @@ static void svn_auth_set_gnome_keyring_u
prompt_baton);
}
%}
-#endif
#if defined(SWIGPERL) || defined(SWIGRUBY)
%include svn_md5_h.swg
Modified: subversion/branches/javahl-1.8-extensions/subversion/include/svn_auth.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/include/svn_auth.h?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/include/svn_auth.h (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/include/svn_auth.h Tue Jan 7 11:29:10 2014
@@ -966,7 +966,10 @@ svn_auth_get_keychain_ssl_client_cert_pw
apr_pool_t *pool);
#endif /* DARWIN || DOXYGEN */
-#if (!defined(DARWIN) && !defined(WIN32)) || defined(DOXYGEN)
+/* Note that the gnome keyring unlock prompt related items below must be
+ * declared for all platforms in order to allow SWIG interfaces to be
+ * used regardless of the platform. */
+
/** A type of callback function for obtaining the GNOME Keyring password.
*
* In this callback, the client should ask the user for default keyring
@@ -996,7 +999,7 @@ typedef svn_error_t *(*svn_auth_gnome_ke
* @c *SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC. */
#define SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_BATON "gnome-keyring-unlock-prompt-baton"
-
+#if (!defined(DARWIN) && !defined(WIN32)) || defined(DOXYGEN)
/**
* Get libsvn_auth_gnome_keyring version information.
*
Modified: subversion/branches/javahl-1.8-extensions/subversion/include/svn_version.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/include/svn_version.h?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/include/svn_version.h (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/include/svn_version.h Tue Jan 7 11:29:10 2014
@@ -72,7 +72,7 @@ extern "C" {
*
* @since New in 1.1.
*/
-#define SVN_VER_PATCH 5
+#define SVN_VER_PATCH 6
/** @deprecated Provided for backward compatibility with the 1.0 API. */
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/externals.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/externals.c Tue Jan 7 11:29:10 2014
@@ -737,7 +737,7 @@ handle_external_item_change(svn_client_c
switch (ext_kind)
{
case svn_node_dir:
- SVN_ERR(switch_dir_external(local_abspath, new_url,
+ SVN_ERR(switch_dir_external(local_abspath, new_loc->url,
&(new_item->peg_revision),
&(new_item->revision),
parent_dir_abspath,
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/util.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/util.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/util.c Tue Jan 7 11:29:10 2014
@@ -166,6 +166,13 @@ svn_client_commit_item3_dup(const svn_cl
new_item->outgoing_prop_changes =
svn_prop_array_dup(new_item->outgoing_prop_changes, pool);
+ if (new_item->session_relpath)
+ new_item->session_relpath = apr_pstrdup(pool, new_item->session_relpath);
+
+ if (new_item->moved_from_abspath)
+ new_item->moved_from_abspath = apr_pstrdup(pool,
+ new_item->moved_from_abspath);
+
return new_item;
}
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_fs_fs/fs_fs.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_fs_fs/fs_fs.c Tue Jan 7 11:29:10 2014
@@ -11293,16 +11293,18 @@ hotcopy_body(void *baton, apr_pool_t *po
SVN_ERR(hotcopy_remove_rev_files(dst_fs, rev,
rev + max_files_per_dir,
max_files_per_dir, iterpool));
- SVN_ERR(hotcopy_remove_revprop_files(dst_fs, rev,
- rev + max_files_per_dir,
- max_files_per_dir, iterpool));
+ if (dst_ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
+ SVN_ERR(hotcopy_remove_revprop_files(dst_fs, rev,
+ rev + max_files_per_dir,
+ max_files_per_dir,
+ iterpool));
}
/* Now that all revisions have moved into the pack, the original
* rev dir can be removed. */
SVN_ERR(remove_folder(path_rev_shard(dst_fs, rev, iterpool),
cancel_func, cancel_baton, iterpool));
- if (rev > 0)
+ if (rev > 0 && dst_ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
SVN_ERR(remove_folder(path_revprops_shard(dst_fs, rev, iterpool),
cancel_func, cancel_baton, iterpool));
}
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/sysinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/sysinfo.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/sysinfo.c Tue Jan 7 11:29:10 2014
@@ -290,11 +290,21 @@ stringbuf_split_key(svn_stringbuf_t *buf
return NULL;
svn_stringbuf_strip_whitespace(buffer);
+
+ /* Now we split the currently allocated buffer in two parts:
+ - a const char * HEAD
+ - the remaining stringbuf_t. */
+
+ /* Create HEAD as '\0' terminated const char * */
key = buffer->data;
end = strchr(key, delim);
*end = '\0';
- buffer->len = 1 + end - key;
+
+ /* And update the TAIL to be a smaller, but still valid stringbuf */
buffer->data = end + 1;
+ buffer->len -= 1 + end - key;
+ buffer->blocksize -= 1 + end - key;
+
svn_stringbuf_strip_whitespace(buffer);
return key;
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/diff.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/diff.h?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/diff.h (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/diff.h Tue Jan 7 11:29:10 2014
@@ -38,7 +38,9 @@
extern "C" {
#endif /* __cplusplus */
-/* Reports the file LOCAL_ABSPATH as ADDED file with relpath RELPATH to
+/* A function to diff locally added and locally copied files.
+
+ Reports the file LOCAL_ABSPATH as ADDED file with relpath RELPATH to
PROCESSOR with as parent baton PROCESSOR_PARENT_BATON.
The node is expected to have status svn_wc__db_status_normal, or
@@ -61,7 +63,9 @@ svn_wc__diff_local_only_file(svn_wc__db_
void *cancel_baton,
apr_pool_t *scratch_pool);
-/* Reports the directory LOCAL_ABSPATH and everything below it (limited by
+/* A function to diff locally added and locally copied directories.
+
+ Reports the directory LOCAL_ABSPATH and everything below it (limited by
DEPTH) as added with relpath RELPATH to PROCESSOR with as parent baton
PROCESSOR_PARENT_BATON.
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/diff_local.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/diff_local.c Tue Jan 7 11:29:10 2014
@@ -116,13 +116,20 @@ ensure_state(struct diff_baton *eb,
apr_pool_t *ns_pool;
if (!eb->cur)
{
- if (!svn_dirent_is_ancestor(eb->anchor_abspath, local_abspath))
+ const char *relpath;
+
+ relpath = svn_dirent_skip_ancestor(eb->anchor_abspath, local_abspath);
+ if (! relpath)
return SVN_NO_ERROR;
- SVN_ERR(ensure_state(eb,
- svn_dirent_dirname(local_abspath,scratch_pool),
- FALSE,
- scratch_pool));
+ /* Don't recurse on the anchor, as that might loop infinately because
+ svn_dirent_dirname("/",...) -> "/"
+ svn_dirent_dirname("C:/",...) -> "C:/" (Windows) */
+ if (*relpath)
+ SVN_ERR(ensure_state(eb,
+ svn_dirent_dirname(local_abspath,scratch_pool),
+ FALSE,
+ scratch_pool));
}
else if (svn_dirent_is_child(eb->cur->local_abspath, local_abspath, NULL))
SVN_ERR(ensure_state(eb, svn_dirent_dirname(local_abspath,scratch_pool),
@@ -391,7 +398,7 @@ diff_status_callback(void *baton,
}
}
- if (local_only)
+ if (local_only && (db_status != svn_wc__db_status_deleted))
{
if (db_kind == svn_node_file)
SVN_ERR(svn_wc__diff_local_only_file(db, child_abspath,
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/upgrade.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/upgrade.c Tue Jan 7 11:29:10 2014
@@ -1958,6 +1958,10 @@ svn_wc__upgrade_sdb(int *result_format,
case SVN_WC__VERSION:
/* already upgraded */
*result_format = SVN_WC__VERSION;
+
+ SVN_SQLITE__WITH_LOCK(
+ svn_wc__db_install_schema_statistics(sdb, scratch_pool),
+ sdb);
}
#ifdef SVN_DEBUG
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc-metadata.sql?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc-metadata.sql Tue Jan 7 11:29:10 2014
@@ -573,6 +573,54 @@ CREATE UNIQUE INDEX I_EXTERNALS_DEFINED
local_relpath);
/* ------------------------------------------------------------------------- */
+/* This statement provides SQLite with the necessary information about our
+ indexes to make better decisions in the query planner.
+
+ For every interesting index this contains a number of rows where the
+ statistics ar calculated for and then for every column in the index the
+ average number of rows with the same value in all columns left of this
+ column including the column itself.
+
+ See http://www.sqlite.org/fileformat2.html#stat1tab for more details.
+
+ The important thing here is that this tells Sqlite that the wc_id column
+ of the NODES and ACTUAL_NODE table is usually a single value, so queries
+ should use more than one column for index usage.
+
+ The current hints describe NODES+ACTUAL_NODE as a working copy with
+ 8000 nodes in 1 a single working copy(=wc_id), 10 nodes per directory
+ and an average of 2 op-depth layers per node.
+
+ The number of integers must be number of index columns + 1, which is
+ verified via the test_schema_statistics() test.
+ */
+-- STMT_INSTALL_SCHEMA_STATISTICS
+ANALYZE sqlite_master; /* Creates empty sqlite_stat1 if necessary */
+
+INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+ ('NODES', 'sqlite_autoindex_NODES_1', '8000 8000 2 1');
+INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+ ('NODES', 'I_NODES_PARENT', '8000 8000 10 2 1');
+/* Tell a lie: We ignore that 99.9% of all moved_to values are NULL */
+INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+ ('NODES', 'I_NODES_MOVED', '8000 8000 1 1');
+
+INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+ ('ACTUAL_NODE', 'sqlite_autoindex_ACTUAL_NODE_1', '8000 8000 1');
+INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+ ('ACTUAL_NODE', 'I_ACTUAL_PARENT', '8000 8000 10 1');
+
+INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+ ('LOCK', 'sqlite_autoindex_LOCK_1', '100 100 1');
+
+INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+ ('WC_LOCK', 'sqlite_autoindex_WC_LOCK_1', '100 100 1');
+
+/* sqlite_autoindex_WORK_QUEUE_1 doesn't exist because WORK_QUEUE is
+ a INTEGER PRIMARY KEY AUTOINCREMENT table */
+
+ANALYZE sqlite_master; /* Loads sqlite_stat1 data for query optimizer */
+/* ------------------------------------------------------------------------- */
/* Format 20 introduces NODES and removes BASE_NODE and WORKING_NODE */
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc_db.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc_db.c Tue Jan 7 11:29:10 2014
@@ -1390,6 +1390,15 @@ does_node_exist(svn_boolean_t *exists,
return svn_error_trace(svn_sqlite__reset(stmt));
}
+svn_error_t *
+svn_wc__db_install_schema_statistics(svn_sqlite__db_t *sdb,
+ apr_pool_t *scratch_pool)
+{
+ SVN_ERR(svn_sqlite__exec_statements(sdb, STMT_INSTALL_SCHEMA_STATISTICS));
+
+ return SVN_NO_ERROR;
+}
+
/* Helper for create_db(). Initializes our wc.db schema.
*/
static svn_error_t *
@@ -1417,6 +1426,8 @@ init_db(/* output values */
SVN_ERR(create_repos_id(repos_id, repos_root_url, repos_uuid,
db, scratch_pool));
+ SVN_ERR(svn_wc__db_install_schema_statistics(db, scratch_pool));
+
/* Insert the wcroot. */
/* ### Right now, this just assumes wc metadata is being stored locally. */
SVN_ERR(svn_sqlite__get_statement(&stmt, db, STMT_INSERT_WCROOT));
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc_db.h?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc_db.h Tue Jan 7 11:29:10 2014
@@ -2831,6 +2831,16 @@ svn_wc__db_scan_deletion(const char **ba
@{
*/
+/* Installs or updates Sqlite schema statistics for the current (aka latest)
+ working copy schema.
+
+ This function should be called once on initializing the database and after
+ an schema update completes */
+svn_error_t *
+svn_wc__db_install_schema_statistics(svn_sqlite__db_t *sdb,
+ apr_pool_t *scratch_pool);
+
+
/* Create a new wc.db file for LOCAL_DIR_ABSPATH, which is going to be a
working copy for the repository REPOS_ROOT_URL with uuid REPOS_UUID.
Return the raw sqlite handle, repository id and working copy id
Modified: subversion/branches/javahl-1.8-extensions/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/mod_authz_svn/mod_authz_svn.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/mod_authz_svn/mod_authz_svn.c Tue Jan 7 11:29:10 2014
@@ -91,7 +91,8 @@ create_authz_svn_dir_config(apr_pool_t *
/* canonicalize ACCESS_FILE based on the type of argument.
* If SERVER_RELATIVE is true, ACCESS_FILE is a relative
* path then ACCESS_FILE is converted to an absolute
- * path rooted at the server root. */
+ * path rooted at the server root.
+ * Returns NULL if path is not valid.*/
static const char *
canonicalize_access_file(const char *access_file,
svn_boolean_t server_relative,
@@ -104,7 +105,11 @@ canonicalize_access_file(const char *acc
else if (!svn_path_is_repos_relative_url(access_file))
{
if (server_relative)
- access_file = ap_server_root_relative(pool, access_file);
+ {
+ access_file = ap_server_root_relative(pool, access_file);
+ if (access_file == NULL)
+ return NULL;
+ }
access_file = svn_dirent_internal_style(access_file, pool);
}
@@ -126,6 +131,8 @@ AuthzSVNAccessFile_cmd(cmd_parms *cmd, v
"directives are mutually exclusive.";
conf->access_file = canonicalize_access_file(arg1, TRUE, cmd->pool);
+ if (!conf->access_file)
+ return apr_pstrcat(cmd->pool, "Invalid file path ", arg1, NULL);
return NULL;
}
@@ -145,6 +152,9 @@ AuthzSVNReposRelativeAccessFile_cmd(cmd_
conf->repo_relative_access_file = canonicalize_access_file(arg1, FALSE,
cmd->pool);
+ if (!conf->repo_relative_access_file)
+ return apr_pstrcat(cmd->pool, "Invalid file path ", arg1, NULL);
+
return NULL;
}
@@ -155,6 +165,9 @@ AuthzSVNGroupsFile_cmd(cmd_parms *cmd, v
conf->groups_file = canonicalize_access_file(arg1, TRUE, cmd->pool);
+ if (!conf->groups_file)
+ return apr_pstrcat(cmd->pool, "Invalid file path ", arg1, NULL);
+
return NULL;
}
Modified: subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/dav_svn.h?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/dav_svn.h Tue Jan 7 11:29:10 2014
@@ -900,6 +900,12 @@ dav_svn__simple_parse_uri(dav_svn__uri_i
const char *uri,
apr_pool_t *pool);
+/* Test the request R to determine if we should return the list of
+ * repositories at the parent path. Only true if SVNListParentPath directive
+ * is 'on' and the request is for our configured root path. */
+svn_boolean_t
+dav_svn__is_parentpath_list(request_rec *r);
+
int dav_svn__find_ns(const apr_array_header_t *namespaces, const char *uri);
Modified: subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/mod_dav_svn.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/mod_dav_svn.c Tue Jan 7 11:29:10 2014
@@ -1096,30 +1096,84 @@ static int dav_svn__handler(request_rec
#define NO_MAP_TO_STORAGE_NOTE "dav_svn-no-map-to-storage"
-/* Prevent filename on the request from being set since we aren't serving a
- * file off the disk. This means that <Directory> blocks will not match and
- * that * %f in logging formats will show as "-". */
+/* Fill the filename on the request with a bogus path since we aren't serving
+ * a file off the disk. This means that <Directory> blocks will not match and
+ * that %f in logging formats will show as "svn:/path/to/repo/path/in/repo". */
static int dav_svn__translate_name(request_rec *r)
{
+ const char *fs_path, *repos_basename, *repos_path, *slash;
+ const char *ignore_cleaned_uri, *ignore_relative_path;
+ int ignore_had_slash;
dir_conf_t *conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
/* module is not configured, bail out early */
if (!conf->fs_path && !conf->fs_parent_path)
return DECLINED;
- /* Be paranoid and set it to NULL just in case some other module set it
- * before we got called. */
- r->filename = NULL;
+ if (dav_svn__is_parentpath_list(r))
+ {
+ /* SVNListParentPath is on and the request is for the conf->root_dir,
+ * so just set the repos_basename to an empty string and the repos_path
+ * to NULL so we end up just reporting our parent path as the bogus
+ * path. */
+ repos_basename = "";
+ repos_path = NULL;
+ }
+ else
+ {
+ /* Retrieve path to repo and within repo for the request */
+ dav_error *err = dav_svn_split_uri(r, r->uri, conf->root_dir,
+ &ignore_cleaned_uri,
+ &ignore_had_slash, &repos_basename,
+ &ignore_relative_path, &repos_path);
+ if (err)
+ {
+ dav_svn__log_err(r, err, APLOG_ERR);
+ return err->status;
+ }
+ }
+
+ if (conf->fs_parent_path)
+ {
+ fs_path = svn_dirent_join(conf->fs_parent_path, repos_basename,
+ r->pool);
+ }
+ else
+ {
+ fs_path = conf->fs_path;
+ }
+
+ /* Avoid a trailing slash on the bogus path when repos_path is just "/" and
+ * ensure that there is always a slash between fs_path and repos_path as
+ * long as the repos_path is not an empty path. */
+ slash = "";
+ if (repos_path)
+ {
+ if ('/' == repos_path[0] && '\0' == repos_path[1])
+ repos_path = NULL;
+ else if ('/' != repos_path[0] && '\0' != repos_path[0])
+ slash = "/";
+ }
+
+ /* Combine 'svn:', fs_path and repos_path to produce the bogus path we're
+ * placing in r->filename. We can't use our standard join helpers such
+ * as svn_dirent_join. fs_path is a dirent and repos_path is a fspath
+ * (that can be trivially converted to a relpath by skipping the leading
+ * slash). In general it is safe to join these, but when a path in a
+ * repository is 'trunk/c:hi' this results in a non canonical dirent on
+ * Windows. Instead we just cat them together. */
+ r->filename = apr_pstrcat(r->pool,
+ "svn:", fs_path, slash, repos_path, NULL);
- /* Leave a note to ourselves so that we know not to decline in the
+ /* Leave a note to ourselves so that we know not to decline in the
* map_to_storage hook. */
- apr_table_setn(r->notes, NO_MAP_TO_STORAGE_NOTE, (const char*)1);
+ apr_table_setn(r->notes, NO_MAP_TO_STORAGE_NOTE, (const char*)1);
return OK;
}
/* Prevent core_map_to_storage from running if we prevented the r->filename
* from being set since core_map_to_storage doesn't like r->filename being
- * NULL. */
+ * bogus. */
static int dav_svn__map_to_storage(request_rec *r)
{
/* Check a note we left in translate_name since map_to_storage doesn't
Modified: subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/repos.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/repos.c Tue Jan 7 11:29:10 2014
@@ -1969,26 +1969,12 @@ get_resource(request_rec *r,
/* Special case: detect and build the SVNParentPath as a unique type
of private resource, iff the SVNListParentPath directive is 'on'. */
- if (fs_parent_path && dav_svn__get_list_parentpath_flag(r))
+ if (dav_svn__is_parentpath_list(r))
{
- char *uri = apr_pstrdup(r->pool, r->uri);
- char *parentpath = apr_pstrdup(r->pool, root_path);
- apr_size_t uri_len = strlen(uri);
- apr_size_t parentpath_len = strlen(parentpath);
-
- if (uri[uri_len-1] == '/')
- uri[uri_len-1] = '\0';
-
- if (parentpath[parentpath_len-1] == '/')
- parentpath[parentpath_len-1] = '\0';
-
- if (strcmp(parentpath, uri) == 0)
- {
- err = get_parentpath_resource(r, resource);
- if (err)
- return err;
- return NULL;
- }
+ err = get_parentpath_resource(r, resource);
+ if (err)
+ return err;
+ return NULL;
}
/* This does all the work of interpreting/splitting the request uri. */
@@ -2455,9 +2441,12 @@ get_parent_resource(const dav_resource *
parent->info = parentinfo;
parentinfo->uri_path =
- svn_stringbuf_create(get_parent_path(resource->info->uri_path->data,
- TRUE, resource->pool),
- resource->pool);
+ svn_stringbuf_create(
+ get_parent_path(
+ svn_urlpath__canonicalize(resource->info->uri_path->data,
+ resource->pool),
+ TRUE, resource->pool),
+ resource->pool);
parentinfo->repos = resource->info->repos;
parentinfo->root = resource->info->root;
parentinfo->r = resource->info->r;
Modified: subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/util.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/mod_dav_svn/util.c Tue Jan 7 11:29:10 2014
@@ -425,6 +425,32 @@ dav_svn__simple_parse_uri(dav_svn__uri_i
"Unsupported URI form");
}
+svn_boolean_t
+dav_svn__is_parentpath_list(request_rec *r)
+{
+ const char *fs_parent_path = dav_svn__get_fs_parent_path(r);
+
+ if (fs_parent_path && dav_svn__get_list_parentpath_flag(r))
+ {
+ const char *root_path = dav_svn__get_root_dir(r);
+ char *uri = apr_pstrdup(r->pool, r->uri);
+ char *parentpath = apr_pstrdup(r->pool, root_path);
+ apr_size_t uri_len = strlen(uri);
+ apr_size_t parentpath_len = strlen(parentpath);
+
+ if (uri[uri_len-1] == '/')
+ uri[uri_len-1] = '\0';
+
+ if (parentpath[parentpath_len-1] == '/')
+ parentpath[parentpath_len-1] = '\0';
+
+ if (strcmp(parentpath, uri) == 0)
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
/* ### move this into apr_xml */
int
Modified: subversion/branches/javahl-1.8-extensions/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/svn/conflict-callbacks.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/svn/conflict-callbacks.c Tue Jan 7 11:29:10 2014
@@ -489,10 +489,10 @@ static const resolver_option_t text_conf
/* Resolver options for a property conflict */
static const resolver_option_t prop_conflict_options[] =
{
- { "mf", N_("my version"), N_("accept my version of entire file (even "
+ { "mf", N_("my version"), N_("accept my version of entire property (even "
"non-conflicts) [mine-full]"),
svn_wc_conflict_choose_mine_full },
- { "tf", N_("their version"), N_("accept their version of entire file "
+ { "tf", N_("their version"), N_("accept their version of entire property "
"(same) [theirs-full]"),
svn_wc_conflict_choose_theirs_full },
{ "dc", N_("display conflict"), N_("show conflicts in this property"), -1 },
Modified: subversion/branches/javahl-1.8-extensions/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/svn/status-cmd.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/svn/status-cmd.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/svn/status-cmd.c Tue Jan 7 11:29:10 2014
@@ -358,7 +358,8 @@ svn_cl__status(apr_getopt_t *os,
NULL, opt_state->quiet,
/* not versioned: */
SVN_ERR_WC_NOT_WORKING_COPY,
- SVN_ERR_WC_PATH_NOT_FOUND));
+ SVN_ERR_WC_PATH_NOT_FOUND,
+ SVN_NO_ERROR));
if (opt_state->xml)
SVN_ERR(print_finish_target_xml(repos_rev, iterpool));
Modified: subversion/branches/javahl-1.8-extensions/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/svn/svn.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/svn/svn.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/svn/svn.c Tue Jan 7 11:29:10 2014
@@ -2939,6 +2939,10 @@ sub_main(int argc, const char *argv[], a
"Subversion"));
}
+ /* Ensure that stdout is flushed, so the user will see any write errors.
+ This makes sure that output is not silently lost. */
+ err = svn_error_compose_create(err, svn_cmdline_fflush(stdout));
+
return EXIT_ERROR(err);
}
else
Propchange: subversion/branches/javahl-1.8-extensions/subversion/svn/svn.c
------------------------------------------------------------------------------
Merged /subversion/branches/1.8.x/subversion/svn/svn.c:r1518876-1556175
Merged /subversion/trunk/subversion/svn/svn.c:r1499470,1543413
Modified: subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/diff_tests.py?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/diff_tests.py Tue Jan 7 11:29:10 2014
@@ -4648,6 +4648,26 @@ def diff_local_missing_obstruction(sbox)
'diff', wc_dir)
+@Issue(4444)
+def diff_move_inside_copy(sbox):
+ "diff copied-along child that contains a moved file"
+ sbox.build(read_only=True)
+ wc_dir = sbox.wc_dir
+
+ d_path = 'A/D'
+ d_copy = 'A/D-copy'
+ h_path = 'A/D-copy/H'
+ chi_path = '%s/chi' % h_path
+ chi_moved = '%s/chi-moved' % h_path
+
+ sbox.simple_copy(d_path, d_copy)
+ sbox.simple_move(chi_path, chi_moved)
+ sbox.simple_append(chi_moved, 'a new line')
+
+ # Bug: Diffing the copied-along parent directory asserts
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
+ 'diff', sbox.ospath(h_path))
+
########################################################################
#Run the tests
@@ -4729,6 +4749,7 @@ test_list = [ None,
diff_repos_empty_file_addition,
diff_missing_tree_conflict_victim,
diff_local_missing_obstruction,
+ diff_move_inside_copy,
]
if __name__ == '__main__':
Modified: subversion/branches/javahl-1.8-extensions/subversion/tests/libsvn_subr/checksum-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/tests/libsvn_subr/checksum-test.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/tests/libsvn_subr/checksum-test.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/tests/libsvn_subr/checksum-test.c Tue Jan 7 11:29:10 2014
@@ -23,7 +23,10 @@
#include <apr_pools.h>
+#include <zlib.h>
+
#include "svn_error.h"
+#include "svn_io.h"
#include "private/svn_pseudo_md5.h"
#include "../svn_test.h"
@@ -155,6 +158,87 @@ zero_match(apr_pool_t *pool)
return SVN_NO_ERROR;
}
+static svn_error_t *
+zlib_expansion_test(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ const char *data_path;
+ svn_stringbuf_t *deflated;
+ Byte dst_buffer[256 * 1024];
+ Byte *src_buffer;
+ apr_size_t sz;
+
+ data_path = svn_dirent_join(opts->srcdir, "zlib.deflated", pool);
+
+ SVN_ERR(svn_stringbuf_from_file2(&deflated, data_path, pool));
+ src_buffer = (Byte*)deflated->data;
+
+ /* Try to decompress the same data with different blocksizes */
+ for (sz = 1; sz < 256; sz++)
+ {
+ z_stream stream;
+ memset(&stream, 0, sizeof(stream));
+ inflateInit2(&stream, -15 /* DEFLATE_WINDOW_SIZE */);
+
+ stream.avail_in = sz;
+ stream.next_in = src_buffer;
+ stream.avail_out = sizeof(dst_buffer);
+ stream.next_out = dst_buffer;
+
+ do
+ {
+ int zr = inflate(&stream, Z_NO_FLUSH);
+
+ if (zr != Z_OK && zr != Z_STREAM_END)
+ {
+ return svn_error_createf(
+ SVN_ERR_TEST_FAILED, NULL,
+ "Failure decompressing with blocksize %d", (int)sz);
+ }
+ stream.avail_in += sz;
+ } while (stream.next_in + stream.avail_in < src_buffer + deflated->len);
+
+ stream.avail_in = (src_buffer + deflated->len) - stream.next_in;
+
+ {
+ int zr = inflate(&stream, Z_NO_FLUSH);
+
+ if (zr != Z_STREAM_END)
+ {
+ return svn_error_createf(
+ SVN_ERR_TEST_FAILED, NULL,
+ "Final flush failed with blocksize %d", (int)sz);
+ }
+
+ zr = inflateEnd(&stream);
+
+ if (zr != Z_OK)
+ {
+ return svn_error_createf(
+ SVN_ERR_TEST_FAILED, NULL,
+ "End of stream handling failed with blocksize %d",
+ (int)sz);
+ }
+ }
+
+ {
+ apr_uint32_t crc = crc32(0, dst_buffer, stream.total_out);
+
+ if (stream.total_out != 242014 || crc != 0x8f03d934)
+ {
+ return svn_error_createf(
+ SVN_ERR_TEST_FAILED, NULL,
+ "Decompressed data doesn't match expected size or crc with "
+ "blocksize %d: Found crc32=0x%08x, size=%d.\n"
+ "Verify your ZLib installation, as this should never happen",
+ (int)sz, (unsigned)crc, (int)stream.total_out);
+ }
+ }
+ }
+
+ return SVN_NO_ERROR;
+}
+
/* An array of all test functions */
struct svn_test_descriptor_t test_funcs[] =
{
@@ -167,5 +251,7 @@ struct svn_test_descriptor_t test_funcs[
"pseudo-md5 compatibility"),
SVN_TEST_PASS2(zero_match,
"zero checksum matching"),
+ SVN_TEST_OPTS_PASS(zlib_expansion_test,
+ "zlib expansion test (zlib regression)"),
SVN_TEST_NULL
};
Modified: subversion/branches/javahl-1.8-extensions/subversion/tests/libsvn_wc/wc-queries-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/tests/libsvn_wc/wc-queries-test.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/tests/libsvn_wc/wc-queries-test.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/tests/libsvn_wc/wc-queries-test.c Tue Jan 7 11:29:10 2014
@@ -77,6 +77,7 @@ static const int schema_statements[] =
STMT_CREATE_NODES,
STMT_CREATE_NODES_TRIGGERS,
STMT_CREATE_EXTERNALS,
+ STMT_INSTALL_SCHEMA_STATISTICS,
/* Memory tables */
STMT_CREATE_TARGETS_LIST,
STMT_CREATE_CHANGELIST_LIST,
@@ -95,8 +96,8 @@ static const int slow_statements[] =
/* Operate on the entire WC */
STMT_SELECT_ALL_NODES, /* schema validation code */
- /* Is there a record? ### Can we somehow check for LIMIT 1? */
- STMT_LOOK_FOR_WORK,
+ /* Updates all records for a repository (designed slow) */
+ STMT_UPDATE_LOCK_REPOS_ID,
/* Full temporary table read */
STMT_INSERT_ACTUAL_EMPTIES,
@@ -114,6 +115,19 @@ static const int slow_statements[] =
-1 /* final marker */
};
+/* Statements that just read the first record from a table,
+ using the primary key. Specialized as different sqlite
+ versions produce different results */
+static const int primary_key_statements[] =
+{
+ /* Is there a record? ### Can we somehow check for LIMIT 1,
+ and primary key instead of adding a list? */
+ STMT_LOOK_FOR_WORK,
+ STMT_SELECT_WORK_ITEM,
+
+ -1 /* final marker */
+};
+
/* Helper function to determine if a statement is in a list */
static svn_boolean_t
in_list(const int list[], int stmt_idx)
@@ -529,6 +543,7 @@ is_node_table(const char *table_name)
return (apr_strnatcasecmp(table_name, "nodes") == 0
|| apr_strnatcasecmp(table_name, "actual_node") == 0
|| apr_strnatcasecmp(table_name, "externals") == 0
+ || apr_strnatcasecmp(table_name, "lock") == 0
|| apr_strnatcasecmp(table_name, "wc_lock") == 0
|| FALSE);
}
@@ -651,14 +666,24 @@ test_query_expectations(apr_pool_t *scra
|| (item->expression_vars < 1))
&& !is_result_table(item->table))
{
- warned = TRUE;
- if (!is_slow_statement(i))
- warnings = svn_error_createf(SVN_ERR_TEST_FAILED, warnings,
+ if (in_list(primary_key_statements, i))
+ {
+ /* Reported as primary key index usage in Sqlite 3.7,
+ as table scan in 3.8+, while the execution plan is
+ identical: read first record from table */
+ }
+ else if (!is_slow_statement(i))
+ {
+ warned = TRUE;
+ warnings = svn_error_createf(SVN_ERR_TEST_FAILED, warnings,
"%s: "
"Uses %s with only %d index component: (%s)\n%s",
wc_query_info[i][0], item->table,
item->expression_vars, item->expressions,
wc_queries[i]);
+ }
+ else
+ warned = TRUE;
}
else if (item->search && !item->index)
{
@@ -718,6 +743,144 @@ test_query_expectations(apr_pool_t *scra
return warnings;
}
+/* Helper to verify a bit of data in the sqlite3 statistics */
+static int
+parse_stat_data(const char *stat)
+{
+ int n = 0;
+ apr_int64_t last = APR_INT64_MAX;
+ while (*stat)
+ {
+ apr_int64_t v;
+ char *next;
+
+ if (*stat < '0' || *stat > '9')
+ return -2;
+
+ errno = 0;
+ v = apr_strtoi64(stat, &next, 10);
+
+ /* All numbers specify the average number of rows
+ with the same values in all columns left of it,
+ so the value must be >= 1 and lower than or equal
+ to all previous seen numbers */
+ if (v <= 0 || (v > last) || (errno != 0))
+ return -1;
+
+ last = v;
+
+ n++;
+ stat = next;
+
+ if (*stat == ' ')
+ stat++;
+ }
+
+ return n;
+}
+
+static svn_error_t *
+test_schema_statistics(apr_pool_t *scratch_pool)
+{
+ sqlite3 *sdb;
+ sqlite3_stmt *stmt;
+
+ SVN_ERR(create_memory_db(&sdb, scratch_pool));
+
+ SQLITE_ERR(
+ sqlite3_exec(sdb,
+ "CREATE TABLE shadow_stat1(tbl TEXT, idx TEXT, stat TEXT)",
+ NULL, NULL, NULL));
+
+ SQLITE_ERR(
+ sqlite3_exec(sdb,
+ "INSERT INTO shadow_stat1 (tbl, idx, stat) "
+ "SELECT tbl, idx, stat FROM sqlite_stat1",
+ NULL, NULL, NULL));
+
+ SQLITE_ERR(
+ sqlite3_exec(sdb,
+ "DROP TABLE sqlite_stat1",
+ NULL, NULL, NULL));
+
+ /* Insert statement to give index at least 1 record */
+ SQLITE_ERR(
+ sqlite3_exec(sdb,
+ "INSERT INTO nodes (wc_id, local_relpath, op_depth,"
+ " presence, kind) "
+ "VALUES (1, '', 0, 'normal', 'dir')",
+ NULL, NULL, NULL));
+
+ SQLITE_ERR(
+ sqlite3_exec(sdb,
+ "INSERT INTO actual_node (wc_id, local_relpath) "
+ "VALUES (1, '')",
+ NULL, NULL, NULL));
+
+ SQLITE_ERR(
+ sqlite3_exec(sdb,
+ "INSERT INTO lock (repos_id, repos_relpath, lock_token) "
+ "VALUES (1, '', '')",
+ NULL, NULL, NULL));
+
+ /* These are currently not necessary for query optimization, but it's better
+ to tell Sqlite how we intend to use this table anyway */
+ SQLITE_ERR(
+ sqlite3_exec(sdb,
+ "INSERT INTO wc_lock (wc_id, local_dir_relpath) "
+ "VALUES (1, '')",
+ NULL, NULL, NULL));
+
+ SQLITE_ERR(
+ sqlite3_exec(sdb,
+ "INSERT INTO WORK_QUEUE (work) "
+ "VALUES ('')",
+ NULL, NULL, NULL));
+
+ SQLITE_ERR(
+ sqlite3_exec(sdb,
+ "ANALYZE",
+ NULL, NULL, NULL));
+
+ SQLITE_ERR(
+ sqlite3_prepare(sdb, "SELECT s.tbl, s.idx, s.stat, r.stat "
+ "FROM shadow_stat1 s "
+ "LEFT JOIN sqlite_stat1 r ON "
+ "s.tbl=r.tbl and s.idx=r.idx",
+ -1, &stmt, NULL));
+
+ while (sqlite3_step(stmt) == SQLITE_ROW)
+ {
+ const char *wc_stat = (const char*)sqlite3_column_text(stmt, 2);
+ const char *sqlite_stat = (const char*)sqlite3_column_text(stmt, 3);
+
+ if (! sqlite_stat)
+ {
+ return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+ "Schema statistic failure:"
+ " Refering to unknown index '%s' on '%s'",
+ sqlite3_column_text(stmt, 1),
+ sqlite3_column_text(stmt, 0));
+ }
+
+ if (parse_stat_data(wc_stat) != parse_stat_data(sqlite_stat))
+ {
+ return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+ "Schema statistic failure:"
+ " Column mismatch for '%s' on '%s'",
+ sqlite3_column_text(stmt, 1),
+ sqlite3_column_text(stmt, 0));
+ }
+ }
+
+ SQLITE_ERR(sqlite3_reset(stmt));
+ SQLITE_ERR(sqlite3_finalize(stmt));
+
+ SQLITE_ERR(sqlite3_close(sdb)); /* Close the DB if ok; otherwise leaked */
+
+ return SVN_NO_ERROR;
+}
+
struct svn_test_descriptor_t test_funcs[] =
{
SVN_TEST_NULL,
@@ -727,5 +890,7 @@ struct svn_test_descriptor_t test_funcs[
"queries are parsable"),
SVN_TEST_PASS2(test_query_expectations,
"test query expectations"),
+ SVN_TEST_PASS2(test_schema_statistics,
+ "test schema statistics"),
SVN_TEST_NULL
};
Modified: subversion/branches/javahl-1.8-extensions/subversion/tests/svn_test.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/tests/svn_test.h?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/tests/svn_test.h (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/tests/svn_test.h Tue Jan 7 11:29:10 2014
@@ -103,6 +103,8 @@ typedef struct svn_test_opts_t
const char *fs_type;
/* Config file. */
const char *config_file;
+ /* Source dir. */
+ const char *srcdir;
/* Minor version to use for servers and FS backends, or zero to use
the current latest version. */
int server_minor_version;
Modified: subversion/branches/javahl-1.8-extensions/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/tests/svn_test_main.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/tests/svn_test_main.c Tue Jan 7 11:29:10 2014
@@ -44,6 +44,7 @@
#include "svn_io.h"
#include "svn_path.h"
#include "svn_ctype.h"
+#include "svn_utf.h"
#include "private/svn_cmdline_private.h"
@@ -475,6 +476,10 @@ main(int argc, const char *argv[])
case fstype_opt:
opts.fs_type = apr_pstrdup(pool, opt_arg);
break;
+ case srcdir_opt:
+ SVN_INT_ERR(svn_utf_cstring_to_utf8(&opts.srcdir, opt_arg, pool));
+ opts.srcdir = svn_dirent_internal_style(opts.srcdir, pool);
+ break;
case list_opt:
list_mode = TRUE;
break;
Modified: subversion/branches/javahl-1.8-extensions/tools/server-side/mod_dontdothat/mod_dontdothat.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/tools/server-side/mod_dontdothat/mod_dontdothat.c?rev=1556183&r1=1556182&r2=1556183&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/tools/server-side/mod_dontdothat/mod_dontdothat.c (original)
+++ subversion/branches/javahl-1.8-extensions/tools/server-side/mod_dontdothat/mod_dontdothat.c Tue Jan 7 11:29:10 2014
@@ -30,12 +30,15 @@
#include <util_filter.h>
#include <ap_config.h>
#include <apr_strings.h>
+#include <apr_uri.h>
#include <expat.h>
#include "mod_dav_svn.h"
#include "svn_string.h"
#include "svn_config.h"
+#include "svn_path.h"
+#include "private/svn_fspath.h"
module AP_MODULE_DECLARE_DATA dontdothat_module;
@@ -161,26 +164,71 @@ matches(const char *wc, const char *p)
}
}
+/* duplicate of dav_svn__log_err() from mod_dav_svn/util.c */
+static void
+log_dav_err(request_rec *r,
+ dav_error *err,
+ int level)
+{
+ dav_error *errscan;
+
+ /* Log the errors */
+ /* ### should have a directive to log the first or all */
+ for (errscan = err; errscan != NULL; errscan = errscan->prev) {
+ apr_status_t status;
+
+ if (errscan->desc == NULL)
+ continue;
+
+#if AP_MODULE_MAGIC_AT_LEAST(20091119,0)
+ status = errscan->aprerr;
+#else
+ status = errscan->save_errno;
+#endif
+
+ ap_log_rerror(APLOG_MARK, level, status, r,
+ "%s [%d, #%d]",
+ errscan->desc, errscan->status, errscan->error_id);
+ }
+}
+
static svn_boolean_t
is_this_legal(dontdothat_filter_ctx *ctx, const char *uri)
{
const char *relative_path;
const char *cleaned_uri;
const char *repos_name;
+ const char *uri_path;
int trailing_slash;
dav_error *derr;
- /* Ok, so we need to skip past the scheme, host, etc. */
- uri = ap_strstr_c(uri, "://");
- if (uri)
- uri = ap_strchr_c(uri + 3, '/');
+ /* uri can be an absolute uri or just a path, we only want the path to match
+ * against */
+ if (uri && svn_path_is_url(uri))
+ {
+ apr_uri_t parsed_uri;
+ apr_status_t rv = apr_uri_parse(ctx->r->pool, uri, &parsed_uri);
+ if (APR_SUCCESS != rv)
+ {
+ /* Error parsing the URI, log and reject request. */
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, ctx->r,
+ "mod_dontdothat: blocked request after failing "
+ "to parse uri: '%s'", uri);
+ return FALSE;
+ }
+ uri_path = parsed_uri.path;
+ }
+ else
+ {
+ uri_path = uri;
+ }
- if (uri)
+ if (uri_path)
{
const char *repos_path;
derr = dav_svn_split_uri(ctx->r,
- uri,
+ uri_path,
ctx->cfg->base_path,
&cleaned_uri,
&trailing_slash,
@@ -194,7 +242,7 @@ is_this_legal(dontdothat_filter_ctx *ctx
if (! repos_path)
repos_path = "";
- repos_path = apr_psprintf(ctx->r->pool, "/%s", repos_path);
+ repos_path = svn_fspath__canonicalize(repos_path, ctx->r->pool);
/* First check the special cases that are always legal... */
for (idx = 0; idx < ctx->allow_recursive_ops->nelts; ++idx)
@@ -228,6 +276,19 @@ is_this_legal(dontdothat_filter_ctx *ctx
}
}
}
+ else
+ {
+ log_dav_err(ctx->r, derr, APLOG_ERR);
+ return FALSE;
+ }
+
+ }
+ else
+ {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r,
+ "mod_dontdothat: empty uri passed to is_this_legal(), "
+ "module bug?");
+ return FALSE;
}
return TRUE;
Propchange: subversion/branches/javahl-1.8-extensions/tools/server-side/mod_dontdothat/mod_dontdothat.c
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Jan 7 11:29:10 2014
@@ -0,0 +1,97 @@
+/subversion/branches/1.5.x-r30215/tools/server-side/mod_dontdothat/mod_dontdothat.c:870312
+/subversion/branches/1.7.x-fs-verify/tools/server-side/mod_dontdothat/mod_dontdothat.c:1146708,1161180
+/subversion/branches/1.8.x/tools/server-side/mod_dontdothat/mod_dontdothat.c:1483275-1556175
+/subversion/branches/1.8.x-busted-proxy/tools/server-side/mod_dontdothat/mod_dontdothat.c:1499222-1502434
+/subversion/branches/1.8.x-issue4400/tools/server-side/mod_dontdothat/mod_dontdothat.c:1507591-1512557
+/subversion/branches/1.8.x-issue4448/tools/server-side/mod_dontdothat/mod_dontdothat.c:1540420-1541802
+/subversion/branches/1.8.x-libsvnjavahl-version/tools/server-side/mod_dontdothat/mod_dontdothat.c:1483910-1485054
+/subversion/branches/1.8.x-openssl-dirs/tools/server-side/mod_dontdothat/mod_dontdothat.c:1535137-1540436
+/subversion/branches/1.8.x-r1477876/tools/server-side/mod_dontdothat/mod_dontdothat.c:1477981-1487716
+/subversion/branches/1.8.x-r1481625/tools/server-side/mod_dontdothat/mod_dontdothat.c:1481637-1482135
+/subversion/branches/1.8.x-r1495063/tools/server-side/mod_dontdothat/mod_dontdothat.c:1495804-1501074
+/subversion/branches/1.8.x-r1497310-partial/tools/server-side/mod_dontdothat/mod_dontdothat.c:1497500-1501063
+/subversion/branches/1.8.x-r1502267/tools/server-side/mod_dontdothat/mod_dontdothat.c:1502268-1515998
+/subversion/branches/1.8.x-r1507044/tools/server-side/mod_dontdothat/mod_dontdothat.c:1507282-1511571
+/subversion/branches/1.8.x-r1513879/tools/server-side/mod_dontdothat/mod_dontdothat.c:1514699-1516021
+/subversion/branches/1.8.x-r1537147/tools/server-side/mod_dontdothat/mod_dontdothat.c:1537201-1537216
+/subversion/branches/1.8.x-r1537193/tools/server-side/mod_dontdothat/mod_dontdothat.c:1537217-1541815
+/subversion/branches/1.8.x-r1541790/tools/server-side/mod_dontdothat/mod_dontdothat.c:1541791-1542075
+/subversion/branches/1.8.x-r175-daemonize/tools/server-side/mod_dontdothat/mod_dontdothat.c:1515866-1516020
+/subversion/branches/1.8.x-serf-1.3+-windows/tools/server-side/mod_dontdothat/mod_dontdothat.c:1517122-1533873
+/subversion/branches/1.8.x-svn_fs_info-removal/tools/server-side/mod_dontdothat/mod_dontdothat.c:1467420-1468159
+/subversion/branches/1.8.x-svnsync-serf-memory/tools/server-side/mod_dontdothat/mod_dontdothat.c:1515248-1515701
+/subversion/branches/1.8.x-synvsync-serf-memory/tools/server-side/mod_dontdothat/mod_dontdothat.c:1515247
+/subversion/branches/1.8.x-tristate-chunked-request/tools/server-side/mod_dontdothat/mod_dontdothat.c:1502435-1503894
+/subversion/branches/10Gb/tools/server-side/mod_dontdothat/mod_dontdothat.c:1388102,1388163-1388190,1388195,1388202,1388205,1388211,1388276,1388362,1388375,1388394,1388636,1388639-1388640,1388643-1388644,1388654,1388720,1388789,1388795,1388801,1388805,1388807,1388810,1388816,1389044,1389276,1389289,1389662,1389867,1390017,1390209,1390216,1390407,1390409,1390414,1390419,1390955
+/subversion/branches/atomic-revprop/tools/server-side/mod_dontdothat/mod_dontdothat.c:965046-1000689
+/subversion/branches/auto-props-sdc/tools/server-side/mod_dontdothat/mod_dontdothat.c:1384106-1401643
+/subversion/branches/bdb-reverse-deltas/tools/server-side/mod_dontdothat/mod_dontdothat.c:872050-872529
+/subversion/branches/diff-callbacks3/tools/server-side/mod_dontdothat/mod_dontdothat.c:870059-870761
+/subversion/branches/diff-optimizations/tools/server-side/mod_dontdothat/mod_dontdothat.c:1031270-1037352
+/subversion/branches/diff-optimizations-bytes/tools/server-side/mod_dontdothat/mod_dontdothat.c:1037353-1067789
+/subversion/branches/dont-save-plaintext-passwords-by-default/tools/server-side/mod_dontdothat/mod_dontdothat.c:870728-871118
+/subversion/branches/double-delete/tools/server-side/mod_dontdothat/mod_dontdothat.c:870511-872970
+/subversion/branches/ev2-export/tools/server-side/mod_dontdothat/mod_dontdothat.c:1325914,1332738,1413107
+/subversion/branches/explore-wc/tools/server-side/mod_dontdothat/mod_dontdothat.c:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997
+/subversion/branches/file-externals/tools/server-side/mod_dontdothat/mod_dontdothat.c:871779-873302
+/subversion/branches/fs-rep-sharing/tools/server-side/mod_dontdothat/mod_dontdothat.c:869036-873803
+/subversion/branches/fsfs-pack/tools/server-side/mod_dontdothat/mod_dontdothat.c:873717-874575
+/subversion/branches/gnome-keyring/tools/server-side/mod_dontdothat/mod_dontdothat.c:870558-871410
+/subversion/branches/gpg-agent-password-store/tools/server-side/mod_dontdothat/mod_dontdothat.c:1005036-1150766
+/subversion/branches/http-protocol-v2/tools/server-side/mod_dontdothat/mod_dontdothat.c:874395-876041
+/subversion/branches/in-memory-cache/tools/server-side/mod_dontdothat/mod_dontdothat.c:869829-871452
+/subversion/branches/in-repo-authz/tools/server-side/mod_dontdothat/mod_dontdothat.c:1414342-1424779
+/subversion/branches/inheritable-props/tools/server-side/mod_dontdothat/mod_dontdothat.c:1297080-1395089
+/subversion/branches/integrate-cache-item-serialization/tools/server-side/mod_dontdothat/mod_dontdothat.c:1068724-1068739
+/subversion/branches/integrate-cache-membuffer/tools/server-side/mod_dontdothat/mod_dontdothat.c:998649-998852
+/subversion/branches/integrate-compression-level/tools/server-side/mod_dontdothat/mod_dontdothat.c:1068651-1072287
+/subversion/branches/integrate-io-improvements/tools/server-side/mod_dontdothat/mod_dontdothat.c:1068684-1072297
+/subversion/branches/integrate-is-cachable/tools/server-side/mod_dontdothat/mod_dontdothat.c:1072568-1074082
+/subversion/branches/integrate-partial-getter/tools/server-side/mod_dontdothat/mod_dontdothat.c:1072558-1076552
+/subversion/branches/integrate-readline-speedup/tools/server-side/mod_dontdothat/mod_dontdothat.c:1072553-1072555
+/subversion/branches/integrate-stream-api-extensions/tools/server-side/mod_dontdothat/mod_dontdothat.c:1068695-1072516
+/subversion/branches/integrate-string-improvements/tools/server-side/mod_dontdothat/mod_dontdothat.c:1068251-1190617
+/subversion/branches/integrate-txdelta-caching/tools/server-side/mod_dontdothat/mod_dontdothat.c:1072541-1078213
+/subversion/branches/issue-2779-dev/tools/server-side/mod_dontdothat/mod_dontdothat.c:965496-984198
+/subversion/branches/issue-2843-dev/tools/server-side/mod_dontdothat/mod_dontdothat.c:871432-874179
+/subversion/branches/issue-3000/tools/server-side/mod_dontdothat/mod_dontdothat.c:871713,871716-871719,871721-871726,871728,871734
+/subversion/branches/issue-3067-deleted-subtrees/tools/server-side/mod_dontdothat/mod_dontdothat.c:873375-874084
+/subversion/branches/issue-3148-dev/tools/server-side/mod_dontdothat/mod_dontdothat.c:875193-875204
+/subversion/branches/issue-3220-dev/tools/server-side/mod_dontdothat/mod_dontdothat.c:872210-872226
+/subversion/branches/issue-3242-dev/tools/server-side/mod_dontdothat/mod_dontdothat.c:879653-896436
+/subversion/branches/issue-3334-dirs/tools/server-side/mod_dontdothat/mod_dontdothat.c:875156-875867
+/subversion/branches/issue-3975/tools/server-side/mod_dontdothat/mod_dontdothat.c:1152931-1160746
+/subversion/branches/issue-4116-dev/tools/server-side/mod_dontdothat/mod_dontdothat.c:1424719-1425040
+/subversion/branches/issue-4194-dev/tools/server-side/mod_dontdothat/mod_dontdothat.c:1410507-1414880
+/subversion/branches/javahl-ra/tools/server-side/mod_dontdothat/mod_dontdothat.c:1342682,1344977
+/subversion/branches/kwallet/tools/server-side/mod_dontdothat/mod_dontdothat.c:870785-871314
+/subversion/branches/log-g-performance/tools/server-side/mod_dontdothat/mod_dontdothat.c:870941-871032
+/subversion/branches/merge-skips-obstructions/tools/server-side/mod_dontdothat/mod_dontdothat.c:874525-874615
+/subversion/branches/multi-layer-moves/tools/server-side/mod_dontdothat/mod_dontdothat.c:1239019-1300930
+/subversion/branches/nfc-nfd-aware-client/tools/server-side/mod_dontdothat/mod_dontdothat.c:870276,870376
+/subversion/branches/node_pool/tools/server-side/mod_dontdothat/mod_dontdothat.c:1304828-1305388
+/subversion/branches/performance/tools/server-side/mod_dontdothat/mod_dontdothat.c:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985673,985695,985697,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029090,1029092-1029093,1029111,1029151,1029158,1029229-1029230,
1029232,1029335-1029336,1029339-1029340,1029342,1029344,1030763,1030827,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365
+/subversion/branches/py-tests-as-modules/tools/server-side/mod_dontdothat/mod_dontdothat.c:956579-1033052
+/subversion/branches/ra_serf-digest-authn/tools/server-side/mod_dontdothat/mod_dontdothat.c:875693-876404
+/subversion/branches/reintegrate-improvements/tools/server-side/mod_dontdothat/mod_dontdothat.c:873853-874164
+/subversion/branches/revprop-cache/tools/server-side/mod_dontdothat/mod_dontdothat.c:1298521-1326293
+/subversion/branches/revprop-packing/tools/server-side/mod_dontdothat/mod_dontdothat.c:1143907,1143971,1143997,1144017,1144499,1144568,1146145
+/subversion/branches/subtree-mergeinfo/tools/server-side/mod_dontdothat/mod_dontdothat.c:876734-878766
+/subversion/branches/svn-mergeinfo-enhancements/tools/server-side/mod_dontdothat/mod_dontdothat.c:870119-870195,870197-870288
+/subversion/branches/svn-patch-improvements/tools/server-side/mod_dontdothat/mod_dontdothat.c:918519-934609
+/subversion/branches/svn_mutex/tools/server-side/mod_dontdothat/mod_dontdothat.c:1141683-1182099
+/subversion/branches/svnpatch-diff/tools/server-side/mod_dontdothat/mod_dontdothat.c:865738-876477
+/subversion/branches/svnraisetc/tools/server-side/mod_dontdothat/mod_dontdothat.c:874709-875149
+/subversion/branches/svnserve-logging/tools/server-side/mod_dontdothat/mod_dontdothat.c:869828-870893
+/subversion/branches/tc-issue-3334/tools/server-side/mod_dontdothat/mod_dontdothat.c:874697-874773
+/subversion/branches/tc-merge-notify/tools/server-side/mod_dontdothat/mod_dontdothat.c:874017-874062
+/subversion/branches/tc-resolve/tools/server-side/mod_dontdothat/mod_dontdothat.c:874191-874239
+/subversion/branches/tc_url_rev/tools/server-side/mod_dontdothat/mod_dontdothat.c:874351-874483
+/subversion/branches/tree-conflicts/tools/server-side/mod_dontdothat/mod_dontdothat.c:868291-873154
+/subversion/branches/tree-conflicts-notify/tools/server-side/mod_dontdothat/mod_dontdothat.c:873926-874008
+/subversion/branches/tristate-chunked-request/tools/server-side/mod_dontdothat/mod_dontdothat.c:1502401,1502673
+/subversion/branches/tweak-build-take-two/tools/server-side/mod_dontdothat/mod_dontdothat.c:1424288-1425049,1425051-1425613
+/subversion/branches/uris-as-urls/tools/server-side/mod_dontdothat/mod_dontdothat.c:1060426-1064427
+/subversion/branches/verify-at-commit/tools/server-side/mod_dontdothat/mod_dontdothat.c:1462039-1462408
+/subversion/branches/wc-collate-path/tools/server-side/mod_dontdothat/mod_dontdothat.c:1407642
+/subversion/trunk/tools/server-side/mod_dontdothat/mod_dontdothat.c:1467440,1467450,1467481,1467587,1467597,1467668,1467675,1467803,1467807,1468151,1468347,1468395,1468439,1468487,1468565-1468566,1468980,1469248,1469363,1469478,1469489,1469512-1469513,1469550,1469556,1469645,1469674,1469862,1469866,1469871,1469994,1470031,1470037,1470221,1470238,1470246,1470248,1470537,1470650,1470738,1470781,1470898,1470904,1470908,1470913,1470936,1470993-1470994,1471028-1471029,1471107,1471153,1471302,1471443,1471490,1471744,1475704,1475724,1475772,1475963,1476092,1476155,1476181,1476193,1476254,1476359,1476366,1476607,1477294,1477359,1477729-1477730,1477876,1477891,1478001,1478220-1478221,1478465,1478897,1478951,1478987,1478998,1479320-1479321,1479323,1479326,1479329,1479540,1479563,1479605,1479896,1480054,1480077,1480080,1480082,1480119,1480149,1480344,1480412,1480442,1480616,1480641-1480642,1480664,1480669,1480723,1480738,1480765,1481010,1481594,1481596,1481625,1481627-1481628,1481631-1481632,1
481772,1481800,1481813,1481847,1481944,1481981,1482282,1482327,1482338,1482350,1482354,1482436,1482479,1482524,1482528,1482536,1482554,1482558,1482592,1482724,1482759,1482779,1482829,1482969-1482970,1482973,1483015,1483077,1483101,1483116,1483125,1483391,1483397,1483555,1483557,1483575,1483580,1483781,1483927,1483939,1483947,1483964-1483965,1483968,1483972,1483975,1483977,1483984,1484006,1484016-1484017,1484023,1484755,1485018,1485127,1485350,1485413,1485427,1485447,1485449,1485497,1485501,1485650,1486072,1486457,1486572,1486809,1486915,1486931,1487083,1487094,1488183,1488267,1488294,1488425,1488639,1488693,1488878,1489114,1489116-1489117,1489203,1489339,1489935,1490045,1490326,1490679,1490684,1490721,1491432,1491499,1491707,1491739,1491755-1491756,1491762,1491770,1491816,1491868,1492005,1492020,1492145,1492148,1492152,1492164,1492264,1492295,1493424,1493475,1493703,1493720,1493951,1494089,1494171,1494223,1494287,1494298,1494318,1494342,1494657,1494913,1494967,1495063,1495104,149520
4,1495209,1495214,1495256,1495329,1495428,1495432,1495446,1495597,1495805,1495850,1495978,1496007,1496110-1496111,1496132,1496151,1496470,1496938,1496957,1497002,1497318-1497319,1497551,1497804,1497975,1497980,1498012,1498136,1498449,1498455-1498456,1498483-1498484,1498486,1498550,1498564,1498851,1498885,1498997,1499034,1499044,1499064,1499095-1499096,1499100,1499403,1499423,1499438,1499447,1499460,1499470,1499483,1499492,1499496,1499498,1499595,1499727,1500074,1500175,1500226,1500680,1500695,1500762,1500799,1500801-1500802,1500904,1500928,1501199,1501207,1501656,1501702,1502097,1502267,1502577,1502777,1502811,1502901,1502909,1502952,1503009-1503010,1503058,1503061,1503211,1503318,1503528,1503884,1504192,1504505,1506040-1506041,1506047,1506058,1506966,1507044,1507382,1507567,1507589,1507889,1507891,1508438,1509186,1509196,1511057,1511272,1511353,1511603,1512195,1512300-1512301,1512432,1512471-1512472,1513119,1513122,1513156,1513463,1513472,1513874,1513879-1513880,1513943,1514295,151
4315,1514318,1514356,1514628,1514763,1514785,1514804,1515119,1515141,1515201,1515225,1515237,1515343,1515366,1515516,1515534,1515721,1515992,1515997,1516023-1516024,1516049,1516051-1516053,1516071,1516271,1516429,1516556,1516565,1516567,1516806,1518184,1519615,1519617,1519733,1519955,1520065,1520529,1520532,1520539,1520745,1522892,1523666,1524869,1525902,1526439,1526655,1527103,1527105,1530763,1530768,1530872,1530922,1530967,1531002,1531004,1531938,1532023,1532098,1534102,1534158,1534713,1534737,1534860,1535115,1535161,1536537,1537147,1537190,1537193,1537221,1537263,1537360,1537415,1537555,1537700,1537812,1538516-1538517,1538519,1538574,1538581,1540044,1540417,1541432,1541635,1541705,1541790,1542042,1542069,1542071,1542119,1542129,1542138,1542146,1542151,1542765,1542767,1542774,1543145,1543413,1543961,1544295,1544316,1544878,1544895,1550803