You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2015/08/13 17:54:56 UTC
svn commit: r1695730 [1/9] - in /subversion/branches/move-tracking-2: ./
build/ build/ac-macros/ notes/ subversion/
subversion/bindings/javahl/native/ subversion/bindings/swig/
subversion/include/ subversion/include/private/ subversion/libsvn_client/
s...
Author: julianfoad
Date: Thu Aug 13 15:54:54 2015
New Revision: 1695730
URL: http://svn.apache.org/r1695730
Log:
On the 'move-tracking-2' branch: catch up to trunk@1695728.
Added:
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/batch_fsync.c
- copied unchanged from r1695728, subversion/trunk/subversion/libsvn_fs_x/batch_fsync.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/batch_fsync.h
- copied unchanged from r1695728, subversion/trunk/subversion/libsvn_fs_x/batch_fsync.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/dag_cache.c
- copied unchanged from r1695728, subversion/trunk/subversion/libsvn_fs_x/dag_cache.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/dag_cache.h
- copied unchanged from r1695728, subversion/trunk/subversion/libsvn_fs_x/dag_cache.h
subversion/branches/move-tracking-2/subversion/libsvn_subr/cache-null.c
- copied unchanged from r1695728, subversion/trunk/subversion/libsvn_subr/cache-null.c
subversion/branches/move-tracking-2/tools/dist/security/
- copied from r1695728, subversion/trunk/tools/dist/security/
Removed:
subversion/branches/move-tracking-2/tools/dist/_gnupg.py
Modified:
subversion/branches/move-tracking-2/ (props changed)
subversion/branches/move-tracking-2/CHANGES (contents, props changed)
subversion/branches/move-tracking-2/INSTALL (contents, props changed)
subversion/branches/move-tracking-2/build/ (props changed)
subversion/branches/move-tracking-2/build/ac-macros/apache.m4
subversion/branches/move-tracking-2/notes/ (props changed)
subversion/branches/move-tracking-2/subversion/ (props changed)
subversion/branches/move-tracking-2/subversion/bindings/javahl/native/SVNRepos.cpp
subversion/branches/move-tracking-2/subversion/bindings/swig/svn_client.i
subversion/branches/move-tracking-2/subversion/include/private/svn_cache.h
subversion/branches/move-tracking-2/subversion/include/private/svn_dep_compat.h
subversion/branches/move-tracking-2/subversion/include/private/svn_mutex.h
subversion/branches/move-tracking-2/subversion/include/private/svn_ra_svn_private.h
subversion/branches/move-tracking-2/subversion/include/private/svn_temp_serializer.h
subversion/branches/move-tracking-2/subversion/include/svn_client.h
subversion/branches/move-tracking-2/subversion/include/svn_repos.h
subversion/branches/move-tracking-2/subversion/libsvn_client/diff.c
subversion/branches/move-tracking-2/subversion/libsvn_client/patch.c
subversion/branches/move-tracking-2/subversion/libsvn_client/resolved.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/caching.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/util.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/verify.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/ (props changed)
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/cached_data.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/cached_data.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/caching.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/changes.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/changes.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/dag.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/dag.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs_x.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs_x.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/hotcopy.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/hotcopy.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/index.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/index.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/lock.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/lock.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/low_level.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/low_level.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/noderevs.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/noderevs.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/pack.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/pack.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/recovery.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/recovery.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/reps.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/reps.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/rev_file.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/rev_file.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/string_table.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/string_table.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/temp_serializer.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/temp_serializer.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/transaction.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/transaction.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/tree.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/tree.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/util.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/util.h
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/verify.c
subversion/branches/move-tracking-2/subversion/libsvn_fs_x/verify.h
subversion/branches/move-tracking-2/subversion/libsvn_ra_svn/client.c
subversion/branches/move-tracking-2/subversion/libsvn_ra_svn/editorp.c
subversion/branches/move-tracking-2/subversion/libsvn_ra_svn/marshal.c
subversion/branches/move-tracking-2/subversion/libsvn_repos/deprecated.c
subversion/branches/move-tracking-2/subversion/libsvn_repos/dump.c
subversion/branches/move-tracking-2/subversion/libsvn_repos/load-fs-vtable.c
subversion/branches/move-tracking-2/subversion/libsvn_subr/cache-membuffer.c
subversion/branches/move-tracking-2/subversion/libsvn_subr/deprecated.c
subversion/branches/move-tracking-2/subversion/libsvn_subr/io.c
subversion/branches/move-tracking-2/subversion/libsvn_subr/mergeinfo.c
subversion/branches/move-tracking-2/subversion/libsvn_subr/mutex.c
subversion/branches/move-tracking-2/subversion/libsvn_subr/stream.c
subversion/branches/move-tracking-2/subversion/libsvn_subr/temp_serializer.c
subversion/branches/move-tracking-2/subversion/mod_authz_svn/mod_authz_svn.c
subversion/branches/move-tracking-2/subversion/svn/help-cmd.c
subversion/branches/move-tracking-2/subversion/svnadmin/svnadmin.c
subversion/branches/move-tracking-2/subversion/svnserve/svnserve.c
subversion/branches/move-tracking-2/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
subversion/branches/move-tracking-2/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
subversion/branches/move-tracking-2/subversion/tests/cmdline/patch_tests.py
subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py
subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/verify.py
subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/fs-test.c
subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_x/ (props changed)
subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_x/fs-x-pack-test.c
subversion/branches/move-tracking-2/subversion/tests/libsvn_repos/dump-load-test.c
subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/cache-test.c
subversion/branches/move-tracking-2/tools/ (props changed)
subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh
subversion/branches/move-tracking-2/tools/dist/rat-excludes
subversion/branches/move-tracking-2/tools/dist/release.py
Propchange: subversion/branches/move-tracking-2/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 13 15:54:54 2015
@@ -1,4 +1,4 @@
-/subversion/branches/1.10-cache-improvements:1675666-1677522,1679679,1679681,1679859
+/subversion/branches/1.10-cache-improvements:1669168-1694487
/subversion/branches/1.5.x-r30215:870312
/subversion/branches/1.7.x-fs-verify:1146708,1161180
/subversion/branches/1.9-cache-improvements:1678948-1679863
@@ -23,6 +23,7 @@
/subversion/branches/fsfs-lock-many:1571740-1577217
/subversion/branches/fsfs-pack:873717-874575
/subversion/branches/fsx:1507845-1509914
+/subversion/branches/fsx-1.10:1658219-1694500
/subversion/branches/fsx-id:1645603-1649011
/subversion/branches/gnome-keyring:870558-871410
/subversion/branches/gpg-agent-password-store:1005036-1150766
@@ -63,6 +64,7 @@
/subversion/branches/performance:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985673,985695,985697,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029090,1029092-1029093,1029111,1029151,1029158,1029229-1029230,1029232,1029335-1029336,1029339-1029340,1029342,10
29344,1030763,1030827,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365
/subversion/branches/pin-externals:1643757-1659392
/subversion/branches/py-tests-as-modules:956579-1033052
+/subversion/branches/ra-svn-tuning:1658201-1694489
/subversion/branches/ra_serf-digest-authn:875693-876404
/subversion/branches/reintegrate-improvements:873853-874164
/subversion/branches/remote-only-status:1581845-1586090
@@ -90,4 +92,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1606692-1693454
+/subversion/trunk:1606692-1695728
Modified: subversion/branches/move-tracking-2/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/CHANGES?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/CHANGES (original)
+++ subversion/branches/move-tracking-2/CHANGES Thu Aug 13 15:54:54 2015
@@ -9,7 +9,6 @@ http://svn.apache.org/repos/asf/subversi
- Major new features:
* fsfs: new format 7 with more efficient on-disk layout (r1547045 et al)
- * resolve: improve interactive conflict resolution menus
* blame: support showing prospective as well as previous changes
* info: support printing of individual values with --show-item (r1662620)
* svn auth: new subcommand to manage cached credentials and certs
@@ -137,7 +136,6 @@ http://svn.apache.org/repos/asf/subversi
* svnfsfs: new expert tool (r1594860)
* mod_dav_svn: allow server admin to GET the FSFS global cache stats
(r1595160)
- * patch: support of svn:mergeinfo (issue #3747)
* diff: support git-like binary file diffs with '--git' (r1599552)
* diff: support arbitrary context size for internal diff tool with
'-U' option (r1603847, 1603871)
@@ -167,6 +165,7 @@ http://svn.apache.org/repos/asf/subversi
* svnadmin setrevprop: add '--transaction' option (r1631435)
* svnadmin delrevprop: new subcommand (1592723)
* svnadmin verify: validate the index data against checksums (r1631598)
+ * svnadmin verify: new option '--metadata-only' (r1593753)
* cp: improve performance of local copies (r1632284, et al)
* fsfs: speed up operations that use revision properties (r1634875,
r1634879)
@@ -175,8 +174,7 @@ http://svn.apache.org/repos/asf/subversi
* patch: improve command to be more capable as compared to GNU patch
(issue #4533)
* limit server caches to avoid running out of memory if server admin
- configured caches largely then they can possibly be on the platform
- (r1645572)
+ configured caches larger than supported by the platform (r1645572)
* mod_authz_svn: log implicit read access failures with INFO log level;
Explicit read access failures are still logged with ERROR log level
(r1653032)
@@ -335,7 +333,6 @@ http://svn.apache.org/repos/asf/subversi
* svnserve: fix potential integer overflow in Cyrus SASL support (r1570434)
* bdb: fix potential integer overflow and underflow (r1570701)
* bdb: prevent silent propogation of some corruption (r1570778)
- * svnadmin verify: new option '--metadata-only' (r1593753)
* svnadmin hotcopy: do not corrupt db/current contents when copying old
FSFS repos (r1603485)
* svnadmin hotcopy: don't produce broken copies when a concurrent pack
@@ -749,6 +746,9 @@ http://svn.apache.org/repos/asf/subversi
of user and revision after 'svn up' (r1680242)
- Server-side bugfixes:
+ * mod_authz_svn: do not leak information in mixed anonymous/authenticated
+ httpd (dav) configurations (CVE-2015-3184)
+ * do not leak paths that were hidden by path-based authz (CVE-2015-3187)
* mod_dav_svn: do not ignore skel parsing errors (r1658168)
* detect invalid svndiff data earlier (r1684077)
* prevent possible repository corruption on power/disk failures (r1680819)
@@ -1599,10 +1599,17 @@ http://svn.apache.org/repos/asf/subversi
* add missing API functions to JavaHL bindings (issue #4326)
* fix some reference counting bugs in swig-py bindings (r1464899, r1466524)
+Version 1.7.22
+(12 Aug 2015, from /branches/1.7.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.7.22
+
+ Developer-visible changes:
+ - General:
+ * fix the regression test suite which was broken in 1.7.21 (r1694012)
Version 1.7.21
(5 Aug 2015, from /branches/1.7.x)
-http://svn.apache.org/repos/asf/subversion/tags/1.8.21
+http://svn.apache.org/repos/asf/subversion/tags/1.7.21
User-visible changes:
- Client-side bugfixes:
@@ -1611,6 +1618,9 @@ http://svn.apache.org/repos/asf/subversi
non-deltas dumpfile (r1652182 et al.)
- Server-side bugfixes:
+ * mod_authz_svn: do not leak information in mixed anonymous/authenticated
+ httpd (dav) configurations (CVE-2015-3184)
+ * do not leak paths that were hidden by path-based authz (CVE-2015-3187)
* fix 'svnadmin recover' for pre-1.4 FSFS repositories (r1561419)
Developer-visible changes:
Propchange: subversion/branches/move-tracking-2/CHANGES
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 13 15:54:54 2015
@@ -86,4 +86,4 @@
/subversion/branches/verify-at-commit/CHANGES:1462039-1462408
/subversion/branches/verify-keep-going/CHANGES:1439280-1546110
/subversion/branches/wc-collate-path/CHANGES:1402685-1480384
-/subversion/trunk/CHANGES:1606692-1692852
+/subversion/trunk/CHANGES:1606692-1695728
Modified: subversion/branches/move-tracking-2/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/INSTALL?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/INSTALL (original)
+++ subversion/branches/move-tracking-2/INSTALL Thu Aug 13 15:54:54 2015
@@ -955,6 +955,8 @@ II. INSTALLATION
*Note: Use "call ms\do_nasm" if you have nasm instead of MASM, or
"call ms\do_ms" if you don't have an assembler.
+ Also if you are using OpenSSL >= 1.0.0 masm is no longer
+ supported. You will have to use do_nasm or do_ms in this case.
Apache 2
Propchange: subversion/branches/move-tracking-2/INSTALL
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 13 15:54:54 2015
@@ -87,4 +87,4 @@
/subversion/branches/verify-at-commit/INSTALL:1462039-1462408
/subversion/branches/verify-keep-going/INSTALL:1439280-1546110
/subversion/branches/wc-collate-path/INSTALL:1402685-1480384
-/subversion/trunk/INSTALL:1606692-1692852
+/subversion/trunk/INSTALL:1606692-1695728
Propchange: subversion/branches/move-tracking-2/build/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 13 15:54:54 2015
@@ -82,4 +82,4 @@
/subversion/branches/verify-at-commit/build:1462039-1462408
/subversion/branches/verify-keep-going/build:1439280-1546110
/subversion/branches/wc-collate-path/build:1402685-1480384
-/subversion/trunk/build:1606692-1693454
+/subversion/trunk/build:1606692-1695728
Modified: subversion/branches/move-tracking-2/build/ac-macros/apache.m4
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/build/ac-macros/apache.m4?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/build/ac-macros/apache.m4 (original)
+++ subversion/branches/move-tracking-2/build/ac-macros/apache.m4 Thu Aug 13 15:54:54 2015
@@ -164,19 +164,42 @@ if test -n "$APXS" && test "$APXS" != "n
AC_CHECK_HEADERS(unistd.h, [AC_CHECK_FUNCS(getpid)], [])
+ MMN_MAJOR=`$SED -ne '/^#define MODULE_MAGIC_NUMBER_MAJOR/p' "$APXS_INCLUDE/ap_mmn.h" | $SED -e 's/^.*MAJOR *//'`
+ MMN_MINOR=`$SED -ne '/^#define MODULE_MAGIC_NUMBER_MINOR/p' "$APXS_INCLUDE/ap_mmn.h" | $SED -e 's/^.*MINOR *//' | $SED -e 's/ .*//'`
+ if test "$MMN_MAJOR" = "20120211" && test "$MMN_MINOR" -lt "47" ; then
+ # This is httpd 2.4 and it doesn't appear to have the required
+ # API but the installation may have been patched.
+ AC_ARG_ENABLE(broken-httpd-auth,
+ AS_HELP_STRING([--enable-broken-httpd-auth],
+ [Force build against httpd 2.4 with broken auth]),
+ [broken_httpd_auth=$enableval],[broken_httpd_auth=no])
+ AC_MSG_CHECKING([for ap_some_authn_required])
+ old_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $APACHE_INCLUDES $SVN_APR_INCLUDES"
+ AC_EGREP_CPP([int.*\sap_some_authn_required\s*\(],
+ [#include "http_request.h"],
+ [AC_MSG_RESULT([yes])
+ working_auth=yes],
+ [AC_MSG_RESULT([no])])
+ CPPFLAGS="$old_CPPFLAGS"
+ if test "$working_auth" = "yes" ; then
+ AC_DEFINE(SVN_USE_FORCE_AUTHN, 1,
+ [Defined to build with patched httpd 2.4 and working auth])
+ elif test "$enable_broken_httpd_auth" = "yes"; then
+ AC_MSG_WARN([==============================================])
+ AC_MSG_WARN([Apache httpd $HTTPD_VERSION MMN $MMN_MAJOR.$MMN_MINOR])
+ AC_MSG_WARN([Subversion will be vulnerable to CVE-2015-3184])
+ AC_MSG_WARN([==============================================])
+ AC_DEFINE(SVN_ALLOW_BROKEN_HTTPD_AUTH, 1,
+ [Defined to build against httpd 2.4 with broken auth])
+ else
+ AC_MSG_ERROR([Apache httpd $HTTPD_VERSION MMN $MMN_MAJOR.$MMN_MINOR has broken auth (CVE-2015-3184)])
+ fi
+ fi
+
BUILD_APACHE_RULE=apache-mod
INSTALL_APACHE_RULE=install-mods-shared
INSTALL_APACHE_MODS=true
- AC_ARG_ENABLE(broken-httpd-auth,
- AS_HELP_STRING([--enable-broken-httpd-auth],
- [Allow building against httpd 2.4 with broken auth]),
- [broken_httpd_auth=$enableval],[broken_httpd_auth=no])
- if test "$enable_broken_httpd_auth" = "yes"; then
- AC_MSG_NOTICE([Building with broken httpd auth])
- AC_DEFINE(SVN_ALLOW_BROKEN_HTTPD_AUTH, 1,
- [Defined to allow building against httpd 2.4 with broken auth])
- fi
-
case $host in
*-*-cygwin*)
APACHE_LDFLAGS="-shrext .so"
Propchange: subversion/branches/move-tracking-2/notes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 13 15:54:54 2015
@@ -9,6 +9,7 @@
/subversion/branches/fs-rep-sharing/notes:869036-873803
/subversion/branches/fsfs-lock-many/notes:1571740-1577217
/subversion/branches/fsfs-pack/notes:873717-874575
+/subversion/branches/fsx-1.10/notes:1658219-1694500
/subversion/branches/gnome-keyring/notes:870558-871410
/subversion/branches/http-protocol-v2/notes:874395-876041
/subversion/branches/in-memory-cache/notes:869829-871452
@@ -39,4 +40,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:1606692-1660163
+/subversion/trunk/notes:1606692-1695728
Propchange: subversion/branches/move-tracking-2/subversion/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 13 15:54:54 2015
@@ -82,4 +82,4 @@
/subversion/branches/verify-at-commit/subversion:1462039-1462408
/subversion/branches/verify-keep-going/subversion:1439280-1546110
/subversion/branches/wc-collate-path/subversion:1402685-1480384
-/subversion/trunk/subversion:1606692-1693454
+/subversion/trunk/subversion:1606692-1695728
Modified: subversion/branches/move-tracking-2/subversion/bindings/javahl/native/SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/bindings/javahl/native/SVNRepos.cpp?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/bindings/javahl/native/SVNRepos.cpp (original)
+++ subversion/branches/move-tracking-2/subversion/bindings/javahl/native/SVNRepos.cpp Thu Aug 13 15:54:54 2015
@@ -240,8 +240,9 @@ void SVNRepos::dump(File &path, OutputSt
" (%ld)"), youngest), );
}
- SVN_JNI_ERR(svn_repos_dump_fs3(repos, dataOut.getStream(requestPool),
+ SVN_JNI_ERR(svn_repos_dump_fs4(repos, dataOut.getStream(requestPool),
lower, upper, incremental, useDeltas,
+ true, true,
notifyCallback != NULL
? ReposNotifyCallback::notify
: NULL,
Modified: subversion/branches/move-tracking-2/subversion/bindings/swig/svn_client.i
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/bindings/swig/svn_client.i?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/bindings/swig/svn_client.i (original)
+++ subversion/branches/move-tracking-2/subversion/bindings/swig/svn_client.i Thu Aug 13 15:54:54 2015
@@ -442,13 +442,13 @@ Callback: svn_client_diff_summarize_func
self = apr_palloc(pool, sizeof(*self));
self->path = path ? apr_pstrdup(pool, path) : NULL;
- revision = apr_palloc(pool, sizeof(revision));
+ revision = apr_palloc(pool, sizeof(*revision));
revision->kind = rev->kind;
revision->value.number = rev->value.number;
revision->value.date = rev->value.date;
self->revision = revision;
- peg_revision = apr_palloc(pool, sizeof(peg_revision));
+ peg_revision = apr_palloc(pool, sizeof(*peg_revision));
peg_revision->kind = peg_rev->kind;
peg_revision->value.number = peg_rev->value.number;
peg_revision->value.date = peg_rev->value.date;
Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_cache.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_cache.h?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/private/svn_cache.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/private/svn_cache.h Thu Aug 13 15:54:54 2015
@@ -356,7 +356,12 @@ svn_cache__membuffer_cache_create(svn_me
*
* If @a thread_safe is true, and APR is compiled with threads, all
* accesses to the cache will be protected with a mutex, if the shared
- * @a memcache has also been created with thread_safe flag set.
+ * @a membuffer has also been created with thread_safe flag set.
+ *
+ * If @a short_lived is set, assume that the data stored through this
+ * cache will probably only be needed for a short period of time.
+ * Typically, some UUID is used as part of the prefix in that scenario.
+ * This flag is a mere hint and does not affect functionality.
*
* These caches do not support svn_cache__iter.
*/
@@ -369,10 +374,24 @@ svn_cache__create_membuffer_cache(svn_ca
const char *prefix,
apr_uint32_t priority,
svn_boolean_t thread_safe,
+ svn_boolean_t short_lived,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
+ * Creates a null-cache instance in @a *cache_p, allocated from
+ * @a result_pool. The given @c id is the only data stored in it and can
+ * be retrieved through svn_cache__get_info().
+ *
+ * The cache object will immediately evict (reject) any data being added
+ * to it and will always report as empty.
+ */
+svn_error_t *
+svn_cache__create_null(svn_cache__t **cache_p,
+ const char *id,
+ apr_pool_t *result_pool);
+
+/**
* Sets @a handler to be @a cache's error handling routine. If any
* error is returned from a call to svn_cache__get or svn_cache__set, @a
* handler will be called with @a baton and the error, and the
Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_dep_compat.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_dep_compat.h?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/private/svn_dep_compat.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/private/svn_dep_compat.h Thu Aug 13 15:54:54 2015
@@ -90,12 +90,8 @@ extern "C" {
|| (defined(__APPLE__) && defined(__MACH__))) /* UNIX-style OS? */
# include <unistd.h>
# if defined(_POSIX_VERSION)
-# define SVN_ON_POSIX 1
-# else
-# define SVN_ON_POSIX 0
+# define SVN_ON_POSIX
# endif
-#else
-# define SVN_ON_POSIX 0
#endif
#endif
Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_mutex.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_mutex.h?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/private/svn_mutex.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/private/svn_mutex.h Thu Aug 13 15:54:54 2015
@@ -104,6 +104,17 @@ do {
SVN_ERR(svn_mutex__unlock(svn_mutex__m, (expr))); \
} while (0)
+#if APR_HAS_THREADS
+
+/** Return the APR mutex encapsulated in @a mutex.
+ *
+ * @note This function should only be called by APR wrapper code.
+ */
+apr_thread_mutex_t *
+svn_mutex__get(svn_mutex__t *mutex);
+
+#endif
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_ra_svn_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_ra_svn_private.h?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/private/svn_ra_svn_private.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/private/svn_ra_svn_private.h Thu Aug 13 15:54:54 2015
@@ -347,7 +347,7 @@ svn_error_t *
svn_ra_svn__write_cmd_open_root(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
svn_revnum_t rev,
- const char *token);
+ const svn_string_t *token);
/** Send a "delete-entry" command over connection @a conn. Delete the
* @a path at optional revision @a rev below @a parent_token.
@@ -358,7 +358,7 @@ svn_ra_svn__write_cmd_delete_entry(svn_r
apr_pool_t *pool,
const char *path,
svn_revnum_t rev,
- const char *parent_token);
+ const svn_string_t *parent_token);
/** Send a "add-dir" command over connection @a conn. Add a new directory
* node named @a path under the directory identified by @a parent_token.
@@ -370,8 +370,8 @@ svn_error_t *
svn_ra_svn__write_cmd_add_dir(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *path,
- const char *parent_token,
- const char *token,
+ const svn_string_t *parent_token,
+ const svn_string_t *token,
const char *copy_path,
svn_revnum_t copy_rev);
@@ -384,8 +384,8 @@ svn_error_t *
svn_ra_svn__write_cmd_open_dir(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *path,
- const char *parent_token,
- const char *token,
+ const svn_string_t *parent_token,
+ const svn_string_t *token,
svn_revnum_t rev);
/** Send a "change-dir-prop" command over connection @a conn. Set the
@@ -395,7 +395,7 @@ svn_ra_svn__write_cmd_open_dir(svn_ra_sv
svn_error_t *
svn_ra_svn__write_cmd_change_dir_prop(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
- const char *token,
+ const svn_string_t *token,
const char *name,
const svn_string_t *value);
@@ -406,7 +406,7 @@ svn_ra_svn__write_cmd_change_dir_prop(sv
svn_error_t *
svn_ra_svn__write_cmd_close_dir(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
- const char *token);
+ const svn_string_t *token);
/** Send a "absent-dir" command over connection @a conn. Directory node
* named @a path under the directory identified by @a parent_token is
@@ -416,7 +416,7 @@ svn_error_t *
svn_ra_svn__write_cmd_absent_dir(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *path,
- const char *parent_token);
+ const svn_string_t *parent_token);
/** Send a "add-file" command over connection @a conn. Add a new file
* node named @a path under the directory identified by @a parent_token.
@@ -428,8 +428,8 @@ svn_error_t *
svn_ra_svn__write_cmd_add_file(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *path,
- const char *parent_token,
- const char *token,
+ const svn_string_t *parent_token,
+ const svn_string_t *token,
const char *copy_path,
svn_revnum_t copy_rev);
@@ -442,8 +442,8 @@ svn_error_t *
svn_ra_svn__write_cmd_open_file(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *path,
- const char *parent_token,
- const char *token,
+ const svn_string_t *parent_token,
+ const svn_string_t *token,
svn_revnum_t rev);
/** Send a "change-file-prop" command over connection @a conn. Set the
@@ -453,7 +453,7 @@ svn_ra_svn__write_cmd_open_file(svn_ra_s
svn_error_t *
svn_ra_svn__write_cmd_change_file_prop(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
- const char *token,
+ const svn_string_t *token,
const char *name,
const svn_string_t *value);
@@ -465,7 +465,7 @@ svn_ra_svn__write_cmd_change_file_prop(s
svn_error_t *
svn_ra_svn__write_cmd_close_file(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
- const char *token,
+ const svn_string_t *token,
const char *text_checksum);
/** Send a "absent-file" command over connection @a conn. File node
@@ -476,7 +476,7 @@ svn_error_t *
svn_ra_svn__write_cmd_absent_file(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *path,
- const char *parent_token);
+ const svn_string_t *parent_token);
/** Send a "apply-textdelta" command over connection @a conn. Starts a
* series of text deltas to be applied to the file identified by @a token.
@@ -486,7 +486,7 @@ svn_ra_svn__write_cmd_absent_file(svn_ra
svn_error_t *
svn_ra_svn__write_cmd_apply_textdelta(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
- const char *token,
+ const svn_string_t *token,
const char *base_checksum);
/** Send a "textdelta-chunk" command over connection @a conn. Apply
@@ -496,7 +496,7 @@ svn_ra_svn__write_cmd_apply_textdelta(sv
svn_error_t *
svn_ra_svn__write_cmd_textdelta_chunk(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
- const char *token,
+ const svn_string_t *token,
const svn_string_t *chunk);
/** Send a "textdelta-end" command over connection @a conn. Ends the
@@ -506,7 +506,7 @@ svn_ra_svn__write_cmd_textdelta_chunk(sv
svn_error_t *
svn_ra_svn__write_cmd_textdelta_end(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
- const char *token);
+ const svn_string_t *token);
/** Send a "close-edit" command over connection @a conn. Ends the editor
* drive (successfully). Use @a pool for allocations.
@@ -790,7 +790,7 @@ svn_error_t *
svn_ra_svn__write_cmd_unlock(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *path,
- const char *token,
+ const svn_string_t *token,
svn_boolean_t break_lock);
/** Send a "get-lock" command over connection @a conn.
Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_temp_serializer.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_temp_serializer.h?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/private/svn_temp_serializer.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/private/svn_temp_serializer.h Thu Aug 13 15:54:54 2015
@@ -206,7 +206,7 @@ svn_temp_serializer__get(svn_temp_serial
* the pointer to resolve in @a ptr.
*/
void
-svn_temp_deserializer__resolve(void *buffer, void **ptr);
+svn_temp_deserializer__resolve(const void *buffer, void **ptr);
/**
* Similar to svn_temp_deserializer__resolve() but instead of modifying
Modified: subversion/branches/move-tracking-2/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/svn_client.h?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/svn_client.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/svn_client.h Thu Aug 13 15:54:54 2015
@@ -4361,8 +4361,18 @@ svn_client_revert(const apr_array_header
* @{
*/
+/**
+ * An opaque type which represents a conflicted node in the working copy.
+ *
+ * @since New in 1.10.
+ */
typedef struct svn_client_conflict_t svn_client_conflict_t;
+/**
+ * An opaque type which represents a resolution option for a conflict.
+ *
+ * @since New in 1.10.
+ */
typedef struct svn_client_conflict_option_t svn_client_conflict_option_t;
/**
@@ -4380,13 +4390,43 @@ typedef enum svn_client_conflict_option_
svn_client_conflict_option_working_text,
svn_client_conflict_option_incoming_new_text_for_conflicted_hunks_only,
svn_client_conflict_option_working_text_for_conflicted_hunks_only,
- svn_client_conflict_option_merged_text, /* unsupported */
+ svn_client_conflict_option_merged_text,
svn_client_conflict_option_unspecified
/* Values derived from svn_wc_conflict_choice_t end here. */
} svn_client_conflict_option_id_t;
/**
+ * Set a merged property value on @a option to @a merged_propval.
+ *
+ * Setting the merged value is required before resolving the property
+ * conflict using an option with ID svn_client_conflict_option_merged_text.
+ *
+ * The contents of @a merged_propval are not copied, so the storage it
+ * points to needs to remain valid until svn_client_conflict_prop_resolve()
+ * has been called with @a option.
+ *
+ * @since New in 1.10.
+ */
+void
+svn_client_conflict_option_set_merged_propval(
+ svn_client_conflict_option_t *option,
+ const svn_string_t *merged_propval);
+
+/**
+ * Given an @a option_id, try to find the corresponding option in @a options,
+ * which is an array of svn_client_conflict_option_t * elements.
+ *
+ * Return NULL if no corresponding option can be be found.
+ *
+ * @since New in 1.10.
+ */
+svn_client_conflict_option_t *
+svn_client_conflict_option_find_by_id(
+ apr_array_header_t *options,
+ svn_client_conflict_option_id_t option_id);
+
+/**
* Return a conflict for the conflicted path @a local_abspath.
*
* @since New in 1.10.
@@ -4411,12 +4451,43 @@ svn_client_conflict_from_wc_description2
apr_pool_t *scratch_pool);
/**
+ * Callback for svn_client_conflict_walk_conflicts();
+ *
+ * @since New in 1.10.
+ */
+typedef svn_error_t *(svn_client_conflict_walk_func_t)(
+ void *baton,
+ svn_client_conflict_t *conflict,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Walk all conflicts within the specified @a depth of @a local_abspath.
+ * Pass each conflict found during the walk to the @conflict_walk_func
+ * callback, along with @a conflict_walk_func_baton.
+ * Use cancellation and notification support provided by client context @a ctx.
+ *
+ * This callback may choose to resolve the conflict. If the act of resolving
+ * a conflict creates new conflicts within the walked working copy (as might
+ * be the case for some tree conflicts), the callback will be invoked for each
+ * such new conflict as well.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_walk(const char *local_abspath,
+ svn_depth_t depth,
+ svn_client_conflict_walk_func_t conflict_walk_func,
+ void *conflict_walk_func_baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
+/**
* Indicate the types of conflicts present on the working copy node
* described by @a conflict. Any output argument may be @c NULL if
* the caller is not interested in the status of a particular type.
*
* The returned @a *props_conflicted array is allocated in @a result_pool.
-* It contains the names of conflicted properties. If no property conflit
+* It contains the names of conflicted properties. If no property conflict
* exists, the array will contain no elements.
*
* @since New in 1.10.
@@ -4494,16 +4565,6 @@ svn_client_conflict_option_describe(cons
apr_pool_t *scratch_pool);
/**
- * Resolve @a conflict using resolution option @a option.
- *
- * @since New in 1.10.
- */
-svn_error_t *
-svn_client_conflict_resolve(svn_client_conflict_t *conflict,
- svn_client_conflict_option_t *option,
- apr_pool_t *scratch_pool);
-
-/**
* Return the kind of conflict (text conflict, property conflict,
* or tree conflict) represented by @a conflict.
*
@@ -4631,6 +4692,40 @@ svn_client_conflict_tree_get_victim_node
const svn_client_conflict_t *conflict);
/**
+ * Resolve a tree @a conflict using resolution option @a option.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_tree_resolve(svn_client_conflict_t *conflict,
+ svn_client_conflict_option_t *option,
+ apr_pool_t *scratch_pool);
+
+/**
+ * If the provided @a option_id is the ID of an option which resolves
+ * @a conflict, resolve the tree conflict using that option.
+ * Else, return an error.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_tree_resolve_by_id(
+ svn_client_conflict_t *conflict,
+ svn_client_conflict_option_id_t option_id,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Return the ID of the option this tree @a conflict has been resolved to.
+ * If the conflict has not been resolved yet, then return
+ * @c svn_client_conflict_option_undefined.
+ *
+ * @since New in 1.10.
+ */
+svn_client_conflict_option_id_t
+svn_client_conflict_tree_get_resolution(const svn_client_conflict_t *conflict);
+
+
+/**
* Return the name of the conflicted property represented by @a conflict.
*
* @since New in 1.10.
@@ -4671,6 +4766,44 @@ svn_client_conflict_prop_get_propvals(co
apr_pool_t *result_pool);
/**
+ * Resolve a property @a conflict in property @a propname using resolution
+ * option @a option. To resolve all properties to the same option at once,
+ * set @a propname to the empty string "".
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_prop_resolve(svn_client_conflict_t *conflict,
+ const char *propname,
+ svn_client_conflict_option_t *option,
+ apr_pool_t *scratch_pool);
+/**
+ * If the provided @a option_id is the ID of an option which resolves
+ * @a conflict, resolve the property conflict in property @a propname
+ * using that option. Else, return an error.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_prop_resolve_by_id(
+ svn_client_conflict_t *conflict,
+ const char *propname,
+ svn_client_conflict_option_id_t option_id,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Return the ID of the option this property @a conflict in property
+ * @a propname has been resolved to.
+ * If the conflict has not been resolved yet, then return
+ * @c svn_client_conflict_option_undefined.
+ *
+ * @since New in 1.10.
+ */
+svn_client_conflict_option_id_t
+svn_client_conflict_prop_get_resolution(const svn_client_conflict_t *conflict,
+ const char *propname);
+
+/**
* Return the MIME-type of the working version of the text-conflicted file
* described by @a conflict.
*
@@ -4698,6 +4831,39 @@ svn_client_conflict_text_get_contents(co
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
+/**
+ * Resolve a text @a conflict using resolution option @a option.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_text_resolve(svn_client_conflict_t *conflict,
+ svn_client_conflict_option_t *option,
+ apr_pool_t *scratch_pool);
+
+/**
+ * If the provided @a option_id is the ID of an option which resolves
+ * @a conflict, resolve the text conflict using that option.
+ * Else, return an error.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_text_resolve_by_id(
+ svn_client_conflict_t *conflict,
+ svn_client_conflict_option_id_t option_id,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Return the ID of the option this text @a conflict has been resolved to.
+ * If the conflict has not been resolved yet, then return
+ * @c svn_client_conflict_option_undefined.
+ *
+ * @since New in 1.10.
+ */
+svn_client_conflict_option_id_t
+svn_client_conflict_text_get_resolution(const svn_client_conflict_t *conflict);
+
/** @} */
/**
Modified: subversion/branches/move-tracking-2/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/svn_repos.h?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/svn_repos.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/svn_repos.h Thu Aug 13 15:54:54 2015
@@ -247,7 +247,10 @@ typedef enum svn_repos_notify_action_t
svn_repos_notify_hotcopy_rev_range,
/** The repository pack did not do anything. @since New in 1.10. */
- svn_repos_notify_pack_noop
+ svn_repos_notify_pack_noop,
+
+ /** The revision properties got set. @since New in 1.10. */
+ svn_repos_notify_load_revprop_set
} svn_repos_notify_action_t;
/** The type of warning occurring.
@@ -2986,6 +2989,12 @@ svn_repos_verify_fs(svn_repos_t *repos,
* be done with full plain text. A dump with @a use_deltas set cannot
* be loaded by Subversion 1.0.x.
*
+ * If @a include_revprops is @c TRUE, output the revision properties as
+ * well, otherwise omit them.
+ *
+ * If @a include_changes is @c TRUE, output the revision contents, i.e.
+ * tree and node changes.
+ *
* If @a notify_func is not null, then call it with @a notify_baton and
* with a notification structure in which the fields are set as follows.
* (For a warning or error notification that does not apply to a specific
@@ -3017,8 +3026,31 @@ svn_repos_verify_fs(svn_repos_t *repos,
*
* Use @a scratch_pool for temporary allocation.
*
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_repos_dump_fs4(svn_repos_t *repos,
+ svn_stream_t *stream,
+ svn_revnum_t start_rev,
+ svn_revnum_t end_rev,
+ svn_boolean_t incremental,
+ svn_boolean_t use_deltas,
+ svn_boolean_t include_revprops,
+ svn_boolean_t include_changes,
+ svn_repos_notify_func_t notify_func,
+ void *notify_baton,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *pool);
+
+/**
+ * Similar to svn_repos_dump_fs4(), but with @a include_revprops and
+ * @a include_changes both set to @c TRUE.
+ *
* @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.9 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_repos_dump_fs3(svn_repos_t *repos,
svn_stream_t *dumpstream,
@@ -3222,6 +3254,52 @@ svn_repos_load_fs(svn_repos_t *repos,
void *cancel_baton,
apr_pool_t *pool);
+/**
+ * Read and parse dumpfile-formatted @a dumpstream, extracting the
+ * revision properties from it and apply them to the already-open
+ * @a repos. Use @a scratch_pool for temporary allocations.
+ *
+ * If, after filtering by the @a start_rev and @a end_rev, the dumpstream
+ * contains revisions missing in @a repos, an error will be thrown.
+ *
+ * @a start_rev and @a end_rev act as filters, the lower and upper
+ * (inclusive) range values of revisions in @a dumpstream which will
+ * be loaded. Either both of these values are #SVN_INVALID_REVNUM (in
+ * which case no revision-based filtering occurs at all), or both are
+ * valid revisions (where @a start_rev is older than or equivalent to
+ * @a end_rev).
+ *
+ * If @a validate_props is set, then validate Subversion revision
+ * 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, keeping whatever timestamps the revisions currently
+ * have.
+ *
+ * If non-NULL, use @a notify_func and @a notify_baton to send notification
+ * of events to the caller.
+ *
+ * If @a cancel_func is not @c NULL, it is called periodically with
+ * @a cancel_baton as argument to see if the client wishes to cancel
+ * the load.
+ *
+ * @remark No repository hooks will be triggered.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_repos_load_fs_revprops(svn_repos_t *repos,
+ svn_stream_t *dumpstream,
+ svn_revnum_t start_rev,
+ svn_revnum_t end_rev,
+ svn_boolean_t validate_props,
+ svn_boolean_t ignore_dates,
+ svn_repos_notify_func_t notify_func,
+ void *notify_baton,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *scratch_pool);
/**
* A vtable that is driven by svn_repos_parse_dumpstream3().
@@ -3424,7 +3502,7 @@ svn_repos_parse_dumpstream3(svn_stream_t
* @since New in 1.9.
*/
svn_error_t *
-svn_repos_get_fs_build_parser5(const svn_repos_parse_fns3_t **callbacks,
+svn_repos_get_fs_build_parser5(const svn_repos_parse_fns3_t **parser,
void **parse_baton,
svn_repos_t *repos,
svn_revnum_t start_rev,
Modified: subversion/branches/move-tracking-2/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_client/diff.c?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_client/diff.c Thu Aug 13 15:54:54 2015
@@ -259,7 +259,7 @@ print_git_diff_header_added(svn_stream_t
"diff --git a/%s b/%s%s",
path1, path2, APR_EOL_STR));
SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
- "new file mode 10644" APR_EOL_STR));
+ "new file mode 100644" APR_EOL_STR));
return SVN_NO_ERROR;
}
@@ -275,7 +275,7 @@ print_git_diff_header_deleted(svn_stream
"diff --git a/%s b/%s%s",
path1, path2, APR_EOL_STR));
SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
- "deleted file mode 10644"
+ "deleted file mode 100644"
APR_EOL_STR));
return SVN_NO_ERROR;
}
Modified: subversion/branches/move-tracking-2/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_client/patch.c?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_client/patch.c Thu Aug 13 15:54:54 2015
@@ -819,22 +819,9 @@ write_file(void *baton, const char *buf,
return SVN_NO_ERROR;
}
-/* Handling symbolic links:
- *
- * In Subversion, symlinks can be represented on disk in two distinct ways.
- * On systems which support symlinks, a symlink is created on disk.
- * On systems which do not support symlink, a file is created on disk
- * which contains the "normal form" of the symlink, which looks like:
- * link TARGET
- * where TARGET is the file the symlink points to.
- *
- * When reading symlinks (i.e. the link itself, not the file the symlink
- * is pointing to) through the svn_subst_create_specialfile() function
- * into a buffer, the buffer always contains the "normal form" of the symlink.
- * Due to this representation symlinks always contain a single line of text.
- *
- * The functions below are needed to deal with the case where a patch
- * wants to change the TARGET that a symlink points to.
+/* Symlinks appear in patches in their repository normal form, abstracted by
+ * the svn_subst_* module. The functions below enable patches to change the
+ * targets of symlinks.
*/
/* Baton for the (readline|tell|seek|write)_symlink functions. */
@@ -870,10 +857,12 @@ readline_symlink(void *baton, svn_string
}
else
{
- svn_string_t *dest;
+ svn_stream_t *stream;
+ const apr_size_t len_hint = 64; /* arbitrary */
- SVN_ERR(svn_io_read_link(&dest, sb->local_abspath, scratch_pool));
- *line = svn_stringbuf_createf(result_pool, "link %s", dest->data);
+ SVN_ERR(svn_subst_read_specialfile(&stream, sb->local_abspath,
+ scratch_pool, scratch_pool));
+ SVN_ERR(svn_stringbuf_from_stream(line, stream, len_hint, result_pool));
sb->at_eof = TRUE;
}
@@ -910,22 +899,17 @@ write_symlink(void *baton, const char *b
apr_pool_t *scratch_pool)
{
const char *target_abspath = baton;
- const char *new_name;
- const char *sym_link = apr_pstrndup(scratch_pool, buf, len);
-
- if (strncmp(sym_link, "link ", 5) != 0)
- return svn_error_create(SVN_ERR_IO_WRITE_ERROR, NULL,
- _("Invalid link representation"));
-
- sym_link += 5; /* Skip "link " */
/* We assume the entire symlink is written at once, as the patch
format is line based */
- SVN_ERR(svn_io_create_unique_link(&new_name, target_abspath, sym_link,
- ".tmp", scratch_pool));
-
- SVN_ERR(svn_io_file_rename(new_name, target_abspath, scratch_pool));
+ {
+ svn_stream_t *stream;
+ SVN_ERR(svn_subst_create_specialfile(&stream, target_abspath,
+ scratch_pool, scratch_pool));
+ SVN_ERR(svn_stream_write(stream, buf, &len));
+ SVN_ERR(svn_stream_close(stream));
+ }
return SVN_NO_ERROR;
}
Modified: subversion/branches/move-tracking-2/subversion/libsvn_client/resolved.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_client/resolved.c?rev=1695730&r1=1695729&r2=1695730&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_client/resolved.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_client/resolved.c Thu Aug 13 15:54:54 2015
@@ -157,12 +157,97 @@ struct svn_client_conflict_t
svn_client_ctx_t *ctx;
apr_hash_t *prop_conflicts;
+ /* Indicate which options were chosen to resolve a text or tree conflict
+ * on the conflited node. */
+ svn_client_conflict_option_id_t resolution_text;
+ svn_client_conflict_option_id_t resolution_tree;
+
+ /* A mapping from const char* property name to pointers to
+ * svn_client_conflict_option_t for all properties which had their
+ * conflicts resolved. Indicates which options were chosen to resolve
+ * the property conflicts. */
+ apr_hash_t *resolved_props;
+
/* For backwards compat. */
const svn_wc_conflict_description2_t *legacy_text_conflict;
const svn_wc_conflict_description2_t *legacy_prop_conflict;
const svn_wc_conflict_description2_t *legacy_tree_conflict;
};
+/* Resolves conflict to OPTION and sets CONFLICT->RESOLUTION accordingly. */
+typedef svn_error_t *(*conflict_option_resolve_func_t)(
+ svn_client_conflict_option_t *option,
+ svn_client_conflict_t *conflict,
+ apr_pool_t *scratch_pool);
+
+struct svn_client_conflict_option_t
+{
+ svn_client_conflict_option_id_t id;
+ const char *description;
+
+ svn_client_conflict_t *conflict;
+ conflict_option_resolve_func_t do_resolve_func;
+
+ /* Data which is specific to particular conflicts and options. */
+ union {
+ struct {
+ /* Indicates the property to resolve in case of a property conflict.
+ * If set to "", all properties are resolved to this option. */
+ const char *propname;
+
+ /* A merged property value, if supplied by the API user, else NULL. */
+ const svn_string_t *merged_propval;
+ } prop;
+ } type_data;
+
+};
+
+/*
+ * Return a legacy conflict choice corresponding to OPTION_ID.
+ * Return svn_wc_conflict_choose_undefined if no corresponding
+ * legacy conflict choice exists.
+ */
+static svn_wc_conflict_choice_t
+conflict_option_id_to_wc_conflict_choice(
+ svn_client_conflict_option_id_t option_id)
+{
+
+ switch (option_id)
+ {
+ case svn_client_conflict_option_undefined:
+ return svn_wc_conflict_choose_undefined;
+
+ case svn_client_conflict_option_postpone:
+ return svn_wc_conflict_choose_postpone;
+
+ case svn_client_conflict_option_base_text:
+ return svn_wc_conflict_choose_base;
+
+ case svn_client_conflict_option_incoming_new_text:
+ return svn_wc_conflict_choose_theirs_full;
+
+ case svn_client_conflict_option_working_text:
+ return svn_wc_conflict_choose_mine_full;
+
+ case svn_client_conflict_option_incoming_new_text_for_conflicted_hunks_only:
+ return svn_wc_conflict_choose_theirs_conflict;
+
+ case svn_client_conflict_option_working_text_for_conflicted_hunks_only:
+ return svn_wc_conflict_choose_mine_conflict;
+
+ case svn_client_conflict_option_merged_text:
+ return svn_wc_conflict_choose_merged;
+
+ case svn_client_conflict_option_unspecified:
+ return svn_wc_conflict_choose_unspecified;
+
+ default:
+ break;
+ }
+
+ return svn_wc_conflict_choose_undefined;
+}
+
static void
add_legacy_desc_to_conflict(const svn_wc_conflict_description2_t *desc,
svn_client_conflict_t *conflict,
@@ -206,12 +291,18 @@ conflict_get_internal(svn_client_conflic
{
/* Add a single legacy conflict descriptor. */
(*conflict)->local_abspath = desc->local_abspath;
+ (*conflict)->resolution_text = svn_client_conflict_option_undefined;
+ (*conflict)->resolution_tree = svn_client_conflict_option_undefined;
+ (*conflict)->resolved_props = apr_hash_make(result_pool);
add_legacy_desc_to_conflict(desc, *conflict, result_pool);
return SVN_NO_ERROR;
}
(*conflict)->local_abspath = apr_pstrdup(result_pool, local_abspath);
+ (*conflict)->resolution_text = svn_client_conflict_option_undefined;
+ (*conflict)->resolution_tree = svn_client_conflict_option_undefined;
+ (*conflict)->resolved_props = apr_hash_make(result_pool);
(*conflict)->ctx = ctx;
/* Add all legacy conflict descriptors we can find. Eventually, this code
@@ -257,92 +348,253 @@ svn_client_conflict_from_wc_description2
result_pool, scratch_pool));
}
-typedef svn_error_t *(*conflict_option_resolve_func_t)(
- svn_client_conflict_option_t *option,
- svn_client_conflict_t *conflict,
- apr_pool_t *scratch_pool);
+/* Baton type for conflict_resolver_func(). */
+struct conflict_resolver_baton_t {
-struct svn_client_conflict_option_t
-{
- svn_client_conflict_option_id_t id;
- const char *description;
+ svn_client_conflict_walk_func_t *conflict_walk_func;
+ void *conflict_walk_func_baton;
+ svn_client_ctx_t *ctx;
+
+} conflict_walk_baton_t;
+/* Implements svn_wc_conflict_resolver_func2_t for now because
+ * libsvn_wc does not support our new conflict type yet. */
+static svn_error_t *
+conflict_resolver_func(svn_wc_conflict_result_t **result,
+ const svn_wc_conflict_description2_t *description,
+ void *baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ struct conflict_resolver_baton_t *b = baton;
svn_client_conflict_t *conflict;
- conflict_option_resolve_func_t do_resolve_func;
-};
+ const char *local_abspath;
+ svn_client_conflict_option_id_t resolution;
+ svn_wc_conflict_choice_t conflict_choice;
+
+ local_abspath = description->local_abspath;
+ SVN_ERR(svn_client_conflict_get(&conflict, local_abspath, b->ctx,
+ scratch_pool, scratch_pool));
+
+ SVN_ERR(b->conflict_walk_func(b->conflict_walk_func_baton,
+ conflict, scratch_pool));
+
+ /* Evaluate the conflict callback result based on which kind
+ * of conflict libsvn_wc has given us. */
+ resolution = svn_client_conflict_option_undefined;
+ if (description->kind == svn_wc_conflict_kind_text)
+ resolution = conflict->resolution_text;
+ else if (description->kind == svn_wc_conflict_kind_tree)
+ resolution = conflict->resolution_tree;
+ else if (description->kind == svn_wc_conflict_kind_property)
+ {
+ svn_client_conflict_option_t *option;
+
+ option = svn_hash_gets(conflict->resolved_props,
+ description->property_name);
+ if (option == NULL)
+ return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+ _("No resolution provided for conflicted "
+ "property '%s' on path '%s'"),
+ description->property_name,
+ svn_dirent_local_style(local_abspath,
+ scratch_pool));
+
+ resolution = svn_client_conflict_option_get_id(option);
+ conflict_choice = conflict_option_id_to_wc_conflict_choice(resolution);
+ *result = svn_wc_create_conflict_result(conflict_choice, NULL,
+ result_pool);
+ if (resolution == svn_client_conflict_option_merged_text)
+ (*result)->merged_value = option->type_data.prop.merged_propval;
+
+ return SVN_NO_ERROR;
+ }
+ else
+ return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+ _("Unknown legacy conflict kind '%d'"),
+ description->kind);
+
+ if (resolution == svn_client_conflict_option_undefined)
+ return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+ _("No resolution for conflicted path '%s'"),
+ svn_dirent_local_style(local_abspath,
+ scratch_pool));
+
+ conflict_choice = conflict_option_id_to_wc_conflict_choice(resolution);
+ *result = svn_wc_create_conflict_result(conflict_choice, NULL, result_pool);
+
+ return SVN_NO_ERROR;
+}
+svn_error_t *
+svn_client_conflict_walk(const char *local_abspath,
+ svn_depth_t depth,
+ svn_client_conflict_walk_func_t conflict_walk_func,
+ void *conflict_walk_func_baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool)
+{
+ struct conflict_resolver_baton_t b;
+ const char *lock_abspath;
+ svn_error_t *err;
+
+ b.conflict_walk_func = conflict_walk_func;
+ b.conflict_walk_func_baton = conflict_walk_func_baton;
+ b.ctx = ctx;
+
+ SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx,
+ local_abspath,
+ scratch_pool, scratch_pool));
+ /* ### TODO: svn_wc__resolve_conflicts() should be changed to support
+ * ### iteration without relying on svn_wc_conflict_resolver_func2_t */
+ err = svn_wc__resolve_conflicts(ctx->wc_ctx, local_abspath,
+ depth,
+ TRUE /* resolve_text */,
+ "" /* resolve_prop (ALL props) */,
+ TRUE /* resolve_tree */,
+ svn_wc_conflict_choose_unspecified,
+ conflict_resolver_func, &b,
+ ctx->cancel_func, ctx->cancel_baton,
+ ctx->notify_func2, ctx->notify_baton2,
+ scratch_pool);
+
+ err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx,
+ lock_abspath,
+ scratch_pool));
+ svn_io_sleep_for_timestamps(local_abspath, scratch_pool);
+
+
+
+ return SVN_NO_ERROR;
+}
+
+void
+svn_client_conflict_option_set_merged_propval(
+ svn_client_conflict_option_t *option,
+ const svn_string_t *merged_propval)
+{
+ option->type_data.prop.merged_propval = merged_propval;
+}
+
+/*
+ * Resolve the conflict at LOCAL_ABSPATH. Currently only supports
+ * an OPTION_ID which can be mapped to svn_wc_conflict_choice_t and
+ * maps a single option_id to text, prop, and/or tree conflicts.
+ */
static svn_error_t *
-resolve_postpone(svn_client_conflict_option_t *option,
- svn_client_conflict_t *conflict,
+resolve_conflict(svn_client_conflict_option_id_t option_id,
+ const char *local_abspath,
+ svn_boolean_t resolve_text,
+ const char * resolve_prop,
+ svn_boolean_t resolve_tree,
+ svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
- /* Nothing to do. */
+ svn_wc_conflict_choice_t conflict_choice;
+ const char *lock_abspath;
+ svn_error_t *err;
+
+ conflict_choice = conflict_option_id_to_wc_conflict_choice(option_id);
+ SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx,
+ local_abspath,
+ scratch_pool, scratch_pool));
+ err = svn_wc__resolve_conflicts(ctx->wc_ctx, local_abspath,
+ svn_depth_empty,
+ resolve_text, resolve_prop, resolve_tree,
+ conflict_choice,
+ NULL, NULL, /* legacy conflict_func/baton */
+ ctx->cancel_func,
+ ctx->cancel_baton,
+ ctx->notify_func2,
+ ctx->notify_baton2,
+ scratch_pool);
+ err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx,
+ lock_abspath,
+ scratch_pool));
+ svn_io_sleep_for_timestamps(local_abspath, scratch_pool);
+
return SVN_NO_ERROR;
}
+/* Implements conflict_option_resolve_func_t. */
static svn_error_t *
resolve_text_conflict(svn_client_conflict_option_t *option,
svn_client_conflict_t *conflict,
apr_pool_t *scratch_pool)
{
- svn_client_conflict_option_id_t id;
+ svn_client_conflict_option_id_t option_id;
const char *local_abspath;
- id = svn_client_conflict_option_get_id(option);
+ option_id = svn_client_conflict_option_get_id(option);
local_abspath = svn_client_conflict_get_local_abspath(conflict);
+ SVN_ERR(resolve_conflict(option_id, local_abspath, TRUE, NULL, FALSE,
+ conflict->ctx, scratch_pool));
+ conflict->resolution_text = option_id;
- SVN_ERR(svn_wc_resolved_conflict5(conflict->ctx->wc_ctx, local_abspath,
- svn_depth_empty, TRUE, NULL, FALSE,
- id, /* option id is backwards compatible */
- conflict->ctx->cancel_func,
- conflict->ctx->cancel_baton,
- conflict->ctx->notify_func2,
- conflict->ctx->notify_baton2,
- scratch_pool));
return SVN_NO_ERROR;
}
+/* Implements conflict_option_resolve_func_t. */
static svn_error_t *
resolve_prop_conflict(svn_client_conflict_option_t *option,
svn_client_conflict_t *conflict,
apr_pool_t *scratch_pool)
{
- svn_client_conflict_option_id_t id;
+ svn_client_conflict_option_id_t option_id;
const char *local_abspath;
+ const char *propname = option->type_data.prop.propname;
- id = svn_client_conflict_option_get_id(option);
+ option_id = svn_client_conflict_option_get_id(option);
local_abspath = svn_client_conflict_get_local_abspath(conflict);
+ SVN_ERR(resolve_conflict(option_id, local_abspath,
+ FALSE, propname, FALSE,
+ conflict->ctx, scratch_pool));
+
+ if (propname[0] == '\0')
+ {
+ apr_hash_index_t *hi;
+
+ /* All properties have been resolved to the same option. */
+ for (hi = apr_hash_first(scratch_pool, conflict->prop_conflicts);
+ hi;
+ hi = apr_hash_next(hi))
+ {
+ const char *this_propname = apr_hash_this_key(hi);
+
+ svn_hash_sets(conflict->resolved_props,
+ apr_pstrdup(apr_hash_pool_get(conflict->resolved_props),
+ this_propname),
+ option);
+ svn_hash_sets(conflict->prop_conflicts, this_propname, NULL);
+ }
+ }
+ else
+ {
+ svn_hash_sets(conflict->resolved_props,
+ apr_pstrdup(apr_hash_pool_get(conflict->resolved_props),
+ propname),
+ option);
+ svn_hash_sets(conflict->prop_conflicts, propname, NULL);
+ }
- SVN_ERR(svn_wc_resolved_conflict5(conflict->ctx->wc_ctx, local_abspath,
- svn_depth_empty, TRUE, "", FALSE,
- id, /* option id is backwards compatible */
- conflict->ctx->cancel_func,
- conflict->ctx->cancel_baton,
- conflict->ctx->notify_func2,
- conflict->ctx->notify_baton2,
- scratch_pool));
return SVN_NO_ERROR;
}
static svn_error_t *
+/* Implements conflict_option_resolve_func_t. */
resolve_tree_conflict(svn_client_conflict_option_t *option,
svn_client_conflict_t *conflict,
apr_pool_t *scratch_pool)
{
- svn_client_conflict_option_id_t id;
+ svn_client_conflict_option_id_t option_id;
const char *local_abspath;
- id = svn_client_conflict_option_get_id(option);
+ option_id = svn_client_conflict_option_get_id(option);
local_abspath = svn_client_conflict_get_local_abspath(conflict);
+ SVN_ERR(resolve_conflict(option_id, local_abspath, FALSE, NULL, TRUE,
+ conflict->ctx, scratch_pool));
+ conflict->resolution_tree = option_id;
- SVN_ERR(svn_wc_resolved_conflict5(conflict->ctx->wc_ctx, local_abspath,
- svn_depth_empty, FALSE, NULL, TRUE,
- id, /* option id is backwards compatible */
- conflict->ctx->cancel_func,
- conflict->ctx->cancel_baton,
- conflict->ctx->notify_func2,
- conflict->ctx->notify_baton2,
- scratch_pool));
return SVN_NO_ERROR;
}
@@ -353,7 +605,7 @@ static const svn_client_conflict_option_
svn_client_conflict_option_postpone,
N_("mark the conflict to be resolved later"),
NULL,
- resolve_postpone
+ resolve_text_conflict
},
{
@@ -393,7 +645,7 @@ static const svn_client_conflict_option_
svn_client_conflict_option_postpone,
N_("mark the conflict to be resolved later"),
NULL,
- resolve_postpone
+ resolve_text_conflict,
},
{
@@ -419,7 +671,7 @@ static const svn_client_conflict_option_
svn_client_conflict_option_postpone,
N_("mark the conflict to be resolved later"),
NULL,
- resolve_postpone
+ resolve_prop_conflict
},
{
@@ -445,7 +697,7 @@ static const svn_client_conflict_option_
svn_client_conflict_option_postpone,
N_("mark the conflict to be resolved later"),
NULL,
- resolve_postpone
+ resolve_tree_conflict
},
{
@@ -597,15 +849,166 @@ svn_client_conflict_option_describe(cons
}
svn_error_t *
-svn_client_conflict_resolve(svn_client_conflict_t *conflict,
- svn_client_conflict_option_t *option,
- apr_pool_t *scratch_pool)
+svn_client_conflict_text_resolve(svn_client_conflict_t *conflict,
+ svn_client_conflict_option_t *option,
+ apr_pool_t *scratch_pool)
+{
+ SVN_ERR(assert_text_conflict(conflict, scratch_pool));
+ SVN_ERR(option->do_resolve_func(option, conflict, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+svn_client_conflict_option_t *
+svn_client_conflict_option_find_by_id(apr_array_header_t *options,
+ svn_client_conflict_option_id_t option_id)
+{
+ int i;
+
+ for (i = 0; i < options->nelts; i++)
+ {
+ svn_client_conflict_option_t *this_option;
+ svn_client_conflict_option_id_t this_option_id;
+
+ this_option = APR_ARRAY_IDX(options, i, svn_client_conflict_option_t *);
+ this_option_id = svn_client_conflict_option_get_id(this_option);
+
+ if (this_option_id == option_id)
+ return this_option;
+ }
+
+ return NULL;
+}
+
+svn_error_t *
+svn_client_conflict_text_resolve_by_id(
+ svn_client_conflict_t *conflict,
+ svn_client_conflict_option_id_t option_id,
+ apr_pool_t *scratch_pool)
+{
+ apr_array_header_t *resolution_options;
+ svn_client_conflict_option_t *option;
+
+ SVN_ERR(svn_client_conflict_text_get_resolution_options(
+ &resolution_options, conflict,
+ scratch_pool, scratch_pool));
+ option = svn_client_conflict_option_find_by_id(resolution_options,
+ option_id);
+ if (option == NULL)
+ return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+ _("Inapplicable conflict resolution option "
+ "ID '%d' given for conflicted path '%s'"),
+ option_id,
+ svn_dirent_local_style(conflict->local_abspath,
+ scratch_pool));
+ SVN_ERR(svn_client_conflict_text_resolve(conflict, option, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+svn_client_conflict_option_id_t
+svn_client_conflict_text_get_resolution(const svn_client_conflict_t *conflict)
+{
+ return conflict->resolution_text;
+}
+
+svn_error_t *
+svn_client_conflict_prop_resolve(svn_client_conflict_t *conflict,
+ const char *propname,
+ svn_client_conflict_option_t *option,
+ apr_pool_t *scratch_pool)
+{
+ SVN_ERR(assert_prop_conflict(conflict, scratch_pool));
+ option->type_data.prop.propname = propname;
+ SVN_ERR(option->do_resolve_func(option, conflict, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_client_conflict_prop_resolve_by_id(
+ svn_client_conflict_t *conflict,
+ const char *propname,
+ svn_client_conflict_option_id_t option_id,
+ apr_pool_t *scratch_pool)
{
+ apr_array_header_t *resolution_options;
+ svn_client_conflict_option_t *option;
+
+ SVN_ERR(svn_client_conflict_prop_get_resolution_options(
+ &resolution_options, conflict,
+ scratch_pool, scratch_pool));
+ option = svn_client_conflict_option_find_by_id(resolution_options,
+ option_id);
+ if (option == NULL)
+ return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+ _("Inapplicable conflict resolution option "
+ "ID '%d' given for conflicted path '%s'"),
+ option_id,
+ svn_dirent_local_style(conflict->local_abspath,
+ scratch_pool));
+ SVN_ERR(svn_client_conflict_prop_resolve(conflict, propname, option,
+ scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+svn_client_conflict_option_id_t
+svn_client_conflict_prop_get_resolution(const svn_client_conflict_t *conflict,
+ const char *propname)
+{
+ svn_client_conflict_option_t *option;
+
+ option = svn_hash_gets(conflict->resolved_props, propname);
+ if (option == NULL)
+ return svn_client_conflict_option_undefined;
+
+ return svn_client_conflict_option_get_id(option);
+}
+
+svn_error_t *
+svn_client_conflict_tree_resolve(svn_client_conflict_t *conflict,
+ svn_client_conflict_option_t *option,
+ apr_pool_t *scratch_pool)
+{
+ SVN_ERR(assert_tree_conflict(conflict, scratch_pool));
SVN_ERR(option->do_resolve_func(option, conflict, scratch_pool));
return SVN_NO_ERROR;
}
+svn_error_t *
+svn_client_conflict_tree_resolve_by_id(
+ svn_client_conflict_t *conflict,
+ svn_client_conflict_option_id_t option_id,
+ apr_pool_t *scratch_pool)
+{
+ apr_array_header_t *resolution_options;
+ svn_client_conflict_option_t *option;
+
+ SVN_ERR(svn_client_conflict_tree_get_resolution_options(
+ &resolution_options, conflict,
+ scratch_pool, scratch_pool));
+ option = svn_client_conflict_option_find_by_id(resolution_options,
+ option_id);
+ if (option == NULL)
+ return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+ _("Inapplicable conflict resolution option "
+ "ID '%d' given for conflicted path '%s'"),
+ option_id,
+ svn_dirent_local_style(conflict->local_abspath,
+ scratch_pool));
+ SVN_ERR(svn_client_conflict_tree_resolve(conflict, option, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+svn_client_conflict_option_id_t
+svn_client_conflict_tree_get_resolution(const svn_client_conflict_t *conflict)
+{
+ return conflict->resolution_tree;
+}
+
/* Return the legacy conflict descriptor which is wrapped by CONFLICT. */
static const svn_wc_conflict_description2_t *
get_conflict_desc2_t(const svn_client_conflict_t *conflict)
@@ -648,9 +1051,11 @@ svn_client_conflict_get_conflicted(svn_b
APR_ARRAY_PUSH((*props_conflicted), const char *) =
conflict->legacy_prop_conflict->property_name;
}
- else
+ else if (conflict->prop_conflicts)
SVN_ERR(svn_hash_keys(props_conflicted, conflict->prop_conflicts,
result_pool));
+ else
+ *props_conflicted = NULL;
}
if (tree_conflicted)