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 2015/01/21 17:22:22 UTC
svn commit: r1653578 [1/18] - in /subversion/branches/pin-externals: ./
notes/ subversion/bindings/swig/ subversion/bindings/swig/include/
subversion/bindings/swig/perl/native/ subversion/bindings/swig/perl/native/t/
subversion/bindings/swig/python/tes...
Author: stsp
Date: Wed Jan 21 16:22:19 2015
New Revision: 1653578
URL: http://svn.apache.org/r1653578
Log:
On the pin-externals branch, merge from trunk.
Added:
subversion/branches/pin-externals/subversion/libsvn_fs_x/fs_id.c
- copied, changed from r1649801, subversion/trunk/subversion/libsvn_fs_x/fs_id.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/fs_id.h
- copied unchanged from r1649801, subversion/trunk/subversion/libsvn_fs_x/fs_id.h
subversion/branches/pin-externals/subversion/tests/cmdline/svnrdump_tests_data/mergeinfo-contains-r0.dump
- copied unchanged from r1649801, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/mergeinfo-contains-r0.dump
subversion/branches/pin-externals/subversion/tests/cmdline/svnrdump_tests_data/mergeinfo-contains-r0.expected.dump
- copied unchanged from r1649801, subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/mergeinfo-contains-r0.expected.dump
subversion/branches/pin-externals/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.dump
- copied unchanged from r1649801, subversion/trunk/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.dump
subversion/branches/pin-externals/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.expected.dump
- copied unchanged from r1649801, subversion/trunk/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.expected.dump
Modified:
subversion/branches/pin-externals/ (props changed)
subversion/branches/pin-externals/CHANGES
subversion/branches/pin-externals/notes/ (props changed)
subversion/branches/pin-externals/notes/dump-load-format.txt
subversion/branches/pin-externals/subversion/bindings/swig/include/svn_types.swg
subversion/branches/pin-externals/subversion/bindings/swig/perl/native/Client.pm
subversion/branches/pin-externals/subversion/bindings/swig/perl/native/Repos.pm
subversion/branches/pin-externals/subversion/bindings/swig/perl/native/t/1repos.t
subversion/branches/pin-externals/subversion/bindings/swig/perl/native/t/3client.t
subversion/branches/pin-externals/subversion/bindings/swig/python/tests/repository.py
subversion/branches/pin-externals/subversion/bindings/swig/svn_client.i
subversion/branches/pin-externals/subversion/include/mod_dav_svn.h
subversion/branches/pin-externals/subversion/include/private/svn_fs_util.h
subversion/branches/pin-externals/subversion/include/private/svn_mergeinfo_private.h
subversion/branches/pin-externals/subversion/include/private/svn_repos_private.h
subversion/branches/pin-externals/subversion/include/svn_io.h
subversion/branches/pin-externals/subversion/include/svn_repos.h
subversion/branches/pin-externals/subversion/include/svn_string.h
subversion/branches/pin-externals/subversion/include/svn_version.h
subversion/branches/pin-externals/subversion/libsvn_client/add.c
subversion/branches/pin-externals/subversion/libsvn_client/copy.c
subversion/branches/pin-externals/subversion/libsvn_client/diff.c
subversion/branches/pin-externals/subversion/libsvn_client/locking_commands.c
subversion/branches/pin-externals/subversion/libsvn_client/log.c
subversion/branches/pin-externals/subversion/libsvn_client/mtcc.c
subversion/branches/pin-externals/subversion/libsvn_client/patch.c
subversion/branches/pin-externals/subversion/libsvn_diff/diff_file.c
subversion/branches/pin-externals/subversion/libsvn_fs_base/fs.c
subversion/branches/pin-externals/subversion/libsvn_fs_fs/dag.c
subversion/branches/pin-externals/subversion/libsvn_fs_fs/dag.h
subversion/branches/pin-externals/subversion/libsvn_fs_fs/fs.c
subversion/branches/pin-externals/subversion/libsvn_fs_fs/index.c
subversion/branches/pin-externals/subversion/libsvn_fs_fs/lock.c
subversion/branches/pin-externals/subversion/libsvn_fs_fs/revprops.c
subversion/branches/pin-externals/subversion/libsvn_fs_fs/stats.c
subversion/branches/pin-externals/subversion/libsvn_fs_fs/transaction.c
subversion/branches/pin-externals/subversion/libsvn_fs_fs/tree.c
subversion/branches/pin-externals/subversion/libsvn_fs_fs/verify.c
subversion/branches/pin-externals/subversion/libsvn_fs_util/fs-util.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/ (props changed)
subversion/branches/pin-externals/subversion/libsvn_fs_x/cached_data.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/cached_data.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/caching.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/changes.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/changes.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/dag.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/dag.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/fs.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/fs.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/fs_x.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/fs_x.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/hotcopy.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/hotcopy.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/id.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/id.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/index.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/index.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/lock.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/lock.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/low_level.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/low_level.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/noderevs.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/noderevs.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/pack.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/pack.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/recovery.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/recovery.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/rep-cache.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/rep-cache.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/reps.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/reps.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/rev_file.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/revprops.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/revprops.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/string_table.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/string_table.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/temp_serializer.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/temp_serializer.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/transaction.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/transaction.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/tree.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/tree.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/util.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/util.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/verify.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/verify.h
subversion/branches/pin-externals/subversion/libsvn_ra_serf/merge.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/options.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/replay.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/update.c
subversion/branches/pin-externals/subversion/libsvn_repos/deprecated.c
subversion/branches/pin-externals/subversion/libsvn_repos/dump.c
subversion/branches/pin-externals/subversion/libsvn_repos/load-fs-vtable.c
subversion/branches/pin-externals/subversion/libsvn_subr/cache-membuffer.c
subversion/branches/pin-externals/subversion/libsvn_subr/cache.c
subversion/branches/pin-externals/subversion/libsvn_subr/cache_config.c
subversion/branches/pin-externals/subversion/libsvn_subr/config.c
subversion/branches/pin-externals/subversion/libsvn_subr/error.c
subversion/branches/pin-externals/subversion/libsvn_subr/io.c
subversion/branches/pin-externals/subversion/libsvn_subr/mergeinfo.c
subversion/branches/pin-externals/subversion/libsvn_subr/prefix_string.c
subversion/branches/pin-externals/subversion/libsvn_subr/sqlite.c
subversion/branches/pin-externals/subversion/libsvn_subr/string.c
subversion/branches/pin-externals/subversion/libsvn_subr/sysinfo.c
subversion/branches/pin-externals/subversion/libsvn_wc/conflicts.c
subversion/branches/pin-externals/subversion/libsvn_wc/wc-queries.sql
subversion/branches/pin-externals/subversion/libsvn_wc/wc_db.c
subversion/branches/pin-externals/subversion/libsvn_wc/wc_db.h
subversion/branches/pin-externals/subversion/libsvn_wc/wc_db_private.h
subversion/branches/pin-externals/subversion/libsvn_wc/wc_db_update_move.c
subversion/branches/pin-externals/subversion/mod_authz_svn/mod_authz_svn.c
subversion/branches/pin-externals/subversion/mod_dav_svn/merge.c
subversion/branches/pin-externals/subversion/mod_dav_svn/mod_dav_svn.c
subversion/branches/pin-externals/subversion/mod_dav_svn/repos.c
subversion/branches/pin-externals/subversion/svn/conflict-callbacks.c
subversion/branches/pin-externals/subversion/svnadmin/svnadmin.c
subversion/branches/pin-externals/subversion/svndumpfilter/svndumpfilter.c
subversion/branches/pin-externals/subversion/svnfsfs/stats-cmd.c
subversion/branches/pin-externals/subversion/svnrdump/dump_editor.c
subversion/branches/pin-externals/subversion/svnrdump/load_editor.c
subversion/branches/pin-externals/subversion/svnrdump/svnrdump.c
subversion/branches/pin-externals/subversion/svnserve/logger.c
subversion/branches/pin-externals/subversion/svnserve/svnserve.c
subversion/branches/pin-externals/subversion/svnsync/sync.c
subversion/branches/pin-externals/subversion/tests/cmdline/basic_tests.py
subversion/branches/pin-externals/subversion/tests/cmdline/copy_tests.py
subversion/branches/pin-externals/subversion/tests/cmdline/externals_tests.py
subversion/branches/pin-externals/subversion/tests/cmdline/patch_tests.py
subversion/branches/pin-externals/subversion/tests/cmdline/svndumpfilter_tests.py
subversion/branches/pin-externals/subversion/tests/cmdline/svnrdump_tests.py
subversion/branches/pin-externals/subversion/tests/cmdline/svnsync_tests.py
subversion/branches/pin-externals/subversion/tests/cmdline/svntest/main.py
subversion/branches/pin-externals/subversion/tests/cmdline/update_tests.py
subversion/branches/pin-externals/subversion/tests/libsvn_fs/fs-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_subr/cache-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_subr/config-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_subr/mergeinfo-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_subr/string-test.c
subversion/branches/pin-externals/subversion/tests/libsvn_wc/op-depth-test.c
Propchange: subversion/branches/pin-externals/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 21 16:22:19 2015
@@ -20,6 +20,7 @@
/subversion/branches/fsfs-lock-many:1571740-1577217
/subversion/branches/fsfs-pack:873717-874575
/subversion/branches/fsx:1507845-1509914
+/subversion/branches/fsx-id:1645603-1649011
/subversion/branches/gnome-keyring:870558-871410
/subversion/branches/gpg-agent-password-store:1005036-1150766
/subversion/branches/gtest_addition:1452117-1502138
@@ -84,4 +85,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1643755-1643836
+/subversion/trunk:1643755-1653577
Modified: subversion/branches/pin-externals/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/CHANGES?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/CHANGES (original)
+++ subversion/branches/pin-externals/CHANGES Wed Jan 21 16:22:19 2015
@@ -298,6 +298,7 @@ http://svn.apache.org/repos/asf/subversi
* Allow PARALLEL value to specify the number of threads to run tests with,
PARALLEL=1 means to use the default (r1573320)
* pkg-config support for libsvn_* libraries (issue #4435)
+ * binaries built on Mac OS X 10.6+ will not run on older versions (r1651549)
- API changes:
* New RA callbacks for managing ra_svn tunnels:
@@ -315,7 +316,7 @@ http://svn.apache.org/repos/asf/subversi
* New api svn_io_file_aligned_seek() (r1502539)
* ra_svn: fix svn_ra_get_log*() to apply limit when server can't (r1503043)
* svn_client_commit6: notify which path prevents a mv commit (r1503662)
- * New apis svn_io_file_create_empty() and svn_io_file_create_binary()
+ * New apis svn_io_file_create_empty() and svn_io_file_create_bytes()
(r1505006)
* New api svn_ver_check_list2() (r1502267)
* svn_fs_paths_changed() gains support for moves (r1525448)
@@ -457,6 +458,8 @@ http://svn.apache.org/repos/asf/subversi
* mod_dav_svn: reject requests with missing repository paths (r1643409)
* mod_dav_svn: reject requests with invalid virtual transaction names
(r1643437)
+ * mod_dav_svn: avoid unneeded memory growth in resource walking
+ (issue #4531)
Developer-visible changes:
- General:
@@ -466,6 +469,7 @@ http://svn.apache.org/repos/asf/subversi
r1564576, r1568180)
* fix LIBTOOL_M4 and LIBTOOL_CONFIG variable not be evaluated properly
during a unix build (r1637826)
+ * allow the use of libtool 2.4.3 (r1640862, r1640873, r1643793)
Version 1.8.10
@@ -1216,6 +1220,8 @@ http://svn.apache.org/repos/asf/subversi
* mod_dav_svn: reject requests with missing repository paths (r1643409)
* mod_dav_svn: reject requests with invalid virtual transaction names
(r1643437)
+ * mod_dav_svn: avoid unneeded memory growth in resource walking
+ (issue #4531)
Developer-visible changes:
- General:
@@ -1227,6 +1233,7 @@ http://svn.apache.org/repos/asf/subversi
2003-2008 (r1595431)
* fix LIBTOOL_M4 and LIBTOOL_CONFIG variable not be evaluated properly
during a unix build (r1637826)
+ * allow the use of libtool 2.4.3 (r1640862, r1640873, r1643793)
Version 1.7.18
Propchange: subversion/branches/pin-externals/notes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 21 16:22:19 2015
@@ -36,3 +36,4 @@
/subversion/branches/tc_url_rev/notes:874351-874483
/subversion/branches/tree-conflicts/notes:868291-873154
/subversion/branches/tree-conflicts-notify/notes:873926-874008
+/subversion/trunk/notes:1643755-1653571
Modified: subversion/branches/pin-externals/notes/dump-load-format.txt
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/notes/dump-load-format.txt?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/notes/dump-load-format.txt (original)
+++ subversion/branches/pin-externals/notes/dump-load-format.txt Wed Jan 21 16:22:19 2015
@@ -47,6 +47,8 @@ Dumpfiles include four record types. Tw
record, consist of single header lines. The bulk of a dumpfile
consists of Revision and Node records.
+==== Version stamp records ====
+
A version stamp record is always the first line of the file and
looks like this:
@@ -58,6 +60,8 @@ where <N> is replaced by the dump format
specified, the descriptions in this document apply to all
versions of the format.
+==== UUID records ====
+
Versions 2 and later may have a UUID record following the version
stamp. It is of the form
@@ -68,12 +72,14 @@ UUID: <hex-string>
where the <hex-string> is the UUID of the originating repository.
An example UUID is "7bf7a5ef-cabf-0310-b7d4-93df341afa7e".
-A Revision record has three headers and is always followed by a
+==== Revision records ====
+
+A Revision record has three headers and is usually followed by a
property section. Expect the following form and sequence:
-------------------------------------------------------------------
Revision-number: <N>
-Prop-content-length: <P>
+[Prop-content-length: <P>]
Content-length: <L>
!
-------------------------------------------------------------------
@@ -87,42 +93,7 @@ that can parse RFC-822 messages.
A revision record is followed by one or more Node records (see below).
-=== Property sections ==
-
-A Revision record *must* have a property section, and a Node record *may*
-have a property section. Every record with a property section has
-a Prop-content-length header.
-
-A property section consists of pairs of key and value records and
-is ended by a fixed trailer. Here is an example attached to a
-Revision record:
-
--------------------------------------------------------------------
-Revision-number: 1422
-Prop-content-length: 80
-Content-length: 80
-
-K 6
-author
-V 7
-sussman
-K 3
-log
-V 33
-Added two files, changed a third.
-PROPS-END
--------------------------------------------------------------------
-
-The fixed trailer is "PROPS-END\n" and its length is included in the
-Prop-content-length. Before it, each K and V record consists of a
-header line giving the length of the key or value content in bytes.
-The content follows. The content is itself always followed by \n.
-
-In version 3 of the format, a third type 'D' of property record is
-introduced to describe property deletion. This feature will be
-described later, in the specification of delta dumps.
-
-=== Node records ===
+==== Node records ====
Each Revision record is followed by one or more Node records.
Node records have the following sequence of header lines:
@@ -185,6 +156,41 @@ copyfrom sources may also not have eithe
Again, the '!' stands in for a mandatory empty line following the
RFC822-style headers. A body may follow.
+=== Property sections ===
+
+A Revision record *may* have a property section, and a Node record *may*
+have a property section. Every record with a property section has
+a Prop-content-length header.
+
+A property section consists of pairs of key and value records and
+is ended by a fixed trailer. Here is an example attached to a
+Revision record:
+
+-------------------------------------------------------------------
+Revision-number: 1422
+Prop-content-length: 80
+Content-length: 80
+
+K 6
+author
+V 7
+sussman
+K 3
+log
+V 33
+Added two files, changed a third.
+PROPS-END
+-------------------------------------------------------------------
+
+The fixed trailer is "PROPS-END\n" and its length is included in the
+Prop-content-length. Before it, each K and V record consists of a
+header line giving the length of the key or value content in bytes.
+The content follows. The content is itself always followed by \n.
+
+In version 3 of the format, a third type 'D' of property record is
+introduced to describe property deletion. This feature will be
+described later, in the specification of delta dumps.
+
== Semantics ==
=== The kinds of things ===
@@ -339,9 +345,13 @@ to the same directory.
=== Properties and persistence ===
-The properties section of a Revision record consists of some subset
-of the three reserved per-commit properties: svn:author, svn:date,
-and svn:log. These properties do not persist to later revisions.
+The properties section of a Revision record consists of some (possibly
+empty) subset of the three reserved revision properties: svn:author,
+svn:date, and svn:log, along with any other revision properties.
+
+The revision properties do not persist to later revisions. Each revision
+has exactly the revision properties specified in its revision record, or
+no revision properties if there is no property section.
The key thing to know about Node properties is that they are
persistent, once set, until modified by a future property
@@ -514,6 +524,15 @@ properties block.
This note is included for historical completeness only, at is it highly
unlikely that any Subversion instances that old remain in production.
+== Implementation choices for optional behaviour ==
+
+This section lists some of the ways existing implementations interpret the
+optional aspects of the specification.
+
+When a Revision record has no revision properties, svnadmin and svnrdump
+write an empty properties section whereas svndumpfilter omits the properties
+section. (At least in Subversion 1.0 through 1.8.)
+
== Ancient history ==
Old discussion:
Modified: subversion/branches/pin-externals/subversion/bindings/swig/include/svn_types.swg
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/swig/include/svn_types.swg?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/swig/include/svn_types.swg (original)
+++ subversion/branches/pin-externals/subversion/bindings/swig/include/svn_types.swg Wed Jan 21 16:22:19 2015
@@ -807,20 +807,12 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
Callback: svn_cancel_func_t
*/
-#ifdef SWIGPYTHON
-%typemap(in) (svn_cancel_func_t cancel_func, void *cancel_baton) {
- $1 = svn_swig_py_cancel_func;
- $2 = $input; /* our function is the baton. */
-}
-#endif
+%callback_typemap(svn_cancel_func_t cancel_func, void *cancel_baton,
+ svn_swig_py_cancel_func,
+ svn_swig_pl_cancel_func,
+ svn_swig_rb_cancel_func)
#ifdef SWIGRUBY
-%typemap(in) (svn_cancel_func_t cancel_func, void *cancel_baton)
-{
- $1 = svn_swig_rb_cancel_func;
- $2 = (void *)svn_swig_rb_make_baton($input, _global_svn_swig_rb_pool);
-}
-
%typemap(argout) (svn_cancel_func_t cancel_func, void *cancel_baton)
{
svn_swig_rb_set_baton($result, (VALUE)$2);
Modified: subversion/branches/pin-externals/subversion/bindings/swig/perl/native/Client.pm
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/swig/perl/native/Client.pm?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/swig/perl/native/Client.pm (original)
+++ subversion/branches/pin-externals/subversion/bindings/swig/perl/native/Client.pm Wed Jan 21 16:22:19 2015
@@ -55,8 +55,7 @@ SVN::Client - Subversion client function
0, #no_auth_cache
0, #trust_server_cert
$config_category,
- undef, #cancel_func
- undef) #cancel_baton
+ undef) #cancel_callback
);
# Use first argument as target and canonicalize it before using
@@ -1286,24 +1285,8 @@ sub log_msg {
=item $client-E<gt>cancel(\&cancel)
Sets the cancellation callback for the client context to a code reference that you
-pass. It always returns the current codereference set.
-
-The subroutine pointed to by this value will be called to see if the operation
-should be canceled. If the operation should be canceled, the function may
-return one of the following values:
-
-An svn_error_t object made with SVN::Error::create.
-
-Any true value, in which case the bindings will generate an svn_error_t object
-for you with the error code of SVN_ERR_CANCELLED and the string set to "By
-cancel callback".
-
-A string, in which case the bindings will generate an svn_error_t object for you
-with the error code of SVN_ERR_CANCELLED and the string set to the string you
-returned.
-
-Any other value will be interpreted as wanting to continue the operation.
-Generally, it's best to return 0 to continue the operation.
+pass. See L<"CANCELLATION CALLBACK"> below for details.
+It always returns the current codereference set.
=cut
@@ -1489,6 +1472,25 @@ may_save.
=back
+=head1 CANCELLATION CALLBACK
+
+This callback will be called periodically to see if the operation
+should be canceled. If the operation should be canceled, the function may
+return one of the following values:
+
+An svn_error_t object made with SVN::Error::create.
+
+Any true value, in which case the bindings will generate an svn_error_t object
+for you with the error code of SVN_ERR_CANCELLED and the string set to "By
+cancel callback".
+
+A string, in which case the bindings will generate an svn_error_t object for you
+with the error code of SVN_ERR_CANCELLED and the string set to the string you
+returned.
+
+Any other value will be interpreted as wanting to continue the operation.
+Generally, it's best to return 0 to continue the operation.
+
=head1 OBJECTS
These are some of the object types that are returned from the methods
Modified: subversion/branches/pin-externals/subversion/bindings/swig/perl/native/Repos.pm
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/swig/perl/native/Repos.pm?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/swig/perl/native/Repos.pm (original)
+++ subversion/branches/pin-externals/subversion/bindings/swig/perl/native/Repos.pm Wed Jan 21 16:22:19 2015
@@ -42,9 +42,9 @@ object.
=over
-=item $repos-E<gt>dump_fs($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $cancel_func, $cancel_baton)
+=item $repos-E<gt>dump_fs($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $cancel_callback)
-=item $repos-E<gt>dump_fs2($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $deltify, $cancel_func, $cancel_baton)
+=item $repos-E<gt>dump_fs2($dump_fh, $feedback_fh, $start_rev, $end_rev, $incremental, $deltify, $cancel_callback)
Create a dump file of the repository from revision C<$start_rev> to C<$end_rev>
, store it into the filehandle C<$dump_fh>, and write feedback on the progress
@@ -61,10 +61,9 @@ this flag is set, the first revision of
be done with full plain text. A dump with @a use_deltas set cannot
be loaded by Subversion 1.0.x.
-According to svn_repos.h, the C<$cancel_func> is a function that is called
-periodically and given C<$cancel_baton> as a parameter to determine whether
-the client wishes to cancel the dump. You must supply C<undef> at the very
-least.
+If C<$cancel_callback> is not C<undef>, it must be a code reference
+that is called periodically to determine whether the client wishes
+to cancel the dump. See L<SVN::Client/"CANCELLATION CALLBACK"> for details.
Example:
@@ -83,13 +82,13 @@ Example:
$repos->dump_fs2($fh, \*STDOUT, # Dump file => $fh, Feedback => STDOUT
$start_rev, $end_rev, # Revision Range
$incremental, $deltify, # Options
- undef, undef); # Cancel Function
+ undef); # Cancel Callback
close $fh;
-=item $repos-E<gt>load_fs($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $cancel_func, $cancel_baton);
+=item $repos-E<gt>load_fs($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $cancel_callback);
-=item $repos-E<gt>load_fs2($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $use_pre_commit_hook, $use_post_commit_hook, $cancel_func, $cancel_baton);
+=item $repos-E<gt>load_fs2($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $use_pre_commit_hook, $use_post_commit_hook, $cancel_callback);
Loads a dumpfile specified by the C<$dumpfile_fh> filehandle into the repository.
If the dumpstream contains copy history that is unavailable in the repository,
@@ -113,11 +112,11 @@ hook before committing each loaded revis
If C<$use_post_commit_hook> is set, call the repository's
post-commit hook after committing each loaded revision.
-If C<$cancel_func> is not NULL, it is called periodically with
-C<$cancel_baton> as argument to see if the client wishes to cancel
-the load.
+If C<$cancel_callback> is not C<undef>, it must be a code reference
+that is called periodically to determine whether the client wishes
+to cancel the load. See L<SVN::Client/"CANCELLATION CALLBACK"> for details.
-You must at least provide undef for these parameters for the method call
+You must at least provide C<undef> for these parameters for the method call
to work.
Example:
Modified: subversion/branches/pin-externals/subversion/bindings/swig/perl/native/t/1repos.t
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/swig/perl/native/t/1repos.t?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/swig/perl/native/t/1repos.t (original)
+++ subversion/branches/pin-externals/subversion/bindings/swig/perl/native/t/1repos.t Wed Jan 21 16:22:19 2015
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
#
#
# Licensed to the Apache Software Foundation (ASF) under one
@@ -20,16 +20,21 @@
#
#
-use Test::More tests => 6;
+use strict;
+use warnings;
+
+use Test::More tests => 8;
use File::Temp qw(tempdir);
use File::Path qw(rmtree);
-use strict;
+use File::Spec;
+use POSIX qw(locale_h);
+
+use SVN::Core;
+use SVN::Repos;
+use SVN::Fs;
+use SVN::Delta;
-require SVN::Core;
-require SVN::Repos;
-require SVN::Fs;
-require SVN::Delta;
-use File::Path;
+setlocale(LC_ALL, "C");
my $repospath = tempdir('svn-perl-test-XXXXXX', TMPDIR => 1, CLEANUP => 1);
@@ -107,6 +112,26 @@ ok($main::something_destroyed, 'callback
# TEST
cmp_ok($fs->youngest_rev, '==', 3);
+open my $dump_fh, ">", File::Spec->devnull or die "open file sink: $!";
+
+my $feedback;
+open my $feedback_fh, ">", \$feedback or die "open string: $!";
+
+my $cancel_cb_called = 0;
+$repos->dump_fs2($dump_fh, $feedback_fh,
+ 0, $SVN::Core::INVALID_REVNUM, # start_rev, end_rev
+ 0, 0, # incremental, deltify
+ sub { $cancel_cb_called++; 0 });
+# TEST
+ok($cancel_cb_called, 'cancel callback was called');
+# TEST
+is($feedback, <<'...', 'dump feedback');
+* Dumped revision 0.
+* Dumped revision 1.
+* Dumped revision 2.
+* Dumped revision 3.
+...
+
END {
diag "cleanup";
rmtree($repospath);
Modified: subversion/branches/pin-externals/subversion/bindings/swig/perl/native/t/3client.t
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/swig/perl/native/t/3client.t?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/swig/perl/native/t/3client.t (original)
+++ subversion/branches/pin-externals/subversion/bindings/swig/perl/native/t/3client.t Wed Jan 21 16:22:19 2015
@@ -20,7 +20,7 @@
#
#
-use Test::More tests => 297;
+use Test::More tests => 302;
use strict;
# shut up about variables that are only used once.
@@ -1119,6 +1119,45 @@ isa_ok($ph2,'HASH','propget returns HASH
is(scalar(keys %$ph2),0,
'No properties after deleting a property');
+# test cancel callback
+my $cancel_cb_called = 0;
+$ctx->cancel(sub { $cancel_cb_called++; 0 });
+my $log_entries_received = 0;
+$ctx->log5($reposurl,
+ 'HEAD',['HEAD',1],0, # peg rev, rev ranges, limit
+ 1,1,0, # discover_changed_paths, strict_node_history, include_merged_revisions
+ undef, # revprops
+ sub { $log_entries_received++ });
+# TEST
+ok($cancel_cb_called, 'cancel callback was called');
+# TEST
+is($log_entries_received, $current_rev, 'log entries received');
+
+my $cancel_msg = "stop the presses";
+$ctx->cancel(sub { $cancel_msg });
+$svn_error = $ctx->log5($reposurl,
+ 'HEAD',['HEAD',1],0, # peg rev, rev ranges, limit
+ 1,1,0, # discover_changed_paths, strict_node_history, include_merged_revisions
+ undef, # revprops
+ sub { });
+# TEST
+isa_ok($svn_error, '_p_svn_error_t', 'return of a cancelled operation');
+# TEST
+is($svn_error->apr_err, $SVN::Error::CANCELLED, "SVN_ERR_CANCELLED");
+{
+ # If we're running a debug build, $svn_error may be the top of a
+ # chain of svn_error_t's (all with message "traced call"), we need
+ # to get to the bottom svn_error_t to check for the original message.
+ my $chained = $svn_error;
+ $chained = $chained->child while $chained->child;
+ # TEST
+ is($chained->message, $cancel_msg, 'cancellation message');
+}
+
+$svn_error->clear(); # don't leak this
+$ctx->cancel(undef); # reset cancel callback
+
+
SKIP: {
# This is ugly. It is included here as an aide to understand how
# to test this and because it makes my life easier as I only have
Modified: subversion/branches/pin-externals/subversion/bindings/swig/python/tests/repository.py
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/swig/python/tests/repository.py?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/swig/python/tests/repository.py (original)
+++ subversion/branches/pin-externals/subversion/bindings/swig/python/tests/repository.py Wed Jan 21 16:22:19 2015
@@ -229,7 +229,7 @@ class SubversionRepositoryTestCase(unitt
]
# Compare only the first X nodes described in the expected list - otherwise
# the comparison list gets too long.
- self.assertListEqual(dsp.ops[:len(expected_list)], expected_list)
+ self.assertEqual(dsp.ops[:len(expected_list)], expected_list)
def test_get_logs(self):
"""Test scope of get_logs callbacks"""
Modified: subversion/branches/pin-externals/subversion/bindings/swig/svn_client.i
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/swig/svn_client.i?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/bindings/swig/svn_client.i (original)
+++ subversion/branches/pin-externals/subversion/bindings/swig/svn_client.i Wed Jan 21 16:22:19 2015
@@ -170,13 +170,6 @@
svn_swig_rb_get_commit_log_func)
#endif
-#ifdef SWIGRUBY
-%callback_typemap(svn_cancel_func_t cancel_func, void *cancel_baton,
- ,
- ,
- svn_swig_rb_cancel_func)
-#endif
-
%callback_typemap(svn_client_blame_receiver_t receiver, void *receiver_baton,
svn_swig_py_client_blame_receiver_func,
svn_swig_pl_blame_func,
Modified: subversion/branches/pin-externals/subversion/include/mod_dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/mod_dav_svn.h?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/mod_dav_svn.h (original)
+++ subversion/branches/pin-externals/subversion/include/mod_dav_svn.h Wed Jan 21 16:22:19 2015
@@ -40,7 +40,7 @@ extern "C" {
/**
Given an apache request @a r, a @a uri, and a @a root_path to the svn
location block, process @a uri and return many things, allocated in
- @a r->pool:
+ @a pool:
- @a cleaned_uri: The uri with duplicate and trailing slashes removed.
@@ -74,7 +74,25 @@ extern "C" {
- @a relative_path: /!svn/blah/13/A/B/alpha
- @a repos_path: A/B/alpha
- @a trailing_slash: FALSE
+
+ NOTE: The returned dav_error will be also allocated in @a pool, not
+ in @a r->pool.
+
+ @since New in 1.9
*/
+AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri2(request_rec *r,
+ const char *uri_to_split,
+ const char *root_path,
+ const char **cleaned_uri,
+ int *trailing_slash,
+ const char **repos_basename,
+ const char **relative_path,
+ const char **repos_path,
+ apr_pool_t *pool);
+
+/**
+ * Same as dav_svn_split_uri2() but allocates the result in @a r->pool.
+ */
AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri(request_rec *r,
const char *uri,
const char *root_path,
@@ -87,7 +105,22 @@ AP_MODULE_DECLARE(dav_error *) dav_svn_s
/**
* Given an apache request @a r and a @a root_path to the svn location
- * block, set @a *repos_path to the path of the repository on disk. */
+ * block, set @a *repos_path to the path of the repository on disk.
+ * Perform all allocations in @a pool.
+ *
+ * NOTE: The returned dav_error will be also allocated in @a pool, not
+ * in @a r->pool.
+ *
+ * @since New in 1.9
+ */
+AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path2(request_rec *r,
+ const char *root_path,
+ const char **repos_path,
+ apr_pool_t *pool);
+
+/**
+ * Same as dav_svn_get_repos_path2() but allocates the result in@a r->pool.
+ */
AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path(request_rec *r,
const char *root_path,
const char **repos_path);
Modified: subversion/branches/pin-externals/subversion/include/private/svn_fs_util.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/private/svn_fs_util.h?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/private/svn_fs_util.h (original)
+++ subversion/branches/pin-externals/subversion/include/private/svn_fs_util.h Wed Jan 21 16:22:19 2015
@@ -29,12 +29,17 @@
#include "svn_types.h"
#include "svn_error.h"
+#include "svn_version.h"
#include "svn_fs.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
+/* Get libsvn_fs_util version information. */
+const svn_version_t *
+svn_fs_util__version(void);
+
/* Returns whether PATH is in canonical form as defined by
svn_fs__canonicalize_abspath().
*/
Modified: subversion/branches/pin-externals/subversion/include/private/svn_mergeinfo_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/private/svn_mergeinfo_private.h?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/private/svn_mergeinfo_private.h (original)
+++ subversion/branches/pin-externals/subversion/include/private/svn_mergeinfo_private.h Wed Jan 21 16:22:19 2015
@@ -65,6 +65,27 @@ svn_error_t *
svn_rangelist__combine_adjacent_ranges(svn_rangelist_t *rangelist,
apr_pool_t *scratch_pool);
+/** Canonicalize the @a rangelist: sort the ranges, and combine adjacent or
+ * overlapping ranges into single ranges where possible.
+ *
+ * If overlapping ranges have different inheritability, return an error.
+ *
+ * Modify @a rangelist in place. Use @a scratch_pool for temporary
+ * allocations.
+ */
+svn_error_t *
+svn_rangelist__canonicalize(svn_rangelist_t *rangelist,
+ apr_pool_t *scratch_pool);
+
+/** Canonicalize the revision range lists in the @a mergeinfo.
+ *
+ * Modify @a mergeinfo in place. Use @a scratch_pool for temporary
+ * allocations.
+ */
+svn_error_t *
+svn_mergeinfo__canonicalize_ranges(svn_mergeinfo_t mergeinfo,
+ apr_pool_t *scratch_pool);
+
/* Set inheritability of all rangelists in MERGEINFO to INHERITABLE.
If MERGEINFO is NULL do nothing. If a rangelist in MERGEINFO is
NULL leave it alone. */
Modified: subversion/branches/pin-externals/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/private/svn_repos_private.h?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/pin-externals/subversion/include/private/svn_repos_private.h Wed Jan 21 16:22:19 2015
@@ -260,6 +260,109 @@ svn_repos__authz_pool_get(svn_authz_t **
/** @} */
+/* Adjust mergeinfo paths and revisions in ways that are useful when loading
+ * a dump stream.
+ *
+ * Set *NEW_VALUE_P to an adjusted version of the mergeinfo property value
+ * supplied in OLD_VALUE, with the following adjustments.
+ *
+ * - Normalize line endings: if all CRLF, change to LF; but error if
+ * mixed. If this normalization is performed, send a notification type
+ * svn_repos_notify_load_normalized_mergeinfo to NOTIFY_FUNC/NOTIFY_BATON.
+ *
+ * - Prefix all the merge source paths with PARENT_DIR, if not null.
+ *
+ * - Adjust any mergeinfo revisions not older than OLDEST_DUMPSTREAM_REV
+ * by using REV_MAP which maps (svn_revnum_t) old rev to (svn_revnum_t)
+ * new rev.
+ *
+ * - Adjust any mergeinfo revisions older than OLDEST_DUMPSTREAM_REV by
+ * (-OLDER_REVS_OFFSET), dropping any revisions that become <= 0.
+ *
+ * Allocate *NEW_VALUE_P in RESULT_POOL.
+ */
+svn_error_t *
+svn_repos__adjust_mergeinfo_property(svn_string_t **new_value_p,
+ const svn_string_t *old_value,
+ const char *parent_dir,
+ apr_hash_t *rev_map,
+ svn_revnum_t oldest_dumpstream_rev,
+ apr_int32_t older_revs_offset,
+ svn_repos_notify_func_t notify_func,
+ void *notify_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/* A header entry.
+ *
+ * (The headers are currently declared here to be of type apr_array_header_t
+ * with svn_repos__dumpfile_header_entry_t entries, but the types could
+ * instead be made opaque.)
+ */
+typedef struct svn_repos__dumpfile_header_entry_t {
+ const char *key, *val;
+} svn_repos__dumpfile_header_entry_t;
+
+/* Create an empty set of headers.
+ */
+apr_array_header_t *
+svn_repos__dumpfile_headers_create(apr_pool_t *pool);
+
+/* Push the header (KEY, VAL) onto HEADERS.
+ *
+ * Duplicate the key and value into HEADERS's pool.
+ */
+void
+svn_repos__dumpfile_header_push(apr_array_header_t *headers,
+ const char *key,
+ const char *val);
+
+/* Push the header (KEY, val = VAL_FMT ...) onto HEADERS.
+ *
+ * Duplicate the key and value into HEADERS's pool.
+ */
+void
+svn_repos__dumpfile_header_pushf(apr_array_header_t *headers,
+ const char *key,
+ const char *val_fmt,
+ ...)
+ __attribute__((format(printf, 3, 4)));
+
+/* Write to STREAM the headers in HEADERS followed by a blank line.
+ *
+ * HEADERS is an array of struct {const char *key, *val;}.
+ */
+svn_error_t *
+svn_repos__dump_headers(svn_stream_t *stream,
+ apr_array_header_t *headers,
+ svn_boolean_t terminate,
+ apr_pool_t *scratch_pool);
+
+/* Write a revision record to DUMP_STREAM for revision REVISION with revision
+ * properies REVPROPS, creating appropriate headers.
+ *
+ * Include all of the headers in EXTRA_HEADERS (if non-null), ignoring
+ * the revision number header and the three content length headers (which
+ * will be recreated as needed). EXTRA_HEADERS maps (char *) key to
+ * (char *) value.
+ *
+ * REVPROPS maps (char *) key to (svn_string_t *) value.
+ *
+ * Iff PROPS_SECTION_ALWAYS is true, include a prop content section (and
+ * corresponding header) even when REVPROPS is empty. This option exists
+ * to support a historical difference between svndumpfilter and svnadmin
+ * dump.
+ *
+ * Finally write another blank line.
+ */
+svn_error_t *
+svn_repos__dump_revision_record(svn_stream_t *dump_stream,
+ svn_revnum_t revision,
+ apr_hash_t *extra_headers,
+ apr_hash_t *revprops,
+ svn_boolean_t props_section_always,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/pin-externals/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/svn_io.h?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/svn_io.h (original)
+++ subversion/branches/pin-externals/subversion/include/svn_io.h Wed Jan 21 16:22:19 2015
@@ -682,28 +682,48 @@ svn_io_files_contents_three_same_p(svn_b
const char *file3,
apr_pool_t *scratch_pool);
-/** Create file at utf8-encoded @a file with contents @a contents.
- * @a file must not already exist.
+/** Create a file at utf8-encoded path @a file with the contents given
+ * by the null-terminated string @a contents.
+ *
+ * @a file must not already exist. If an error occurs while writing or
+ * closing the file, attempt to delete the file before returning the error.
+ *
+ * Write the data in 'binary' mode (#APR_FOPEN_BINARY). If @a contents
+ * is null, create an empty file.
+ *
* Use @a pool for memory allocations.
+ *
+ * @since
*/
svn_error_t *
svn_io_file_create(const char *file,
const char *contents,
apr_pool_t *pool);
-/** Create file at utf8-encoded @a file with binary contents @a contents
- * of @a length bytes. @a file must not already exist.
+/** Create a file at utf8-encoded path @a file with the contents given
+ * by @a contents of @a length bytes.
+ *
+ * @a file must not already exist. If an error occurs while writing or
+ * closing the file, attempt to delete the file before returning the error.
+ *
+ * Write the data in 'binary' mode (#APR_FOPEN_BINARY). If @a length is
+ * zero, create an empty file; in this case @a contents may be null.
+ *
* Use @a pool for memory allocations.
*
* @since New in 1.9.
*/
svn_error_t *
-svn_io_file_create_binary(const char *file,
- const char *contents,
- apr_size_t length,
- apr_pool_t *pool);
+svn_io_file_create_bytes(const char *file,
+ const void *contents,
+ apr_size_t length,
+ apr_pool_t *pool);
-/** Create empty file at utf8-encoded @a file, which must not already exist.
+/** Create an empty file at utf8-encoded path @a file.
+ *
+ * @a file must not already exist. If an error occurs while
+ * closing the file, attempt to delete the file before returning the error.
+ *
* Use @a pool for memory allocations.
*
* @since New in 1.9.
Modified: subversion/branches/pin-externals/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/svn_repos.h?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/svn_repos.h (original)
+++ subversion/branches/pin-externals/subversion/include/svn_repos.h Wed Jan 21 16:22:19 2015
@@ -3093,7 +3093,7 @@ svn_repos_load_fs5(svn_repos_t *repos,
/** Similar to svn_repos_load_fs5(), but with @a ignore_dates
* always passed as FALSE.
*
- * @since New in 1.9.
+ * @since New in 1.8.
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
@@ -3340,20 +3340,65 @@ svn_repos_parse_dumpstream3(svn_stream_t
* @a end_rev). They refer to dump stream revision numbers rather than
* committed revision numbers.
*
- * If @a use_history is set, then the parser will require relative
- * 'copyfrom' history to exist in the repository when it encounters
- * nodes that are added-with-history.
+ * If @a use_history is true, then when the parser encounters a node that
+ * is added-with-history, it will require 'copy-from' history to exist in
+ * the repository at the relative (adjusted) copy-from revision and path.
+ * It will perform a copy from that source location, and will fail if no
+ * suitable source exists there. If @a use_history is false, then it will
+ * instead convert every copy to a plain add.
+ *
+ * ### The 'use_history=FALSE' case is unused and untested in Subversion.
+ * It seems to me it would not work with a deltas dumpfile (a driver
+ * that calls the @c apply_textdelta method), as it would not have
+ * access to the delta base text.
+ *
+ * If @a use_pre_commit_hook is set, call the repository's pre-commit
+ * hook before committing each loaded revision.
+ *
+ * If @a use_post_commit_hook is set, call the repository's
+ * post-commit hook after committing each loaded revision.
*
* If @a validate_props is set, then validate Subversion revision and
* node properties (those in the svn: namespace) against established
* rules for those things.
*
+ * If @a ignore_dates is set, ignore any revision datestamps found in
+ * @a dumpstream, allowing the revisions created by the load process
+ * to be stamped as if they were newly created via the normal commit
+ * process.
+ *
* If @a parent_dir is not NULL, then the parser will reparent all the
* loaded nodes, from root to @a parent_dir. The directory @a parent_dir
* must be an existing directory in the repository.
*
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_repos_get_fs_build_parser5(const svn_repos_parse_fns3_t **callbacks,
+ void **parse_baton,
+ svn_repos_t *repos,
+ svn_revnum_t start_rev,
+ svn_revnum_t end_rev,
+ svn_boolean_t use_history,
+ svn_boolean_t validate_props,
+ enum svn_repos_load_uuid uuid_action,
+ const char *parent_dir,
+ svn_boolean_t use_pre_commit_hook,
+ svn_boolean_t use_post_commit_hook,
+ svn_boolean_t ignore_dates,
+ svn_repos_notify_func_t notify_func,
+ void *notify_baton,
+ apr_pool_t *pool);
+
+/**
+ * Similar to svn_repos_get_fs_build_parser5(), but with the
+ * @c use_pre_commit_hook, @c use_post_commit_hook and @c ignore_dates
+ * arguments all false.
+ *
* @since New in 1.8.
+ * @deprecated Provided for backward compatibility with the 1.8 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_repos_get_fs_build_parser4(const svn_repos_parse_fns3_t **parser,
void **parse_baton,
Modified: subversion/branches/pin-externals/subversion/include/svn_string.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/svn_string.h?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/svn_string.h (original)
+++ subversion/branches/pin-externals/subversion/include/svn_string.h Wed Jan 21 16:22:19 2015
@@ -308,7 +308,7 @@ void
svn_stringbuf_appendbyte(svn_stringbuf_t *targetstr,
char byte);
-/** Append an array of bytes onto @a targetstr.
+/** Append the array of bytes @a bytes of length @a count onto @a targetstr.
*
* reallocs if necessary. @a targetstr is affected, nothing else is.
*
@@ -345,14 +345,15 @@ void
svn_stringbuf_appendcstr(svn_stringbuf_t *targetstr,
const char *cstr);
-/** Read @a count bytes from @a bytes and insert them into @a str at
- * position @a pos and following. The resulting string will be
- * @c count+str->len bytes long. If @c pos is larger or equal to the
- * number of bytes currently used in @a str, simply append @a bytes.
+/** Insert into @a str at position @a pos an array of bytes @a bytes
+ * which is @a count bytes long.
+ *
+ * The resulting string will be @c count+str->len bytes long. If
+ * @a pos is larger than or equal to @c str->len, simply append @a bytes.
*
* Reallocs if necessary. @a str is affected, nothing else is.
*
- * @note The inserted string may be a sub-range if @a str.
+ * @note The inserted string may be a sub-range of @a str.
*
* @since New in 1.8.
*
@@ -364,9 +365,10 @@ svn_stringbuf_insert(svn_stringbuf_t *st
const char *bytes,
apr_size_t count);
-/** Removes @a count bytes from @a str, starting at position @a pos.
- * If that range exceeds the current string data, @a str gets truncated
- * at @a pos. If the latter is larger or equal to @c str->pos, this will
+/** Remove @a count bytes from @a str, starting at position @a pos.
+ *
+ * If that range exceeds the current string data, truncate @a str at
+ * @a pos. If @a pos is larger than or equal to @c str->len, this will
* be a no-op. Otherwise, the resulting string will be @c str->len-count
* bytes long.
*
@@ -378,8 +380,8 @@ svn_stringbuf_remove(svn_stringbuf_t *st
apr_size_t count);
/** Replace in @a str the substring which starts at @a pos and is @a
- * old_count bytes long with a new substring @a bytes (which is @a
- * new_count bytes long).
+ * old_count bytes long with a new substring @a bytes which is @a
+ * new_count bytes long.
*
* This is faster but functionally equivalent to the following sequence:
* @code
Modified: subversion/branches/pin-externals/subversion/include/svn_version.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/svn_version.h?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/svn_version.h (original)
+++ subversion/branches/pin-externals/subversion/include/svn_version.h Wed Jan 21 16:22:19 2015
@@ -82,7 +82,7 @@ extern "C" {
/** Version tag: a string describing the version.
*
- * This tag remains " (dev build)" in the repository so that we can
+ * This tag remains " (under development)" in the repository so that we can
* always see from "svn --version" that the software has been built
* from the repository rather than a "blessed" distribution.
*
@@ -175,10 +175,25 @@ struct svn_version_t
* Generate the implementation of a version query function.
*
* @since New in 1.1.
+ * @since Since 1.9, embeds a string into the compiled object
+ * file that can be queried with the 'what' utility.
*/
-#define SVN_VERSION_BODY \
- SVN_VERSION_DEFINE(versioninfo); \
- return &versioninfo
+#define SVN_VERSION_BODY \
+ static struct versioninfo_t \
+ { \
+ const char *const str; \
+ const svn_version_t num; \
+ } const versioninfo = \
+ { \
+ "@(#)" SVN_VERSION, \
+ { \
+ SVN_VER_MAJOR, \
+ SVN_VER_MINOR, \
+ SVN_VER_PATCH, \
+ SVN_VER_NUMTAG \
+ } \
+ }; \
+ return &versioninfo.num
/**
* Check library version compatibility. Return #TRUE if the client's
Modified: subversion/branches/pin-externals/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/add.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/add.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/add.c Wed Jan 21 16:22:19 2015
@@ -1270,11 +1270,7 @@ svn_client__make_local_parents(const cha
else
SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
- /* Should no longer use svn_depth_empty to indicate that only the directory
- itself is added, since it not only constraints the operation depth, but
- also defines the depth of the target directory now. Moreover, the new
- directory will have no children at all.*/
- err = svn_client_add5(local_abspath, svn_depth_infinity, FALSE, FALSE, FALSE,
+ err = svn_client_add5(local_abspath, svn_depth_empty, FALSE, FALSE, FALSE,
make_parents, ctx, scratch_pool);
/* If we created a new directory, but couldn't add it to version
Modified: subversion/branches/pin-externals/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/copy.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/copy.c Wed Jan 21 16:22:19 2015
@@ -1416,8 +1416,13 @@ repos_to_repos_copy(const apr_array_head
SVN_ERR(svn_ra_check_path(ra_session, dst_rel, SVN_INVALID_REVNUM,
&dst_kind, pool));
if (dst_kind != svn_node_none)
- return svn_error_createf(SVN_ERR_FS_ALREADY_EXISTS, NULL,
- _("Path '%s' already exists"), dst_rel);
+ {
+ const char *path = svn_uri_skip_ancestor(repos_root,
+ pair->dst_abspath_or_url,
+ pool);
+ return svn_error_createf(SVN_ERR_FS_ALREADY_EXISTS, NULL,
+ _("Path '/%s' already exists"), path);
+ }
/* More info for our INFO structure. */
info->src_path = src_rel;
Modified: subversion/branches/pin-externals/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/diff.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/diff.c Wed Jan 21 16:22:19 2015
@@ -154,9 +154,6 @@ adjust_paths_for_diff_labels(const char
new_path = ".";
else
return MAKE_ERR_BAD_RELATIVE_PATH(new_path, relative_to_dir);
-
- child_path = svn_dirent_is_child(relative_to_dir, new_path1,
- result_pool);
}
{
Modified: subversion/branches/pin-externals/subversion/libsvn_client/locking_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/locking_commands.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/locking_commands.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/locking_commands.c Wed Jan 21 16:22:19 2015
@@ -402,10 +402,9 @@ organize_lock_targets(apr_array_header_t
_("Unable to lock/unlock across multiple "
"repositories"));
- /* Now we need to create a couple of different hash mappings. */
+ /* Now we need to create our mapping. */
rel_fs_paths = apr_hash_make(result_pool);
- target_urls = apr_array_make(scratch_pool, targets->nelts,
- sizeof(const char *));
+
for (hi = apr_hash_first(scratch_pool, wc_info);
hi;
hi = apr_hash_next(hi))
Modified: subversion/branches/pin-externals/subversion/libsvn_client/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/log.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/log.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/log.c Wed Jan 21 16:22:19 2015
@@ -852,10 +852,12 @@ svn_client_log5(const apr_array_header_t
svn_ra_session_t *ra_session;
const char *old_session_url;
const char *ra_target;
+ const char *path_or_url;
svn_opt_revision_t youngest_opt_rev;
svn_revnum_t youngest_rev;
svn_revnum_t oldest_rev;
svn_opt_revision_t peg_rev;
+ svn_client__pathrev_t *ra_session_loc;
svn_client__pathrev_t *actual_loc;
apr_array_header_t *log_segments;
apr_array_header_t *revision_ranges;
@@ -875,7 +877,7 @@ svn_client_log5(const apr_array_header_t
SVN_ERR(resolve_log_targets(&relative_targets, &ra_target, &peg_rev,
targets, ctx, pool, pool));
- SVN_ERR(svn_client__ra_session_from_path2(&ra_session, NULL,
+ SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &ra_session_loc,
ra_target, NULL, &peg_rev, &peg_rev,
ctx, pool));
@@ -889,11 +891,22 @@ svn_client_log5(const apr_array_header_t
opt_rev_ranges, &peg_rev,
ctx, pool, pool));
+ /* For some peg revisions we must resolve revision and url via a local path
+ so use the original RA_TARGET. For others, use the potentially corrected
+ (redirected) ra session URL. */
+ if (peg_rev.kind == svn_opt_revision_previous ||
+ peg_rev.kind == svn_opt_revision_base ||
+ peg_rev.kind == svn_opt_revision_committed ||
+ peg_rev.kind == svn_opt_revision_working)
+ path_or_url = ra_target;
+ else
+ path_or_url = ra_session_loc->url;
+
/* Make ACTUAL_LOC and RA_SESSION point to the youngest operative rev. */
youngest_opt_rev.kind = svn_opt_revision_number;
youngest_opt_rev.value.number = youngest_rev;
SVN_ERR(svn_client__resolve_rev_and_url(&actual_loc, ra_session,
- ra_target, &peg_rev,
+ path_or_url, &peg_rev,
&youngest_opt_rev, ctx, pool));
SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url, ra_session,
actual_loc->url, pool));
Modified: subversion/branches/pin-externals/subversion/libsvn_client/mtcc.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/mtcc.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/mtcc.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/mtcc.c Wed Jan 21 16:22:19 2015
@@ -337,7 +337,6 @@ svn_client__mtcc_create(svn_client__mtcc
*mtcc = apr_pcalloc(mtcc_pool, sizeof(**mtcc));
(*mtcc)->pool = mtcc_pool;
- (*mtcc)->base_revision = base_revision;
(*mtcc)->root_op = mtcc_op_create(NULL, FALSE, TRUE, mtcc_pool);
@@ -350,9 +349,12 @@ svn_client__mtcc_create(svn_client__mtcc
SVN_ERR(svn_ra_get_latest_revnum((*mtcc)->ra_session, &(*mtcc)->head_revision,
scratch_pool));
- if (! SVN_IS_VALID_REVNUM(base_revision))
- base_revision = (*mtcc)->head_revision;
- else if (base_revision > (*mtcc)->head_revision)
+ if (SVN_IS_VALID_REVNUM(base_revision))
+ (*mtcc)->base_revision = base_revision;
+ else
+ (*mtcc)->base_revision = (*mtcc)->head_revision;
+
+ if ((*mtcc)->base_revision > (*mtcc)->head_revision)
return svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, NULL,
_("No such revision %ld (HEAD is %ld)"),
base_revision, (*mtcc)->head_revision);
Modified: subversion/branches/pin-externals/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/patch.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/patch.c Wed Jan 21 16:22:19 2015
@@ -48,6 +48,7 @@
#include "private/svn_dep_compat.h"
#include "private/svn_string_private.h"
#include "private/svn_subr_private.h"
+#include "private/svn_sorts_private.h"
typedef struct hunk_info_t {
/* The hunk. */
@@ -1578,7 +1579,8 @@ match_existing_target(svn_boolean_t *mat
/* Determine the line at which a HUNK applies to CONTENT of the TARGET
* file, and return an appropriate hunk_info object in *HI, allocated from
* RESULT_POOL. Use fuzz factor FUZZ. Set HI->FUZZ to FUZZ. If no correct
- * line can be determined, set HI->REJECTED to TRUE.
+ * line can be determined, set HI->REJECTED to TRUE. PREVIOUS_OFFSET
+ * is the offset at which the previous matching hunk was applied, or zero.
* IGNORE_WHITESPACE tells whether whitespace should be considered when
* matching. IS_PROP_HUNK indicates whether the hunk patches file content
* or a property.
@@ -1590,6 +1592,7 @@ static svn_error_t *
get_hunk_info(hunk_info_t **hi, patch_target_t *target,
target_content_t *content,
svn_diff_hunk_t *hunk, svn_linenum_t fuzz,
+ apr_int64_t previous_offset,
svn_boolean_t ignore_whitespace,
svn_boolean_t is_prop_hunk,
svn_cancel_func_t cancel_func, void *cancel_baton,
@@ -1599,7 +1602,7 @@ get_hunk_info(hunk_info_t **hi, patch_ta
svn_linenum_t original_start;
svn_boolean_t already_applied;
- original_start = svn_diff_hunk_get_original_start(hunk);
+ original_start = svn_diff_hunk_get_original_start(hunk) + previous_offset;
already_applied = FALSE;
/* An original offset of zero means that this hunk wants to create
@@ -1707,7 +1710,9 @@ get_hunk_info(hunk_info_t **hi, patch_ta
modified_start = svn_diff_hunk_get_modified_start(hunk);
if (modified_start == 0)
{
- /* Patch wants to delete the file. */
+ /* Patch wants to delete the file.
+
+ ### locally_deleted is always false here? */
already_applied = target->locally_deleted;
}
else
@@ -1728,27 +1733,85 @@ get_hunk_info(hunk_info_t **hi, patch_ta
if (! already_applied)
{
- /* Scan the whole file again from the start. */
- SVN_ERR(seek_to_line(content, 1, scratch_pool));
+ int i;
+ svn_linenum_t search_start = 1, search_end = 0;
+ svn_linenum_t matched_line2;
+
+ /* Search for closest match before or after original
+ start. We have no backward search so search forwards
+ from the previous match (or start of file) to the
+ original start looking for the last match. Then
+ search forwards from the original start looking for a
+ better match. Finally search forwards from the start
+ of file to the previous hunk if that could result in
+ a better match. */
+
+ for (i = content->hunks->nelts; i > 0; --i)
+ {
+ const hunk_info_t *prev
+ = APR_ARRAY_IDX(content->hunks, i - 1, const hunk_info_t *);
+ if (!prev->rejected)
+ {
+ svn_linenum_t length;
+
+ length = svn_diff_hunk_get_original_length(prev->hunk);
+ search_start = prev->matched_line + length;
+ break;
+ }
+ }
- /* Scan forward towards the hunk's line and look for a line
- * where the hunk matches. */
+ /* Search from the previous match, or start of file,
+ towards the original location. */
+ SVN_ERR(seek_to_line(content, search_start, scratch_pool));
SVN_ERR(scan_for_match(&matched_line, content, hunk, FALSE,
original_start, fuzz,
ignore_whitespace, FALSE,
cancel_func, cancel_baton,
scratch_pool));
- /* In tie-break situations, we arbitrarily prefer early matches
- * to save us from scanning the rest of the file. */
- if (matched_line == 0)
+ /* If a match we only need to search forwards for a
+ better match, otherwise to the end of the file. */
+ if (matched_line)
+ search_end = original_start + (original_start - matched_line);
+
+ /* Search from original location, towards the end. */
+ SVN_ERR(seek_to_line(content, original_start + 1, scratch_pool));
+ SVN_ERR(scan_for_match(&matched_line2, content, hunk,
+ TRUE, search_end, fuzz, ignore_whitespace,
+ FALSE, cancel_func, cancel_baton,
+ scratch_pool));
+
+ /* Chose the forward match if it is closer than the
+ backward match or if there is no backward match. */
+ if (matched_line2
+ && (!matched_line
+ || (matched_line2 - original_start
+ < original_start - matched_line)))
+ matched_line = matched_line2;
+
+ /* Search from before previous hunk if there could be a
+ better match. */
+ if (search_start > 1
+ && (!matched_line
+ || (matched_line > original_start
+ && (matched_line - original_start
+ > original_start - search_start))))
{
- /* Scan forward towards the end of the file and look
- * for a line where the hunk matches. */
- SVN_ERR(scan_for_match(&matched_line, content, hunk,
- TRUE, 0, fuzz, ignore_whitespace,
- FALSE, cancel_func, cancel_baton,
+ svn_linenum_t search_start2 = 1;
+
+ if (matched_line
+ && matched_line - original_start < original_start)
+ search_start2
+ = original_start - (matched_line - original_start) + 1;
+
+ SVN_ERR(seek_to_line(content, search_start2, scratch_pool));
+ SVN_ERR(scan_for_match(&matched_line2, content, hunk, FALSE,
+ search_start - 1, fuzz,
+ ignore_whitespace, FALSE,
+ cancel_func, cancel_baton,
scratch_pool));
+ if (matched_line2)
+ matched_line = matched_line2;
}
}
}
@@ -2139,6 +2202,48 @@ send_patch_notification(const patch_targ
return SVN_NO_ERROR;
}
+/* Implements the callback for svn_sort__array. Puts hunks that match
+ before hunks that do not match, puts hunks that match in order
+ based on postion matched, puts hunks that do not match in order
+ based on original position. */
+static int
+sort_matched_hunks(const void *a, const void *b)
+{
+ const hunk_info_t *item1 = *((const hunk_info_t * const *)a);
+ const hunk_info_t *item2 = *((const hunk_info_t * const *)b);
+ svn_boolean_t matched1 = !item1->rejected && !item1->already_applied;
+ svn_boolean_t matched2 = !item2->rejected && !item2->already_applied;
+ svn_linenum_t original1, original2;
+
+ if (matched1 && matched2)
+ {
+ /* Both match so use order matched in file. */
+ if (item1->matched_line > item2->matched_line)
+ return 1;
+ else if (item1->matched_line == item2->matched_line)
+ return 0;
+ else
+ return -1;
+ }
+ else if (matched2)
+ /* Only second matches, put it before first. */
+ return 1;
+ else if (matched1)
+ /* Only first matches, put it before second. */
+ return -1;
+
+ /* Neither matches, sort by original_start. */
+ original1 = svn_diff_hunk_get_original_start(item1->hunk);
+ original2 = svn_diff_hunk_get_original_start(item2->hunk);
+ if (original1 > original2)
+ return 1;
+ else if (original1 == original2)
+ return 0;
+ else
+ return -1;
+}
+
+
/* Apply a PATCH to a working copy at ABS_WC_PATH and put the result
* into temporary files, to be installed in the working copy later.
* Return information about the patch target in *PATCH_TARGET, allocated
@@ -2167,6 +2272,7 @@ apply_one_patch(patch_target_t **patch_t
int i;
static const svn_linenum_t MAX_FUZZ = 2;
apr_hash_index_t *hash_index;
+ apr_int64_t previous_offset = 0;
SVN_ERR(init_patch_target(&target, patch, abs_wc_path, wc_ctx, strip_count,
remove_tempfiles, result_pool, scratch_pool));
@@ -2209,6 +2315,7 @@ apply_one_patch(patch_target_t **patch_t
do
{
SVN_ERR(get_hunk_info(&hi, target, target->content, hunk, fuzz,
+ previous_offset,
ignore_whitespace,
FALSE /* is_prop_hunk */,
cancel_func, cancel_baton,
@@ -2217,9 +2324,17 @@ apply_one_patch(patch_target_t **patch_t
}
while (hi->rejected && fuzz <= MAX_FUZZ && ! hi->already_applied);
+ if (hi->matched_line)
+ previous_offset
+ = hi->matched_line - svn_diff_hunk_get_original_start(hunk);
+
APR_ARRAY_PUSH(target->content->hunks, hunk_info_t *) = hi;
}
+ /* Hunks are applied in the order determined by the matched line and
+ this may be different from the order of the original lines. */
+ svn_sort__array(target->content->hunks, sort_matched_hunks);
+
/* Apply or reject hunks. */
for (i = 0; i < target->content->hunks->nelts; i++)
{
@@ -2291,7 +2406,7 @@ apply_one_patch(patch_target_t **patch_t
do
{
SVN_ERR(get_hunk_info(&hi, target, prop_target->content,
- hunk, fuzz,
+ hunk, fuzz, 0,
ignore_whitespace,
TRUE /* is_prop_hunk */,
cancel_func, cancel_baton,
Modified: subversion/branches/pin-externals/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_diff/diff_file.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_diff/diff_file.c Wed Jan 21 16:22:19 2015
@@ -544,7 +544,6 @@ find_identical_suffix(apr_off_t *suffix_
int suffix_lines_to_keep = SUFFIX_LINES_TO_KEEP;
svn_boolean_t is_match;
apr_off_t lines = 0;
- svn_boolean_t had_cr;
svn_boolean_t had_nl;
apr_size_t i;
@@ -685,7 +684,6 @@ find_identical_suffix(apr_off_t *suffix_
/* We skipped some bytes, so there are no closing EOLs */
had_nl = FALSE;
- had_cr = FALSE;
}
/* The > min_curp[i] check leaves at least one final byte for checking
@@ -712,7 +710,7 @@ find_identical_suffix(apr_off_t *suffix_
one file reaches its end. */
do
{
- had_cr = FALSE;
+ svn_boolean_t had_cr = FALSE;
while (!is_one_at_eof(file_for_suffix, file_len)
&& *file_for_suffix[0].curp != '\n'
&& *file_for_suffix[0].curp != '\r')
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_base/fs.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_base/fs.c Wed Jan 21 16:22:19 2015
@@ -1516,6 +1516,7 @@ svn_fs_base__init(const svn_version_t *l
{
{ "svn_subr", svn_subr_version },
{ "svn_delta", svn_delta_version },
+ { "svn_fs_util", svn_fs_util__version },
{ NULL, NULL }
};
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_fs/dag.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_fs/dag.c Wed Jan 21 16:22:19 2015
@@ -866,14 +866,20 @@ svn_fs_fs__dag_delete_if_mutable(svn_fs_
{
apr_array_header_t *entries;
int i;
+ apr_pool_t *iterpool = svn_pool_create(pool);
/* Loop over directory entries */
SVN_ERR(svn_fs_fs__dag_dir_entries(&entries, node, pool));
if (entries)
for (i = 0; i < entries->nelts; ++i)
- SVN_ERR(svn_fs_fs__dag_delete_if_mutable(fs,
- APR_ARRAY_IDX(entries, i, svn_fs_dirent_t *)->id,
- pool));
+ {
+ svn_pool_clear(iterpool);
+ SVN_ERR(svn_fs_fs__dag_delete_if_mutable(fs,
+ APR_ARRAY_IDX(entries, i, svn_fs_dirent_t *)->id,
+ iterpool));
+ }
+
+ svn_pool_destroy(iterpool);
}
/* ... then delete the node itself, after deleting any mutable
@@ -1099,6 +1105,15 @@ svn_fs_fs__dag_dup(const dag_node_t *nod
return new_node;
}
+dag_node_t *
+svn_fs_fs__dag_copy_into_pool(dag_node_t *node,
+ apr_pool_t *pool)
+{
+ return (node->node_pool == pool
+ ? node
+ : svn_fs_fs__dag_dup(node, pool));
+}
+
svn_error_t *
svn_fs_fs__dag_serialize(void **data,
apr_size_t *data_len,
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_fs/dag.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_fs/dag.h?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_fs/dag.h (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_fs/dag.h Wed Jan 21 16:22:19 2015
@@ -80,6 +80,12 @@ dag_node_t *
svn_fs_fs__dag_dup(const dag_node_t *node,
apr_pool_t *pool);
+/* If NODE has been allocated in POOL, return NODE. Otherwise, return
+ a copy created in POOL with svn_fs_fs__dag_dup. */
+dag_node_t *
+svn_fs_fs__dag_copy_into_pool(dag_node_t *node,
+ apr_pool_t *pool);
+
/* Serialize a DAG node, except don't try to preserve the 'fs' member.
Implements svn_cache__serialize_func_t */
svn_error_t *
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_fs/fs.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_fs/fs.c Wed Jan 21 16:22:19 2015
@@ -597,6 +597,7 @@ svn_fs_fs__init(const svn_version_t *loa
{
{ "svn_subr", svn_subr_version },
{ "svn_delta", svn_delta_version },
+ { "svn_fs_util", svn_fs_util__version },
{ NULL, NULL }
};
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_fs/index.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_fs/index.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_fs/index.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_fs/index.c Wed Jan 21 16:22:19 2015
@@ -836,8 +836,8 @@ svn_fs_fs__l2p_index_append(svn_checksum
/* 1 page with up to L2P_PAGE_SIZE entries.
* fsfs.conf settings validation guarantees this to fit into
* our address space. */
- apr_size_t last_buffer_size
- = (apr_size_t)svn_spillbuf__get_size(buffer);
+ apr_uint64_t last_buffer_size
+ = (apr_uint64_t)svn_spillbuf__get_size(buffer);
svn_pool_clear(iterpool);
@@ -1980,8 +1980,8 @@ svn_fs_fs__p2l_index_append(svn_checksum
apr_uint64_t last_entry_end = 0;
apr_uint64_t last_page_end = 0;
- apr_size_t last_buffer_size = 0; /* byte offset in the spill buffer at
- the begin of the current revision */
+ apr_uint64_t last_buffer_size = 0; /* byte offset in the spill buffer at
+ the begin of the current revision */
apr_uint64_t file_size = 0;
/* temporary data structures that collect the data which will be moved
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_fs/lock.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_fs/lock.c Wed Jan 21 16:22:19 2015
@@ -103,8 +103,7 @@ hash_store(apr_hash_t *hash,
of that value (if it exists). */
static const char *
hash_fetch(apr_hash_t *hash,
- const char *key,
- apr_pool_t *pool)
+ const char *key)
{
svn_string_t *str = svn_hash_gets(hash, key);
return str ? str->data : NULL;
@@ -284,7 +283,7 @@ read_digest_file(apr_hash_t **children_p
/* If our caller cares, see if we have a lock path in our hash. If
so, we'll assume we have a lock here. */
- val = hash_fetch(hash, PATH_KEY, pool);
+ val = hash_fetch(hash, PATH_KEY);
if (val && lock_p)
{
const char *path = val;
@@ -293,30 +292,30 @@ read_digest_file(apr_hash_t **children_p
lock = svn_lock_create(pool);
lock->path = path;
- if (! ((lock->token = hash_fetch(hash, TOKEN_KEY, pool))))
+ if (! ((lock->token = hash_fetch(hash, TOKEN_KEY))))
return svn_error_trace(err_corrupt_lockfile(fs_path, path));
- if (! ((lock->owner = hash_fetch(hash, OWNER_KEY, pool))))
+ if (! ((lock->owner = hash_fetch(hash, OWNER_KEY))))
return svn_error_trace(err_corrupt_lockfile(fs_path, path));
- if (! ((val = hash_fetch(hash, IS_DAV_COMMENT_KEY, pool))))
+ if (! ((val = hash_fetch(hash, IS_DAV_COMMENT_KEY))))
return svn_error_trace(err_corrupt_lockfile(fs_path, path));
lock->is_dav_comment = (val[0] == '1');
- if (! ((val = hash_fetch(hash, CREATION_DATE_KEY, pool))))
+ if (! ((val = hash_fetch(hash, CREATION_DATE_KEY))))
return svn_error_trace(err_corrupt_lockfile(fs_path, path));
SVN_ERR(svn_time_from_cstring(&(lock->creation_date), val, pool));
- if ((val = hash_fetch(hash, EXPIRATION_DATE_KEY, pool)))
+ if ((val = hash_fetch(hash, EXPIRATION_DATE_KEY)))
SVN_ERR(svn_time_from_cstring(&(lock->expiration_date), val, pool));
- lock->comment = hash_fetch(hash, COMMENT_KEY, pool);
+ lock->comment = hash_fetch(hash, COMMENT_KEY);
*lock_p = lock;
}
/* If our caller cares, see if we have any children for this path. */
- val = hash_fetch(hash, CHILDREN_KEY, pool);
+ val = hash_fetch(hash, CHILDREN_KEY);
if (val && children_p)
{
apr_array_header_t *kiddos = svn_cstring_split(val, "\n", FALSE, pool);
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_fs/revprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_fs/revprops.c?rev=1653578&r1=1653577&r2=1653578&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_fs/revprops.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_fs/revprops.c Wed Jan 21 16:22:19 2015
@@ -208,7 +208,9 @@ parse_revprop(apr_hash_t **properties,
svn_stream_t *stream = svn_stream_from_string(content, scratch_pool);
*properties = apr_hash_make(pool);
- SVN_ERR(svn_hash_read2(*properties, stream, SVN_HASH_TERMINATOR, pool));
+ SVN_ERR_W(svn_hash_read2(*properties, stream, SVN_HASH_TERMINATOR, pool),
+ apr_psprintf(scratch_pool, "Failed to parse revprops for r%ld.",
+ revision));
return SVN_NO_ERROR;
}