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 2010/09/14 19:43:21 UTC
svn commit: r997010 -
/subversion/trunk/subversion/tests/cmdline/resolve_tests.py
Author: pburba
Date: Tue Sep 14 17:43:21 2010
New Revision: 997010
URL: http://svn.apache.org/viewvc?rev=997010&view=rev
Log:
Expand test for issue #3707 'property conflicts not handled correctly by
svn resolve'.
* subversion/tests/cmdline/resolve_tests.py
(resolving prop conflicts): Also test resolution of a property conflict
caused by an incoming prop edit on a conflicting local prop modification.
Modified:
subversion/trunk/subversion/tests/cmdline/resolve_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/resolve_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/resolve_tests.py?rev=997010&r1=997009&r2=997010&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/resolve_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/resolve_tests.py Tue Sep 14 17:43:21 2010
@@ -111,52 +111,73 @@ def prop_conflict_resolution(sbox):
# Some paths we'll care about
iota_path = os.path.join(wc_dir, "iota")
-
- # r2 - Set property 'propname:propval' on iota.
- svntest.actions.run_and_verify_svn(None, None, [],
- 'ps', 'propname', 'propval', iota_path)
+ mu_path = os.path.join(wc_dir, "A", "mu")
+
+ # r2 - Set property 'propname:propval' on iota and A/mu.
svntest.actions.run_and_verify_svn(None, None, [],
- 'commit', '-m', 'create a new property',
+ 'ps', 'propname', 'propval',
+ iota_path, mu_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'commit',
+ '-m', 'create some new properties',
wc_dir)
- # r3 - Delete property 'propname' from itoa.
+ # r3 - Delete property 'propname' from iota and change the property value
+ # of 'propname' on A/mu to 'incoming'.
svntest.actions.run_and_verify_svn(None, None, [],
'pd', 'propname', iota_path)
svntest.actions.run_and_verify_svn(None, None, [],
+ 'ps', 'propname', 'incoming', mu_path)
+ svntest.actions.run_and_verify_svn(None, None, [],
'commit', '-m', 'delete a property',
wc_dir)
- def do_prop_conflicting_up_and_resolve(resolve_accept, resolved_prop_val):
-
- """Revert the WC, update it to r2, set a conflicting propval on iota,
- update the WC, postponing conflicts, then run svn resolve -R
- --accept=RESOLVE_ACCEPT and check the the property on iota is
- RESOLVED_PROP_VAL"""
+ def do_prop_conflicting_up_and_resolve(resolve_accept,
+ resolved_deleted_prop_val_output,
+ resolved_edited_prop_val_output):
+
+ """Revert the WC, update it to r2, set the property 'propname:local_edit'
+ on iota and A/mu. Update the WC, postponing conflicts, then run svn
+ resolve -R --accept=RESOLVE_ACCEPT and check that the property on iota
+ (using svn pg), is RESOLVED_PROP_VAL_OUTPUT and property on A/mu is
+ RESOLVED_EDITED_PROP_VAL_OUTPUT. Both output arguments follow the rules
+ for the expected_stdout arg to run_and_verify_svn2()"""
svntest.actions.run_and_verify_svn(None, None, [],
'revert', '--recursive', wc_dir)
svntest.actions.run_and_verify_svn(None, None, [], 'up', '-r2', wc_dir)
svntest.actions.run_and_verify_svn(None, None, [], 'ps',
- 'propname', 'local_edit', iota_path)
+ 'propname', 'local_edit',
+ iota_path, mu_path)
svntest.actions.run_and_verify_svn(None, None, [], 'up',
'--accept=postpone', wc_dir)
- svntest.actions.run_and_verify_resolve([iota_path], '-R', '--accept',
- resolve_accept, wc_dir)
+ svntest.actions.run_and_verify_resolve([iota_path, mu_path], '-R',
+ '--accept', resolve_accept, wc_dir)
svntest.actions.run_and_verify_svn(
'svn revolve -R --accept=' + resolve_accept + ' of prop conflict '
'not resolved as expected;',
- [resolved_prop_val], [], 'pg', 'propname', iota_path)
+ resolved_deleted_prop_val_output, [], 'pg', 'propname', iota_path)
+ svntest.actions.run_and_verify_svn(
+ 'svn revolve -R --accept=' + resolve_accept + ' of prop conflict '
+ 'not resolved as expected;',
+ resolved_edited_prop_val_output, [], 'pg', 'propname', mu_path)
- # Test how svn resolve deals with a prop conflict resulting from an incoming
- # prop delete on a local modification.
+ # Test how svn resolve deals with prop conflicts resulting from:
+ #
+ # 1) 'iota' - An incoming prop delete on a local prop modification.
+ # 2) 'A/mu' - An incoming prop edit on a local prop modification.
#
# This currently fails because svn resolve --accept=[theirs-conflict |
# theirs-full] does not delete the locally modified property.
- do_prop_conflicting_up_and_resolve('mine-full', 'local_edit\n')
- do_prop_conflicting_up_and_resolve('mine-conflict', 'local_edit\n')
- do_prop_conflicting_up_and_resolve('working', 'local_edit\n')
- do_prop_conflicting_up_and_resolve('theirs-conflict', '\n')
- do_prop_conflicting_up_and_resolve('theirs-full', '\n')
+ do_prop_conflicting_up_and_resolve('mine-full',
+ ['local_edit\n'], ['local_edit\n'])
+ do_prop_conflicting_up_and_resolve('mine-conflict',
+ ['local_edit\n'], ['local_edit\n'])
+ do_prop_conflicting_up_and_resolve('working',
+ ['local_edit\n'], ['local_edit\n'])
+ do_prop_conflicting_up_and_resolve('theirs-conflict',
+ [], ['incoming\n'])
+ do_prop_conflicting_up_and_resolve('theirs-full',
+ [], ['incoming\n'])
########################################################################
# Run the tests