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/04/30 01:10:27 UTC
svn commit: r1591140 [1/3] - in /subversion/branches/1.8.x-issue4437: ./
build/ac-macros/ build/generator/ subversion/bindings/javahl/native/
subversion/bindings/swig/ subversion/bindings/swig/ruby/libsvn_swig_ruby/
subversion/bindings/swig/ruby/test/ ...
Author: breser
Date: Tue Apr 29 23:10:25 2014
New Revision: 1591140
URL: http://svn.apache.org/r1591140
Log:
On 1.8.x-issue4437 branch: Do a catchup merge from 1.8.x to fix spurious
conflicts in the op-depth-test.c file.
Added:
subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/upgrade_tests_data/upgrade_1_7_dir_external.tar.bz2
- copied unchanged from r1591139, subversion/branches/1.8.x/subversion/tests/cmdline/upgrade_tests_data/upgrade_1_7_dir_external.tar.bz2
Modified:
subversion/branches/1.8.x-issue4437/ (props changed)
subversion/branches/1.8.x-issue4437/CHANGES (contents, props changed)
subversion/branches/1.8.x-issue4437/NOTICE
subversion/branches/1.8.x-issue4437/STATUS
subversion/branches/1.8.x-issue4437/build/ac-macros/apache.m4
subversion/branches/1.8.x-issue4437/build/ac-macros/compiler.m4
subversion/branches/1.8.x-issue4437/build/generator/gen_base.py
subversion/branches/1.8.x-issue4437/configure.ac (contents, props changed)
subversion/branches/1.8.x-issue4437/subversion/bindings/javahl/native/JNIUtil.cpp
subversion/branches/1.8.x-issue4437/subversion/bindings/javahl/native/JNIUtil.h
subversion/branches/1.8.x-issue4437/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
subversion/branches/1.8.x-issue4437/subversion/bindings/swig/ruby/test/test_client.rb
subversion/branches/1.8.x-issue4437/subversion/bindings/swig/svn_client.i
subversion/branches/1.8.x-issue4437/subversion/include/private/svn_cache.h
subversion/branches/1.8.x-issue4437/subversion/include/private/svn_dep_compat.h
subversion/branches/1.8.x-issue4437/subversion/include/svn_version.h
subversion/branches/1.8.x-issue4437/subversion/libsvn_client/commit_util.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_client/export.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_client/merge.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_client/prop_commands.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_delta/svndiff.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_fs_fs/fs.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_fs_fs/fs.h
subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/getlocks.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/inherited_props.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/locks.c (contents, props changed)
subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/log.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/update.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_svn/protocol
subversion/branches/1.8.x-issue4437/subversion/libsvn_repos/dump.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_repos/fs-wrap.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_subr/cache-membuffer.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_subr/cache-memcache.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_subr/config_file.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_subr/io.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_subr/prompt.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_subr/sqlite.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_subr/sysinfo.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_subr/version.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_wc/status.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_wc/wc-metadata.sql
subversion/branches/1.8.x-issue4437/subversion/libsvn_wc/wc-queries.sql
subversion/branches/1.8.x-issue4437/subversion/libsvn_wc/wc_db.c
subversion/branches/1.8.x-issue4437/subversion/libsvn_wc/wc_db_wcroot.c
subversion/branches/1.8.x-issue4437/subversion/mod_dav_svn/lock.c
subversion/branches/1.8.x-issue4437/subversion/mod_dav_svn/repos.c
subversion/branches/1.8.x-issue4437/subversion/svn/conflict-callbacks.c
subversion/branches/1.8.x-issue4437/subversion/svndumpfilter/svndumpfilter.c
subversion/branches/1.8.x-issue4437/subversion/svnrdump/util.c
subversion/branches/1.8.x-issue4437/subversion/svnserve/serve.c
subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/autoprop_tests.py
subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/checkout_tests.py
subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/commit_tests.py
subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/export_tests.py
subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/lock_tests.py
subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/merge_automatic_tests.py
subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/merge_tests.py
subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/prop_tests.py
subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/svndumpfilter_tests.py
subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/upgrade_tests.py
subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/wc_tests.py
subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_repos/repos-test.c
subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/conflict-data-test.c
subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/op-depth-test.c
subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/utils.c
subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/utils.h
Propchange: subversion/branches/1.8.x-issue4437/
------------------------------------------------------------------------------
Merged /subversion/branches/1.8.x-serf-no-lock-support:r1584583-1591109
Merged /subversion/branches/1.8.x-r1578853:r1578879-1581682
Merged /subversion/branches/1.8.x-r1577151:r1589064-1589574
Merged /subversion/branches/1.8.x-r1581305:r1581320-1582587
Merged /subversion/branches/1.8.x-r1577812:r1577814-1588145
Merged /subversion/branches/1.8.x:r1567249-1591139
Merged /subversion/branches/1.8.x-r1574868:r1575329-1579873
Merged /subversion/branches/1.8.x-r1579588:r1579589-1591112
Merged /subversion/branches/1.8.x-issue4480:r1588773-1591136
Merged /subversion/branches/1.8.x-r1567985:r1568016-1568055
Merged /subversion/trunk:r1481782,1496127,1498000,1543187,1545835,1545845,1555403,1567064,1567109,1567134,1567286,1567392,1567492,1567494,1567740,1567752,1567985,1568070,1568872,1568953,1568955,1570642,1571214,1571747,1571787,1571795,1572102,1572200,1573088,1573106,1573209,1574868,1575270,1575284,1575525,1575915,1577151,1577200,1577294,1577739,1577755,1577812-1577813,1578273,1578311,1578326,1578670,1578820,1578853,1578875,1579274,1579429,1579588,1579684,1580626,1580650,1580832,1580867,1580872,1581296,1581305,1581315,1581430,1581810,1583580,1583977,1584342,1584576,1584592,1584745,1585686,1586052,1586255,1586352,1586467,1587511,1587946,1587968,1588772,1588778
Merged /subversion/branches/1.8.x-r1578311:r1578312-1589576
Merged /subversion/branches/1.8.x-javahl-exception-crash:r1586424-1588151
Merged /subversion/branches/1.8.x-r1584342:r1584350-1589572
Merged /subversion/branches/1.8.x-r1580626:r1580631,1580652,1580661,1581435,1588382-1591134
Merged /subversion/branches/1.8.x-r1567286:r1567364-1567731
Merged /subversion/branches/1.8.x-apr-0.9:r1585493-1589570
Modified: subversion/branches/1.8.x-issue4437/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/CHANGES?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/CHANGES (original)
+++ subversion/branches/1.8.x-issue4437/CHANGES Tue Apr 29 23:10:25 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/1.8.x-issue4437/CHANGES
------------------------------------------------------------------------------
Merged /subversion/branches/1.8.x/CHANGES:r1567249-1591139
Merged /subversion/trunk/CHANGES:r1565530,1567740,1568070
Modified: subversion/branches/1.8.x-issue4437/NOTICE
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/NOTICE?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/NOTICE (original)
+++ subversion/branches/1.8.x-issue4437/NOTICE Tue Apr 29 23:10:25 2014
@@ -1,5 +1,5 @@
Apache Subversion
-Copyright 2013 The Apache Software Foundation
+Copyright 2014 The Apache Software Foundation
This product includes software developed by many people, and distributed
under Contributor License Agreements to The Apache Software Foundation
Modified: subversion/branches/1.8.x-issue4437/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/STATUS?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/STATUS (original)
+++ subversion/branches/1.8.x-issue4437/STATUS Tue Apr 29 23:10:25 2014
@@ -10,7 +10,7 @@ See http://subversion.apache.org/docs/co
for details on how release lines and voting work, what kinds of bugs can
delay a release, etc.
-Status of 1.8.7:
+Status of 1.8.9:
Candidate changes:
==================
@@ -24,26 +24,6 @@ Candidate changes:
+1: blair, brane
-0: philip (see dev thread: false alarm, trades one warning for another)
- * r1498000
- Improve error handling for inherited property requests by using the
- transition based xml parser in libsvn_ra_serf.
- Justification:
- This maintenance work which usually doesn't belong in a patch release
- makes it possible to properly detect if this request should be restarted
- on non-chunk-enabled proxies.
- Votes:
- +1: rhuijben, ivan
-
- * r1496127
- Fix occasional failure of checkout_tests.py 12.
- Justification:
- Spurious FAILs confuse people testing the release.
- Votes:
- +1: philip, rhuijben
- -0: danielsh (loses functionality; patch sent with alternative fix)
- stsp: where exactly is the alternative patch?
- danielsh: http://mid.gmane.org/20130705040533.GL3244@lp-shahaf.local
-
* r1501293, r1501338, r1501360, r1501533
Fix issue #4390, "parallel nested checkout not possible with wc-ng"
Justification:
@@ -62,26 +42,6 @@ Candidate changes:
a related problem. It looks like this fix doesn't work for
the user scenario it was intended for)
- * r1531014, r1532316, r1536350, r1536383, r1536464, r1536488
- Fix working copy database inconsistency on certain move scenarios,
- including those described in issue #4437 "Deleting a moved file can maintain a
- half move"
- Justification:
- The working copy database should be consistent on any normal operation.
- Votes:
- +1: rhuijben, philip
-
- * r1518942, r1536914, r1536931
- Fix commit of a specific mixed revision copy with non copy descendants that
- shadow not present nodes. This problem manifests itself as a copy of a tree
- that can't be committed because it is reported out of date.
- Justification:
- 'svn cp TREE NEW-TREE; svn ci NEW-TREE' should never report out of date
- on some random descendant.
- Branch: ^/subversion/branches/1.8.x-r1536931
- Votes:
- +1: rhuijben
-
* r1536854
Make 'svnadmin verify' detect inconsistencies that will prevent loading
dump files.
@@ -94,46 +54,16 @@ Candidate changes:
Votes:
+1: stefan2
- * r1538812, r1538925, r1538928, r1538939
- Properly remove moved_to information when the node in its original location
- is removed.
- Justification:
- The NODES table in the working copy database should always be consistent.
- Notes:
- rhuijben: The test for this problem might accidentally depend on other
- move fixes on trunk.
- Votes:
- +1: rhuijben, philip
-
- * r1542610, r1564576
+ * r1542610, r1564576, r1568180
Add missing description to build.conf, to properly generate a version
resource (including icon) for this executable on Windows.
- Votes:
- +1: breser, rhuijben
- +1 (without r1564567): stsp
- -0: brane (horrible grammar; suggest translation to English)
-
- * r1544597, r1544600, r1544688, r1544690, r1545111, r1545122
- Fix a specific case where the api behind status would report a different
- move status for A depending on whether the user called 'svn status A' or
- 'svn status wc' and then looked at 'wc/A'.
- Justification:
- Api users such as AnkhSVN rely on the result of svn status to match and
- this breaks their assumptions.
- This change has the nice side effect that it resolves the most common
- user triggerable assertion in AnkhSVN, which is really caused by a
- broken move. (See other nomination for a fix). But even then it shouldn't
- matter how status is called: on the node or an ancestor.
- (It also improves status performance a tiny bit, by reducing the number
- of sqlite transactions used)
Notes:
- r1564587 fixes a function reference on the branch in some code that
- is disabled by the macro processor on Windows.
- Branch:
- ^/subversion/branches/1.8.x-r1544597
+ r1564576 breaks compilation on Visual Studio 2010, 2012 and 2013 of
+ this project. r1568180 fixes this problem.
Votes:
- +1: rhuijben
- -0 (before branch): philip (Doesn't build, needs a branch due to r1539279)
+ +1: rhuijben, breser
+ +1: (without r1564567, r1568180): stsp
+ -0: brane (horrible grammar; suggest translation to English)
* r1555491
Fix svn_fs_close_root for FSFS transaction roots.
@@ -144,8 +74,8 @@ Candidate changes:
Branch:
^/subversion/branches/1.8.x-r1555491
Votes:
- +1: stefan2, rhuijben
- -0: philip (Seems to be a different name for the same pool?)
+ +1: stefan2
+ -0: philip, rhuijben (Seems to be a different name for the same pool?)
* r1547454
In FSFS, omit config file when creating pre-1.5 format repositories.
@@ -168,38 +98,60 @@ Candidate changes:
Votes:
+1: stefan2
- * r1543187
- Fix SWIG bindings not building in release mode with out of tree builds.
+ * r1567996, r1568009, r1568062, r1568063
+ Fix a caching inefficiency in multi-threaded servers.
Justification:
- Build systems should work. This makes Branko cranky every release.
- Notes: Test by using ./autogen.sh --release, then do an out of tree build
- without this fix swig-py and swig-rb fail immediately.
+ .
+ Notes:
+ Due to going back and forth with different approaches to solve this
+ issue, the best way to review this
+ Branch:
+ ^/subversion/branches/1.8.x-r1567996
Votes:
- +1: breser, brane
+ +1: stefan2
+ -0: rhuijben (incomplete (misses cache->total_reads accesses) and
+ overkill. The whole thing can be implemented with simple
+ atomic operations while mutexes may be a limited resource)
- * r1566960, r1566977, r1567034
- Try to block people from using SQLITE_ENABLE_STAT3/4 with versions of
- SQLite that are buggy.
+ * r1589184, r1589188
+ Properly handle properties not present and excluded on cross wc copy
Justification:
- SQLite returns incorrect results for queries. Try to help our users
- and packagers from using buggy setups.
- Url:
- http://www.sqlite.org/src/info/4c86b126f2
+ Cross working copy copies should just work.
Votes:
- +1: (without r1567034) breser, brane
+1: rhuijben
- * r1567109, r1567134
- Fix an sqlite query definition to always return its rows in the order the
- C code expects them to be. This resolves some potential problems in the
- move logic on update/switch.
- Justification:
- Sqlite tries to execute queries in an 'optimal' way, but how this is
- depends on factors like SQLITE_ENABLE_STAT3, code improvements in Sqlite,
- etc. We shouldn't rely on a specific execution plan for correct behavior.
+ * r1589360
+ Make property output in 'svn diff' stable
+ Justification:
+ Local change that makes it easier to compare patch files.
+ Votes:
+ +1: rhuijben
+ -0: stefan2 (compiler misses "private/svn_sorts_private.h")
+
+ * r1589460, r1589486
+ Fix copying parents of locally deleted nodes between working copies.
+ Justification:
+ Resolves a case of creating invalid working copy state.
Votes:
+1: rhuijben
+ * r1590751
+ Use empty, rather than NULL, config if default is unreadable.
+ Justification:
+ svn SEGV reported by user.
+ Votes:
+ +1: philip
+ -0: julianfoad (prefer to fix all the programs at the same time;
+ other queries -- see email thread)
+
+ * r1591123
+ Display the proper URL for 'svn rm URL' in the commit log editor.
+ Justification:
+ It's confusing since the URL isn't what the user passed. Regression since
+ 1.7.9 when we fixed issue #4332.
+ Votes:
+ +1: breser
+
Veto-blocked changes:
=====================
@@ -228,3 +180,57 @@ Veto-blocked changes:
Approved changes:
=================
+
+ * r1531014, r1532316, r1536350, r1536383, r1536464, r1536488, r1567204, r1567228
+ Fix working copy database inconsistency on certain move scenarios,
+ including those described in issue #4437 "Deleting a moved file can maintain a
+ half move"
+ Justification:
+ The working copy database should be consistent on any normal operation.
+ Branch:
+ ^/subversion/branches/1.8.x-issue4437
+ Votes:
+ +1: rhuijben, philip, breser
+
+ * r1518942, r1536914, r1536931
+ Fix commit of a specific mixed revision copy with non copy descendants that
+ shadow not present nodes. This problem manifests itself as a copy of a tree
+ that can't be committed because it is reported out of date.
+ Justification:
+ 'svn cp TREE NEW-TREE; svn ci NEW-TREE' should never report out of date
+ on some random descendant.
+ Branch: ^/subversion/branches/1.8.x-r1536931
+ Votes:
+ +1: rhuijben, philip, breser
+
+ * r1538812, r1538925, r1538928, r1538939
+ Properly remove moved_to information when the node in its original location
+ is removed.
+ Justification:
+ The NODES table in the working copy database should always be consistent.
+ Notes:
+ rhuijben: The test for this problem might accidentally depend on other
+ move fixes on trunk.
+ Votes:
+ +1: rhuijben, philip, breser
+
+ * r1544597, r1544600, r1544688, r1544690, r1545111, r1545122
+ Fix a specific case where the api behind status would report a different
+ move status for A depending on whether the user called 'svn status A' or
+ 'svn status wc' and then looked at 'wc/A'.
+ Justification:
+ Api users such as AnkhSVN rely on the result of svn status to match and
+ this breaks their assumptions.
+ This change has the nice side effect that it resolves the most common
+ user triggerable assertion in AnkhSVN, which is really caused by a
+ broken move. (See other nomination for a fix). But even then it shouldn't
+ matter how status is called: on the node or an ancestor.
+ (It also improves status performance a tiny bit, by reducing the number
+ of sqlite transactions used)
+ Notes:
+ r1564587 fixes a function reference on the branch in some code that
+ is disabled by the macro processor on Windows.
+ Branch:
+ ^/subversion/branches/1.8.x-r1544597
+ Votes:
+ +1: philip, rhuijben, breser
Modified: subversion/branches/1.8.x-issue4437/build/ac-macros/apache.m4
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/build/ac-macros/apache.m4?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/build/ac-macros/apache.m4 (original)
+++ subversion/branches/1.8.x-issue4437/build/ac-macros/apache.m4 Tue Apr 29 23:10:25 2014
@@ -118,6 +118,27 @@ apache_minor_version=AP_SERVER_MINORVERS
CPPFLAGS="$old_CPPFLAGS"
fi
+# check for some busted versions of mod_dav
+# in particular 2.2.25, 2.4.5, and 2.4.6 had the following bugs which are
+# troublesome for Subversion:
+# PR 55304: https://issues.apache.org/bugzilla/show_bug.cgi?id=55304
+# PR 55306: https://issues.apache.org/bugzilla/show_bug.cgi?id=55306
+# PR 55397: https://issues.apache.org/bugzilla/show_bug.cgi?id=55397
+if test -n "$APXS" && test "$APXS" != "no"; then
+ AC_MSG_CHECKING([mod_dav version])
+ old_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES"
+ blacklisted_versions_regex=["\"2\" \"\.\" (\"2\" \"\.\" \"25\"|\"4\" \"\.\" \"[56]\")"]
+ AC_EGREP_CPP([apache_version= *$blacklisted_versions_regex],
+ [
+#include "$APXS_INCLUDE/ap_release.h"
+apache_version=AP_SERVER_BASEREVISION],
+ [AC_MSG_RESULT([broken])
+ AC_MSG_ERROR([Apache httpd version includes a broken mod_dav; use a newer version of httpd])],
+ [AC_MSG_RESULT([acceptable])])
+ CPPFLAGS="$old_CPPFLAGS"
+fi
+
AC_ARG_WITH(apache-libexecdir,
[AS_HELP_STRING([[--with-apache-libexecdir[=PATH]]],
[Install Apache modules to Apache's configured
Modified: subversion/branches/1.8.x-issue4437/build/ac-macros/compiler.m4
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/build/ac-macros/compiler.m4?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/build/ac-macros/compiler.m4 (original)
+++ subversion/branches/1.8.x-issue4437/build/ac-macros/compiler.m4 Tue Apr 29 23:10:25 2014
@@ -33,24 +33,27 @@ AC_DEFUN([_SVN_XXFLAGS_ADD_IFELSE],
[
_svn_xxflags__save="[$][$3]"
AC_LANG_PUSH([$1])
- AC_MSG_CHECKING([if [$][$2] accepts $4])
- [$3]="$4 [$][$3]"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],[
+ AC_MSG_CHECKING([if [$][$2] accepts $5])
+ [$3]="$5 [$][$3]"
+ dnl Compiling is not enough: Solaris cc accepts invalid options at
+ dnl compile-time and just warns, assuming they are for the linker,
+ dnl but they cause errors at link-time.
+ AC_LINK_IFELSE([AC_LANG_SOURCE([$4])],[
AC_MSG_RESULT([yes])
- $5
+ $6
],[
AC_MSG_RESULT([no])
[$3]="$_svn_xxflags__save"
- $6
+ $7
])
AC_LANG_POP([$1])
])
AC_DEFUN([SVN_CFLAGS_ADD_IFELSE],
- [_SVN_XXFLAGS_ADD_IFELSE([C],[CC],[CFLAGS],[$1],[$2],[$3])])
+ [_SVN_XXFLAGS_ADD_IFELSE([C],[CC],[CFLAGS],[[int main(void){return 0;}]],[$1],[$2],[$3])])
AC_DEFUN([SVN_CXXFLAGS_ADD_IFELSE],
- [_SVN_XXFLAGS_ADD_IFELSE([C++],[CXX],[CXXFLAGS],[$1],[$2],[$3])])
+ [_SVN_XXFLAGS_ADD_IFELSE([C++],[CXX],[CXXFLAGS],[[int main(){}]],[$1],[$2],[$3])])
AC_DEFUN([SVN_CC_MODE_SETUP],
Modified: subversion/branches/1.8.x-issue4437/build/generator/gen_base.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/build/generator/gen_base.py?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/build/generator/gen_base.py (original)
+++ subversion/branches/1.8.x-issue4437/build/generator/gen_base.py Tue Apr 29 23:10:25 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/1.8.x-issue4437/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/configure.ac?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/configure.ac (original)
+++ subversion/branches/1.8.x-issue4437/configure.ac Tue Apr 29 23:10:25 2014
@@ -98,7 +98,7 @@ dnl now generating errors instead of s
dnl them. Only .7 and later can guarantee repository
dnl integrity with FSFS.
-APR_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\. 2\."]
+APR_VER_REGEXES=["0\.9\.[7-9] 0\.9\.[12][0-9] 1\. 2\."]
SVN_LIB_APR($APR_VER_REGEXES)
@@ -755,7 +755,7 @@ AC_ARG_WITH(libmagic,AS_HELP_STRING([--w
CPPFLAGS="$CPPFLAGS -I$libmagic_prefix/include"
AC_CHECK_HEADERS(magic.h,[
save_ldflags="$LDFLAGS"
- LDFLAGS="-L$libmagic_prefix/lib"
+ LDFLAGS="-L$libmagic_prefix/lib $LDFLAGS"
AC_CHECK_LIB(magic, magic_open, [libmagic_found="yes"])
LDFLAGS="$save_ldflags"
])
Propchange: subversion/branches/1.8.x-issue4437/configure.ac
------------------------------------------------------------------------------
Merged /subversion/branches/1.8.x-r1579588/configure.ac:r1579589-1591112
Merged /subversion/branches/1.8.x-apr-0.9/configure.ac:r1585493-1589570
Merged /subversion/trunk/configure.ac:r1577200
Merged /subversion/branches/1.8.x/configure.ac:r1567249-1591139
Modified: subversion/branches/1.8.x-issue4437/subversion/bindings/javahl/native/JNIUtil.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/bindings/javahl/native/JNIUtil.cpp?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/bindings/javahl/native/JNIUtil.cpp (original)
+++ subversion/branches/1.8.x-issue4437/subversion/bindings/javahl/native/JNIUtil.cpp Tue Apr 29 23:10:25 2014
@@ -418,7 +418,7 @@ JNIUtil::putErrorsInTrace(svn_error_t *e
env->DeleteLocalRef(jfileName);
}
-void JNIUtil::handleSVNError(svn_error_t *err)
+void JNIUtil::wrappedHandleSVNError(svn_error_t *err)
{
std::string msg;
assembleErrorMessage(svn_error_purge_tracing(err), 0, APR_SUCCESS, msg);
@@ -546,7 +546,16 @@ void JNIUtil::handleSVNError(svn_error_t
#endif
env->Throw(static_cast<jthrowable>(env->PopLocalFrame(nativeException)));
+}
+void JNIUtil::handleSVNError(svn_error_t *err)
+{
+ try {
+ wrappedHandleSVNError(err);
+ } catch (...) {
+ svn_error_clear(err);
+ throw;
+ }
svn_error_clear(err);
}
@@ -646,28 +655,42 @@ bool JNIUtil::isJavaExceptionThrown()
const char *
JNIUtil::thrownExceptionToCString(SVN::Pool &in_pool)
{
- const char *msg;
+ const char *msg = NULL;
JNIEnv *env = getEnv();
+ apr_pool_t *pool = in_pool.getPool();
if (env->ExceptionCheck())
{
jthrowable t = env->ExceptionOccurred();
- static jmethodID getMessage = 0;
- if (getMessage == 0)
+ jclass cls = env->GetObjectClass(t);
+
+ jstring jclass_name;
+ {
+ jmethodID mid = env->GetMethodID(cls, "getClass", "()Ljava/lang/Class;");
+ jobject clsobj = env->CallObjectMethod(t, mid);
+ jclass basecls = env->GetObjectClass(clsobj);
+ mid = env->GetMethodID(basecls, "getName", "()Ljava/lang/String;");
+ jclass_name = (jstring) env->CallObjectMethod(clsobj, mid);
+ }
+
+ jstring jmessage;
+ {
+ jmethodID mid = env->GetMethodID(cls, "getMessage",
+ "()Ljava/lang/String;");
+ jmessage = (jstring) env->CallObjectMethod(t, mid);
+ }
+
+ JNIStringHolder class_name(jclass_name);
+ if (jmessage)
{
- jclass clazz = env->FindClass("java/lang/Throwable");
- getMessage = env->GetMethodID(clazz, "getMessage",
- "(V)Ljava/lang/String;");
- env->DeleteLocalRef(clazz);
+ JNIStringHolder message(jmessage);
+ msg = apr_pstrcat(pool,
+ static_cast<const char*>(class_name), ": ",
+ static_cast<const char*>(message), NULL);
}
- jstring jmsg = (jstring) env->CallObjectMethod(t, getMessage);
- JNIStringHolder tmp(jmsg);
- msg = tmp.pstrdup(in_pool.getPool());
+ else
+ msg = class_name.pstrdup(pool);
// ### Conditionally add t.printStackTrace() to msg?
}
- else
- {
- msg = NULL;
- }
return msg;
}
Modified: subversion/branches/1.8.x-issue4437/subversion/bindings/javahl/native/JNIUtil.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/bindings/javahl/native/JNIUtil.h?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/bindings/javahl/native/JNIUtil.h (original)
+++ subversion/branches/1.8.x-issue4437/subversion/bindings/javahl/native/JNIUtil.h Tue Apr 29 23:10:25 2014
@@ -141,6 +141,7 @@ class JNIUtil
enum { noLog, errorLog, exceptionLog, entryLog } LogLevel;
private:
+ static void wrappedHandleSVNError(svn_error_t *err);
static void assembleErrorMessage(svn_error_t *err, int depth,
apr_status_t parent_apr_err,
std::string &buffer);
Modified: subversion/branches/1.8.x-issue4437/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c Tue Apr 29 23:10:25 2014
@@ -1192,6 +1192,7 @@ DEFINE_DUP(auth_ssl_server_cert_info)
DEFINE_DUP(wc_entry)
DEFINE_DUP(client_diff_summarize)
DEFINE_DUP(dirent)
+DEFINE_DUP(log_entry)
DEFINE_DUP_NO_CONVENIENCE(client_commit_item3)
DEFINE_DUP_NO_CONVENIENCE(client_proplist_item)
DEFINE_DUP_NO_CONVENIENCE(wc_external_item2)
@@ -2155,9 +2156,7 @@ svn_swig_rb_log_entry_receiver(void *bat
cbb.receiver = proc;
cbb.message = id_call;
- cbb.args = rb_ary_new3(1,
- c2r_swig_type((void *)entry,
- (void *)"svn_log_entry_t *"));
+ cbb.args = rb_ary_new3(1, c2r_log_entry__dup(entry));
invoke_callback_handle_error((VALUE)(&cbb), rb_pool, &err);
}
return err;
Modified: subversion/branches/1.8.x-issue4437/subversion/bindings/swig/ruby/test/test_client.rb
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/bindings/swig/ruby/test/test_client.rb?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/bindings/swig/ruby/test/test_client.rb (original)
+++ subversion/branches/1.8.x-issue4437/subversion/bindings/swig/ruby/test/test_client.rb Tue Apr 29 23:10:25 2014
@@ -2262,7 +2262,6 @@ class SvnClientTest < Test::Unit::TestCa
end
end
config = Svn::Core::Config.config(@config_path)
- assert_nil(ctx.config)
assert_equal(options, config[Svn::Core::CONFIG_CATEGORY_SERVERS].to_hash)
ctx.config = config
assert_equal(options,
Modified: subversion/branches/1.8.x-issue4437/subversion/bindings/swig/svn_client.i
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/bindings/swig/svn_client.i?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/bindings/swig/svn_client.i (original)
+++ subversion/branches/1.8.x-issue4437/subversion/bindings/swig/svn_client.i Tue Apr 29 23:10:25 2014
@@ -395,7 +395,13 @@ Callback: svn_client_diff_summarize_func
svn_client_ctx_t(apr_pool_t *pool) {
svn_error_t *err;
svn_client_ctx_t *self;
- err = svn_client_create_context(&self, pool);
+ apr_hash_t *cfg_hash;
+
+ err = svn_config_get_config(&cfg_hash, NULL, pool);
+ if (err)
+ svn_swig_rb_handle_svn_error(err);
+
+ err = svn_client_create_context2(&self, cfg_hash, pool);
if (err)
svn_swig_rb_handle_svn_error(err);
return self;
@@ -512,7 +518,13 @@ svn_client_set_config(svn_client_ctx_t *
apr_hash_t *config,
apr_pool_t *pool)
{
- ctx->config = config;
+ svn_error_t *err;
+
+ apr_hash_clear(ctx->config);
+ err = svn_config_copy_config(&ctx->config, config,
+ apr_hash_pool_get(ctx->config));
+ if (err)
+ svn_swig_rb_handle_svn_error(err);
return Qnil;
}
Modified: subversion/branches/1.8.x-issue4437/subversion/include/private/svn_cache.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/include/private/svn_cache.h?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/include/private/svn_cache.h (original)
+++ subversion/branches/1.8.x-issue4437/subversion/include/private/svn_cache.h Tue Apr 29 23:10:25 2014
@@ -182,6 +182,10 @@ typedef struct svn_cache__info_t
* if they are strings. Cached values will be copied in and out of
* the cache using @a serialize_func and @a deserialize_func, respectively.
*
+ * If @a deserialize_func is NULL, then the data is returned as an
+ * svn_stringbuf_t; if @a serialize_func is NULL, then the data is
+ * assumed to be an svn_stringbuf_t.
+ *
* The cache stores up to @a pages * @a items_per_page items at a
* time. The exact cache invalidation strategy is not defined here,
* but in general, a lower value for @a items_per_page means more
@@ -224,7 +228,7 @@ svn_cache__create_inprocess(svn_cache__t
* other caches. @a *cache_p will be allocated in @a result_pool.
*
* If @a deserialize_func is NULL, then the data is returned as an
- * svn_string_t; if @a serialize_func is NULL, then the data is
+ * svn_stringbuf_t; if @a serialize_func is NULL, then the data is
* assumed to be an svn_stringbuf_t.
*
* These caches are always thread safe.
@@ -309,7 +313,7 @@ svn_cache__membuffer_cache_create(svn_me
* this cache from other caches. @a *cache_p will be allocated in @a result_pool.
*
* If @a deserialize_func is NULL, then the data is returned as an
- * svn_string_t; if @a serialize_func is NULL, then the data is
+ * svn_stringbuf_t; if @a serialize_func is NULL, then the data is
* assumed to be an svn_stringbuf_t.
*
* If @a thread_safe is true, and APR is compiled with threads, all
Modified: subversion/branches/1.8.x-issue4437/subversion/include/private/svn_dep_compat.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/include/private/svn_dep_compat.h?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/include/private/svn_dep_compat.h (original)
+++ subversion/branches/1.8.x-issue4437/subversion/include/private/svn_dep_compat.h Tue Apr 29 23:10:25 2014
@@ -78,6 +78,7 @@ void svn_hash__clear(struct apr_hash_t *
#if !APR_VERSION_AT_LEAST(1,0,0)
#define APR_UINT64_C(val) UINT64_C(val)
#define APR_FPROT_OS_DEFAULT APR_OS_DEFAULT
+#define apr_hash_make_custom(pool,hash_func) apr_hash_make(pool)
#endif
#if !APR_VERSION_AT_LEAST(1,3,0)
@@ -114,6 +115,12 @@ typedef apr_uint32_t apr_uintptr_t;
#define SVN_LOCK_IS_BUSY(x) APR_STATUS_IS_EBUSY(x)
#endif
+#if !APR_VERSION_AT_LEAST(1,4,0)
+#ifndef apr_time_from_msec
+#define apr_time_from_msec(msec) ((apr_time_t)(msec) * 1000)
+#endif
+#endif
+
/**
* Check at compile time if the Serf version is at least a certain
* level.
Modified: subversion/branches/1.8.x-issue4437/subversion/include/svn_version.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/include/svn_version.h?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/include/svn_version.h (original)
+++ subversion/branches/1.8.x-issue4437/subversion/include/svn_version.h Tue Apr 29 23:10:25 2014
@@ -72,7 +72,7 @@ extern "C" {
*
* @since New in 1.1.
*/
-#define SVN_VER_PATCH 7
+#define SVN_VER_PATCH 9
/** @deprecated Provided for backward compatibility with the 1.0 API. */
Modified: subversion/branches/1.8.x-issue4437/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/libsvn_client/commit_util.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/libsvn_client/commit_util.c Tue Apr 29 23:10:25 2014
@@ -892,7 +892,7 @@ harvest_status_callback(void *status_bat
if (matches_changelists
&& (is_harvest_root || baton->changelists)
&& state_flags
- && is_added
+ && (is_added || (is_deleted && is_op_root && status->copied))
&& baton->danglers)
{
/* If a node is added, its parent must exist in the repository at the
Modified: subversion/branches/1.8.x-issue4437/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/libsvn_client/export.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/libsvn_client/export.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/libsvn_client/export.c Tue Apr 29 23:10:25 2014
@@ -267,7 +267,9 @@ export_node(void *baton,
scratch_pool));
}
- if (status->file_external)
+ /* Skip file externals if they are a descendant of the export,
+ BUT NOT if we are explictly exporting the file external. */
+ if (status->file_external && strcmp(eib->origin_abspath, local_abspath) != 0)
return SVN_NO_ERROR;
/* Produce overwrite errors for the export root */
@@ -1587,3 +1589,4 @@ svn_client_export5(svn_revnum_t *result_
return SVN_NO_ERROR;
}
+
Modified: subversion/branches/1.8.x-issue4437/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/libsvn_client/merge.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/libsvn_client/merge.c Tue Apr 29 23:10:25 2014
@@ -322,6 +322,10 @@ typedef struct merge_cmd_baton_t {
const char *diff3_cmd;
const apr_array_header_t *merge_options;
+ /* Array of file extension patterns to preserve as extensions in
+ generated conflict files. */
+ const apr_array_header_t *ext_patterns;
+
/* RA sessions used throughout a merge operation. Opened/re-parented
as needed.
@@ -2023,17 +2027,36 @@ merge_file_changed(const char *relpath,
{
svn_boolean_t has_local_mods;
enum svn_wc_merge_outcome_t content_outcome;
+ const char *target_label;
+ const char *left_label;
+ const char *right_label;
+ const char *path_ext = "";
+
+ if (merge_b->ext_patterns && merge_b->ext_patterns->nelts)
+ {
+ svn_path_splitext(NULL, &path_ext, local_abspath, scratch_pool);
+ if (! (*path_ext
+ && svn_cstring_match_glob_list(path_ext,
+ merge_b->ext_patterns)))
+ {
+ path_ext = "";
+ }
+ }
/* xgettext: the '.working', '.merge-left.r%ld' and
'.merge-right.r%ld' strings are used to tag onto a file
name in case of a merge conflict */
- const char *target_label = _(".working");
- const char *left_label = apr_psprintf(scratch_pool,
- _(".merge-left.r%ld"),
- left_source->revision);
- const char *right_label = apr_psprintf(scratch_pool,
- _(".merge-right.r%ld"),
- right_source->revision);
+
+ target_label = apr_psprintf(scratch_pool, _(".working%s%s"),
+ *path_ext ? "." : "", path_ext);
+ left_label = apr_psprintf(scratch_pool,
+ _(".merge-left.r%ld%s%s"),
+ left_source->revision,
+ *path_ext ? "." : "", path_ext);
+ right_label = apr_psprintf(scratch_pool,
+ _(".merge-right.r%ld%s%s"),
+ right_source->revision,
+ *path_ext ? "." : "", path_ext);
SVN_ERR(svn_wc_text_modified_p2(&has_local_mods, ctx->wc_ctx,
local_abspath, FALSE, scratch_pool));
@@ -3062,7 +3085,6 @@ merge_dir_deleted(const char *relpath,
struct merge_dir_baton_t *db = dir_baton;
const char *local_abspath = svn_dirent_join(merge_b->target->abspath,
relpath, scratch_pool);
- struct dir_delete_baton_t *delb;
svn_boolean_t same;
apr_hash_t *working_props;
@@ -3093,66 +3115,69 @@ merge_dir_deleted(const char *relpath,
scratch_pool, scratch_pool));
if (merge_b->force_delete)
- same = TRUE;
+ {
+ /* In this legacy mode we just assume that a directory delete
+ matches any directory. db->delete_state is NULL */
+ same = TRUE;
+ }
else
{
+ struct dir_delete_baton_t *delb;
+
/* Compare the properties */
SVN_ERR(properties_same_p(&same, left_props, working_props,
scratch_pool));
- }
+ delb = db->delete_state;
+ assert(delb != NULL);
- delb = db->delete_state;
- assert(delb != NULL);
+ if (! same)
+ {
+ delb->found_edit = TRUE;
+ }
+ else
+ {
+ store_path(delb->compared_abspaths, local_abspath);
+ }
- if (! same)
- {
- delb->found_edit = TRUE;
- }
- else
- {
- store_path(delb->compared_abspaths, local_abspath);
- }
+ if (delb->del_root != db)
+ return SVN_NO_ERROR;
- if (delb->del_root != db)
- return SVN_NO_ERROR;
+ if (delb->found_edit)
+ same = FALSE;
+ else
+ {
+ apr_array_header_t *ignores;
+ svn_error_t *err;
+ same = TRUE;
- if (delb->found_edit)
- same = FALSE;
- else if (merge_b->force_delete)
- same = TRUE;
- else
- {
- apr_array_header_t *ignores;
- svn_error_t *err;
- same = TRUE;
+ SVN_ERR(svn_wc_get_default_ignores(&ignores, merge_b->ctx->config,
+ scratch_pool));
- SVN_ERR(svn_wc_get_default_ignores(&ignores, merge_b->ctx->config,
- scratch_pool));
+ /* None of the descendants was modified, but maybe there are
+ descendants we haven't walked?
- /* None of the descendants was modified, but maybe there are
- descendants we haven't walked?
+ Note that we aren't interested in changes, as we already verified
+ changes in the paths touched by the merge. And the existence of
+ other paths is enough to mark the directory edited */
+ err = svn_wc_walk_status(merge_b->ctx->wc_ctx, local_abspath,
+ svn_depth_infinity, TRUE /* get-all */,
+ FALSE /* no-ignore */,
+ TRUE /* ignore-text-mods */, ignores,
+ verify_touched_by_del_check, delb,
+ merge_b->ctx->cancel_func,
+ merge_b->ctx->cancel_baton,
+ scratch_pool);
- Note that we aren't interested in changes, as we already verified
- changes in the paths touched by the merge. And the existance of
- other paths is enough to mark the directory edited */
- err = svn_wc_walk_status(merge_b->ctx->wc_ctx, local_abspath,
- svn_depth_infinity, TRUE /* get-all */,
- FALSE /* no-ignore */,
- TRUE /* ignore-text-mods */, ignores,
- verify_touched_by_del_check, delb,
- merge_b->ctx->cancel_func,
- merge_b->ctx->cancel_baton,
- scratch_pool);
+ if (err)
+ {
+ if (err->apr_err != SVN_ERR_CEASE_INVOCATION)
+ return svn_error_trace(err);
- if (err)
- {
- if (err->apr_err != SVN_ERR_CEASE_INVOCATION)
- return svn_error_trace(err);
+ svn_error_clear(err);
+ }
- svn_error_clear(err);
+ same = ! delb->found_edit;
}
-
- same = ! delb->found_edit;
}
if (same && !merge_b->dry_run)
@@ -9668,6 +9693,7 @@ do_merge(apr_hash_t **modified_subtrees,
merge_cmd_baton_t merge_cmd_baton = { 0 };
svn_config_t *cfg;
const char *diff3_cmd;
+ const char *preserved_exts_str;
int i;
svn_boolean_t checked_mergeinfo_capability = FALSE;
svn_ra_session_t *ra_session1 = NULL, *ra_session2 = NULL;
@@ -9728,6 +9754,11 @@ do_merge(apr_hash_t **modified_subtrees,
if (diff3_cmd != NULL)
SVN_ERR(svn_path_cstring_to_utf8(&diff3_cmd, diff3_cmd, scratch_pool));
+ /* See which files the user wants to preserve the extension of when
+ conflict files are made. */
+ svn_config_get(cfg, &preserved_exts_str, SVN_CONFIG_SECTION_MISCELLANY,
+ SVN_CONFIG_OPTION_PRESERVED_CF_EXTS, "");
+
/* Build the merge context baton (or at least the parts of it that
don't need to be reset for each merge source). */
merge_cmd_baton.force_delete = force_delete;
@@ -9743,6 +9774,11 @@ do_merge(apr_hash_t **modified_subtrees,
merge_cmd_baton.pool = iterpool;
merge_cmd_baton.merge_options = merge_options;
merge_cmd_baton.diff3_cmd = diff3_cmd;
+ merge_cmd_baton.ext_patterns = *preserved_exts_str
+ ? svn_cstring_split(preserved_exts_str, "\n\r\t\v ",
+ FALSE, scratch_pool)
+ : NULL;
+
merge_cmd_baton.use_sleep = use_sleep;
/* Do we already know the specific subtrees with mergeinfo we want
@@ -10447,15 +10483,10 @@ merge_locked(conflict_report_t **conflic
}
else
{
- merge_source_t source;
-
- source.loc1 = source1_loc;
- source.loc2 = source2_loc;
- source.ancestral = FALSE;
-
/* Build a single-item merge_source_t array. */
merge_sources = apr_array_make(scratch_pool, 1, sizeof(merge_source_t *));
- APR_ARRAY_PUSH(merge_sources, merge_source_t *) = &source;
+ APR_ARRAY_PUSH(merge_sources, merge_source_t *)
+ = merge_source_create(source1_loc, source2_loc, FALSE, scratch_pool);
}
err = do_merge(NULL, NULL, conflict_report, &use_sleep,
@@ -10761,7 +10792,7 @@ log_find_operative_revs(void *baton,
UNMERGED_CATALOG represents the history (as mergeinfo) from
TARGET_LOC that is not represented in SOURCE_LOC's
explicit/inherited mergeinfo as represented by MERGED_CATALOG.
- MERGEINFO_CATALOG may be empty if the source has no explicit or inherited
+ MERGED_CATALOG may be empty if the source has no explicit or inherited
mergeinfo.
Check that all of the unmerged revisions in UNMERGED_CATALOG's
@@ -11464,7 +11495,7 @@ find_reintegrate_merge(merge_source_t **
prefix. */
svn_mergeinfo_catalog_t final_unmerged_catalog = apr_hash_make(scratch_pool);
- SVN_ERR(find_unsynced_ranges(source_loc, yc_ancestor,
+ SVN_ERR(find_unsynced_ranges(source_loc, &target->loc,
unmerged_to_source_mergeinfo_catalog,
merged_to_source_mergeinfo_catalog,
final_unmerged_catalog,
Modified: subversion/branches/1.8.x-issue4437/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/libsvn_client/prop_commands.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/libsvn_client/prop_commands.c Tue Apr 29 23:10:25 2014
@@ -890,8 +890,14 @@ svn_client_propget5(apr_hash_t **props,
const char *copy_root_abspath;
svn_boolean_t is_copy;
- SVN_ERR(svn_dirent_get_absolute(&local_abspath, target,
- scratch_pool));
+ /* Avoid assertion on the next line when somebody accidentally asks for
+ a working copy revision on a URL */
+ if (svn_path_is_url(target))
+ return svn_error_create(SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED,
+ NULL, NULL);
+
+ SVN_ERR_ASSERT(svn_dirent_is_absolute(target));
+ local_abspath = target;
if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_revision->kind))
{
@@ -1232,7 +1238,7 @@ recursive_proplist_receiver(void *baton,
Report iprops anyway */
SVN_ERR(b->wrapped_receiver(b->wrapped_receiver_baton,
- b->anchor ? b->anchor : local_abspath,
+ b->anchor ? b->anchor : b->anchor_abspath,
NULL /* prop_hash */,
b->iprops,
scratch_pool));
@@ -1293,6 +1299,12 @@ get_remote_props(const char *path_or_url
const char *copy_root_abspath;
svn_boolean_t is_copy;
+ /* Avoid assertion on the next line when somebody accidentally asks for
+ a working copy revision on a URL */
+ if (svn_path_is_url(path_or_url))
+ return svn_error_create(SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED,
+ NULL, NULL);
+
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path_or_url,
scratch_pool));
Modified: subversion/branches/1.8.x-issue4437/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/libsvn_delta/svndiff.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/libsvn_delta/svndiff.c Tue Apr 29 23:10:25 2014
@@ -723,8 +723,6 @@ decode_window(svn_txdelta_window_t *wind
svn_stringbuf_t *instout = svn_stringbuf_create_empty(pool);
svn_stringbuf_t *ndout = svn_stringbuf_create_empty(pool);
- /* these may in fact simply return references to insend */
-
SVN_ERR(zlib_decode(insend, newlen, ndout,
SVN_DELTA_WINDOW_SIZE));
SVN_ERR(zlib_decode(data, insend - data, instout,
@@ -739,7 +737,13 @@ decode_window(svn_txdelta_window_t *wind
}
else
{
- new_data->data = (const char *) insend;
+ /* Copy the data because an svn_string_t must have the invariant
+ data[len]=='\0'. */
+ char *buf = apr_palloc(pool, newlen + 1);
+
+ memcpy(buf, insend, newlen);
+ buf[newlen] = '\0';
+ new_data->data = buf;
new_data->len = newlen;
}
Modified: subversion/branches/1.8.x-issue4437/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/libsvn_fs_fs/fs.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/libsvn_fs_fs/fs.c Tue Apr 29 23:10:25 2014
@@ -98,8 +98,11 @@ fs_serialized_init(svn_fs_t *fs, apr_poo
SVN_ERR(svn_mutex__init(&ffsd->txn_current_lock,
SVN_FS_FS__USE_LOCK_MUTEX, common_pool));
+ /* We also need a mutex for synchronizing access to the active
+ transaction list and free transaction pointer. This one is
+ enabled unconditionally. */
SVN_ERR(svn_mutex__init(&ffsd->txn_list_lock,
- SVN_FS_FS__USE_LOCK_MUTEX, common_pool));
+ TRUE, common_pool));
key = apr_pstrdup(common_pool, key);
status = apr_pool_userdata_set(ffsd, key, NULL, common_pool);
Modified: subversion/branches/1.8.x-issue4437/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/libsvn_fs_fs/fs.h?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/1.8.x-issue4437/subversion/libsvn_fs_fs/fs.h Tue Apr 29 23:10:25 2014
@@ -266,7 +266,7 @@ typedef struct fs_fs_data_t
svn_cache__t *dir_cache;
/* Fulltext cache; currently only used with memcached. Maps from
- rep key (revision/offset) to svn_string_t. */
+ rep key (revision/offset) to svn_stringbuf_t. */
svn_cache__t *fulltext_cache;
/* Access object to the atomics namespace used by revprop caching.
Modified: subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/getlocks.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/getlocks.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/getlocks.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/getlocks.c Tue Apr 29 23:10:25 2014
@@ -116,6 +116,7 @@ getlocks_closed(svn_ra_serf__xml_estate_
if (leaving_state == LOCK)
{
const char *path = svn_hash_gets(attrs, "path");
+ const char *token = svn_hash_gets(attrs, "token");
svn_boolean_t save_lock = FALSE;
/* Filter out unwanted paths. Since Subversion only allows
@@ -128,6 +129,12 @@ getlocks_closed(svn_ra_serf__xml_estate_
c) we've asked for depth=files or depth=immediates, and this
lock is on an immediate child of our query path.
*/
+ if (! token)
+ {
+ /* A lock without a token is not a lock; just an answer that there
+ is no lock on the node. */
+ save_lock = FALSE;
+ }
if (strcmp(lock_ctx->path, path) == 0
|| lock_ctx->requested_depth == svn_depth_infinity)
{
@@ -154,7 +161,7 @@ getlocks_closed(svn_ra_serf__xml_estate_
them may have not been sent, so the value will be NULL. */
lock.path = path;
- lock.token = svn_hash_gets(attrs, "token");
+ lock.token = token;
lock.owner = svn_hash_gets(attrs, "owner");
lock.comment = svn_hash_gets(attrs, "comment");
@@ -234,6 +241,7 @@ svn_ra_serf__get_locks(svn_ra_session_t
svn_ra_serf__handler_t *handler;
svn_ra_serf__xml_context_t *xmlctx;
const char *req_url, *rel_path;
+ svn_error_t *err;
req_url = svn_path_url_add_component2(session->session_url.path, path, pool);
SVN_ERR(svn_ra_serf__get_relative_path(&rel_path, req_url, session,
@@ -260,7 +268,14 @@ svn_ra_serf__get_locks(svn_ra_session_t
handler->body_delegate = create_getlocks_body;
handler->body_delegate_baton = lock_ctx;
- SVN_ERR(svn_ra_serf__context_run_one(handler, pool));
+ err = svn_ra_serf__context_run_one(handler, pool);
+
+ /* Wrap the server generated error for an unsupported report with the
+ documented error for this ra function. */
+ if (svn_error_find_cause(err, SVN_ERR_UNSUPPORTED_FEATURE))
+ err = svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, err, NULL);
+
+ SVN_ERR(err);
/* We get a 404 when a path doesn't exist in HEAD, but it might
have existed earlier (E.g. 'svn ls http://s/svn/trunk/file@1' */
Modified: subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/inherited_props.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/inherited_props.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/inherited_props.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/inherited_props.c Tue Apr 29 23:10:25 2014
@@ -41,7 +41,7 @@
/* The current state of our XML parsing. */
typedef enum iprops_state_e {
- NONE = 0,
+ INITIAL = 0,
IPROPS_REPORT,
IPROPS_ITEM,
IPROPS_PATH,
@@ -61,18 +61,12 @@ typedef struct iprops_context_t {
/* The repository's root URL. */
const char *repos_root_url;
- /* Current CDATA values*/
- svn_stringbuf_t *curr_path;
+ /* Current property name */
svn_stringbuf_t *curr_propname;
- svn_stringbuf_t *curr_propval;
- const char *curr_prop_val_encoding;
/* Current element in IPROPS. */
svn_prop_inherited_item_t *curr_iprop;
- /* Serf context completion flag for svn_ra_serf__context_run_wait() */
- svn_boolean_t done;
-
/* Path we are finding inherited properties for. This is relative to
the RA session passed to svn_ra_serf__get_inherited_props. */
const char *path;
@@ -80,162 +74,121 @@ typedef struct iprops_context_t {
svn_revnum_t revision;
} iprops_context_t;
+#define S_ SVN_XML_NAMESPACE
+static const svn_ra_serf__xml_transition_t iprops_table[] = {
+ { INITIAL, S_, SVN_DAV__INHERITED_PROPS_REPORT, IPROPS_REPORT,
+ FALSE, { NULL }, FALSE },
+
+ { IPROPS_REPORT, S_, SVN_DAV__IPROP_ITEM, IPROPS_ITEM,
+ FALSE, { NULL }, TRUE },
+
+ { IPROPS_ITEM, S_, SVN_DAV__IPROP_PATH, IPROPS_PATH,
+ TRUE, { NULL }, TRUE },
+
+ { IPROPS_ITEM, S_, SVN_DAV__IPROP_PROPNAME, IPROPS_PROPNAME,
+ TRUE, { NULL }, TRUE },
+
+ { IPROPS_ITEM, S_, SVN_DAV__IPROP_PROPVAL, IPROPS_PROPVAL,
+ TRUE, { "?V:encoding", NULL }, TRUE },
+
+ { 0 }
+};
+
+/* Conforms to svn_ra_serf__xml_opened_t */
static svn_error_t *
-start_element(svn_ra_serf__xml_parser_t *parser,
- svn_ra_serf__dav_props_t name,
- const char **attrs,
+iprops_opened(svn_ra_serf__xml_estate_t *xes,
+ void *baton,
+ int entered_state,
+ const svn_ra_serf__dav_props_t *tag,
apr_pool_t *scratch_pool)
{
- iprops_context_t *iprops_ctx = parser->user_data;
- iprops_state_e state;
+ iprops_context_t *iprops_ctx = baton;
- state = parser->state->current_state;
- if (state == NONE
- && strcmp(name.name, SVN_DAV__INHERITED_PROPS_REPORT) == 0)
+ if (entered_state == IPROPS_ITEM)
{
- svn_ra_serf__xml_push_state(parser, IPROPS_REPORT);
- }
- else if (state == IPROPS_REPORT &&
- strcmp(name.name, SVN_DAV__IPROP_ITEM) == 0)
- {
- svn_stringbuf_setempty(iprops_ctx->curr_path);
svn_stringbuf_setempty(iprops_ctx->curr_propname);
- svn_stringbuf_setempty(iprops_ctx->curr_propval);
- iprops_ctx->curr_prop_val_encoding = NULL;
- iprops_ctx->curr_iprop = NULL;
- svn_ra_serf__xml_push_state(parser, IPROPS_ITEM);
- }
- else if (state == IPROPS_ITEM &&
- strcmp(name.name, SVN_DAV__IPROP_PROPVAL) == 0)
- {
- const char *prop_val_encoding = svn_xml_get_attr_value("encoding",
- attrs);
- iprops_ctx->curr_prop_val_encoding = apr_pstrdup(iprops_ctx->pool,
- prop_val_encoding);
- svn_ra_serf__xml_push_state(parser, IPROPS_PROPVAL);
- }
- else if (state == IPROPS_ITEM &&
- strcmp(name.name, SVN_DAV__IPROP_PATH) == 0)
- {
- svn_ra_serf__xml_push_state(parser, IPROPS_PATH);
- }
- else if (state == IPROPS_ITEM &&
- strcmp(name.name, SVN_DAV__IPROP_PROPNAME) == 0)
- {
- svn_ra_serf__xml_push_state(parser, IPROPS_PROPNAME);
- }
- else if (state == IPROPS_ITEM &&
- strcmp(name.name, SVN_DAV__IPROP_PROPVAL) == 0)
- {
- svn_ra_serf__xml_push_state(parser, IPROPS_PROPVAL);
- }
+ iprops_ctx->curr_iprop = apr_pcalloc(iprops_ctx->pool,
+ sizeof(*iprops_ctx->curr_iprop));
+
+ iprops_ctx->curr_iprop->prop_hash = apr_hash_make(iprops_ctx->pool);
+ }
return SVN_NO_ERROR;
}
+/* Conforms to svn_ra_serf__xml_closed_t */
static svn_error_t *
-end_element(svn_ra_serf__xml_parser_t *parser,
- svn_ra_serf__dav_props_t name,
- apr_pool_t *scratch_pool)
+iprops_closed(svn_ra_serf__xml_estate_t *xes,
+ void *baton,
+ int leaving_state,
+ const svn_string_t *cdata,
+ apr_hash_t *attrs,
+ apr_pool_t *scratch_pool)
{
- iprops_context_t *iprops_ctx = parser->user_data;
- iprops_state_e state;
-
- state = parser->state->current_state;
+ iprops_context_t *iprops_ctx = baton;
- if (state == IPROPS_REPORT &&
- strcmp(name.name, SVN_DAV__INHERITED_PROPS_REPORT) == 0)
+ if (leaving_state == IPROPS_ITEM)
{
- svn_ra_serf__xml_pop_state(parser);
+ APR_ARRAY_PUSH(iprops_ctx->iprops, svn_prop_inherited_item_t *) =
+ iprops_ctx->curr_iprop;
+
+ iprops_ctx->curr_iprop = NULL;
}
- else if (state == IPROPS_PATH
- && strcmp(name.name, SVN_DAV__IPROP_PATH) == 0)
+ else if (leaving_state == IPROPS_PATH)
{
- iprops_ctx->curr_iprop = apr_palloc(
- iprops_ctx->pool, sizeof(svn_prop_inherited_item_t));
+ /* Every <iprop-item> has a single <iprop-path> */
+ if (iprops_ctx->curr_iprop->path_or_url)
+ return svn_error_create(SVN_ERR_XML_MALFORMED, NULL, NULL);
iprops_ctx->curr_iprop->path_or_url =
svn_path_url_add_component2(iprops_ctx->repos_root_url,
- iprops_ctx->curr_path->data,
+ cdata->data,
iprops_ctx->pool);
- iprops_ctx->curr_iprop->prop_hash = apr_hash_make(iprops_ctx->pool);
- svn_ra_serf__xml_pop_state(parser);
}
- else if (state == IPROPS_PROPVAL
- && strcmp(name.name, SVN_DAV__IPROP_PROPVAL) == 0)
+ else if (leaving_state == IPROPS_PROPNAME)
{
- const svn_string_t *prop_val;
+ if (iprops_ctx->curr_propname->len)
+ return svn_error_create(SVN_ERR_XML_MALFORMED, NULL, NULL);
- if (iprops_ctx->curr_prop_val_encoding)
- {
- svn_string_t encoded_prop_val;
+ /* Store propname for value */
+ svn_stringbuf_set(iprops_ctx->curr_propname, cdata->data);
+ }
+ else if (leaving_state == IPROPS_PROPVAL)
+ {
+ const char *encoding;
+ const svn_string_t *val_str;
+
+ if (! iprops_ctx->curr_propname->len)
+ return svn_error_create(SVN_ERR_XML_MALFORMED, NULL, NULL);
+
+ encoding = svn_hash_gets(attrs, "V:encoding");
- if (strcmp(iprops_ctx->curr_prop_val_encoding, "base64") != 0)
- return svn_error_create(SVN_ERR_XML_MALFORMED, NULL, NULL);
+ if (encoding)
+ {
+ if (strcmp(encoding, "base64") != 0)
+ return svn_error_createf(SVN_ERR_XML_MALFORMED,
+ NULL,
+ _("Got unrecognized encoding '%s'"),
+ encoding);
- encoded_prop_val.data = iprops_ctx->curr_propval->data;
- encoded_prop_val.len = iprops_ctx->curr_propval->len;
- prop_val = svn_base64_decode_string(&encoded_prop_val,
- iprops_ctx->pool);
+ /* Decode into the right pool. */
+ val_str = svn_base64_decode_string(cdata, iprops_ctx->pool);
}
else
{
- prop_val = svn_string_create_from_buf(iprops_ctx->curr_propval,
- iprops_ctx->pool);
+ /* Copy into the right pool. */
+ val_str = svn_string_dup(cdata, iprops_ctx->pool);
}
svn_hash_sets(iprops_ctx->curr_iprop->prop_hash,
apr_pstrdup(iprops_ctx->pool,
iprops_ctx->curr_propname->data),
- prop_val);
- /* Clear current propname and propval in the event there are
- multiple properties on the current path. */
+ val_str);
+ /* Clear current propname. */
svn_stringbuf_setempty(iprops_ctx->curr_propname);
- svn_stringbuf_setempty(iprops_ctx->curr_propval);
- svn_ra_serf__xml_pop_state(parser);
- }
- else if (state == IPROPS_PROPNAME
- && strcmp(name.name, SVN_DAV__IPROP_PROPNAME) == 0)
- {
- svn_ra_serf__xml_pop_state(parser);
- }
- else if (state == IPROPS_ITEM
- && strcmp(name.name, SVN_DAV__IPROP_ITEM) == 0)
- {
- APR_ARRAY_PUSH(iprops_ctx->iprops, svn_prop_inherited_item_t *) =
- iprops_ctx->curr_iprop;
- svn_ra_serf__xml_pop_state(parser);
- }
- return SVN_NO_ERROR;
-}
-
-
-static svn_error_t *
-cdata_handler(svn_ra_serf__xml_parser_t *parser,
- const char *data,
- apr_size_t len,
- apr_pool_t *scratch_pool)
-{
- iprops_context_t *iprops_ctx = parser->user_data;
- iprops_state_e state = parser->state->current_state;
-
- switch (state)
- {
- case IPROPS_PATH:
- svn_stringbuf_appendbytes(iprops_ctx->curr_path, data, len);
- break;
-
- case IPROPS_PROPNAME:
- svn_stringbuf_appendbytes(iprops_ctx->curr_propname, data, len);
- break;
-
- case IPROPS_PROPVAL:
- svn_stringbuf_appendbytes(iprops_ctx->curr_propval, data, len);
- break;
-
- default:
- break;
}
+ else
+ SVN_ERR_MALFUNCTION(); /* Invalid transition table */
return SVN_NO_ERROR;
}
@@ -281,7 +234,7 @@ svn_ra_serf__get_inherited_props(svn_ra_
iprops_context_t *iprops_ctx;
svn_ra_serf__session_t *session = ra_session->priv;
svn_ra_serf__handler_t *handler;
- svn_ra_serf__xml_parser_t *parser_ctx;
+ svn_ra_serf__xml_context_t *xmlctx;
const char *req_url;
SVN_ERR(svn_ra_serf__get_stable_url(&req_url,
@@ -295,19 +248,20 @@ svn_ra_serf__get_inherited_props(svn_ra_
SVN_ERR_ASSERT(session->repos_root_str);
iprops_ctx = apr_pcalloc(scratch_pool, sizeof(*iprops_ctx));
- iprops_ctx->done = FALSE;
iprops_ctx->repos_root_url = session->repos_root_str;
iprops_ctx->pool = result_pool;
- iprops_ctx->curr_path = svn_stringbuf_create_empty(scratch_pool);
iprops_ctx->curr_propname = svn_stringbuf_create_empty(scratch_pool);
- iprops_ctx->curr_propval = svn_stringbuf_create_empty(scratch_pool);
iprops_ctx->curr_iprop = NULL;
iprops_ctx->iprops = apr_array_make(result_pool, 1,
sizeof(svn_prop_inherited_item_t *));
iprops_ctx->path = path;
iprops_ctx->revision = revision;
- handler = apr_pcalloc(scratch_pool, sizeof(*handler));
+ xmlctx = svn_ra_serf__xml_context_create(iprops_table,
+ iprops_opened, iprops_closed, NULL,
+ iprops_ctx,
+ scratch_pool);
+ handler = svn_ra_serf__create_expat_handler(xmlctx, scratch_pool);
handler->method = "REPORT";
handler->path = req_url;
@@ -318,18 +272,6 @@ svn_ra_serf__get_inherited_props(svn_ra_
handler->body_type = "text/xml";
handler->handler_pool = scratch_pool;
- parser_ctx = apr_pcalloc(scratch_pool, sizeof(*parser_ctx));
-
- parser_ctx->pool = scratch_pool;
- parser_ctx->user_data = iprops_ctx;
- parser_ctx->start = start_element;
- parser_ctx->end = end_element;
- parser_ctx->cdata = cdata_handler;
- parser_ctx->done = &iprops_ctx->done;
-
- handler->response_handler = svn_ra_serf__handle_xml_parser;
- handler->response_baton = parser_ctx;
-
err = svn_ra_serf__context_run_one(handler, scratch_pool);
SVN_ERR(svn_error_compose_create(
svn_ra_serf__error_on_status(handler->sline,
@@ -337,8 +279,7 @@ svn_ra_serf__get_inherited_props(svn_ra_
handler->location),
err));
- if (iprops_ctx->done)
- *iprops = iprops_ctx->iprops;
+ *iprops = iprops_ctx->iprops;
return SVN_NO_ERROR;
}
Modified: subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/locks.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/locks.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/locks.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/locks.c Tue Apr 29 23:10:25 2014
@@ -156,11 +156,20 @@ locks_closed(svn_ra_serf__xml_estate_t *
if (leaving_state == TIMEOUT)
{
- if (strcmp(cdata->data, "Infinite") == 0)
+ if (strcasecmp(cdata->data, "Infinite") == 0)
lock_ctx->lock->expiration_date = 0;
+ else if (strncasecmp(cdata->data, "Second-", 7) == 0)
+ {
+ unsigned n;
+ SVN_ERR(svn_cstring_atoui(&n, cdata->data+7));
+
+ lock_ctx->lock->expiration_date = apr_time_now() +
+ apr_time_from_sec(n);
+ }
else
- SVN_ERR(svn_time_from_cstring(&lock_ctx->lock->creation_date,
- cdata->data, lock_ctx->pool));
+ return svn_error_createf(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL,
+ _("Invalid LOCK timeout value '%s'"),
+ cdata->data);
}
else if (leaving_state == HREF)
{
@@ -362,29 +371,30 @@ svn_error_t *
svn_ra_serf__get_lock(svn_ra_session_t *ra_session,
svn_lock_t **lock,
const char *path,
- apr_pool_t *pool)
+ apr_pool_t *result_pool)
{
svn_ra_serf__session_t *session = ra_session->priv;
svn_ra_serf__handler_t *handler;
svn_ra_serf__xml_context_t *xmlctx;
+ apr_pool_t *scratch_pool = svn_pool_create(result_pool);
lock_info_t *lock_ctx;
const char *req_url;
svn_error_t *err;
- req_url = svn_path_url_add_component2(session->session_url.path, path, pool);
-
- lock_ctx = apr_pcalloc(pool, sizeof(*lock_ctx));
+ req_url = svn_path_url_add_component2(session->session_url.path, path,
+ scratch_pool);
- lock_ctx->pool = pool;
+ lock_ctx = apr_pcalloc(scratch_pool, sizeof(*lock_ctx));
+ lock_ctx->pool = result_pool;
lock_ctx->path = req_url;
- lock_ctx->lock = svn_lock_create(pool);
- lock_ctx->lock->path = apr_pstrdup(pool, path); /* be sure */
+ lock_ctx->lock = svn_lock_create(result_pool);
+ lock_ctx->lock->path = apr_pstrdup(result_pool, path);
xmlctx = svn_ra_serf__xml_context_create(locks_ttable,
NULL, locks_closed, NULL,
lock_ctx,
- pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, pool);
+ scratch_pool);
+ handler = svn_ra_serf__create_expat_handler(xmlctx, scratch_pool);
handler->method = "PROPFIND";
handler->path = req_url;
@@ -405,7 +415,7 @@ svn_ra_serf__get_lock(svn_ra_session_t *
lock_ctx->handler = handler;
- err = svn_ra_serf__context_run_one(handler, pool);
+ err = svn_ra_serf__context_run_one(handler, scratch_pool);
err = determine_error(handler, err);
if (handler->sline.code == 404)
@@ -420,7 +430,12 @@ svn_ra_serf__get_lock(svn_ra_session_t *
_("Server does not support locking features"));
}
- *lock = lock_ctx->lock;
+ if (lock_ctx->lock && lock_ctx->lock->token)
+ *lock = lock_ctx->lock;
+ else
+ *lock = NULL;
+
+ svn_pool_destroy(scratch_pool);
return SVN_NO_ERROR;
}
@@ -574,7 +589,7 @@ svn_ra_serf__unlock(svn_ra_session_t *ra
{
SVN_ERR(svn_ra_serf__get_lock(ra_session, &existing_lock, path,
iterpool));
- token = existing_lock->token;
+ token = existing_lock ? existing_lock->token : NULL;
if (!token)
{
err = svn_error_createf(SVN_ERR_RA_NOT_LOCKED, NULL,