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/02/16 20:47:24 UTC
svn commit: r1568815 - in /subversion/branches/javahl-1.8-extensions: ./
build/generator/ subversion/include/ subversion/libsvn_client/
subversion/libsvn_subr/ subversion/libsvn_wc/ subversion/tests/cmdline/
Author: brane
Date: Sun Feb 16 19:47:24 2014
New Revision: 1568815
URL: http://svn.apache.org/r1568815
Log:
On the javahl-1.8-extensions branch: Sync with 1.8.x up to r1568071 (the 1.8.8 release).
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/build/generator/gen_base.py
subversion/branches/javahl-1.8-extensions/subversion/include/svn_version.h
subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/copy.c
subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/cache-membuffer.c
subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/sqlite.c
subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc-queries.sql
subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/checkout_tests.py
subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/move_tests.py
Propchange: subversion/branches/javahl-1.8-extensions/
------------------------------------------------------------------------------
Merged /subversion/branches/1.8.x:r1567085-1568071
Merged /subversion/trunk:r1496127,1543187,1551579,1567064,1567109,1567134,1567286,1567392,1567492,1567494,1567740,1567985,1568070
Merged /subversion/branches/1.8.x-r1567286:r1567364-1567731
Merged /subversion/branches/1.8.x-r1567985:r1568016-1568055
Modified: subversion/branches/javahl-1.8-extensions/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/CHANGES?rev=1568815&r1=1568814&r2=1568815&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/CHANGES (original)
+++ subversion/branches/javahl-1.8-extensions/CHANGES Sun Feb 16 19:47:24 2014
@@ -1,6 +1,6 @@
-Version 1.8.6
-(12 Feb 2014, from /branches/1.8.x)
-http://svn.apache.org/repos/asf/subversion/tags/1.8.6
+Version 1.8.8
+(19 Feb 2014, from /branches/1.8.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.8.8
User-visible changes:
- Client-side bugfixes:
@@ -19,6 +19,8 @@ http://svn.apache.org/repos/asf/subversi
* version: don't cut off the distribution version on Linux (r1544878 et al)
* flush stdout before exiting to avoid information being lost (r1499470)
* status: fix missing sentinel value on warning codes (r1543145)
+ * update/switch: improve some WC db queries that may return incorrect
+ results depending on how SQLite is built (r1567109)
- Server-side bugfixes:
* reduce memory usage during checkout and export (r1564215)
@@ -28,8 +30,16 @@ http://svn.apache.org/repos/asf/subversi
* mod_dav_svn: include requested property changes in reports (r1557522)
* svnserve: correct default cache size in help text (r1563110)
* svnadmin dump: reduce size of dump files with '--deltas' (r1554978)
+ * resolve integer underflow that resulted in infinite loops (r1567985)
Developer-visible changes:
+ - General:
+ * fix ocassional failure of check_tests.py 12 (r1496127 et al)
+ * fix failure with SQLite 3.8.1-3.8.3 when built with
+ SQLITE_ENABLE_STAT3/4 due to bug in SQLite (r1567286, r1567392)
+ * specify SQLite defaults that can be changed when SQLite is built
+ to avoid unexpected behavior with Subversion (r1567064)
+
- API changes:
* numerous documentation fixes
* svn_client_commit_item3_dup() fix pool lifetime issues (r1550803)
@@ -43,6 +53,16 @@ http://svn.apache.org/repos/asf/subversi
* javahl: make test suite run without installing on OS X (r1535115)
* swig: fix building out of tarball on OS X (r1555654)
* swig-pl: fix with --enable-sqlite-compatibility-version (r1559009)
+ * swig: fix building bindings on OS X when APR has the -no-cpp-precomp
+ flag in the apr-config --cppflags output. (r1535610)
+ * swig: fix building from tarball with an out-of-tree build (r1543187)
+
+
+Version 1.8.7
+(Not released, see changes for 1.8.8.)
+
+Version 1.8.6
+(Not released, see changes for 1.8.8.)
Version 1.8.5
@@ -562,7 +582,7 @@ http://svn.apache.org/repos/asf/subversi
* configure now script auto-detects GNOME keyring (r1387230)
* allow configure to detect BDB on Debian-based Linux distros (r1390633)
* auto-detect serf via pkg-config (r1391662)
- * improve queries for compatability with SQLite 3.7.16 (r1455239)
+ * improve queries for compatibility with SQLite 3.7.16 (r1455239)
* remove support for in-tree apr, apr-util and apr-memcache (r1456924)
* FSFS caching supports prefixes now (r1462436)
* maintainer mode now prints symbolic error codes (r1465157)
@@ -1392,7 +1412,7 @@ http://svn.apache.org/repos/asf/subversi
http://subversion.apache.org/security/CVE-2011-1752-advisory.txt
* fixed: write-through proxy could direcly commit to slave (r917523)
* detect a particular corruption condition in FSFS (r1100213)
- * improve error message when clients refer to unkown revisions (r939000)
+ * improve error message when clients refer to unknown revisions (r939000)
* bugfixes and optimizations to the DAV mirroring code (r878607)
* fixed: locked and deleted file causes tree conflict (issue #3525)
* fixed: update touches locked file with svn:keywords property (issue #3471)
@@ -1762,7 +1782,7 @@ http://svn.apache.org/repos/asf/subversi
* improve performance of 'svn update' on large files (r36389, et. al.)
* fixed: error leak and potential crash (r36860)
* fixed: parent directory handling on Windows (r36049, -50, -51, -131)
- * fixed: unintialized memory errors (r36252, -3)
+ * fixed: uninitialized memory errors (r36252, -3)
* fixed: potential working copy corruption (r36714)
* fixed: working copy upgrade error (r36302)
* fixed: pointer dereference error (r36783)
Propchange: subversion/branches/javahl-1.8-extensions/CHANGES
------------------------------------------------------------------------------
Merged /subversion/branches/1.8.x/CHANGES:r1567085-1568071
Merged /subversion/trunk/CHANGES:r1565530,1567740,1568070
Modified: subversion/branches/javahl-1.8-extensions/build/generator/gen_base.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/build/generator/gen_base.py?rev=1568815&r1=1568814&r2=1568815&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/build/generator/gen_base.py (original)
+++ subversion/branches/javahl-1.8-extensions/build/generator/gen_base.py Sun Feb 16 19:47:24 2014
@@ -314,11 +314,16 @@ class ObjectFile(DependencyNode):
self.source_generated = 0
class SWIGObject(ObjectFile):
- def __init__(self, filename, lang):
+ def __init__(self, filename, lang, release_mode):
ObjectFile.__init__(self, filename)
self.lang = lang
self.lang_abbrev = lang_abbrev[lang]
- self.source_generated = 1
+ # in release mode the sources are not generated by the build
+ # but rather by the packager
+ if release_mode:
+ self.source_generated = 0
+ else:
+ self.source_generated = 1
### hmm. this is Makefile-specific
self.compile_cmd = '$(COMPILE_%s_WRAPPER)' % self.lang_abbrev.upper()
@@ -614,8 +619,10 @@ class TargetSWIG(TargetLib):
self.filename = build_path_join(self.path, lib_filename)
ifile = SWIGSource(ipath)
- cfile = SWIGObject(build_path_join(self.path, cname), self.lang)
- ofile = SWIGObject(build_path_join(self.path, oname), self.lang)
+ cfile = SWIGObject(build_path_join(self.path, cname), self.lang,
+ self.gen_obj.release_mode)
+ ofile = SWIGObject(build_path_join(self.path, oname), self.lang,
+ self.gen_obj.release_mode)
# the .c file depends upon the .i file
self.gen_obj.graph.add(DT_SWIG_C, cfile, ifile)
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=1568815&r1=1568814&r2=1568815&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 Sun Feb 16 19:47:24 2014
@@ -72,7 +72,7 @@ extern "C" {
*
* @since New in 1.1.
*/
-#define SVN_VER_PATCH 7
+#define SVN_VER_PATCH 8
/** @deprecated Provided for backward compatibility with the 1.0 API. */
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/copy.c?rev=1568815&r1=1568814&r2=1568815&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_client/copy.c Sun Feb 16 19:47:24 2014
@@ -314,6 +314,8 @@ do_wc_to_wc_moves(svn_boolean_t *timesta
{
const char *src_parent_abspath;
svn_boolean_t lock_src, lock_dst;
+ const char *src_wcroot_abspath;
+ const char *dst_wcroot_abspath;
svn_client__copy_pair_t *pair = APR_ARRAY_IDX(copy_pairs, i,
svn_client__copy_pair_t *);
@@ -326,6 +328,13 @@ do_wc_to_wc_moves(svn_boolean_t *timesta
src_parent_abspath = svn_dirent_dirname(pair->src_abspath_or_url,
iterpool);
+ SVN_ERR(svn_wc__get_wcroot(&src_wcroot_abspath,
+ ctx->wc_ctx, src_parent_abspath,
+ iterpool, iterpool));
+ SVN_ERR(svn_wc__get_wcroot(&dst_wcroot_abspath,
+ ctx->wc_ctx, pair->dst_parent_abspath,
+ iterpool, iterpool));
+
/* We now need to lock the right combination of batons.
Four cases:
1) src_parent == dst_parent
@@ -334,15 +343,18 @@ do_wc_to_wc_moves(svn_boolean_t *timesta
4) src_parent and dst_parent are disjoint
We can handle 1) as either 2) or 3) */
if (strcmp(src_parent_abspath, pair->dst_parent_abspath) == 0
- || svn_dirent_is_child(src_parent_abspath, pair->dst_parent_abspath,
- iterpool))
+ || (svn_dirent_is_child(src_parent_abspath, pair->dst_parent_abspath,
+ NULL)
+ && !svn_dirent_is_child(src_parent_abspath, dst_wcroot_abspath,
+ NULL)))
{
lock_src = TRUE;
lock_dst = FALSE;
}
else if (svn_dirent_is_child(pair->dst_parent_abspath,
- src_parent_abspath,
- iterpool))
+ src_parent_abspath, NULL)
+ && !svn_dirent_is_child(pair->dst_parent_abspath,
+ src_wcroot_abspath, NULL))
{
lock_src = FALSE;
lock_dst = TRUE;
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/cache-membuffer.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/cache-membuffer.c?rev=1568815&r1=1568814&r2=1568815&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/cache-membuffer.c Sun Feb 16 19:47:24 2014
@@ -422,7 +422,7 @@ struct svn_membuffer_t
*/
apr_uint64_t current_data;
- /* Total number of data buffer bytes in use. This is for statistics only.
+ /* Total number of data buffer bytes in use.
*/
apr_uint64_t data_used;
@@ -1374,7 +1374,11 @@ membuffer_cache_set_internal(svn_membuff
* the old spot, just re-use that space. */
if (entry && ALIGN_VALUE(entry->size) >= size && buffer)
{
- cache->data_used += size - entry->size;
+ /* Careful! We need to cast SIZE to the full width of CACHE->DATA_USED
+ * lest we run into trouble with 32 bit underflow *not* treated as a
+ * negative value.
+ */
+ cache->data_used += (apr_uint64_t)size - entry->size;
entry->size = size;
#ifdef SVN_DEBUG_CACHE_MEMBUFFER
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/sqlite.c?rev=1568815&r1=1568814&r2=1568815&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_subr/sqlite.c Sun Feb 16 19:47:24 2014
@@ -902,6 +902,18 @@ svn_sqlite__open(svn_sqlite__db_t **db,
SVN_ERR(internal_open(&(*db)->db3, path, mode, scratch_pool));
+#if SQLITE_VERSION_NUMBER >= 3008000 && SQLITE_VERSION_NUMBER < 3009000
+ /* disable SQLITE_ENABLE_STAT3/4 from 3.8.1 - 3.8.3 (but not 3.8.3.1+)
+ * to prevent using it when it's buggy.
+ * See: https://www.sqlite.org/src/info/4c86b126f2 */
+ if (sqlite3_libversion_number() > 3008000 &&
+ sqlite3_libversion_number() < 3008004 &&
+ strcmp(sqlite3_sourceid(),"2014-02-11")<0)
+ {
+ sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS, (*db)->db3, 0x800);
+ }
+#endif
+
#ifdef SQLITE3_DEBUG
sqlite3_trace((*db)->db3, sqlite_tracer, (*db)->db3);
#endif
@@ -933,7 +945,13 @@ svn_sqlite__open(svn_sqlite__db_t **db,
/* Enable recursive triggers so that a user trigger will fire
in the deletion phase of an INSERT OR REPLACE statement.
Requires SQLite >= 3.6.18 */
- "PRAGMA recursive_triggers=ON;"));
+ "PRAGMA recursive_triggers=ON;"
+ /* Enforce current Sqlite default behavior. Some distributions
+ might change the Sqlite defaults without realizing how this
+ affects application(read: Subversion) performance/behavior. */
+ "PRAGMA foreign_keys=OFF;" /* SQLITE_DEFAULT_FOREIGN_KEYS*/
+ "PRAGMA locking_mode = NORMAL;" /* SQLITE_DEFAULT_LOCKING_MODE */
+ ));
#if defined(SVN_DEBUG)
/* When running in debug mode, enable the checking of foreign key
@@ -942,6 +960,14 @@ svn_sqlite__open(svn_sqlite__db_t **db,
SVN_ERR(exec_sql(*db, "PRAGMA foreign_keys=ON;"));
#endif
+#ifdef SVN_SQLITE_REVERSE_UNORDERED_SELECTS
+ /* When enabled, this PRAGMA causes SELECT statements without an ORDER BY
+ clause to emit their results in the reverse order of what they normally
+ would. This can help detecting invalid assumptions about the result
+ order.*/
+ SVN_ERR(exec_sql(*db, "PRAGMA reverse_unordered_selects=ON;"));
+#endif
+
/* Store temporary tables in RAM instead of in temporary files, but don't
fail on this if this option is disabled in the sqlite compilation by
setting SQLITE_TEMP_STORE to 0 (always to disk) */
Modified: subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc-queries.sql?rev=1568815&r1=1568814&r2=1568815&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/libsvn_wc/wc-queries.sql Sun Feb 16 19:47:24 2014
@@ -1565,10 +1565,15 @@ WHERE wc_id = ?1
-- STMT_SELECT_MOVED_PAIR3
SELECT local_relpath, moved_to, op_depth, kind FROM nodes
+WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > ?3
+ AND moved_to IS NOT NULL
+UNION ALL
+SELECT local_relpath, moved_to, op_depth, kind FROM nodes
WHERE wc_id = ?1
- AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+ AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
AND op_depth > ?3
AND moved_to IS NOT NULL
+ORDER BY local_relpath, op_depth
-- STMT_SELECT_MOVED_OUTSIDE
SELECT local_relpath, moved_to, op_depth FROM nodes
Modified: subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/checkout_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/checkout_tests.py?rev=1568815&r1=1568814&r2=1568815&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/checkout_tests.py (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/checkout_tests.py Sun Feb 16 19:47:24 2014
@@ -27,6 +27,7 @@
# General modules
import sys, re, os, time, subprocess
+import datetime
# Our testing module
import svntest
@@ -660,11 +661,28 @@ def checkout_peg_rev_date(sbox):
sbox.build()
wc_dir = sbox.wc_dir
- # note the current time to use it as peg revision date.
- current_time = time.strftime("%Y-%m-%dT%H:%M:%S")
-
- # sleep till the next second.
- time.sleep(1.1)
+ ## Get svn:date.
+ exit_code, output, errput = svntest.main.run_svn(None, 'propget', 'svn:date',
+ '--revprop', '-r1',
+ '--strict',
+ sbox.repo_url)
+ if exit_code or errput != [] or len(output) != 1:
+ raise svntest.Failure("svn:date propget failed")
+ r1_string = output[0]
+
+ ## Increment the svn:date date by one microsecond.
+ # TODO: pass tzinfo=UTC to datetime.datetime()
+ date_pattern = re.compile(r'(\d+)-(\d+)-(\d+)T(\d\d):(\d\d):(\d\d)\.(\d+)Z$')
+ r1_time = datetime.datetime(*map(int, date_pattern.match(r1_string).groups()))
+ peg_time = r1_time + datetime.timedelta(microseconds=1)
+ assert r1_time != peg_time
+ # peg_string is, by all likelihood, younger than r1's svn:date and older than
+ # r2's svn:date. It is also not equal to either of them, so we test the
+ # binary search of svn:date values.
+ peg_string = '%04d-%02d-%02dT%02d:%02d:%02d.%06dZ' % \
+ tuple(getattr(peg_time, x)
+ for x in ["year", "month", "day", "hour", "minute",
+ "second", "microsecond"])
# create a new revision
mu_path = os.path.join(wc_dir, 'A', 'mu')
@@ -673,7 +691,7 @@ def checkout_peg_rev_date(sbox):
svntest.actions.run_and_verify_svn(None, None, [],
'ci', '-m', 'changed file mu', wc_dir)
- # now checkout the repo@current_time in another folder, this should create our
+ # now checkout the repo@peg_string in another folder, this should create our
# initial wc without the change in mu.
checkout_target = sbox.add_wc_path('checkout')
os.mkdir(checkout_target)
@@ -686,7 +704,24 @@ def checkout_peg_rev_date(sbox):
# use an old date to checkout, that way we're sure we get the first revision
svntest.actions.run_and_verify_checkout(sbox.repo_url +
- '@{' + current_time + '}',
+ '@{' + peg_string + '}',
+ checkout_target,
+ expected_output,
+ expected_wc)
+
+ # now try another checkout with repo@r1_string
+ checkout_target = sbox.add_wc_path('checkout2')
+ os.mkdir(checkout_target)
+
+ expected_output = svntest.main.greek_state.copy()
+ expected_output.wc_dir = checkout_target
+ expected_output.tweak(status='A ', contents=None)
+
+ expected_wc = svntest.main.greek_state.copy()
+
+ # use an old date to checkout, that way we're sure we get the first revision
+ svntest.actions.run_and_verify_checkout(sbox.repo_url +
+ '@{' + r1_string + '}',
checkout_target,
expected_output,
expected_wc)
Modified: subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/move_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/move_tests.py?rev=1568815&r1=1568814&r2=1568815&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/move_tests.py (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/tests/cmdline/move_tests.py Sun Feb 16 19:47:24 2014
@@ -1397,7 +1397,6 @@ def move_many_update_add(sbox):
wc_dir, '--accept', 'mine-conflict')
-@XFail()
def move_to_from_external(sbox):
"move to and from an external"
@@ -1416,7 +1415,7 @@ def move_to_from_external(sbox):
sbox.ospath('GG/tau'))
svntest.actions.run_and_verify_svn(None, None, [],
- 'ic',
+ 'ci', '-m', 'Commit both',
sbox.ospath(''),
sbox.ospath('GG'))