Author: svn-role
Date: Wed Jun 5 04:00:36 2013
New Revision: 1489699
URL: http://svn.apache.org/r1489699
Log:
Merge r1489203 from trunk:
* r1489203
Fix a crash when the automatic merge API is called with unrelated source
and target branches, other than by 'svn' which does an ancestry check
before calling it. Also affected svn_client_get_merging_summary().
Justification:
It's a crash. The fix is a straightforward check.
Notes:
Tested as in the email: by temporarily removing the check at
merge-cmd.c:109 and trying a mismatched automatic merge.
Votes:
+1: julianfoad, ivan, pburba
Modified:
subversion/branches/1.8.x/ (props changed)
subversion/branches/1.8.x/STATUS
subversion/branches/1.8.x/subversion/libsvn_client/merge.c
Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1489203
Modified: subversion/branches/1.8.x/STATUS
URL:
http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1489699&r1=1489698&r2=1489699&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Wed Jun 5 04:00:36 2013
@@ -57,18 +57,6 @@ Approved for 1.8.1 or if soak is restart
Approved changes:
=================
- * r1489203
- Fix a crash when the automatic merge API is called with unrelated source
- and target branches, other than by 'svn' which does an ancestry check
- before calling it. Also affected svn_client_get_merging_summary().
- Justification:
- It's a crash. The fix is a straightforward check.
- Notes:
- Tested as in the email: by temporarily removing the check at
- merge-cmd.c:109 and trying a mismatched automatic merge.
- Votes:
- +1: julianfoad, ivan, pburba
-
# 1.8.0-rc2 is being voted on currently and as such 1.8.0 is in the soak phase.
# Changes that are not intended for 1.8.0 should not be placed here and changes
# that would restart the soak should not be added unless they are resolving
Modified: subversion/branches/1.8.x/subversion/libsvn_client/merge.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_client/merge.c?rev=1489699&r1=1489698&r2=1489699&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_client/merge.c Wed Jun 5
04:00:36 2013
@@ -12301,6 +12301,12 @@ find_automatic_merge(svn_client__pathrev
SVN_ERR(svn_client__get_youngest_common_ancestor(
&s_t->yca, s_t->source, &s_t->target->loc, s_t->source_ra_session,
ctx, result_pool, result_pool));
+ if (! s_t->yca)
+ return svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL,
+ _("'%s@%ld' must be ancestrally related to "
+ "'%s@%ld'"),
+ s_t->source->url, s_t->source->rev,
+ s_t->target->loc.url, s_t->target->loc.rev);
/* Find the latest revision of A synced to B and the latest
* revision of B synced to A.