You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/05/16 16:31:37 UTC
svn commit: r1483391 -
/subversion/trunk/subversion/tests/cmdline/diff_tests.py
Author: stsp
Date: Thu May 16 14:31:37 2013
New Revision: 1483391
URL: http://svn.apache.org/r1483391
Log:
Add a new XFail test for a problem with 'svn diff' and actual-only nodes.
$ svn status
! C iota
> local file missing, incoming file edit upon merge
Summary of conflicts:
Tree conflicts: 1
$ svn diff
svn: E155010: The node 'iota' was not found.
(The actual error prints an absolute path, but was shortened for this
log message).
* subversion/tests/cmdline/diff_tests.py
(diff_missing_tree_conflict_victim, test_list): New test.
Modified:
subversion/trunk/subversion/tests/cmdline/diff_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests.py?rev=1483391&r1=1483390&r2=1483391&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Thu May 16 14:31:37 2013
@@ -32,7 +32,7 @@ logger = logging.getLogger()
# Our testing module
import svntest
-from svntest import err
+from svntest import err, wc
from prop_tests import binary_mime_type_on_text_file_warning
@@ -4535,6 +4535,47 @@ def diff_repos_empty_file_addition(sbox)
svntest.actions.run_and_verify_svn(None, expected_output, [],
'diff', '-c', '2', sbox.repo_url)
+@XFail()
+def diff_missing_tree_conflict_victim(sbox):
+ "diff with missing tree-conflict victim in wc"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # Produce an 'incoming edit vs. local missing' tree conflict:
+ # r2: edit iota and commit the change
+ svntest.main.file_append(sbox.ospath('iota'), "This is a change to iota.\n")
+ sbox.simple_commit('iota')
+ # now remove iota
+ sbox.simple_rm('iota')
+ sbox.simple_commit('iota')
+ # update to avoid mixed-rev wc warning
+ sbox.simple_update()
+ # merge r2 into wc and verify that a tree conflict is flagged on iota
+ expected_output = wc.State(wc_dir, {'iota' : Item(status=' ',
+ treeconflict='C')})
+ expected_mergeinfo_output = wc.State(wc_dir, {})
+ expected_elision_output = wc.State(wc_dir, {})
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.remove('iota')
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+ expected_status.add({'iota' : Item(status='! ', treeconflict='C')})
+ expected_skip = wc.State('', { })
+ svntest.actions.run_and_verify_merge(wc_dir, '1', '2',
+ sbox.repo_url, None,
+ expected_output,
+ expected_mergeinfo_output,
+ expected_elision_output,
+ expected_disk,
+ expected_status,
+ expected_skip,
+ None, None, None, None, None, None,
+ False, '--ignore-ancestry', wc_dir)
+
+ # 'svn diff' should show no change for the working copy
+ # This currently fails because svn errors out with a 'node not found' error
+ expected_output = [ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', wc_dir)
########################################################################
#Run the tests
@@ -4615,6 +4656,7 @@ test_list = [ None,
diff_dir_replaced_by_file,
diff_dir_replaced_by_dir,
diff_repos_empty_file_addition,
+ diff_missing_tree_conflict_victim,
]
if __name__ == '__main__':