You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2011/08/25 22:01:58 UTC
svn commit: r1161721 - in /subversion/trunk/subversion:
libsvn_client/merge.c tests/cmdline/merge_tests.py
Author: pburba
Date: Thu Aug 25 20:01:57 2011
New Revision: 1161721
URL: http://svn.apache.org/viewvc?rev=1161721&view=rev
Log:
Fix issue #3976 'record-only merges which add new subtree mergeinfo don't
record mergeinfo describing merge'.
* subversion/libsvn_client/merge.c
(merge_props_changed): We don't care if the diff being applied is the
addition of mergeinfo or a change in mergeinfo, we care if either is
being applied to a WC target where none already exists.
* subversion/tests/cmdline/merge_tests.py
(record_only_merge_adds_new_subtree_mergeinfo): Remove XFail decorator
and comments. Tweak a comment to better explain the expected outcome.
Modified:
subversion/trunk/subversion/libsvn_client/merge.c
subversion/trunk/subversion/tests/cmdline/merge_tests.py
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1161721&r1=1161720&r2=1161721&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Thu Aug 25 20:01:57 2011
@@ -1178,13 +1178,21 @@ merge_props_changed(svn_wc_notify_state_
if (strcmp(prop->name, SVN_PROP_MERGEINFO) == 0)
{
- /* Does PATH have any working mergeinfo? */
- svn_string_t *mergeinfo_prop =
- apr_hash_get(original_props,
- SVN_PROP_MERGEINFO,
- APR_HASH_KEY_STRING);
+ /* Does LOCAL_ABSPATH have any pristine mergeinfo? */
+ svn_boolean_t has_pristine_mergeinfo = FALSE;
+ apr_hash_t *pristine_props;
+
+ SVN_ERR(svn_wc_get_pristine_props(&pristine_props,
+ ctx->wc_ctx,
+ local_abspath,
+ scratch_pool,
+ scratch_pool));
+
+ if (apr_hash_get(pristine_props, SVN_PROP_MERGEINFO,
+ APR_HASH_KEY_STRING))
+ has_pristine_mergeinfo = TRUE;
- if (!mergeinfo_prop && prop->value)
+ if (!has_pristine_mergeinfo && prop->value)
{
/* If BATON->PATHS_WITH_NEW_MERGEINFO needs to be
allocated do so in BATON->POOL so it has a
@@ -1197,7 +1205,7 @@ merge_props_changed(svn_wc_notify_state_
apr_pstrdup(merge_b->pool, local_abspath),
APR_HASH_KEY_STRING, local_abspath);
}
- else if (mergeinfo_prop && !prop->value)
+ else if (has_pristine_mergeinfo && !prop->value)
{
/* If BATON->PATHS_WITH_DELETED_MERGEINFO needs to be
allocated do so in BATON->POOL so it has a
Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_tests.py?rev=1161721&r1=1161720&r2=1161721&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_tests.py Thu Aug 25 20:01:57 2011
@@ -17026,7 +17026,6 @@ def merged_deletion_causes_tree_conflict
# A test for issue #3976 'record-only merges which add new subtree mergeinfo
# don't record mergeinfo describing merge'.
@Issue(3976)
-@XFail()
@SkipUnless(server_has_mergeinfo)
def record_only_merge_adds_new_subtree_mergeinfo(sbox):
"record only merge adds new subtree mergeinfo"
@@ -17064,15 +17063,13 @@ def record_only_merge_adds_new_subtree_m
svntest.main.run_svn(None, 'commit', '-m', 'Subtree merge', wc_dir)
# Merge r10 from ^/A_COPY/D/H to A_COPY_2/D/H. This should leave
- # A_COPY_2/D/H/psi with three new property changes:
+ # A_COPY_2/D/H/psi with three new property additions:
#
# 1) The 'svn:eol-style=native' from r10 via r8.
#
# 2) The mergeinfo '/A/D/H/psi:8' from r10.
#
# 3) The mergeinfo '/A_COPY/D/H/psi:10' describing the merge itself.
- #
- # Currently this test fails because #3 doesn't happen.
svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
expected_output = wc.State(H_COPY2_path, {
'psi' : Item(status=' U'),