You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2021/01/30 04:00:18 UTC
svn commit: r1886039 - in /subversion/branches/1.10.x: ./ STATUS
subversion/svn/cl-conflicts.c subversion/tests/cmdline/info_tests.py
Author: svn-role
Date: Sat Jan 30 04:00:18 2021
New Revision: 1886039
URL: http://svn.apache.org/viewvc?rev=1886039&view=rev
Log:
Merge the 1.10.x-r1885983 branch:
* r1885983
Fix issue #4869: 'svn info --xml' gives wrong 'source-right' of conflict
Justification:
Bugfix; 'svn info --xml' should give correct results; user complained.
Branch:
1.10.x-r1885983
Votes:
+1: hartmannathan, stsp, jcorvel
Modified:
subversion/branches/1.10.x/ (props changed)
subversion/branches/1.10.x/STATUS
subversion/branches/1.10.x/subversion/svn/cl-conflicts.c
subversion/branches/1.10.x/subversion/tests/cmdline/info_tests.py
Propchange: subversion/branches/1.10.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1885983
Merged /subversion/branches/issue-4869:r1885862-1885981
Merged /subversion/branches/1.10.x-r1885983:r1885986-1886038
Modified: subversion/branches/1.10.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/STATUS?rev=1886039&r1=1886038&r2=1886039&view=diff
==============================================================================
--- subversion/branches/1.10.x/STATUS (original)
+++ subversion/branches/1.10.x/STATUS Sat Jan 30 04:00:18 2021
@@ -48,12 +48,3 @@ Veto-blocked changes:
Approved changes:
=================
-
- * r1885983
- Fix issue #4869: 'svn info --xml' gives wrong 'source-right' of conflict
- Justification:
- Bugfix; 'svn info --xml' should give correct results; user complained.
- Branch:
- 1.10.x-r1885983
- Votes:
- +1: hartmannathan, stsp, jcorvel
Modified: subversion/branches/1.10.x/subversion/svn/cl-conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/subversion/svn/cl-conflicts.c?rev=1886039&r1=1886038&r2=1886039&view=diff
==============================================================================
--- subversion/branches/1.10.x/subversion/svn/cl-conflicts.c (original)
+++ subversion/branches/1.10.x/subversion/svn/cl-conflicts.c Sat Jan 30 04:00:18 2021
@@ -452,7 +452,7 @@ append_tree_conflict_info_xml(svn_string
repos_root_url, repos_relpath, peg_rev,
node_kind, pool));
- SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(&repos_relpath,
+ SVN_ERR(svn_client_conflict_get_incoming_new_repos_location(&repos_relpath,
&peg_rev,
&node_kind,
conflict,
@@ -529,7 +529,7 @@ svn_cl__append_conflict_info_xml(svn_str
repos_root_url, repos_relpath, peg_rev,
node_kind, scratch_pool));
- SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(
+ SVN_ERR(svn_client_conflict_get_incoming_new_repos_location(
&repos_relpath, &peg_rev, &node_kind, conflict,
scratch_pool, scratch_pool));
if (repos_root_url && repos_relpath)
@@ -576,7 +576,7 @@ svn_cl__append_conflict_info_xml(svn_str
repos_root_url, repos_relpath, peg_rev,
node_kind, scratch_pool));
- SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(
+ SVN_ERR(svn_client_conflict_get_incoming_new_repos_location(
&repos_relpath, &peg_rev, &node_kind, conflict,
scratch_pool, scratch_pool));
if (repos_root_url && repos_relpath)
Modified: subversion/branches/1.10.x/subversion/tests/cmdline/info_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/subversion/tests/cmdline/info_tests.py?rev=1886039&r1=1886038&r2=1886039&view=diff
==============================================================================
--- subversion/branches/1.10.x/subversion/tests/cmdline/info_tests.py (original)
+++ subversion/branches/1.10.x/subversion/tests/cmdline/info_tests.py Sat Jan 30 04:00:18 2021
@@ -747,6 +747,128 @@ def info_item_failures(sbox):
sbox.ospath('A'), sbox.ospath('iota'))
+@Issue(4869)
+def info_tree_conflict_source(sbox):
+ "info --xml: verify source-left, source-right"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ B_path = os.path.join(wc_dir, 'A', 'B')
+ lambda_path = os.path.join(B_path, 'lambda')
+ alpha_path = os.path.join(B_path, 'E', 'alpha')
+ F_path = os.path.join(B_path, 'F')
+
+ B2_url = sbox.repo_url + '/A/B2'
+ B2_path = os.path.join(wc_dir, 'A', 'B2')
+ lambda2_path = os.path.join(B2_path, 'lambda')
+
+ # Rev 2 copy B to B2
+ sbox.simple_repo_copy('A/B', 'A/B2')
+ sbox.simple_update()
+
+ # Rev 3:
+ # edit A/B/lambda to test text conflict case
+ # add property to A/B/E/alpha to test property conflict case
+ # rename A/B/F to A/B/Z to test tree conflict case
+
+ svntest.main.file_write(lambda_path, 'B/lambda side of conflict')
+ sbox.simple_propset('blue', 'azul', 'A/B/E/alpha')
+ sbox.simple_move('A/B/F', 'A/B/Z');
+ sbox.simple_commit()
+
+ # Rev 4:
+ # edit A/B2/lambda
+ # add property to A/B2/E/alpha
+ # rename A/B2/F to A/B2/Y
+
+ svntest.main.file_write(lambda2_path, 'B2/lambda side of conflict')
+ sbox.simple_propset('blue', 'bleue', 'A/B2/E/alpha')
+ sbox.simple_move('A/B2/F', 'A/B2/Y');
+ sbox.simple_commit()
+
+ # Now merge B2 into B to cause a text conflict, property conflict, and
+ # tree conflict
+ sbox.simple_update()
+
+ svntest.actions.run_and_verify_svn2(svntest.verify.AnyOutput, [],
+ 0, 'merge', B2_url, B_path)
+
+ # Verify 'svn info --xml' on the text conflicted case
+
+ exit_code, output, error = svntest.actions.run_and_verify_svn(None,
+ [], 'info',
+ lambda_path,
+ '--xml')
+
+ verify_xml_elements(output,
+ [('version', {'revision' : '1',
+ 'side' : 'source-left',
+ 'kind' : 'file',
+ 'path-in-repos': 'A/B/lambda',
+ 'repos-url' : sbox.repo_url,
+ },
+ )])
+
+ verify_xml_elements(output,
+ [('version', {'revision' : '4',
+ 'side' : 'source-right',
+ 'kind' : 'file',
+ 'path-in-repos': 'A/B2/lambda',
+ 'repos-url' : sbox.repo_url,
+ },
+ )])
+
+ # Verify 'svn info --xml' on the property conflicted case
+
+ exit_code, output, error = svntest.actions.run_and_verify_svn(None,
+ [], 'info',
+ alpha_path,
+ '--xml')
+
+ verify_xml_elements(output,
+ [('version', {'revision' : '1',
+ 'side' : 'source-left',
+ 'kind' : 'file',
+ 'path-in-repos': 'A/B/E/alpha',
+ 'repos-url' : sbox.repo_url,
+ },
+ )])
+
+ verify_xml_elements(output,
+ [('version', {'revision' : '4',
+ 'side' : 'source-right',
+ 'kind' : 'file',
+ 'path-in-repos': 'A/B2/E/alpha',
+ 'repos-url' : sbox.repo_url,
+ },
+ )])
+
+ # Verify 'svn info --xml' on the tree conflicted case
+
+ exit_code, output, error = svntest.actions.run_and_verify_svn(None,
+ [], 'info',
+ F_path,
+ '--xml')
+
+ verify_xml_elements(output,
+ [('version', {'revision' : '1',
+ 'side' : 'source-left',
+ 'kind' : 'dir',
+ 'path-in-repos': 'A/B/F',
+ 'repos-url' : sbox.repo_url,
+ },
+ )])
+
+ verify_xml_elements(output,
+ [('version', {'revision' : '4',
+ 'side' : 'source-right',
+ 'kind' : 'none',
+ 'path-in-repos': 'A/B2/F',
+ 'repos-url' : sbox.repo_url,
+ },
+ )])
+
########################################################################
# Run the tests
@@ -768,6 +890,7 @@ test_list = [ None,
info_item_url,
info_item_uncommmitted,
info_item_failures,
+ info_tree_conflict_source,
]
if __name__ == '__main__':