You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/07/13 16:14:44 UTC
svn commit: r1502791 [1/2] - in /subversion/branches/fsfs-improvements: ./
build/generator/ doc/programmer/ subversion/ subversion/bindings/cxxhl/src/
subversion/bindings/cxxhl/src/aprwrap/ subversion/bindings/cxxhl/tests/
subversion/bindings/swig/pyth...
Author: stefan2
Date: Sat Jul 13 14:14:42 2013
New Revision: 1502791
URL: http://svn.apache.org/r1502791
Log:
On the fsfs-improvements branch: Sync with /trunk.
Added:
subversion/branches/fsfs-improvements/build/generator/gen_win_dependencies.py
- copied unchanged from r1502770, subversion/trunk/build/generator/gen_win_dependencies.py
subversion/branches/fsfs-improvements/doc/programmer/gtest-guide.txt
- copied unchanged from r1502770, subversion/trunk/doc/programmer/gtest-guide.txt
subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/cxxhl-tests.cpp
- copied unchanged from r1502770, subversion/trunk/subversion/bindings/cxxhl/tests/cxxhl-tests.cpp
subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_aprwrap.cpp
- copied unchanged from r1502770, subversion/trunk/subversion/bindings/cxxhl/tests/test_aprwrap.cpp
subversion/branches/fsfs-improvements/subversion/libsvn_subr/compress.c
- copied unchanged from r1502770, subversion/trunk/subversion/libsvn_subr/compress.c
Modified:
subversion/branches/fsfs-improvements/ (props changed)
subversion/branches/fsfs-improvements/CHANGES
subversion/branches/fsfs-improvements/INSTALL
subversion/branches/fsfs-improvements/Makefile.in
subversion/branches/fsfs-improvements/build.conf
subversion/branches/fsfs-improvements/build/generator/gen_base.py
subversion/branches/fsfs-improvements/build/generator/gen_win.py
subversion/branches/fsfs-improvements/configure.ac
subversion/branches/fsfs-improvements/gen-make.py
subversion/branches/fsfs-improvements/get-deps.sh
subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap.hpp (props changed)
subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/array.hpp (contents, props changed)
subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/hash.hpp (props changed)
subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/impl.cpp (props changed)
subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/pool.hpp (props changed)
subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/exception.cpp
subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_exception.cpp
subversion/branches/fsfs-improvements/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
subversion/branches/fsfs-improvements/subversion/include/private/svn_delta_private.h
subversion/branches/fsfs-improvements/subversion/include/private/svn_ra_svn_private.h
subversion/branches/fsfs-improvements/subversion/include/private/svn_subr_private.h
subversion/branches/fsfs-improvements/subversion/include/svn_config.h
subversion/branches/fsfs-improvements/subversion/include/svn_error_codes.h
subversion/branches/fsfs-improvements/subversion/include/svn_io.h
subversion/branches/fsfs-improvements/subversion/include/svn_version.h
subversion/branches/fsfs-improvements/subversion/libsvn_client/merge.c
subversion/branches/fsfs-improvements/subversion/libsvn_delta/svndiff.c
subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/fs.c
subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs.c
subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/fsfs-improvements/subversion/libsvn_ra_local/ra_plugin.c
subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/commit.c
subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/property.c
subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/serf.c
subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/util.c
subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/client.c
subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/marshal.c
subversion/branches/fsfs-improvements/subversion/libsvn_subr/auth.c
subversion/branches/fsfs-improvements/subversion/libsvn_subr/config_file.c
subversion/branches/fsfs-improvements/subversion/libsvn_subr/deprecated.c
subversion/branches/fsfs-improvements/subversion/libsvn_subr/error.c
subversion/branches/fsfs-improvements/subversion/libsvn_subr/io.c
subversion/branches/fsfs-improvements/subversion/libsvn_subr/nls.c
subversion/branches/fsfs-improvements/subversion/libsvn_subr/version.c
subversion/branches/fsfs-improvements/subversion/mod_dav_svn/mod_dav_svn.c
subversion/branches/fsfs-improvements/subversion/po/de.po
subversion/branches/fsfs-improvements/subversion/svn/svn.c
subversion/branches/fsfs-improvements/subversion/svn_private_config.hw
subversion/branches/fsfs-improvements/subversion/svnadmin/svnadmin.c
subversion/branches/fsfs-improvements/subversion/svnauth/svnauth.c
subversion/branches/fsfs-improvements/subversion/svndumpfilter/svndumpfilter.c
subversion/branches/fsfs-improvements/subversion/svnlook/svnlook.c
subversion/branches/fsfs-improvements/subversion/svnmucc/svnmucc.c
subversion/branches/fsfs-improvements/subversion/svnserve/serve.c
subversion/branches/fsfs-improvements/subversion/svnserve/svnserve.c
subversion/branches/fsfs-improvements/subversion/svnsync/svnsync.c
subversion/branches/fsfs-improvements/subversion/svnversion/svnversion.c
subversion/branches/fsfs-improvements/subversion/tests/cmdline/davautocheck.sh
subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/io-test.c
subversion/branches/fsfs-improvements/subversion/tests/svn_test_fs.c
subversion/branches/fsfs-improvements/tools/dist/backport.pl
subversion/branches/fsfs-improvements/tools/dist/make-deps-tarball.sh (props changed)
subversion/branches/fsfs-improvements/win-tests.py
Propchange: subversion/branches/fsfs-improvements/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Jul 13 14:14:42 2013
@@ -49,7 +49,9 @@ mkmf.log
zlib
sqlite-amalgamation
serf
-gtest
+gmock-fused
.git
.gitignore
compile_commands.json
+.kdev4
+*.kdev4
Propchange: subversion/branches/fsfs-improvements/
------------------------------------------------------------------------------
Merged /subversion/branches/tristate-chunked-request:r1502394-1502681
Merged /subversion/branches/gtest_addition:r1452117-1502138
Merged /subversion/trunk:r1502253-1502790
Merged /subversion/branches/fsfs-format7:r1438982,1442910,1443171,1461851,1481447,1493042
Modified: subversion/branches/fsfs-improvements/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/CHANGES?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/CHANGES (original)
+++ subversion/branches/fsfs-improvements/CHANGES Sat Jul 13 14:14:42 2013
@@ -29,43 +29,80 @@ Version 1.8.1
http://svn.apache.org/repos/asf/subversion/tags/1.8.1
User-visible changes:
+ - Client- and server-side bugfixes:
+ * translation updates for German and Simplified Chinese
+ * improve sqlite error message output (r1497804)
+ * support platforms lacking mmap (r1498136)
+ * allow configuration files to start with UTF-8 BOM (r1499100 et al)
+
- Client-side bugfixes:
- * rename 'automatic merge' to 'complete merge' (r1491432)
- * resolve endless loop problem when files contain inproper data (r1492145)
- * remove revision property buffer limit in fsfs (r1491770)
- * reduce network usage for 'svn mergeinfo --show-revs' (r1492005)
- * resolve segfault in fsfs-stats when passing invalid path (r1492164)
- * fix 'svnadmin upgrade' error of non-sharded fsfs repositories (r1494287)
- * fix data loss when cancelling 'svnadmin upgrade' in last stage (r1494298)
- * deny 'svnadmin create --fs-type=fsfs --compatible-version=1.0' (r1494223)
- * improve http status handling in ra_serf (r1495104)
- * avoid unneeded ra session in 'svn merge' (r1495279)
- * reduce network usage for 'svn merge' (r1478987)
- * remove duplicated ancestry check in 'svn merge' (r1493424)
- * fix the standard 'Accept-Encoding' header (r1497641)
+ * merge: rename 'automatic merge' to 'complete merge' (r1491432)
+ * mergeinfo: reduce network usage for '--show-revs' (r1492005)
+ * ra_serf: improve http status handling (r1495104)
+ * merge: avoid unneeded ra session (r1493475)
+ * merge: reduce network usage (r1478987)
+ * merge: remove duplicated ancestry check (r1493424, r1495597)
+ * ra_serf: fix 'Accept-Encoding' header for IIS interoperability (r1497551)
+ * svn status: improve documentation for lock columns (r1497318, r1497319)
+ * ra_serf: fix support for 'get-file-revs-reversed' capability (r1498456)
+ * log: reduce network usage on repository roots (r1496957)
+ * diff: avoid temporary files when calling external diff (issue #4382)
+ * upgrade: fix notification of 1.7.x working copies (r1493703, r1494171)
+ * fix crash during tree conflict resolution (issue #4388)
+ * interactive file merge: add two additional choices (r1491816, r1494089)
+ * diff: use local style paths in error messages (r1500680)
+ * resolve: improve the interactive conflict resolution menu (r1491739 et al)
+ * switch: use local style path in error message (r1500074)
+ * ra_serf: improve error output when receiving invalid XML (r1498851)
+ * svn cleanup: explain what the command does in help output (r1497310)
+ * blame: error on -r M:N where M>N unless server supports (r1498449 et al)
+ * gpg-agent auth: don't try to use agent when unavailable (r1500762 et al)
+ * gpg-agent auth: don't require GPG_TTY or TERM env vars (r1500801)
+ * update: fix some tree conflicts not triggering resolver (r1491868 et al)
+ * commit: remove stale entries from wc lock table when deleting (r1491756)
+ * merge: fix --record-only erroring out on renamed path (issue #4387)
+ * svnmucc: fix 'make install' symlink to work when DESTDIR is set (r1501072)
- Server-side bugfixes:
- * provide better http status for anonymous user errors (r1495918)
- * provide better http status for commit failures (r1490684)
+ * fsfs: resolve endless loop problem when repos/db/uuid has \r\n (r1492145)
+ * fsfs: remove revision property buffer limit (r1491770)
+ * mod_dav_svn: better status codes for anonymous user errors (r1495918)
+ * mod_dav_svn: better status codes for commit failures (r1490684)
* fix performance regression in 'svn log' against root (r1494913)
- * allow deleting non-default 'svn:' properties (r1495432)
+ * allow deleting non-user-visible 'svn:' properties (r1495432)
+ * fsfs: fix crash on strict-alignment architectures (r1495806, r1495985)
+ * svnadmin upgrade: fix error of non-sharded fsfs repositories (r1494287)
+ * svnadmin create: deny '--fs-type=fsfs --compatible-version=1.0' (r1494223)
+ * svnadmin upgrade: fix data loss when cancelling in last stage (r1494298)
+
+ - Other tool improvements and bugfixes:
+ * fsfs-stats (tool): resolve segfault when passing invalid path (r1492164)
+ * svn-bench: fix help output (r1493951)
+ * svnpubsub: add version header to server (r1491707)
Developer-visible changes
- General:
- * fix some ra_serf specific test runner issues on Windows (r1490679)
- * fix help output of 'svn-bench' (r1493951)
+ * ra_serf: fix some test runner issues on Windows (r1490679)
* fix two issues in reverse svn_ra_get_file_revs() (r1492148, et al)
* handle --compatible-version=1.8 in the C tests (r1494342)
- * improve clang compatibility (r1480080 et all)
- * add version header to svnpubsub server (r1491707)
+ * improve clang compatibility (r1480080 et al)
* use proper cancel baton when handling conflicts (r1495850)
- * tweak configure.ac documentation (r1495967)
- * provide proper error value from BDB (r1495428)
- * tweak ra_serf connection failed error value (r1496132, et al)
- * resolve possible segfault in 'svn log' (r1496110)
+ * fs: BDB: provide proper error value from BDB (r1495428)
+ * ra_serf: tweak connection failed error value (r1496132, et al)
+ * svn_client_log5: resolve possible segfault (r1496110)
+ * fix metadata_only move to work when target is unversioned node (r1498564)
+ * ra_svn: fix segfault with a NULL commit message (r1498550, r1499727)
+ * Ev2: correctly initialize node kind in shims' change table (r1501058)
+ * Ev2: fix copyfrom URL construction in shims (r1500226)
+ * fs: improve test against newlines in filenames (r1498483 et al)
+ * make building with BDB 6 an opt-in feature (r1499438)
+ * sqlite: allow placing amalgamation in build dir (r1499034, r1500175)
- Bindings:
- * fix swig-rb tests with out-of-tree-builds (r1492295)
+ * swig-rb: fix tests with out-of-tree-builds (r1492295)
+ * javahl: fix encoding of error messages produced by javahl (r1492264)
+ * swig-pl: silence compiler warnings (r1487094)
+ * swig-pl: improve documentation (r1488693, r1490721, r1500904)
Version 1.8.0
Modified: subversion/branches/fsfs-improvements/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/INSTALL?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/INSTALL (original)
+++ subversion/branches/fsfs-improvements/INSTALL Sat Jul 13 14:14:42 2013
@@ -153,6 +153,12 @@ I. INTRODUCTION
configured via auto-props or the mime-types-file option
take precedence.
+ * Googlemock aka Gmock (OPTIONAL)
+
+ This optional package is used by the tests for Subversions'
+ C++ bindings.
+
+
C. Dependencies in Detail
Subversion depends on a number of third party tools and libraries.
@@ -568,6 +574,12 @@ I. INTRODUCTION
--with-libmagic
+ 22. Googlemock (OPTIONAL)
+
+ Googlemock can be installed and built in-tree by invoking
+
+ $ ./get-dep.sh gmock
+
D. Documentation
The primary documentation for Subversion is the free book
Modified: subversion/branches/fsfs-improvements/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/Makefile.in?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/Makefile.in (original)
+++ subversion/branches/fsfs-improvements/Makefile.in Sat Jul 13 14:14:42 2013
@@ -131,6 +131,9 @@ APACHE_INCLUDES = @APACHE_INCLUDES@
APACHE_LIBEXECDIR = $(DESTDIR)@APACHE_LIBEXECDIR@
APACHE_LDFLAGS = @APACHE_LDFLAGS@
+SVN_USE_GMOCK = @SVN_USE_GMOCK@
+GMOCK_INCLUDES = -I@GMOCK_SRCDIR@
+
SWIG = @SWIG@
SWIG_PY_INCLUDES = @SWIG_PY_INCLUDES@ -I$(SWIG_SRC_DIR)/python/libsvn_swig_py
SWIG_PY_COMPILE = @SWIG_PY_COMPILE@
@@ -166,9 +169,11 @@ DOXYGEN = @DOXYGEN@
# The EXTRA_ parameters can be used to pass extra flags at 'make' time.
CFLAGS = @CFLAGS@ $(EXTRA_CFLAGS)
CMODEFLAGS = @CMODEFLAGS@
+CNOWARNFLAGS = @CNOWARNFLAGS@
CMAINTAINERFLAGS = @CMAINTAINERFLAGS@
CXXFLAGS = @CXXFLAGS@ $(EXTRA_CXXFLAGS)
CXXMODEFLAGS = @CXXMODEFLAGS@
+CXXNOWARNFLAGS = @CXXNOWARNFLAGS@
CXXMAINTAINERFLAGS = @CXXMAINTAINERFLAGS@
### A few of the CFLAGS (e.g. -Wmissing-prototypes, -Wstrict-prototypes,
### -Wmissing-declarations) are not valid for C++, and should be somehow
@@ -178,10 +183,12 @@ LDFLAGS = @LDFLAGS@ $(EXTRA_LDFLAGS)
SWIG_LDFLAGS = @SWIG_LDFLAGS@ $(EXTRA_SWIG_LDFLAGS)
COMPILE = $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CMAINTAINERFLAGS) $(CFLAGS) $(INCLUDES)
+COMPILE_NOWARN = $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CNOWARNFLAGS) $(CFLAGS) $(INCLUDES)
COMPILE_CXX = $(CXX) $(CXXMODEFLAGS) $(CPPFLAGS) $(CXXMAINTAINERFLAGS) $(CXXFLAGS) $(INCLUDES)
+COMPILE_CXX_NOWARN = $(CXX) $(CXXMODEFLAGS) $(CPPFLAGS) $(CXXNOWARNFLAGS) $(CXXFLAGS) $(INCLUDES)
LT_COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) $(LT_CFLAGS)
LT_COMPILE_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) $(LT_CFLAGS)
-
+LT_COMPILE_CXX_NOWARN = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX_NOWARN) $(LT_CFLAGS)
# Execute a command that loads libraries from the build dir
LT_EXECUTE = $(LIBTOOL) $(LTFLAGS) --mode=execute `for f in $(abs_builddir)/subversion/*/*.la; do echo -dlopen $$f; done`
@@ -199,7 +206,9 @@ COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_
COMPILE_JAVAHL_JAVAH = $(JAVAH)
# special compilation for files destined for cxxhl
-COMPILE_CXXHL_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) $(LT_CFLAGS) $(CXXHL_INCLUDES) -o $@ -c
+COMPILE_CXXHL_CXX = $(LT_COMPILE_CXX) $(CXXHL_INCLUDES) -o $@ -c
+COMPILE_GMOCK_CXX = $(LT_COMPILE_CXX_NOWARN) $(GMOCK_INCLUDES) -o $@ -c
+COMPILE_CXXHL_GMOCK_CXX = $(LT_COMPILE_CXX) $(CXXHL_INCLUDES) $(GMOCK_INCLUDES) -o $@ -c
LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
LINK_LIB = $(LINK) $(LT_SO_VERSION)
Modified: subversion/branches/fsfs-improvements/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/build.conf?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/build.conf (original)
+++ subversion/branches/fsfs-improvements/build.conf Sat Jul 13 14:14:42 2013
@@ -424,7 +424,6 @@ type = sql-header
path = subversion/libsvn_subr
sources = internal_statements.sql
-
# ----------------------------------------------------------------------------
#
# TARGETS FOR I18N SUPPORT
@@ -676,14 +675,31 @@ link-cmd = $(LINK_CXX_LIB)
[cxxhl-tests]
description = Unit tests for Subversion C++ HighLevel bindings
+when = SVN_USE_GMOCK
type = exe
path = subversion/bindings/cxxhl
-libs = libsvncxxhl libsvn_subr
+libs = libsvncxxhl libgmock libsvn_subr
sources = tests/*.cpp
install = tests
-compile-cmd = $(COMPILE_CXXHL_CXX)
+compile-cmd = $(COMPILE_CXXHL_GMOCK_CXX)
link-cmd = $(LINK_CXX)
+
+# ----------------------------------------------------------------------------
+#
+# Gmock targets
+#
+
+[libgmock]
+description = Googlemock Library
+when = SVN_USE_GMOCK
+type = lib
+path = gmock-fused
+sources = gmock-gtest-all.cc
+install = tests
+compile-cmd = $(COMPILE_GMOCK_CXX)
+link-cmd = $(LINK_CXX_LIB)
+
# ----------------------------------------------------------------------------
#
# TESTING TARGETS
Modified: subversion/branches/fsfs-improvements/build/generator/gen_base.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/build/generator/gen_base.py?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/build/generator/gen_base.py (original)
+++ subversion/branches/fsfs-improvements/build/generator/gen_base.py Sat Jul 13 14:14:42 2013
@@ -473,6 +473,8 @@ class TargetLinked(Target):
if glob.glob(src):
if src[-2:] == '.c':
objname = src[:-2] + self.objext
+ elif src[-3:] == '.cc':
+ objname = src[:-3] + self.objext
elif src[-4:] == '.cpp':
objname = src[:-4] + self.objext
else:
Modified: subversion/branches/fsfs-improvements/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/build/generator/gen_win.py?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/build/generator/gen_win.py (original)
+++ subversion/branches/fsfs-improvements/build/generator/gen_win.py Sat Jul 13 14:14:42 2013
@@ -38,6 +38,7 @@ import string
import generator.swig.header_wrappers
import generator.swig.checkout_swig_header
import generator.swig.external_runtime
+import gen_win_dependencies
if sys.version_info[0] >= 3:
# Python >=3.0
@@ -52,186 +53,7 @@ else:
import gen_base
import ezt
-
-class GeneratorBase(gen_base.GeneratorBase):
- """This intermediate base class exists to be instantiated by win-tests.py,
- in order to obtain information from build.conf and library paths without
- actually doing any generation."""
- _extension_map = {
- ('exe', 'target'): '.exe',
- ('exe', 'object'): '.obj',
- ('lib', 'target'): '.dll',
- ('lib', 'object'): '.obj',
- ('pyd', 'target'): '.pyd',
- ('pyd', 'object'): '.obj',
- }
-
- def parse_options(self, options):
- self.apr_path = 'apr'
- self.apr_util_path = 'apr-util'
- self.apr_iconv_path = 'apr-iconv'
- self.serf_path = None
- self.serf_lib = None
- self.bdb_path = 'db4-win32'
- self.httpd_path = None
- self.libintl_path = None
- self.zlib_path = 'zlib'
- self.openssl_path = None
- self.jdk_path = None
- self.junit_path = None
- self.swig_path = None
- self.vs_version = '2002'
- self.sln_version = '7.00'
- self.vcproj_version = '7.00'
- self.vcproj_extension = '.vcproj'
- self.sqlite_path = 'sqlite-amalgamation'
- self.skip_sections = { 'mod_dav_svn': None,
- 'mod_authz_svn': None,
- 'mod_dontdothat' : None,
- 'libsvn_auth_kwallet': None,
- 'libsvn_auth_gnome_keyring': None }
-
- # Instrumentation options
- self.disable_shared = None
- self.static_apr = None
- self.static_openssl = None
- self.instrument_apr_pools = None
- self.instrument_purify_quantify = None
- self.configure_apr_util = None
- self.sasl_path = None
-
- # NLS options
- self.enable_nls = None
-
- # ML (assembler) is disabled by default; use --enable-ml to detect
- self.enable_ml = None
-
- for opt, val in options:
- if opt == '--with-berkeley-db':
- self.bdb_path = val
- elif opt == '--with-apr':
- self.apr_path = val
- elif opt == '--with-apr-util':
- self.apr_util_path = val
- elif opt == '--with-apr-iconv':
- self.apr_iconv_path = val
- elif opt == '--with-serf':
- self.serf_path = val
- elif opt == '--with-httpd':
- self.httpd_path = val
- del self.skip_sections['mod_dav_svn']
- del self.skip_sections['mod_authz_svn']
- del self.skip_sections['mod_dontdothat']
- elif opt == '--with-libintl':
- self.libintl_path = val
- self.enable_nls = 1
- elif opt == '--with-jdk':
- self.jdk_path = val
- elif opt == '--with-junit':
- self.junit_path = val
- elif opt == '--with-zlib':
- self.zlib_path = val
- elif opt == '--with-swig':
- self.swig_path = val
- elif opt == '--with-sqlite':
- self.sqlite_path = val
- elif opt == '--with-sasl':
- self.sasl_path = val
- elif opt == '--with-openssl':
- self.openssl_path = val
- elif opt == '--enable-purify':
- self.instrument_purify_quantify = 1
- self.instrument_apr_pools = 1
- elif opt == '--enable-quantify':
- self.instrument_purify_quantify = 1
- elif opt == '--enable-pool-debug':
- self.instrument_apr_pools = 1
- elif opt == '--enable-nls':
- self.enable_nls = 1
- elif opt == '--enable-bdb-in-apr-util':
- self.configure_apr_util = 1
- elif opt == '--enable-ml':
- self.enable_ml = 1
- elif opt == '--disable-shared':
- self.disable_shared = 1
- elif opt == '--with-static-apr':
- self.static_apr = 1
- elif opt == '--with-static-openssl':
- self.static_openssl = 1
- elif opt == '--vsnet-version':
- if val == '2002' or re.match('7(\.\d+)?$', val):
- self.vs_version = '2002'
- self.sln_version = '7.00'
- self.vcproj_version = '7.00'
- self.vcproj_extension = '.vcproj'
- elif val == '2003' or re.match('8(\.\d+)?$', val):
- self.vs_version = '2003'
- self.sln_version = '8.00'
- self.vcproj_version = '7.10'
- self.vcproj_extension = '.vcproj'
- elif val == '2005' or re.match('9(\.\d+)?$', val):
- self.vs_version = '2005'
- self.sln_version = '9.00'
- self.vcproj_version = '8.00'
- self.vcproj_extension = '.vcproj'
- elif val == '2008' or re.match('10(\.\d+)?$', val):
- self.vs_version = '2008'
- self.sln_version = '10.00'
- self.vcproj_version = '9.00'
- self.vcproj_extension = '.vcproj'
- elif val == '2010':
- self.vs_version = '2010'
- self.sln_version = '11.00'
- self.vcproj_version = '10.0'
- self.vcproj_extension = '.vcxproj'
- elif val == '2012' or val == '11':
- self.vs_version = '2012'
- self.sln_version = '12.00'
- self.vcproj_version = '11.0'
- self.vcproj_extension = '.vcxproj'
- elif re.match('^1\d+$', val):
- self.vsversion = val
- self.sln_version = '12.00'
- self.vcproj_version = val + '.0'
- self.vcproj_extension = '.vcxproj'
- else:
- print('WARNING: Unknown VS.NET version "%s",'
- ' assuming "%s"\n' % (val, '7.00'))
-
-
- def __init__(self, fname, verfname, options):
-
- # parse (and save) the options that were passed to us
- self.parse_options(options)
-
- # Initialize parent
- gen_base.GeneratorBase.__init__(self, fname, verfname, options)
-
- # These files will be excluded from the build when they're not
- # explicitly listed as project sources.
- self._excluded_from_build = frozenset(self.private_includes
- + self.private_built_includes)
-
- # Find Berkeley DB
- self._find_bdb()
-
- def _find_bdb(self):
- "Find the Berkeley DB library and version"
- # Before adding "60" to this list, see build/ac-macros/berkeley-db.m4.
- for ver in ("53", "52", "51", "50", "48", "47", "46",
- "45", "44", "43", "42", "41", "40"):
- lib = "libdb" + ver
- path = os.path.join(self.bdb_path, "lib")
- 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
-
-class WinGeneratorBase(GeneratorBase):
+class WinGeneratorBase(gen_win_dependencies.GenDependenciesBase):
"Base class for all Windows project files generators"
def __init__(self, fname, verfname, options, subdir):
@@ -243,48 +65,19 @@ class WinGeneratorBase(GeneratorBase):
"""
# Initialize parent
- GeneratorBase.__init__(self, fname, verfname, options)
-
- if self.bdb_lib is not None:
- 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")
+ gen_win_dependencies.GenDependenciesBase.__init__(self, fname, verfname,
+ options, find_libs=False)
if subdir == 'vcnet-vcproj':
print('Generating for Visual Studio %s\n' % self.vs_version)
- # Find the right Ruby include and libraries dirs and
- # library name to link SWIG bindings with
- self._find_ruby()
-
- # Find the right Perl library name to link SWIG bindings with
- self._find_perl()
-
- # Find the right Python include and libraries dirs for SWIG bindings
- self._find_python()
-
- # Find the installed SWIG version to adjust swig options
- self._find_swig()
-
- # Find the installed Java Development Kit
- self._find_jdk()
-
- # Find APR and APR-util version
- self._find_apr()
- self._find_apr_util()
+ self.find_libraries(True)
- # Find Sqlite
- self._find_sqlite()
-
- # Look for ZLib and ML
- if self.zlib_path:
- self._find_zlib()
- self._find_ml()
-
- # Find serf and its dependencies
- if self.serf_path:
- self._find_serf()
+ if self._libraries['db']:
+ db = self._libraries['db']
+ print('Found BDB %s in %s' % (db.version, self.bdb_path))
+ else:
+ print('BDB not found, BDB fs will not be built')
#Make some files for the installer so that we don't need to
#require sed or some other command to do it
@@ -395,15 +188,17 @@ class WinGeneratorBase(GeneratorBase):
install_targets = [x for x in install_targets if not isinstance(x, gen_base.TargetScript)]
# Drop the libsvn_fs_base target and tests if we don't have BDB
- if not self.bdb_lib:
+ if 'db' not in self._libraries:
install_targets = [x for x in install_targets if x.name != 'libsvn_fs_base']
install_targets = [x for x in install_targets if not (isinstance(x, gen_base.TargetExe)
and x.install == 'bdb-test')]
- # Drop the serf target if we don't have both serf and openssl
- if not self.serf_lib:
- install_targets = [x for x in install_targets if x.name != 'serf']
+ # Drop the ra_serf target if we don't have serf
+ if 'serf' not in self._libraries:
install_targets = [x for x in install_targets if x.name != 'libsvn_ra_serf']
+ # Drop the serf target if we don't build serf ourselves
+ if 'serf' not in self._libraries or not self._libraries['serf'].is_src:
+ install_targets = [x for x in install_targets if x.name != 'serf']
# Drop the swig targets if we don't have swig
if not self.swig_path and not self.swig_libdir:
@@ -421,6 +216,12 @@ class WinGeneratorBase(GeneratorBase):
or x.name == '__JAVAHL_TESTS__'
or x.name == 'libsvnjavahl')]
+ # If we don't build 'ZLib' ourself, remove this target and all the dependencies on it
+ if not self._libraries['zlib'].is_src:
+ install_targets = [x for x in install_targets if x.name != 'zlib']
+ # TODO: Fixup dependencies
+
+ # Create DLL targets for libraries
dll_targets = []
for target in install_targets:
if isinstance(target, gen_base.TargetLib):
@@ -722,7 +523,7 @@ class WinGeneratorBase(GeneratorBase):
and target.external_project):
return None
- if target.external_project[:5] == 'serf/' and self.serf_lib:
+ if target.external_project[:5] == 'serf/' and 'serf' in self._libraries:
path = self.serf_path + target.external_project[4:]
elif target.external_project.find('/') != -1:
path = target.external_project
@@ -745,8 +546,8 @@ class WinGeneratorBase(GeneratorBase):
if self.enable_nls and name == '__ALL__':
depends.extend(self.sections['locale'].get_targets())
- # Build ZLib as a dependency of Serf if we have it
- if self.zlib_path and name == 'serf':
+ # Make ZLib a dependency of serf if we build the zlib src
+ if name == 'serf' and self._libraries['zlib'].is_src:
depends.extend(self.sections['zlib'].get_targets())
# To set the correct build order of the JavaHL targets, the javahl-javah
@@ -768,7 +569,9 @@ class WinGeneratorBase(GeneratorBase):
dep_dict = {}
- if isinstance(target, gen_base.TargetLib) and target.msvc_static:
+ if mode == FILTER_EXTERNALLIBS:
+ self.get_externallib_depends(target, dep_dict)
+ elif isinstance(target, gen_base.TargetLib) and target.msvc_static:
self.get_static_win_depends(target, dep_dict)
else:
self.get_linked_win_depends(target, dep_dict)
@@ -783,6 +586,10 @@ class WinGeneratorBase(GeneratorBase):
for dep, (is_proj, is_lib, is_static) in dep_dict.items():
if is_static or (is_lib and not is_proj):
deps.append(dep)
+ elif mode == FILTER_EXTERNALLIBS:
+ for dep, (is_proj, is_lib, is_static) in dep_dict.items():
+ if is_static or (is_lib and not is_proj):
+ deps.append(dep)
else:
raise NotImplementedError
@@ -866,6 +673,16 @@ class WinGeneratorBase(GeneratorBase):
elif is_static:
self.get_linked_win_depends(dep, deps, 1)
+ def get_externallib_depends(self, target, deps):
+ """Find externallib dependencies for a project"""
+
+ direct_deps = self.get_direct_depends(target)
+ for dep, dep_kind in direct_deps:
+ self.get_externallib_depends(dep, deps)
+
+ if isinstance(target, gen_base.TargetLinked) and dep.external_lib:
+ deps[dep] = dep_kind
+
def get_win_defines(self, target, cfg):
"Return the list of defines for target"
@@ -903,7 +720,7 @@ class WinGeneratorBase(GeneratorBase):
# XXX: Check if db is present, and if so, let apr-util know
# XXX: This is a hack until the apr build system is improved to
# XXX: know these things for itself.
- if self.bdb_lib:
+ if 'db' in self._libraries:
fakedefines.append("APU_HAVE_DB=1")
fakedefines.append("SVN_LIBSVN_FS_LINKS_FS_BASE=1")
@@ -911,7 +728,7 @@ class WinGeneratorBase(GeneratorBase):
if self.enable_nls:
fakedefines.append("ENABLE_NLS")
- if self.serf_lib:
+ if 'serf' in self._libraries:
fakedefines.append("SVN_HAVE_SERF")
fakedefines.append("SVN_LIBSVN_CLIENT_LINKS_RA_SERF")
@@ -930,18 +747,29 @@ class WinGeneratorBase(GeneratorBase):
def get_win_includes(self, target):
"Return the list of include directories for target"
- fakeincludes = [ self.path("subversion/include"),
- self.path("subversion"),
- self.apath(self.apr_path, "include"),
- self.apath(self.apr_util_path, "include") ]
+ fakeincludes = [ self.apath("subversion/include"),
+ self.apath("subversion") ]
+
+ for dep in self.get_win_depends(target, FILTER_EXTERNALLIBS):
+ if dep.external_lib and \
+ dep.external_lib.startswith('$(SVN_') and \
+ dep.external_lib.endswith('_LIBS)'):
+
+ external_lib = dep.external_lib[6:-6].lower()
+
+ if external_lib in self._libraries:
+ lib = self._libraries[external_lib]
+ inc_dir = self.apath(lib.include_dir)
+
+ # Avoid duplicate items
+ if inc_dir and inc_dir not in fakeincludes:
+ fakeincludes.extend([inc_dir])
if target.name == 'mod_authz_svn':
fakeincludes.extend([ self.apath(self.httpd_path, "modules/aaa") ])
if isinstance(target, gen_base.TargetApacheMod):
- fakeincludes.extend([ self.apath(self.apr_util_path, "xml/expat/lib"),
- self.apath(self.httpd_path, "include"),
- self.apath(self.bdb_path, "include") ])
+ fakeincludes.extend([ self.apath(self.httpd_path, "include") ])
elif isinstance(target, gen_base.TargetSWIG):
util_includes = "subversion/bindings/swig/%s/libsvn_swig_%s" \
% (target.lang,
@@ -951,16 +779,11 @@ class WinGeneratorBase(GeneratorBase):
self.path("subversion/bindings/swig/include"),
self.path(util_includes) ])
else:
- fakeincludes.extend([ self.apath(self.apr_util_path, "xml/expat/lib"),
- self.path("subversion/bindings/swig/proxy"),
- self.apath(self.bdb_path, "include") ])
+ fakeincludes.extend([ self.path("subversion/bindings/swig/proxy") ])
if self.libintl_path:
fakeincludes.append(self.apath(self.libintl_path, 'inc'))
- if self.serf_lib:
- fakeincludes.append(self.apath(self.serf_path))
-
if self.swig_libdir \
and (isinstance(target, gen_base.TargetSWIG)
or isinstance(target, gen_base.TargetSWIGLib)):
@@ -979,8 +802,6 @@ class WinGeneratorBase(GeneratorBase):
if target.lang == "ruby":
fakeincludes.extend(self.ruby_includes)
- fakeincludes.append(self.apath(self.zlib_path))
-
if self.sqlite_inline:
fakeincludes.append(self.apath(self.sqlite_path))
else:
@@ -1001,28 +822,34 @@ class WinGeneratorBase(GeneratorBase):
def get_win_lib_dirs(self, target, cfg):
"Return the list of library directories for target"
- expatlibcfg = cfg.replace("Debug", "LibD").replace("Release", "LibR")
- if self.static_apr:
- libcfg = expatlibcfg
- else:
- libcfg = cfg
+ debug = (cfg == 'Debug')
- fakelibdirs = [ self.apath(self.bdb_path, "lib"),
- self.apath(self.zlib_path),
- ]
+ fakelibdirs = []
+
+ for dep in self.get_win_depends(target, FILTER_LIBS):
+ if dep.external_lib and \
+ dep.external_lib.startswith('$(SVN_') and \
+ dep.external_lib.endswith('_LIBS)'):
+
+ external_lib = dep.external_lib[6:-6].lower()
+
+ if external_lib in self._libraries:
+ lib = self._libraries[external_lib]
+
+ if debug:
+ lib_dir = self.apath(lib.debug_lib_dir)
+ else:
+ lib_dir = self.apath(lib.lib_dir)
+
+ # Avoid duplicate items
+ if lib_dir and lib_dir not in fakelibdirs:
+ fakelibdirs.extend([lib_dir])
if not self.sqlite_inline:
fakelibdirs.append(self.apath(self.sqlite_path, "lib"))
if self.sasl_path:
fakelibdirs.append(self.apath(self.sasl_path, "lib"))
- if self.serf_lib:
- fakelibdirs.append(self.apath(msvc_path_join(self.serf_path, cfg)))
-
- fakelibdirs.append(self.apath(self.apr_path, libcfg))
- fakelibdirs.append(self.apath(self.apr_util_path, libcfg))
- fakelibdirs.append(self.apath(self.apr_util_path, 'xml', 'expat',
- 'lib', expatlibcfg))
if isinstance(target, gen_base.TargetApacheMod):
fakelibdirs.append(self.apath(self.httpd_path, cfg))
@@ -1044,17 +871,12 @@ class WinGeneratorBase(GeneratorBase):
def get_win_libs(self, target, cfg):
"Return the list of external libraries needed for target"
+ debug = (cfg == 'Debug')
+
dblib = None
if self.bdb_lib:
- dblib = self.bdb_lib+(cfg == 'Debug' and 'd.lib' or '.lib')
+ dblib = self.bdb_lib+(debug and 'd.lib' or '.lib')
- if self.serf_lib:
- if self.serf_ver_maj != 0:
- serflib = 'serf-%d.lib' % self.serf_ver_maj
- else:
- serflib = 'serf.lib'
-
- zlib = (cfg == 'Debug' and 'zlibstatD.lib' or 'zlibstat.lib')
sasllib = None
if self.sasl_path:
sasllib = 'libsasl.lib'
@@ -1066,7 +888,6 @@ class WinGeneratorBase(GeneratorBase):
return []
nondeplibs = target.msvc_libs[:]
- nondeplibs.append(zlib)
if self.enable_nls:
if self.libintl_path:
nondeplibs.append(self.apath(self.libintl_path,
@@ -1090,26 +911,39 @@ class WinGeneratorBase(GeneratorBase):
for dep in self.get_win_depends(target, FILTER_LIBS):
nondeplibs.extend(dep.msvc_libs)
- if dep.external_lib == '$(SVN_DB_LIBS)':
- nondeplibs.append(dblib)
+ if dep.external_lib and \
+ dep.external_lib.startswith('$(SVN_') and \
+ dep.external_lib.endswith('_LIBS)'):
+
+ external_lib = dep.external_lib[6:-6].lower()
+
+ if external_lib in self._libraries:
+ lib = self._libraries[external_lib]
- if dep.external_lib == '$(SVN_SQLITE_LIBS)' and not self.sqlite_inline:
- nondeplibs.append('sqlite3.lib')
+ if debug:
+ nondeplibs.append(lib.debug_lib_name)
+ else:
+ nondeplibs.append(lib.lib_name)
+
+ elif external_lib == 'sqlite':
- if self.serf_lib and dep.external_lib == '$(SVN_SERF_LIBS)':
- nondeplibs.append(serflib)
+ if not self.sqlite_inline:
+ nondeplibs.append('sqlite3.lib')
+ # else: # Is not a linkable library
- if dep.external_lib == '$(SVN_SASL_LIBS)':
- nondeplibs.append(sasllib)
+ elif external_lib == 'sasl':
- if dep.external_lib == '$(SVN_APR_LIBS)':
- nondeplibs.append(self.apr_lib)
+ if sasllib:
+ nondeplibs.append(sasllib)
- if dep.external_lib == '$(SVN_APRUTIL_LIBS)':
- nondeplibs.append(self.aprutil_lib)
+ elif external_lib == 'apr_memcache' or \
+ external_lib == 'magic':
+ # Currently unhandled
+ lib = None
- if dep.external_lib == '$(SVN_XML_LIBS)':
- nondeplibs.append('xml.lib')
+ else:
+ print('Warning: Using underclared dependency \'%s\'' % \
+ (dep.external_lib,))
return gen_base.unique(nondeplibs)
@@ -1185,8 +1019,13 @@ class WinGeneratorBase(GeneratorBase):
))
def write_serf_project_file(self, name):
- if not self.serf_lib:
+ if 'serf' not in self._libraries:
return
+
+ serf = self._libraries['serf']
+
+ if not serf.is_src:
+ return # Using an installed library
serf_path = os.path.abspath(self.serf_path)
serf_sources = map(lambda x : os.path.relpath(x, self.serf_path),
@@ -1198,10 +1037,6 @@ class WinGeneratorBase(GeneratorBase):
glob.glob(os.path.join(serf_path, '*.h'))
+ glob.glob(os.path.join(serf_path, 'auth', '*.h'))
+ glob.glob(os.path.join(serf_path, 'buckets', '*.h')))
- if self.serf_ver_maj != 0:
- serflib = 'serf-%d.lib' % self.serf_ver_maj
- else:
- serflib = 'serf.lib'
apr_static = self.static_apr and 'APR_STATIC=1' or ''
openssl_static = self.static_openssl and 'OPENSSL_STATIC=1' or ''
@@ -1219,7 +1054,7 @@ class WinGeneratorBase(GeneratorBase):
('project_guid', self.makeguid('serf')),
('apr_static', apr_static),
('openssl_static', openssl_static),
- ('serf_lib', serflib),
+ ('serf_lib', serf.lib_name),
))
def move_proj_file(self, path, name, params=()):
@@ -1243,421 +1078,6 @@ class WinGeneratorBase(GeneratorBase):
raise NotImplementedError
- def _find_perl(self):
- "Find the right perl library name to link swig bindings with"
- self.perl_includes = []
- self.perl_libdir = None
- fp = os.popen('perl -MConfig -e ' + escape_shell_arg(
- 'print "$Config{PERL_REVISION}$Config{PERL_VERSION}"'), 'r')
- try:
- line = fp.readline()
- if line:
- msg = 'Found installed perl version number.'
- self.perl_lib = 'perl' + line.rstrip() + '.lib'
- else:
- msg = 'Could not detect perl version.'
- self.perl_lib = 'perl56.lib'
- print('%s\n Perl bindings will be linked with %s\n'
- % (msg, self.perl_lib))
- finally:
- fp.close()
-
- fp = os.popen('perl -MConfig -e ' + escape_shell_arg(
- 'print $Config{archlib}'), 'r')
- try:
- line = fp.readline()
- if line:
- self.perl_libdir = os.path.join(line, 'CORE')
- self.perl_includes = [os.path.join(line, 'CORE')]
- finally:
- fp.close()
-
- def _find_ruby(self):
- "Find the right Ruby library name to link swig bindings with"
- self.ruby_includes = []
- self.ruby_libdir = None
- self.ruby_version = None
- self.ruby_major_version = None
- self.ruby_minor_version = None
- # Pass -W0 to stifle the "-e:1: Use RbConfig instead of obsolete
- # and deprecated Config." warning if we are using Ruby 1.9.
- proc = os.popen('ruby -rrbconfig -W0 -e ' + escape_shell_arg(
- "puts Config::CONFIG['ruby_version'];"
- "puts Config::CONFIG['LIBRUBY'];"
- "puts Config::CONFIG['archdir'];"
- "puts Config::CONFIG['libdir'];"), 'r')
- try:
- rubyver = proc.readline()[:-1]
- if rubyver:
- self.ruby_version = rubyver
- self.ruby_major_version = string.atoi(self.ruby_version[0])
- self.ruby_minor_version = string.atoi(self.ruby_version[2])
- libruby = proc.readline()[:-1]
- if libruby:
- msg = 'Found installed ruby %s' % rubyver
- self.ruby_lib = libruby
- self.ruby_includes.append(proc.readline()[:-1])
- self.ruby_libdir = proc.readline()[:-1]
- else:
- msg = 'Could not detect Ruby version, assuming 1.8.'
- self.ruby_version = "1.8"
- self.ruby_major_version = 1
- self.ruby_minor_version = 8
- self.ruby_lib = 'msvcrt-ruby18.lib'
- print('%s\n Ruby bindings will be linked with %s\n'
- % (msg, self.ruby_lib))
- finally:
- proc.close()
-
- def _find_python(self):
- "Find the appropriate options for creating SWIG-based Python modules"
- self.python_includes = []
- self.python_libdir = ""
- try:
- from distutils import sysconfig
- inc = sysconfig.get_python_inc()
- plat = sysconfig.get_python_inc(plat_specific=1)
- self.python_includes.append(inc)
- if inc != plat:
- self.python_includes.append(plat)
- self.python_libdir = self.apath(sysconfig.PREFIX, "libs")
- except ImportError:
- pass
-
- def _find_jdk(self):
- if not self.jdk_path:
- jdk_ver = None
- try:
- try:
- # Python >=3.0
- import winreg
- except ImportError:
- # Python <3.0
- import _winreg as winreg
- key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE,
- r"SOFTWARE\JavaSoft\Java Development Kit")
- # Find the newest JDK version.
- num_values = winreg.QueryInfoKey(key)[1]
- for i in range(num_values):
- (name, value, key_type) = winreg.EnumValue(key, i)
- if name == "CurrentVersion":
- jdk_ver = value
- break
-
- # Find the JDK path.
- if jdk_ver is not None:
- key = winreg.OpenKey(key, jdk_ver)
- num_values = winreg.QueryInfoKey(key)[1]
- for i in range(num_values):
- (name, value, key_type) = winreg.EnumValue(key, i)
- if name == "JavaHome":
- self.jdk_path = value
- break
- winreg.CloseKey(key)
- except (ImportError, EnvironmentError):
- pass
- if self.jdk_path:
- print("Found JDK version %s in %s\n" % (jdk_ver, self.jdk_path))
- else:
- print("Using JDK in %s\n" % (self.jdk_path))
-
- def _find_swig(self):
- # Require 1.3.24. If not found, assume 1.3.25.
- default_version = '1.3.25'
- minimum_version = '1.3.24'
- vernum = 103025
- minimum_vernum = 103024
- libdir = ''
-
- if self.swig_path is not None:
- self.swig_exe = os.path.abspath(os.path.join(self.swig_path, 'swig'))
- else:
- self.swig_exe = 'swig'
-
- try:
- outfp = subprocess.Popen([self.swig_exe, '-version'], stdout=subprocess.PIPE, universal_newlines=True).stdout
- txt = outfp.read()
- if txt:
- vermatch = re.compile(r'^SWIG\ Version\ (\d+)\.(\d+)\.(\d+)$', re.M) \
- .search(txt)
- else:
- vermatch = None
-
- if vermatch:
- version = tuple(map(int, vermatch.groups()))
- # build/ac-macros/swig.m4 explains the next incantation
- vernum = int('%d%02d%03d' % version)
- print('Found installed SWIG version %d.%d.%d\n' % version)
- if vernum < minimum_vernum:
- print('WARNING: Subversion requires version %s\n'
- % minimum_version)
-
- libdir = self._find_swig_libdir()
- else:
- print('Could not find installed SWIG,'
- ' assuming version %s\n' % default_version)
- self.swig_libdir = ''
- outfp.close()
- except OSError:
- print('Could not find installed SWIG,'
- ' assuming version %s\n' % default_version)
- self.swig_libdir = ''
-
- self.swig_vernum = vernum
- self.swig_libdir = libdir
-
- def _find_swig_libdir(self):
- fp = os.popen(self.swig_exe + ' -swiglib', 'r')
- try:
- libdir = fp.readline().rstrip()
- if libdir:
- print('Using SWIG library directory %s\n' % libdir)
- return libdir
- else:
- print('WARNING: could not find SWIG library directory\n')
- finally:
- fp.close()
- return ''
-
- def _find_ml(self):
- "Check if the ML assembler is in the path"
- if not self.enable_ml:
- self.have_ml = 0
- return
- fp = os.popen('ml /help', 'r')
- try:
- line = fp.readline()
- if line:
- msg = 'Found ML, ZLib build will use ASM sources'
- self.have_ml = 1
- else:
- msg = 'Could not find ML, ZLib build will not use ASM sources'
- self.have_ml = 0
- print('%s\n' % (msg,))
- finally:
- fp.close()
-
- def _get_serf_version(self):
- "Retrieves the serf version from serf.h"
-
- # shouldn't be called unless serf is there
- assert self.serf_path and os.path.exists(self.serf_path)
-
- self.serf_ver_maj = None
- self.serf_ver_min = None
- self.serf_ver_patch = None
-
- # serf.h should be present
- if not os.path.exists(os.path.join(self.serf_path, 'serf.h')):
- return None, None, None
-
- txt = open(os.path.join(self.serf_path, 'serf.h')).read()
-
- maj_match = re.search(r'SERF_MAJOR_VERSION\s+(\d+)', txt)
- min_match = re.search(r'SERF_MINOR_VERSION\s+(\d+)', txt)
- patch_match = re.search(r'SERF_PATCH_VERSION\s+(\d+)', txt)
- if maj_match:
- self.serf_ver_maj = int(maj_match.group(1))
- if min_match:
- self.serf_ver_min = int(min_match.group(1))
- if patch_match:
- self.serf_ver_patch = int(patch_match.group(1))
-
- return self.serf_ver_maj, self.serf_ver_min, self.serf_ver_patch
-
- def _find_serf(self):
- "Check if serf and its dependencies are available"
-
- minimal_serf_version = (1, 2, 1)
- 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):
- self.serf_lib = 'serf'
- version = self._get_serf_version()
- if None in version:
- msg = 'Unknown serf version found; but, will try to build ' \
- 'ra_serf.'
- else:
- self.serf_ver = '.'.join(str(v) for v in version)
- if version < minimal_serf_version:
- self.serf_lib = None
- msg = 'Found serf %s, but >= %s is required. ra_serf will not be built.\n' % \
- (self.serf_ver, '.'.join(str(v) for v in minimal_serf_version))
- else:
- msg = 'Found serf %s' % self.serf_ver
- print(msg)
- else:
- print('openssl not found, ra_serf will not be built\n')
- else:
- print('serf not found, ra_serf will not be built\n')
-
- def _find_apr(self):
- "Find the APR library and version"
-
- minimal_apr_version = (0, 9, 0)
-
- version_file_path = os.path.join(self.apr_path, 'include',
- 'apr_version.h')
-
- if not os.path.exists(version_file_path):
- sys.stderr.write("ERROR: '%s' not found.\n" % version_file_path);
- sys.stderr.write("Use '--with-apr' option to configure APR location.\n");
- sys.exit(1)
-
- fp = open(version_file_path)
- txt = fp.read()
- fp.close()
-
- vermatch = re.search(r'^\s*#define\s+APR_MAJOR_VERSION\s+(\d+)', txt, re.M)
- major = int(vermatch.group(1))
-
- vermatch = re.search(r'^\s*#define\s+APR_MINOR_VERSION\s+(\d+)', txt, re.M)
- minor = int(vermatch.group(1))
-
- vermatch = re.search(r'^\s*#define\s+APR_PATCH_VERSION\s+(\d+)', txt, re.M)
- patch = int(vermatch.group(1))
-
- version = (major, minor, patch)
- self.apr_version = '%d.%d.%d' % version
-
- suffix = ''
- if major > 0:
- suffix = '-%d' % major
-
- if self.static_apr:
- self.apr_lib = 'apr%s.lib' % suffix
- else:
- self.apr_lib = 'libapr%s.lib' % suffix
-
- if version < minimal_apr_version:
- sys.stderr.write("ERROR: apr %s or higher is required "
- "(%s found)\n" % (
- '.'.join(str(v) for v in minimal_apr_version),
- self.apr_version))
- sys.exit(1)
- else:
- print('Found apr %s' % self.apr_version)
-
- def _find_apr_util(self):
- "Find the APR-util library and version"
-
- minimal_aprutil_version = (0, 9, 0)
- version_file_path = os.path.join(self.apr_util_path, 'include',
- 'apu_version.h')
-
- if not os.path.exists(version_file_path):
- sys.stderr.write("ERROR: '%s' not found.\n" % version_file_path);
- sys.stderr.write("Use '--with-apr-util' option to configure APR-Util location.\n");
- sys.exit(1)
-
- fp = open(version_file_path)
- txt = fp.read()
- fp.close()
-
- vermatch = re.search(r'^\s*#define\s+APU_MAJOR_VERSION\s+(\d+)', txt, re.M)
- major = int(vermatch.group(1))
-
- vermatch = re.search(r'^\s*#define\s+APU_MINOR_VERSION\s+(\d+)', txt, re.M)
- minor = int(vermatch.group(1))
-
- vermatch = re.search(r'^\s*#define\s+APU_PATCH_VERSION\s+(\d+)', txt, re.M)
- patch = int(vermatch.group(1))
-
- version = (major, minor, patch)
- self.aprutil_version = '%d.%d.%d' % version
-
- suffix = ''
- if major > 0:
- suffix = '-%d' % major
-
- if self.static_apr:
- self.aprutil_lib = 'aprutil%s.lib' % suffix
- else:
- self.aprutil_lib = 'libaprutil%s.lib' % suffix
-
- if version < minimal_aprutil_version:
- sys.stderr.write("ERROR: aprutil %s or higher is required "
- "(%s found)\n" % (
- '.'.join(str(v) for v in minimal_aprutil_version),
- self.aprutil_version))
- sys.exit(1)
- else:
- print('Found aprutil %s' % self.aprutil_version)
-
- def _find_sqlite(self):
- "Find the Sqlite library and version"
-
- minimal_sqlite_version = (3, 7, 12)
-
- header_file = os.path.join(self.sqlite_path, 'inc', 'sqlite3.h')
-
- # First check for compiled version of SQLite.
- if os.path.exists(header_file):
- # Compiled SQLite seems found, check for sqlite3.lib file.
- lib_file = os.path.join(self.sqlite_path, 'lib', 'sqlite3.lib')
- if not os.path.exists(lib_file):
- sys.stderr.write("ERROR: '%s' not found.\n" % lib_file)
- sys.stderr.write("Use '--with-sqlite' option to configure sqlite location.\n");
- sys.exit(1)
- self.sqlite_inline = False
- else:
- # Compiled SQLite not found. Try amalgamation version.
- amalg_file = os.path.join(self.sqlite_path, 'sqlite3.c')
- if not os.path.exists(amalg_file):
- sys.stderr.write("ERROR: SQLite not found in '%s' directory.\n" % self.sqlite_path)
- sys.stderr.write("Use '--with-sqlite' option to configure sqlite location.\n");
- sys.exit(1)
- header_file = os.path.join(self.sqlite_path, 'sqlite3.h')
- self.sqlite_inline = True
-
- fp = open(header_file)
- txt = fp.read()
- fp.close()
- vermatch = re.search(r'^\s*#define\s+SQLITE_VERSION\s+"(\d+)\.(\d+)\.(\d+)(?:\.(\d))?"', txt, re.M)
-
- version = vermatch.groups()
-
- # Sqlite doesn't add patch numbers for their ordinary releases
- if not version[3]:
- version = version[0:3]
-
- version = tuple(map(int, version))
-
- self.sqlite_version = '.'.join(str(v) for v in version)
-
- if version < minimal_sqlite_version:
- sys.stderr.write("ERROR: sqlite %s or higher is required "
- "(%s found)\n" % (
- '.'.join(str(v) for v in minimal_sqlite_version),
- self.sqlite_version))
- sys.exit(1)
- else:
- print('Found SQLite %s' % self.sqlite_version)
-
- def _find_zlib(self):
- "Find the ZLib library and version"
-
- if not self.zlib_path:
- self.zlib_version = '1'
- return
-
- header_file = os.path.join(self.zlib_path, 'zlib.h')
-
- if not os.path.exists(header_file):
- self.zlib_version = '1'
- return
-
- fp = open(header_file)
- txt = fp.read()
- fp.close()
- vermatch = re.search(r'^\s*#define\s+ZLIB_VERSION\s+"(\d+)\.(\d+)\.(\d+)(?:\.\d)?"', txt, re.M)
-
- version = tuple(map(int, vermatch.groups()))
-
- self.zlib_version = '%d.%d.%d' % version
-
- print('Found ZLib %s' % self.zlib_version)
-
class ProjectItem:
"A generic item class for holding sources info, config info, etc for a project"
def __init__(self, **kw):
@@ -1665,32 +1085,10 @@ class ProjectItem:
vars(self).update(kw)
# ============================================================================
-# This is a cut-down and modified version of code from:
-# subversion/subversion/bindings/swig/python/svn/core.py
-#
-if sys.platform == "win32":
- _escape_shell_arg_re = re.compile(r'(\\+)(\"|$)')
-
- def escape_shell_arg(arg):
- # The (very strange) parsing rules used by the C runtime library are
- # described at:
- # http://msdn.microsoft.com/library/en-us/vclang/html/_pluslang_Parsing_C.2b2b_.Command.2d.Line_Arguments.asp
-
- # double up slashes, but only if they are followed by a quote character
- arg = re.sub(_escape_shell_arg_re, r'\1\1\2', arg)
-
- # surround by quotes and escape quotes inside
- arg = '"' + arg.replace('"', '"^""') + '"'
- return arg
-
-else:
- def escape_shell_arg(str):
- return "'" + str.replace("'", "'\\''") + "'"
-
-# ============================================================================
FILTER_LIBS = 1
FILTER_PROJECTS = 2
+FILTER_EXTERNALLIBS = 3
class POFile:
"Item class for holding po file info"
Modified: subversion/branches/fsfs-improvements/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/configure.ac?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/configure.ac (original)
+++ subversion/branches/fsfs-improvements/configure.ac Sat Jul 13 14:14:42 2013
@@ -628,6 +628,28 @@ fi
AC_SUBST(SVN_GNOME_KEYRING_INCLUDES)
AC_SUBST(SVN_GNOME_KEYRING_LIBS)
+dnl Googlemock -----------------
+AC_ARG_ENABLE([gmock],
+ AS_HELP_STRING([--disable-gmock],
+ [Do not use the Googlemock testing framework]),
+ [enable_gmock=yes],
+ [enable_gmock="$withval"])
+
+AC_SUBST([GMOCK_SRCDIR], [$abs_srcdir/gmock-fused])
+AC_MSG_CHECKING([whether use Googlemock])
+if test "$enable_gmock" != "no"; then
+ if test -d "$GMOCK_SRCDIR"; then
+ AC_MSG_RESULT([yes])
+ SVN_USE_GMOCK=true
+ else
+ AC_MSG_RESULT([no])
+ SVN_USE_GMOCK=false
+ fi
+else
+ AC_MSG_RESULT([no])
+ SVN_USE_GMOCK_SOURCES=false
+fi
+AC_SUBST([SVN_USE_GMOCK])
dnl Ev2 experimental features ----------------------
dnl Note: The Ev2 implementations will be built unconditionally, but by
@@ -711,6 +733,26 @@ AH_BOTTOM([
#define gettext(x) (x)
#define dgettext(domain, x) (x)
#endif
+
+/* compiler hints */
+#if defined(__GNUC__) && (__GNUC__ >= 3)
+# define SVN__PREDICT_FALSE(x) (__builtin_expect(x, 0))
+# define SVN__PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
+#else
+# define SVN__PREDICT_FALSE(x)
+# define SVN__PREDICT_TRUE(x)
+#endif
+
+#if defined(SVN_DEBUG)
+# define SVN__FORCE_INLINE
+# define SVN__PREVENT_INLINE
+#elif defined(__GNUC__)
+# define SVN__FORCE_INLINE __attribute__ ((always_inline))
+# define SVN__PREVENT_INLINE __attribute__ ((noinline))
+#else
+# define SVN__FORCE_INLINE
+# define SVN__PREVENT_INLINE
+#endif
])
dnl Used to simulate makefile conditionals.
@@ -1003,6 +1045,7 @@ AS_HELP_STRING([--enable-maintainer-mode
SVN_CFLAGS_ADD_IFELSE([-Wold-style-definition])
SVN_CFLAGS_ADD_IFELSE([-Wno-system-headers])
SVN_CFLAGS_ADD_IFELSE([-Wno-format-nonliteral])
+ SVN_CFLAGS_ADD_IFELSE([-Wno-string-plus-int])
CMAINTAINERFLAGS="$CFLAGS $CMAINTAINERFLAGS"
CFLAGS="$CFLAGS_KEEP"
Modified: subversion/branches/fsfs-improvements/gen-make.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/gen-make.py?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/gen-make.py (original)
+++ subversion/branches/fsfs-improvements/gen-make.py Sat Jul 13 14:14:42 2013
@@ -214,6 +214,8 @@ def _usage_exit(err=None):
print("")
print(" --with-apr_memcache=DIR")
print(" the apr_memcache sources are in DIR")
+ print(" --disable-gmock")
+ print(" do not use Googlemock")
sys.exit(1)
@@ -262,7 +264,7 @@ if __name__ == '__main__':
'disable-shared',
'installed-libs=',
'vsnet-version=',
-
+ 'disable-gmock',
# Keep distributions that help by adding a path
# working. On unix this would be filtered by
# configure, but on Windows gen-make.py is used
Modified: subversion/branches/fsfs-improvements/get-deps.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/get-deps.sh?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/get-deps.sh (original)
+++ subversion/branches/fsfs-improvements/get-deps.sh Sat Jul 13 14:14:42 2013
@@ -36,7 +36,7 @@ APU_VERSION=${APU_VERSION:-"1.5.1"}
SERF_VERSION=${SERF_VERSION:-"1.2.1"}
ZLIB_VERSION=${ZLIB_VERSION:-"1.2.8"}
SQLITE_VERSION=${SQLITE_VERSION:-"3.7.15.1"}
-GTEST_VERSION=${GTEST_VERSION:-"1.6.0"}
+GMOCK_VERSION=${GMOCK_VERSION:-"1.6.0"}
HTTPD_VERSION=${HTTPD_VERSION:-"2.4.3"}
APR_ICONV_VERSION=${APR_ICONV_VERSION:-"1.2.1"}
@@ -46,8 +46,8 @@ SERF=serf-${SERF_VERSION}
ZLIB=zlib-${ZLIB_VERSION}
SQLITE_VERSION_LIST=`echo $SQLITE_VERSION | sed -e 's/\./ /g'`
SQLITE=sqlite-amalgamation-`printf %d%02d%02d%02d $SQLITE_VERSION_LIST`
-GTEST=gtest-${GTEST_VERSION}
-GTEST_URL=http://googletest.googlecode.com/files/
+GMOCK=gmock-${GMOCK_VERSION}
+GMOCK_URL=https://googlemock.googlecode.com/files/
HTTPD=httpd-${HTTPD_VERSION}
APR_ICONV=apr-iconv-${APR_ICONV_VERSION}
@@ -67,7 +67,7 @@ APACHE_MIRROR=http://archive.apache.org/
# helpers
usage() {
echo "Usage: $0"
- echo "Usage: $0 [ apr | serf | zlib | sqlite | gtest ] ..."
+ echo "Usage: $0 [ apr | serf | zlib | sqlite | gmock ] ..."
exit $1
}
@@ -122,23 +122,24 @@ get_sqlite() {
}
-get_gtest() {
- test -d $BASEDIR/gtest && return
+get_gmock() {
+ test -d $BASEDIR/gmock-fused && return
cd $TEMPDIR
- $HTTP_FETCH ${GTEST_URL}/${GTEST}.zip
+ $HTTP_FETCH ${GMOCK_URL}/${GMOCK}.zip
cd $BASEDIR
- unzip -q $TEMPDIR/$GTEST.zip
+ unzip -q $TEMPDIR/$GMOCK.zip
- mv $GTEST gtest
+ mv $GMOCK/fused-src gmock-fused
+ rm -fr $GMOCK
}
# main()
get_deps() {
mkdir -p $TEMPDIR
- for i in zlib serf sqlite-amalgamation apr apr-util gtest; do
+ for i in zlib serf sqlite-amalgamation apr apr-util gmock-fused; do
if [ -d $i ]; then
echo "Local directory '$i' already exists; the downloaded copy won't be used" >&2
fi
Propchange: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/array.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/array.hpp?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/array.hpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/array.hpp Sat Jul 13 14:14:42 2013
@@ -60,7 +60,7 @@ public:
/**
* Create a new proxy for the APR array wrapped by @a that.
*/
- explicit Array(const Array& that) throw()
+ Array(const Array& that) throw()
: m_array(that.m_array)
{}
@@ -105,7 +105,7 @@ public:
*/
const value_type& at(size_type index) const throw(std::out_of_range)
{
- if (index < 0 || index > size())
+ if (index < 0 || index >= size())
throw std::out_of_range(_("APR array index is out of range"));
return (*this)[index];
}
@@ -124,7 +124,7 @@ public:
*/
value_type& at(size_type index) throw(std::out_of_range)
{
- if (index < 0 || index > size())
+ if (index < 0 || index >= size())
throw std::out_of_range(_("APR array index is out of range"));
return (*this)[index];
}
@@ -213,7 +213,7 @@ public:
/**
* Create a new proxy for the APR array wrapped by @a that.
*/
- explicit ConstArray(const ConstArray& that) throw()
+ ConstArray(const ConstArray& that) throw()
: inherited(that)
{}
@@ -268,13 +268,13 @@ public:
/**
* Abstract base class for immutable iteration callback functors.
*/
- typedef typename inherited::ConstIteration ConstIteration;
+ typedef typename inherited::ConstIteration Iteration;
/**
* Iterate over all the values pairs in the array, invoking
* @a callback for each one.
*/
- void iterate(ConstIteration& callback) const
+ void iterate(Iteration& callback) const
{
inherited::iterate(callback);
}
Propchange: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/array.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/hash.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/impl.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/aprwrap/pool.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/exception.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/exception.cpp?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/exception.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/src/exception.cpp Sat Jul 13 14:14:42 2013
@@ -28,6 +28,7 @@
#include <sstream>
#include "svncxxhl/exception.hpp"
+#include "aprwrap.hpp"
#include "svn_error.h"
#include "svn_utf.h"
@@ -251,13 +252,13 @@ void Error::throw_svn_error(svn_error_t*
namespace {
void handle_one_error(Error::MessageList& ml, bool show_traces,
int error_code, detail::ErrorDescription* descr,
- apr_pool_t* pool)
+ const APR::Pool& pool)
{
if (show_traces && descr->file())
{
const char* file_utf8 = NULL;
svn_error_t* err =
- svn_utf_cstring_to_utf8(&file_utf8, descr->file(), pool);
+ svn_utf_cstring_to_utf8(&file_utf8, descr->file(), pool.get());
if (err)
{
svn_error_clear(err);
@@ -302,7 +303,7 @@ void handle_one_error(Error::MessageList
svn_error_t* err = svn_utf_cstring_to_utf8(
&description,
apr_strerror(error_code, errorbuf, sizeof(errorbuf)),
- pool);
+ pool.get());
if (err)
{
svn_error_clear(err);
@@ -333,33 +334,23 @@ Error::MessageList Error::compile_messag
std::vector<int> empties;
empties.reserve(max_length);
- apr_pool_t* pool = NULL;
- apr_pool_create(&pool, NULL);
- try
+ APR::Pool iterpool;
+ for (const Error* err = this; err; err = err->m_nested.get())
{
- for (const Error* err = this; err; err = err->m_nested.get())
+ if (!err->m_description->what())
{
- if (!err->m_description->what())
- {
- // Non-specific messages are printed only once.
- std::vector<int>::iterator it = std::find(
- empties.begin(), empties.end(), err->m_errno);
- if (it != empties.end())
- continue;
- empties.push_back(err->m_errno);
- }
- handle_one_error(ml, show_traces,
- err->m_errno, err->m_description,
- pool);
+ // Non-specific messages are printed only once.
+ std::vector<int>::iterator it = std::find(
+ empties.begin(), empties.end(), err->m_errno);
+ if (it != empties.end())
+ continue;
+ empties.push_back(err->m_errno);
}
+ handle_one_error(ml, show_traces,
+ err->m_errno, err->m_description,
+ iterpool);
+ iterpool.clear();
}
- catch (...)
- {
- apr_pool_destroy(pool);
- throw;
- }
-
- apr_pool_destroy(pool);
return ml;
}
Modified: subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_exception.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_exception.cpp?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_exception.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/cxxhl/tests/test_exception.cpp Sat Jul 13 14:14:42 2013
@@ -19,6 +19,8 @@
* ====================================================================
*/
+// ### TODO: Convert to Googlemock/Googletest
+
#include <algorithm>
#include <cstdio>
#include <iomanip>
@@ -56,7 +58,7 @@ void traceall(const char *message, const
void tracecheck(svn_error_t* err)
{
std::cout << "C-API handler:" << std::endl;
- svn_handle_error2(err, stdout, false, " test_exception");
+ svn_handle_error2(err, stdout, false, " test_exception: ");
svn_error_clear(err);
}
@@ -136,16 +138,13 @@ int test_error()
return false;
}
-int main()
-{
- apr_initialize();
+#include <gmock/gmock.h>
+TEST(Exceptions, DummyTest)
+{
const char *stat = (test_cancel() ? "OK" : "ERROR");
std::cerr << "test_cancel .... " << stat << std::endl;
stat = (test_error() ? "OK" : "ERROR");
std::cerr << "test_error ..... " << stat << std::endl;
-
- apr_terminate();
- return 0;
}
Modified: subversion/branches/fsfs-improvements/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Sat Jul 13 14:14:42 2013
@@ -93,7 +93,7 @@ void svn_swig_py_release_py_lock(void)
if (_saved_thread_key == NULL)
{
/* Obviously, creating a top-level pool for this is pretty stupid. */
- apr_pool_create(&_saved_thread_pool, NULL);
+ _saved_thread_pool = svn_pool_create(NULL);
apr_threadkey_private_create(&_saved_thread_key, NULL,
_saved_thread_pool);
}
Modified: subversion/branches/fsfs-improvements/subversion/include/private/svn_delta_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/include/private/svn_delta_private.h?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/include/private/svn_delta_private.h (original)
+++ subversion/branches/fsfs-improvements/subversion/include/private/svn_delta_private.h Sat Jul 13 14:14:42 2013
@@ -101,26 +101,6 @@ svn_delta__delta_from_editor(const svn_d
struct svn_delta__extra_baton *exb,
apr_pool_t *pool);
-/**
- * Get the data from IN, compress it according to the specified
- * COMPRESSION_LEVEL and write the result to OUT.
- * SVN_DELTA_COMPRESSION_LEVEL_NONE is valid for COMPRESSION_LEVEL.
- */
-svn_error_t *
-svn__compress(svn_string_t *in,
- svn_stringbuf_t *out,
- int compression_level);
-
-/**
- * Get the compressed data from IN, decompress it and write the result to
- * OUT. Return an error if the decompressed size is larger than LIMIT.
- */
-svn_error_t *
-svn__decompress(svn_string_t *in,
- svn_stringbuf_t *out,
- apr_size_t limit);
-
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/fsfs-improvements/subversion/include/private/svn_ra_svn_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/include/private/svn_ra_svn_private.h?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/include/private/svn_ra_svn_private.h (original)
+++ subversion/branches/fsfs-improvements/subversion/include/private/svn_ra_svn_private.h Sat Jul 13 14:14:42 2013
@@ -875,7 +875,7 @@ svn_ra_svn__write_data_log_entry(svn_ra_
const svn_string_t *message,
svn_boolean_t has_children,
svn_boolean_t invalid_revnum,
- int revprop_count);
+ unsigned revprop_count);
/**
* @}
Modified: subversion/branches/fsfs-improvements/subversion/include/private/svn_subr_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/include/private/svn_subr_private.h?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/include/private/svn_subr_private.h (original)
+++ subversion/branches/fsfs-improvements/subversion/include/private/svn_subr_private.h Sat Jul 13 14:14:42 2013
@@ -333,6 +333,84 @@ svn_version__at_least(svn_version_t *ver
/** @} */
+/**
+ * @defgroup svn_compress Data (de-)compression API
+ * @{
+ */
+
+/* This is at least as big as the largest size of an integer that
+ svn__encode_uint() can generate; it is sufficient for creating buffers
+ for it to write into. This assumes that integers are at most 64 bits,
+ and so 10 bytes (with 7 bits of information each) are sufficient to
+ represent them. */
+#define SVN__MAX_ENCODED_UINT_LEN 10
+
+/* Compression method parameters for svn__encode_uint. */
+
+/* No compression (but a length prefix will still be added to the buffer) */
+#define SVN__COMPRESSION_NONE 0
+
+/* Fastest, least effective compression method & level provided by zlib. */
+#define SVN__COMPRESSION_ZLIB_MIN 1
+
+/* Default compression method & level provided by zlib. */
+#define SVN__COMPRESSION_ZLIB_DEFAULT 5
+
+/* Slowest, best compression method & level provided by zlib. */
+#define SVN__COMPRESSION_ZLIB_MAX 9
+
+/* Encode VAL into the buffer P using the variable-length 7b/8b unsigned
+ integer format. Return the incremented value of P after the
+ encoded bytes have been written. P must point to a buffer of size
+ at least SVN__MAX_ENCODED_UINT_LEN.
+
+ This encoding uses the high bit of each byte as a continuation bit
+ and the other seven bits as data bits. High-order data bits are
+ encoded first, followed by lower-order bits, so the value can be
+ reconstructed by concatenating the data bits from left to right and
+ interpreting the result as a binary number. Examples (brackets
+ denote byte boundaries, spaces are for clarity only):
+
+ 1 encodes as [0 0000001]
+ 33 encodes as [0 0100001]
+ 129 encodes as [1 0000001] [0 0000001]
+ 2000 encodes as [1 0001111] [0 1010000]
+*/
+unsigned char *
+svn__encode_uint(unsigned char *p, apr_uint64_t val);
+
+/* Decode an unsigned 7b/8b-encoded integer into *VAL and return a pointer
+ to the byte after the integer. The bytes to be decoded live in the
+ range [P..END-1]. If these bytes do not contain a whole encoded
+ integer, return NULL; in this case *VAL is undefined.
+
+ See the comment for svn__encode_uint() earlier in this file for more
+ detail on the encoding format. */
+const unsigned char *
+svn__decode_uint(apr_uint64_t *val,
+ const unsigned char *p,
+ const unsigned char *end);
+
+/* Get the data from IN, compress it according to the specified
+ * COMPRESSION_METHOD and write the result to OUT.
+ * SVN__COMPRESSION_NONE is valid for COMPRESSION_METHOD.
+ */
+svn_error_t *
+svn__compress(svn_stringbuf_t *in,
+ svn_stringbuf_t *out,
+ int compression_method);
+
+/* Get the compressed data from IN, decompress it and write the result to
+ * OUT. Return an error if the decompressed size is larger than LIMIT.
+ */
+svn_error_t *
+svn__decompress(svn_stringbuf_t *in,
+ svn_stringbuf_t *out,
+ apr_size_t limit);
+
+/** @} */
+
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/fsfs-improvements/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/include/svn_config.h?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/include/svn_config.h (original)
+++ subversion/branches/fsfs-improvements/subversion/include/svn_config.h Sat Jul 13 14:14:42 2013
@@ -96,7 +96,7 @@ typedef struct svn_config_t svn_config_t
/** @since New in 1.8. */
#define SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS "http-max-connections"
/** @since New in 1.9. */
-#define SVN_CONFIG_OPTION_HTTP_DETECT_CHUNKING "http-detect-chunking"
+#define SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS "http-chunked-requests"
#define SVN_CONFIG_CATEGORY_CONFIG "config"
#define SVN_CONFIG_SECTION_AUTH "auth"
Modified: subversion/branches/fsfs-improvements/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/include/svn_error_codes.h?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/fsfs-improvements/subversion/include/svn_error_codes.h Sat Jul 13 14:14:42 2013
@@ -233,6 +233,11 @@ SVN_ERROR_START
SVN_ERR_BAD_CATEGORY_START + 15,
"Invalid atomic")
+ /** @since New in 1.9. */
+ SVN_ERRDEF(SVN_ERR_BAD_COMPRESSION_METHOD,
+ SVN_ERR_BAD_CATEGORY_START + 16,
+ "Invalid compression method")
+
/* xml errors */
SVN_ERRDEF(SVN_ERR_XML_ATTRIB_NOT_FOUND,
Modified: subversion/branches/fsfs-improvements/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/include/svn_io.h?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/include/svn_io.h (original)
+++ subversion/branches/fsfs-improvements/subversion/include/svn_io.h Sat Jul 13 14:14:42 2013
@@ -2065,6 +2065,28 @@ svn_io_file_seek(apr_file_t *file,
apr_off_t *offset,
apr_pool_t *pool);
+/** Set the file pointer of the #APR_BUFFERED @a file to @a offset. In
+ * contrast to #svn_io_file_seek, this function will attempt to resize the
+ * internal data buffer to @a block_size bytes and to read data aligned to
+ * multiples of that value. The beginning of the block will be returned
+ * in @a buffer_start, if that is not NULL.
+ * Uses @a pool for temporary allocations.
+ *
+ * @note Due to limitations of the APR API, in particular pre-1.3 APR,
+ * the alignment may not be successful. If you never use any other seek
+ * function on @a file, you are, however, virtually guaranteed to get at
+ * least 4kByte alignments for all reads.
+ *
+ * @note Calling this for non-buffered files is legal but inefficient.
+ *
+ * @since New in 1.9
+ */
+svn_error_t *
+svn_io_file_aligned_seek(apr_file_t *file,
+ apr_off_t block_size,
+ apr_off_t *buffer_start,
+ apr_off_t offset,
+ apr_pool_t *pool);
/** Wrapper for apr_file_write(). */
svn_error_t *
Modified: subversion/branches/fsfs-improvements/subversion/include/svn_version.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/include/svn_version.h?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/include/svn_version.h (original)
+++ subversion/branches/fsfs-improvements/subversion/include/svn_version.h Sat Jul 13 14:14:42 2013
@@ -192,6 +192,8 @@ struct svn_version_t
* unreleased library. A development client is always compatible with
* a previous released library.
*
+ * @note Implements the #svn_ver_check_list2.@a comparator interface.
+ *
* @since New in 1.1.
*/
svn_boolean_t
@@ -201,6 +203,8 @@ svn_ver_compatible(const svn_version_t *
/**
* Check if @a my_version and @a lib_version encode the same version number.
*
+ * @note Implements the #svn_ver_check_list2.@a comparator interface.
+ *
* @since New in 1.2.
*/
svn_boolean_t
@@ -228,10 +232,31 @@ typedef struct svn_version_checklist_t
* my_version is compatible with each entry in @a checklist. @a
* checklist must end with an entry whose label is @c NULL.
*
- * @see svn_ver_compatible()
+ * @a my_version is considered to be compatible with a version in @a checklist
+ * if @a comparator returns #TRUE when called with @a my_version as the first
+ * parammeter and the @a checklist version as the second parameter.
+ *
+ * @see svn_ver_compatible(), svn_ver_equal()
+ *
+ * @note Subversion's own code invariably uses svn_ver_equal() as @a comparator,
+ * since the cmdline tools sometimes use non-public APIs (such as utility
+ * functions that haven't been promoted to svn_cmdline.h). Third-party code
+ * SHOULD use svn_ver_compatible() as @a comparator.
*
- * @since New in 1.1.
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_ver_check_list2(const svn_version_t *my_version,
+ const svn_version_checklist_t *checklist,
+ svn_boolean_t (*comparator)(const svn_version_t *,
+ const svn_version_t *));
+
+/** Similar to svn_ver_check_list2(), with @a comparator set to
+ * #svn_ver_compatible.
+ *
+ * @deprecated Provided for backward compatibility with 1.8 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ver_check_list(const svn_version_t *my_version,
const svn_version_checklist_t *checklist);
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_client/merge.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_client/merge.c Sat Jul 13 14:14:42 2013
@@ -4740,7 +4740,7 @@ find_gaps_in_merge_source_history(svn_re
*gap_start = *gap_end = SVN_INVALID_REVNUM;
/* Easy out: There can't be a gap between adjacent revisions. */
- if (abs(source->loc1->rev - source->loc2->rev) == 1)
+ if (labs(source->loc1->rev - source->loc2->rev) == 1)
return SVN_NO_ERROR;
/* Get SOURCE as mergeinfo. */