Author: pburba
Date: Tue Nov 22 22:45:54 2011
New Revision: 1205209
URL: http://svn.apache.org/viewvc?rev=1205209&view=rev
Log:
Fix issue #4050 "'svn mergeinfo' always considers non-inheritable ranges
as partially merged".
* subversion/libsvn_client/mergeinfo.c
(filter_log_entry_with_rangelist): Don't consider non-inheritable mergeinfo
as partially merged (or eligible) if the non-inheritable revision in
question *only* effects the path on which it is set.
* subversion/tests/cmdline/mergeinfo_tests.py
(noninheritabled_mergeinfo_not_always_eligible): Remove XFail decorator
and comment. Remove some trailing whitespace.
Modified:
subversion/trunk/subversion/libsvn_client/mergeinfo.c
subversion/trunk/subversion/tests/cmdline/mergeinfo_tests.py
Modified: subversion/trunk/subversion/libsvn_client/mergeinfo.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/mergeinfo.c?rev=1205209&r1=1205208&r2=1205209&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_client/mergeinfo.c Tue Nov 22 22:45:54
2011
@@ -1530,15 +1530,30 @@ filter_log_entry_with_rangelist(void *ba
iterpool));
if (intersection->nelts)
{
- SVN_ERR(svn_rangelist_intersect(&intersection,
- rangelist,
- this_rev_rangelist,
- TRUE, iterpool));
- if (intersection->nelts)
+ if (ancestor_is_self)
{
+ /* TARGET_PATH_AFFECTED has explicit mergeinfo,
+ so we don't need to worry if that mergeinfo
+ is inheritable or not. */
found_this_revision = TRUE;
break;
}
+ else
+ {
+ /* TARGET_PATH_AFFECTED inherited its mergeinfo,
+ se we have to ignore non-inheritable
+ ranges. */
+ SVN_ERR(svn_rangelist_intersect(
+ &intersection,
+ rangelist,
+ this_rev_rangelist,
+ TRUE, iterpool));
+ if (intersection->nelts)
+ {
+ found_this_revision = TRUE;
+ break;
+ }
+ }
}
}
}
Modified: subversion/trunk/subversion/tests/cmdline/mergeinfo_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/mergeinfo_tests.py?rev=1205209&r1=1205208&r2=1205209&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/mergeinfo_tests.py Tue Nov 22
22:45:54 2011
@@ -683,7 +683,6 @@ def natural_history_is_not_eligible_nor_
# A test for issue 4050 "'svn mergeinfo' always considers non-inheritable
# ranges as partially merged".
@Issue(4050)
-@XFail()
@SkipUnless(server_has_mergeinfo)
def noninheritabled_mergeinfo_not_always_eligible(sbox):
"noninheritabled mergeinfo not always eligible"
@@ -693,11 +692,11 @@ def noninheritabled_mergeinfo_not_always
A_path = os.path.join(wc_dir, 'A')
branch_path = os.path.join(wc_dir, 'branch')
-
+
# r2 - Branch ^/A to ^/branch.
svntest.main.run_svn(None, 'copy', sbox.repo_url + '/A',
sbox.repo_url + '/branch', '-m', 'make a branch')
-
+
# r3 - Make prop edit to A.
svntest.main.run_svn(None, 'ps', 'prop', 'val', A_path)
svntest.main.run_svn(None, 'commit', '-m', 'file edit', wc_dir)
@@ -718,9 +717,6 @@ def noninheritabled_mergeinfo_not_always
# Now check that r3 is reported as fully merged from ^/A to ^/branch
# and does not show up all when asking for eligible revs.
- #
- # Currently this fails because r3 shows up as partially merged, even
- # though it is fully merged to ^/branch.
svntest.actions.run_and_verify_mergeinfo(
adjust_error_for_server_version(''),
['3'], sbox.repo_url + '/A', sbox.repo_url + '/branch',