You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/09/18 12:40:16 UTC
svn commit: r998439 [3/3] - in /subversion/branches/object-model: ./
subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/bindings/javahl/src/org/tigris/subversion/javahl/
subversion/bindings/javahl...
Modified: subversion/branches/object-model/subversion/tests/cmdline/resolve_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/tests/cmdline/resolve_tests.py?rev=998439&r1=998438&r2=998439&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/tests/cmdline/resolve_tests.py (original)
+++ subversion/branches/object-model/subversion/tests/cmdline/resolve_tests.py Sat Sep 18 10:40:15 2010
@@ -110,23 +110,32 @@ def prop_conflict_resolution(sbox):
wc_dir = sbox.wc_dir
# Some paths we'll care about
- iota_path = os.path.join(wc_dir, "iota")
- mu_path = os.path.join(wc_dir, "A", "mu")
+ iota_path = os.path.join(wc_dir, "iota")
+ mu_path = os.path.join(wc_dir, "A", "mu")
+ gamma_path = os.path.join(wc_dir, "A", "D", "gamma")
+ psi_path = os.path.join(wc_dir, "A", "D", "H", "psi")
- # r2 - Set property 'propname:propval' on iota and A/mu.
+ # r2 - Set property 'propname:propval' on iota, A/mu, and A/D/gamma.
svntest.actions.run_and_verify_svn(None, None, [],
'ps', 'propname', 'propval',
- iota_path, mu_path)
+ iota_path, mu_path, gamma_path)
svntest.actions.run_and_verify_svn(None, None, [], 'commit',
'-m', 'create some new properties',
wc_dir)
- # r3 - Delete property 'propname' from iota and change the property value
- # of 'propname' on A/mu to 'incoming'.
+ # r3 - Make some changes to the props from r2:
+ #
+ # iota : Delete property 'propname'
+ # A/mu : Change property 'propname' to 'incoming-conflict'
+ # A/D/gamma : Change property 'propname' to 'incoming-no-conflict'
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)
+ 'ps', 'propname', 'incoming-conflict',
+ mu_path)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ps', 'propname', 'incoming-no-conflict',
+ gamma_path)
svntest.actions.run_and_verify_svn(None, None, [],
'commit', '-m', 'delete a property',
wc_dir)
@@ -135,22 +144,54 @@ def prop_conflict_resolution(sbox):
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()"""
+ """Revert the WC, update it to r2, and set the following properties:
+
+ itoa : 'propname' = 'local_edit'
+ 'newprop' = 'new-val-no-incoming'
+ A/mu : 'propname' = 'local_edit'
+ A/D/gamma : 'propname' = 'incoming-no-conflict'
+ A/D/H/psi : 'newprop' = 'new-val-no-incoming'
+
+ Update the WC, postponing conflicts, then run svn resolve -R
+ --accept=RESOLVE_ACCEPT.
+
+ Using svn propget, check that the resolution results in the following
+ properties:
+
+ itoa : 'propname' = RESOLVED_EDITED_PROP_VAL_OUTPUT
+ 'newprop' = 'new-val-no-incoming'
+ A/mu : 'propname' = RESOLVED_DELETED_PROP_VAL_OUTPUT
+ A/D/gamma : 'propname' = 'incoming-no-conflict'
+ A/D/H/psi : 'newprop' = 'new-val-no-incoming'
+
+ RESOLVED_DELETED_PROP_VAL_OUTPUT and RESOLVED_EDITED_PROP_VAL_OUTPUT
+ both 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)
+
+ # Set some properties that will conflict when we update.
svntest.actions.run_and_verify_svn(None, None, [], 'ps',
'propname', 'local_edit',
iota_path, mu_path)
+
+ # Set a property that should always merge cleanly with the update.
+ svntest.actions.run_and_verify_svn(None, None, [], 'ps',
+ 'propname', 'incoming-no-conflict',
+ gamma_path)
+
+ # Set a property that has no update coming.
+ svntest.actions.run_and_verify_svn(None, None, [], 'ps',
+ 'newprop', 'new-val-no-incoming',
+ psi_path,
+ iota_path)
+
+ # Update, postponing all conflict resolution.
svntest.actions.run_and_verify_svn(None, None, [], 'up',
'--accept=postpone', wc_dir)
- svntest.actions.run_and_verify_resolve([iota_path, mu_path], '-R',
+ svntest.actions.run_and_verify_resolve([iota_path, mu_path, gamma_path], '-R',
'--accept', resolve_accept, wc_dir)
svntest.actions.run_and_verify_svn(
'svn revolve -R --accept=' + resolve_accept + ' of prop conflict '
@@ -159,25 +200,45 @@ def prop_conflict_resolution(sbox):
svntest.actions.run_and_verify_svn(
'svn revolve -R --accept=' + resolve_accept + ' of prop conflict '
'not resolved as expected;',
+ ['new-val-no-incoming\n'], [], 'pg', 'newprop', 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)
+ svntest.actions.run_and_verify_svn(
+ 'svn revolve -R --accept=' + resolve_accept + ' modified a '
+ 'non-conflicted property',
+ ['incoming-no-conflict\n'], [], 'pg', 'propname', gamma_path)
+ svntest.actions.run_and_verify_svn(
+ 'svn revolve -R --accept=' + resolve_accept + ' modified a '
+ 'non-conflicted property',
+ ['new-val-no-incoming\n'], [], 'pg', 'newprop', psi_path)
- # Test how svn resolve deals with prop conflicts resulting from:
+ # Test how svn resolve deals with prop conflicts and other local
+ # prop changes:
#
# 1) 'iota' - An incoming prop delete on a local prop modification.
# 2) 'A/mu' - An incoming prop edit on a local prop modification.
+ # 3) 'A/D/gamma' - An local, non-conflicted prop edit
#
# This currently fails because svn resolve --accept=[theirs-conflict |
- # theirs-full] does not delete the locally modified property.
+ # theirs-full] removes the conflicts, but doesn't install 'their' version
+ # of the conflicted properties.
do_prop_conflicting_up_and_resolve('mine-full',
- ['local_edit\n'], ['local_edit\n'])
+ ['local_edit\n'],
+ ['local_edit\n'])
do_prop_conflicting_up_and_resolve('mine-conflict',
- ['local_edit\n'], ['local_edit\n'])
+ ['local_edit\n'],
+ ['local_edit\n'])
do_prop_conflicting_up_and_resolve('working',
- ['local_edit\n'], ['local_edit\n'])
+ ['local_edit\n'],
+ ['local_edit\n'])
do_prop_conflicting_up_and_resolve('theirs-conflict',
- [], ['incoming\n'])
+ [], # Prop deleted
+ ['incoming-conflict\n'])
do_prop_conflicting_up_and_resolve('theirs-full',
- [], ['incoming\n'])
+ [], # Prop deleted
+ ['incoming-conflict\n'])
########################################################################
# Run the tests
Modified: subversion/branches/object-model/subversion/tests/cmdline/resolved_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/tests/cmdline/resolved_tests.py?rev=998439&r1=998438&r2=998439&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/tests/cmdline/resolved_tests.py (original)
+++ subversion/branches/object-model/subversion/tests/cmdline/resolved_tests.py Sat Sep 18 10:40:15 2010
@@ -37,8 +37,7 @@ SkipUnless = svntest.testcase.SkipUnless
XFail = svntest.testcase.XFail
Item = svntest.wc.StateItem
-from svntest.main import SVN_PROP_MERGEINFO, server_sends_copyfrom_on_update, \
- server_has_mergeinfo
+from svntest.main import SVN_PROP_MERGEINFO, server_has_mergeinfo
######################################################################
# Tests
Modified: subversion/branches/object-model/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/tests/cmdline/svntest/main.py?rev=998439&r1=998438&r2=998439&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/object-model/subversion/tests/cmdline/svntest/main.py Sat Sep 18 10:40:15 2010
@@ -1060,9 +1060,6 @@ def server_has_mergeinfo():
def server_has_revprop_commit():
return options.server_minor_version >= 5
-def server_sends_copyfrom_on_update():
- return options.server_minor_version >= 5
-
def server_authz_has_aliases():
return options.server_minor_version >= 5
Modified: subversion/branches/object-model/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/tests/cmdline/update_tests.py?rev=998439&r1=998438&r2=998439&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/object-model/subversion/tests/cmdline/update_tests.py Sat Sep 18 10:40:15 2010
@@ -40,8 +40,7 @@ SkipUnless = svntest.testcase.SkipUnless
XFail = svntest.testcase.XFail
Item = svntest.wc.StateItem
-from svntest.main import SVN_PROP_MERGEINFO, server_sends_copyfrom_on_update, \
- server_has_mergeinfo
+from svntest.main import SVN_PROP_MERGEINFO, server_has_mergeinfo
######################################################################
# Tests
@@ -3503,248 +3502,6 @@ def mergeinfo_update_elision(sbox):
#----------------------------------------------------------------------
-# If the update editor receives add_file(foo, copyfrom='blah'), it
-# should attempt to locate 'blah' in the wc, and then copy it into place.
-
-def update_handles_copyfrom(sbox):
- "update should make use of copyfrom args"
-
- sbox.build()
- wc_dir = sbox.wc_dir
-
- # Make a backup copy of the working copy.
- wc_backup = sbox.add_wc_path('backup')
- svntest.actions.duplicate_dir(wc_dir, wc_backup)
-
- # Copy 'rho' to 'glub'
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
- glub_path = os.path.join(wc_dir, 'A', 'D', 'G', 'glub')
- svntest.actions.run_and_verify_svn(None, None, [],
- 'copy', rho_path, glub_path)
-
- # Commit that change, creating r2.
- expected_output = svntest.wc.State(wc_dir, {
- 'A/D/G/glub' : Item(verb='Adding'),
- })
-
- expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_status.add({
- 'A/D/G/glub' : Item(status=' ', wc_rev=2),
- })
-
- svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
-
- # Make a local edits to rho in the backup working copy - both text and props
- rho2_path = os.path.join(wc_backup, 'A', 'D', 'G', 'rho')
- svntest.main.file_append(rho2_path, "Some new text.\n")
- svntest.main.run_svn(None, 'propset', 'Kubla', 'Khan', rho2_path)
-
- # Now try updating our backup working copy: it should receive glub,
- # but with copyfrom args of rho@1, and thus copy the existing
- # (edited) rho to glub. In other words, both rho and glub should be
- # identical and contain the same local edits.
-
- expected_output = svntest.wc.State(wc_backup, { })
- expected_output = wc.State(wc_backup, {
- 'A/D/G/glub' : Item(status='A '), ### perhaps update should show 'A +' ??
- })
-
- expected_disk = svntest.main.greek_state.copy()
- expected_disk.tweak('A/D/G/rho',
- contents="This is the file 'rho'.\nSome new text.\n",
- props={'Kubla' : 'Khan'})
- expected_disk.add({
- 'A/D/G/glub' : Item("This is the file 'rho'.\nSome new text.\n",
- props={'Kubla' : 'Khan'})
- })
-
- expected_status = svntest.actions.get_virginal_state(wc_backup, 2)
- expected_status.tweak('A/D/G/rho', wc_rev=2, status='MM')
- expected_status.add({
- 'A/D/G/glub' : Item(status='MM', wc_rev=2),
- })
-
- svntest.actions.run_and_verify_update(wc_backup,
- expected_output,
- expected_disk,
- expected_status,
- check_props = True)
-
-#----------------------------------------------------------------------
-# if the update_editor receives add_file(copyfrom=...), and the
-# copyfrom_path simply isn't available in the working copy, it should
-# fall back to doing an RA request to fetch the file.
-
-def copyfrom_degrades_gracefully(sbox):
- "update degrades well if copyfrom_path unavailable"
-
- sbox.build()
- wc_dir = sbox.wc_dir
-
- # Make a backup copy of the working copy.
- wc_backup = sbox.add_wc_path('backup')
- svntest.actions.duplicate_dir(wc_dir, wc_backup)
-
- # Move 'alpha' to 'glub'
- alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
- glub_path = os.path.join(wc_dir, 'A', 'D', 'G', 'glub')
- svntest.actions.run_and_verify_svn(None, None, [],
- 'mv', alpha_path, glub_path)
-
- # Commit that change, creating r2.
- expected_output = svntest.wc.State(wc_dir, {
- 'A/B/E/alpha' : Item(verb='Deleting'),
- 'A/D/G/glub' : Item(verb='Adding'),
- })
-
- expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_status.add({
- 'A/D/G/glub' : Item(status=' ', wc_rev=2),
- })
- expected_status.remove('A/B/E/alpha')
-
- svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
-
- # In the 2nd working copy, update just one side of the move -- so that
- # alpha gets deleted, but glub not yet added.
- E_path = os.path.join(wc_backup, 'A', 'B', 'E')
-
- expected_output = svntest.wc.State(E_path, {
- 'alpha' : Item(status='D '),
- })
-
- expected_disk = wc.State('', {
- 'beta' : wc.StateItem("This is the file 'beta'.\n"),
- })
-
- expected_status = svntest.wc.State(E_path, {
- '' : Item(status=' '),
- 'beta' : Item(status=' '),
- })
- expected_status.tweak(wc_rev=2)
-
- svntest.actions.run_and_verify_update(E_path,
- expected_output,
- expected_disk,
- expected_status)
-
- # Now update the entire working copy, which should cause an
- # add_file(glub, copyfrom_path=alpha)... except alpha is already gone.
- # Update editor should gracefully fetch it via RA request.
- expected_output = svntest.wc.State(wc_backup, { })
- expected_output = wc.State(wc_backup, {
- 'A/D/G/glub' : Item(status='A '),
- })
-
- expected_disk = svntest.main.greek_state.copy()
- expected_disk.remove('A/B/E/alpha')
- expected_disk.add({
- 'A/D/G/glub' : Item("This is the file 'alpha'.\n"),
- })
-
- expected_status = svntest.actions.get_virginal_state(wc_backup, 2)
- expected_status.remove('A/B/E/alpha')
- expected_status.add({
- 'A/D/G/glub' : Item(status=' ', wc_rev=2),
- })
-
- svntest.actions.run_and_verify_update(wc_backup,
- expected_output,
- expected_disk,
- expected_status)
-
-#----------------------------------------------------------------------
-# If the update editor receives add_file(foo, copyfrom='blah'), it
-# should attempt to locate 'blah' in the wc, and then copy it into
-# place. Furthermore, the new file should be able to receive
-# subsequent txdeltas coming from the server.
-
-def update_handles_copyfrom_with_txdeltas(sbox):
- "update uses copyfrom & accepts further txdeltas"
-
- sbox.build()
- wc_dir = sbox.wc_dir
-
- # Make a backup copy of the working copy.
- wc_backup = sbox.add_wc_path('backup')
- svntest.actions.duplicate_dir(wc_dir, wc_backup)
-
- # Copy 'rho' to 'glub'
- rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
- glub_path = os.path.join(wc_dir, 'A', 'D', 'G', 'glub')
- svntest.actions.run_and_verify_svn(None, None, [],
- 'copy', rho_path, glub_path)
-
- # Commit that change, creating r2.
- expected_output = svntest.wc.State(wc_dir, {
- 'A/D/G/glub' : Item(verb='Adding'),
- })
-
- expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_status.add({
- 'A/D/G/glub' : Item(status=' ', wc_rev=2),
- })
-
- svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
-
- # Make additional edits to glub...
- svntest.main.file_append_binary(glub_path, "Some new text.\n")
- svntest.main.run_svn(None, 'propset', 'Kubla', 'Khan', glub_path)
-
- # Commit the changes, creating r3.
- expected_output = svntest.wc.State(wc_dir, {
- 'A/D/G/glub' : Item(verb='Sending'),
- })
-
- expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
- expected_status.add({
- 'A/D/G/glub' : Item(status=' ', wc_rev=3),
- })
-
- svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
-
- # Make a local edit to rho in the backup working copy.
- rho2_path = os.path.join(wc_backup, 'A', 'D', 'G', 'rho')
- svntest.main.file_write(rho2_path,
- "New first line.\nThis is the file 'rho'.\n",
- "wb")
-
- # Now try updating our backup working copy: it should receive glub,
- # but with copyfrom args of rho@1, and thus copy the existing rho to
- # glub. Furthermore, it should then apply the extra r3 edits to the
- # copied file.
-
- expected_output = svntest.wc.State(wc_backup, { })
- expected_output = wc.State(wc_backup, {
- 'A/D/G/glub' : Item(status='A '), ### perhaps update should show 'A +' ??
- })
-
- expected_disk = svntest.main.greek_state.copy()
- expected_disk.tweak('A/D/G/rho',
- contents="New first line.\nThis is the file 'rho'.\n")
- expected_disk.add({
- 'A/D/G/glub' : Item("New first line.\nThis is the file 'rho'.\n"
- + "Some new text.\n",
- props={'Kubla' : 'Khan'})
- })
-
- expected_status = svntest.actions.get_virginal_state(wc_backup, 3)
- expected_status.tweak('A/D/G/rho', wc_rev=3, status='M ')
- expected_status.add({
- 'A/D/G/glub' : Item(status='M ', wc_rev=3),
- })
-
- svntest.actions.run_and_verify_update(wc_backup,
- expected_output,
- expected_disk,
- expected_status,
- check_props = True)
-
-#----------------------------------------------------------------------
# Very obscure bug: Issue #2977.
# Let's say there's a revision with
# $ svn mv b c
@@ -4951,105 +4708,6 @@ def tree_conflicts_on_update_3(sbox):
expected_status,
expected_info = expected_info) ] )
-#----------------------------------------------------------------------
-# Test for issue #3354 'update fails when file with local mods is moved
-# and modified'
-def update_moves_and_modifies_an_edited_file(sbox):
- "update moves and modifies a file with edits"
-
- # r1: Create our standard greek test tree.
- sbox.build()
- wc_dir = sbox.wc_dir
-
- # Make a second working copy
- other_wc = sbox.add_wc_path('other')
- svntest.actions.duplicate_dir(wc_dir, other_wc)
- expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
-
- # Some paths we'll care about
- E_path = os.path.join(wc_dir, "A", "B", "E")
- alpha_path = os.path.join(wc_dir, "A", "B", "E", "alpha")
- alpha_moved_path = os.path.join(wc_dir, "A", "B", "E", "alpha.moved")
- other_alpha_path = os.path.join(other_wc, "A", "B", "E", "alpha")
- other_E_path = os.path.join(other_wc, "A", "B", "E")
-
- # r2: Move A/B/E/alpha to A/B/E/alpha.moved in the first WC.
- svntest.actions.run_and_verify_svn(None, None, [], 'move',
- alpha_path, alpha_moved_path)
-
- expected_output = wc.State(wc_dir, {
- 'A/B/E/alpha' : Item(verb='Deleting'),
- 'A/B/E/alpha.moved' : Item(verb='Adding')
- })
-
- expected_status.add({'A/B/E/alpha.moved' : Item(status=' ', wc_rev=2)})
- expected_status.remove('A/B/E/alpha')
-
- svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None, wc_dir)
-
- # r3: Make a text mod to A/B/E/alpha.moved in the first WC.
- new_content_for_alpha = 'alpha, modified after move\n'
- svntest.main.file_write(alpha_moved_path, new_content_for_alpha)
-
- expected_output = svntest.wc.State(wc_dir, {
- 'A/B/E/alpha.moved' : Item(verb='Sending'),
- })
-
- expected_status.tweak('A/B/E/alpha.moved', wc_rev=3)
-
- svntest.actions.run_and_verify_commit(wc_dir, expected_output,
- expected_status, None,
- wc_dir)
-
- # Make a text mod to A/B/E/alpha in the second WC then
- # update the second WC.
- new_content_for_other_alpha = 'alpha, modified\n'
- svntest.main.file_write(other_alpha_path, new_content_for_other_alpha)
-
- expected_output = wc.State(other_E_path, {
- 'alpha' : Item(status=' ', treeconflict='C'),
- 'alpha.moved' : Item(status='C '),
- })
-
- expected_status = wc.State(other_E_path, {
- '' : Item(status=' ', wc_rev=3),
- 'alpha' : Item(status='A ', wc_rev='-', copied='+', treeconflict='C'),
- 'alpha.moved' : Item(status='C ', wc_rev=3),
- 'beta' : Item(status=' ', wc_rev=3),
- })
-
- expected_disk = wc.State('', {
- 'alpha' : Item(new_content_for_other_alpha),
- 'alpha.moved' : Item("<<<<<<< .mine\n" +
- new_content_for_other_alpha +
- "=======\n" +
- new_content_for_alpha +
- ">>>>>>> .r3\n"),
- 'alpha.moved.copied' : Item("This is the file 'alpha'.\n"),
- 'alpha.moved.r3' : Item(new_content_for_alpha),
- 'alpha.moved.mine' : Item(new_content_for_other_alpha),
- 'beta' : Item("This is the file 'beta'.\n"),
- })
-
- # This update should succeed and leave A/B/E/alpha as scheduled for
- # addition with the local edit made prior to the update (i.e. this is
- # a tree conflict with the incoming delete half of the move in r2).
- # A/B/E/alpha.moved should also be present and have a text conflict
- # as a result of the incoming text edit in r3.
- #
- # Prior to the fix for issue #3354 this update failed and left the
- # WC locked.
- expected_skip = wc.State(other_E_path, { })
-
- svntest.actions.run_and_verify_update(other_E_path,
- expected_output,
- expected_disk,
- expected_status,
- None, None, None, None, None,
- True, other_E_path,
- '--accept', 'postpone')
-
# Issue #3334: a modify-on-deleted tree conflict should leave the node
# updated to the target revision but still scheduled for deletion.
def tree_conflict_uc1_update_deleted_tree(sbox):
@@ -5596,94 +5254,6 @@ def mergeinfo_updates_merge_with_local_m
A_COPY_path)
#----------------------------------------------------------------------
-# Test for receiving modified properties on added files that were originally
-# moved from somewhere else. (Triggers locate_copyfrom behavior)
-def add_moved_file_has_props(sbox):
- """update adding moved file receives modified props"""
- sbox.build()
-
- wc_dir = sbox.wc_dir
-
- G = os.path.join(os.path.join(wc_dir, 'A', 'D', 'G'))
- pi = os.path.join(G, 'pi')
- G_new = os.path.join(wc_dir, 'G_new')
-
- # Give pi some property
- svntest.main.run_svn(None, 'ps', 'svn:eol-style', 'native', pi)
- svntest.main.run_svn(None, 'ci', wc_dir, '-m', 'added eol-style')
-
- svntest.actions.run_and_verify_svn(None, 'At revision 2.', [], 'up', wc_dir)
-
- # Now move pi to a different place
- svntest.main.run_svn(None, 'mkdir', G_new)
- svntest.main.run_svn(None, 'mv', pi, G_new)
- svntest.main.run_svn(None, 'ci', wc_dir, '-m', 'Moved pi to G_new')
-
- svntest.actions.run_and_verify_svn(None, 'At revision 3.', [], 'up', wc_dir)
-
-
- expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
- expected_status.remove('A/D/G/pi')
- expected_status.add({
- 'G_new' : Item (status=' ', wc_rev=3),
- 'G_new/pi' : Item (status=' ', wc_rev=3),
- })
-
- svntest.actions.run_and_verify_status(wc_dir, expected_status)
-
- svntest.main.run_svn(None, 'up', '-r', '0', G_new)
- svntest.main.run_svn(None, 'up', wc_dir)
-
- # This shouldn't show property modifications, but at r982550 it did.
- svntest.actions.run_and_verify_status(wc_dir, expected_status)
-
-#----------------------------------------------------------------------
-# Test for receiving modified properties on added files that were originally
-# moved from somewhere else. (Triggers locate_copyfrom behavior). This is
-# an extended variant that has another property change on the new path
-def add_moved_file_has_props2(sbox):
- """update adding moved node receives 2* props"""
- sbox.build()
-
- wc_dir = sbox.wc_dir
-
- G = os.path.join(os.path.join(wc_dir, 'A', 'D', 'G'))
- pi = os.path.join(G, 'pi')
- G_new = os.path.join(wc_dir, 'G_new')
-
- # Give pi some property
- svntest.main.run_svn(None, 'ps', 'svn:eol-style', 'native', pi)
- svntest.main.run_svn(None, 'ci', wc_dir, '-m', 'added eol-style')
-
- svntest.actions.run_and_verify_svn(None, 'At revision 2.', [], 'up', wc_dir)
-
- # Now move pi to a different place
- svntest.main.run_svn(None, 'mkdir', G_new)
- svntest.main.run_svn(None, 'mv', pi, G_new)
- svntest.main.run_svn(None, 'ps', 'svn:eol-style', 'CR', os.path.join(G_new, 'pi'))
-
- svntest.main.run_svn(None, 'ci', wc_dir, '-m', 'Moved pi to G_new')
-
- svntest.actions.run_and_verify_svn(None, 'At revision 3.', [], 'up', wc_dir)
-
-
- expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
- expected_status.remove('A/D/G/pi')
- expected_status.add({
- 'G_new' : Item (status=' ', wc_rev=3),
- 'G_new/pi' : Item (status=' ', wc_rev=3),
- })
-
- svntest.actions.run_and_verify_status(wc_dir, expected_status)
-
- svntest.main.run_svn(None, 'up', '-r', '0', G_new)
- svntest.main.run_svn(None, 'up', wc_dir)
-
- # This shouldn't show local modifications, but currently it
- # shows a property conflict on G_new/pi.
- svntest.actions.run_and_verify_status(wc_dir, expected_status)
-
-
# A regression test for a 1.7-dev crash upon updating a WC to a different
# revision when it contained an excluded dir.
def update_with_excluded_subdir(sbox):
@@ -5792,11 +5362,6 @@ test_list = [ None,
update_conflicted,
SkipUnless(mergeinfo_update_elision,
server_has_mergeinfo),
- SkipUnless(update_handles_copyfrom,
- server_sends_copyfrom_on_update),
- copyfrom_degrades_gracefully,
- SkipUnless(update_handles_copyfrom_with_txdeltas,
- server_sends_copyfrom_on_update),
update_copied_from_replaced_and_changed,
update_copied_and_deleted_prop,
update_accept_conflicts,
@@ -5809,7 +5374,6 @@ test_list = [ None,
tree_conflicts_on_update_2_2,
XFail(tree_conflicts_on_update_2_3),
tree_conflicts_on_update_3,
- update_moves_and_modifies_an_edited_file,
tree_conflict_uc1_update_deleted_tree,
XFail(tree_conflict_uc2_schedule_re_add),
set_deep_depth_on_target_with_shallow_children,
@@ -5817,8 +5381,6 @@ test_list = [ None,
XFail(update_deleted_locked_files),
XFail(update_empty_hides_entries),
mergeinfo_updates_merge_with_local_mods,
- add_moved_file_has_props,
- XFail(add_moved_file_has_props2),
update_with_excluded_subdir,
XFail(update_with_file_lock_and_keywords_property_set)
]
Modified: subversion/branches/object-model/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/tests/libsvn_wc/db-test.c?rev=998439&r1=998438&r2=998439&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/object-model/subversion/tests/libsvn_wc/db-test.c Sat Sep 18 10:40:15 2010
@@ -48,9 +48,9 @@
#include "../svn_test.h"
-#define ROOT_ONE "http://example.com/one/"
-#define ROOT_TWO "http://example.com/two/"
-#define ROOT_THREE "http://example.com/three/"
+#define ROOT_ONE "http://example.com/one"
+#define ROOT_TWO "http://example.com/two"
+#define ROOT_THREE "http://example.com/three"
#define UUID_ONE "uuid1"
#define UUID_TWO "uuid2"
@@ -75,7 +75,7 @@
#define MD5_2 "5d41402abc4b2a76b9719d911017c592"
#define SHA1_1 "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d"
-#define I_TC_DATA "((conflict F file update edited deleted (version 23 " ROOT_ONE " 1 2 branch1/ft/F none) (version 23 " ROOT_ONE " 1 3 branch1/ft/F file)) (conflict G file update edited deleted (version 23 " ROOT_ONE " 1 2 branch1/ft/F none) (version 23 " ROOT_ONE " 1 3 branch1/ft/F file)) )"
+#define I_TC_DATA "((conflict F file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) (conflict G file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) )"
static const char * const TESTING_DATA = (
/* Load our test data.
@@ -387,7 +387,7 @@ static const char * const TESTING_DATA =
the value 1 is just 'good enough' to make the nodes WORKING nodes. */
"insert into nodes values ("
" 1, 'I', 1, '', 2, 'some/dir', 2, 'normal', 'immediates',"
- " 0, null, 'dir', 2, " TIME_2s ", ' " AUTHOR_2 " ', null, '()',"
+ " 0, null, 'dir', 2, " TIME_2s ", '" AUTHOR_2 "', null, '()',"
" null, null, null, null, null);"
"insert into nodes values ("
" 1, 'J', 1, '', null, null, null, 'normal', 'immediates',"
@@ -399,11 +399,11 @@ static const char * const TESTING_DATA =
" null, null, null, null, null);"
"insert into nodes values ("
" 1, 'J/J-b', 1, 'J', 2, 'some/dir', 2, 'normal', 'infinity',"
- " 0, null, 'dir', 2, " TIME_2s ", ' " AUTHOR_2 " ', null, '()',"
+ " 0, null, 'dir', 2, " TIME_2s ", '" AUTHOR_2 "', null, '()',"
" null, null, null, null, null);"
"insert into nodes values ("
" 1, 'J/J-b/J-b-a', 1, 'J/J-b', 2, 'another/dir', 2, 'normal', 'infinity',"
- " 0, null, 'dir', 2, " TIME_2s ", ' " AUTHOR_2 " ', null, '()',"
+ " 0, null, 'dir', 2, " TIME_2s ", '" AUTHOR_2 "', null, '()',"
" null, null, null, null, null);"
"insert into nodes values ("
" 1, 'J/J-b/J-b-b', 1, 'J/J-b', null, null, null, 'normal', null,"
@@ -419,7 +419,7 @@ static const char * const TESTING_DATA =
" null, null, null, null, null);"
"insert into nodes values ("
" 1, 'J/J-d', 1, 'J', 2, 'moved/file', 2, 'normal', null,"
- " 1, null, 'file', 2, " TIME_2s ", ' " AUTHOR_2 " ', '$md5 $ " MD5_1 " ',"
+ " 1, null, 'file', 2, " TIME_2s ", '" AUTHOR_2 "', '$md5 $ " MD5_1 " ',"
" '()', 10, null, null, null, null);"
"insert into nodes values ("
" 1, 'J/J-e', 1, 'J', null, null, null, 'not-present', null,"
@@ -915,10 +915,10 @@ test_inserting_nodes(apr_pool_t *pool)
pool));
/* Create a new not-present symlink node. */
- SVN_ERR(svn_wc__db_base_add_absent_node(
+ SVN_ERR(svn_wc__db_base_add_not_present_node(
db, svn_dirent_join(local_abspath, "Q", pool),
"Q", ROOT_ONE, UUID_ONE, 3,
- svn_wc__db_kind_symlink, svn_wc__db_status_not_present,
+ svn_wc__db_kind_symlink,
NULL, NULL,
pool));
Modified: subversion/branches/object-model/subversion/tests/libsvn_wc/entries-compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/tests/libsvn_wc/entries-compat.c?rev=998439&r1=998438&r2=998439&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/tests/libsvn_wc/entries-compat.c (original)
+++ subversion/branches/object-model/subversion/tests/libsvn_wc/entries-compat.c Sat Sep 18 10:40:15 2010
@@ -75,7 +75,7 @@
#define MD5_1 "2d18c5e57e84c5b8a5e9a6e13fa394dc"
#define MD5_2 "5d41402abc4b2a76b9719d911017c592"
-#define I_TC_DATA "((conflict F file update edited deleted (version 23 " ROOT_ONE " 1 2 branch1/ft/F none) (version 23 " ROOT_ONE " 1 3 branch1/ft/F file)) (conflict G file update edited deleted (version 23 " ROOT_ONE " 1 2 branch1/ft/F none) (version 23 " ROOT_ONE " 1 3 branch1/ft/F file)) )"
+#define I_TC_DATA "((conflict F file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) (conflict G file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) )"
static const char * const TESTING_DATA = (
/* Load our test data.
@@ -382,11 +382,99 @@ static const char * const TESTING_DATA =
" "
#endif
#ifdef SVN_WC__NODES
+ /* Load data into NODES table;
+ ### op_depths have not been calculated by me yet;
+ the value 1 is just 'good enough' to make the nodes WORKING nodes. */
+ "insert into nodes values ("
+ " 1, 'I', 1, '', 2, 'some/dir', 2, 'normal', 'immediates',"
+ " 0, null, 'dir', 2, " TIME_2s ", '" AUTHOR_2 "', null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J', 1, '', null, null, null, 'normal', 'immediates',"
+ " 0, null, 'dir', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-a', 1, 'J', null, null, null, 'normal', null,"
+ " 0, null, 'file', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-b', 1, 'J', 2, 'some/dir', 2, 'normal', 'infinity',"
+ " 0, null, 'dir', 2, " TIME_2s ", '" AUTHOR_2 "', null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-b/J-b-a', 1, 'J/J-b', 2, 'another/dir', 2, 'normal', 'infinity',"
+ " 0, null, 'dir', 2, " TIME_2s ", '" AUTHOR_2 "', null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-b/J-b-b', 1, 'J/J-b', null, null, null, 'normal', null,"
+ " 0, null, 'file', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-c', 1, 'J', null, null, null, 'not-present', null,"
+ " 0, null, 'dir', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-c/J-c-a', 1, 'J/J-c', null, null, null, 'not-present', null,"
+ " 0, null, 'dir', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-d', 1, 'J', 2, 'moved/file', 2, 'normal', null,"
+ " 1, null, 'file', 2, " TIME_2s ", '" AUTHOR_2 "', '$md5 $ " MD5_1 " ',"
+ " '()', 10, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-e', 1, 'J', null, null, null, 'not-present', null,"
+ " 0, 'other/place', 'dir', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-e/J-e-a', 1, 'J/J-e', null, null, null, 'not-present', null,"
+ " 0, null, 'file', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-e/J-e-b', 1, 'J/J-e', null, null, null, 'not-present',"
+ " null, 0, null, 'dir', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-e/J-e-b/Jeba', 1, 'J/J-e/J-e-b', null, null, null, 'base-deleted',"
+ " null, 0, null, 'file', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-f', 1, 'J', null, null, null, 'normal', 'immediates',"
+ " 0, null, 'dir', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'J/J-f/J-f-a', 1, 'J/J-f', null, null, null, 'base-deleted',"
+ " 'immediates', 0, null, 'dir', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'K', 1, '', null, null, null, 'base-deleted', null,"
+ " 0, null, 'dir', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'K/K-a', 1, 'K', null, null, null, 'base-deleted', null,"
+ " 0, null, 'file', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'K/K-b', 1, 'K', null, null, null, 'base-deleted', null,"
+ " 0, 'moved/away', 'file', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'L', 1, '', null, null, null, 'normal', 'immediates',"
+ " 0, null, 'dir', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'L/L-a', 1, 'L', null, null, null, 'not-present', 'immediates',"
+ " 0, null, 'dir', null, null, null, null, '()',"
+ " null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'L/L-a/L-a-a', 1, 'L', null, null, null, 'not-present', 'immediates',"
+ " 0, null, 'dir', null, null, null, null, '()',"
+ " null, null, null, null, null);"
#endif
"insert into actual_node values ("
" 1, 'I', '', null, null, null, null, null, 'changelist', null, "
"'" I_TC_DATA "', null, null, null, null);"
" "
+#ifndef SVN_WC__NODES_ONLY
"insert into base_node values ("
" 1, 'M', null, null, '', 'normal', 'dir', "
" 1, null, null, "
@@ -397,6 +485,17 @@ static const char * const TESTING_DATA =
" null, null, "
" null, null, null, null, null, "
" null, null, null, 0, null, null, '()', 0); "
+#endif
+#ifdef SVN_WC__NODES
+ "insert into nodes values ("
+ " 1, 'M', 0, '', null, null, 1, 'normal', null,"
+ " null, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
+ " '()', null, null, null, null, null);"
+ "insert into nodes values ("
+ " 1, 'M/M-a', 0, 'M', null, null, 1, 'not-present', null,"
+ " null, null, 'file', 1, null, null, null,"
+ " '()', null, null, null, null, null);"
+#endif
);
@@ -410,11 +509,19 @@ static const char * const M_TESTING_DATA
"insert into repository values (2, '" ROOT_TWO "', '" UUID_TWO "'); "
"insert into wcroot values (1, null); "
+#ifndef SVN_WC__NODES_ONLY
"insert into base_node values ("
" 1, '', 1, 'M', null, 'normal', 'dir', "
" 1, null, null, "
" 1, " TIME_1s ", '" AUTHOR_1 "', 'infinity', null, null, '()', null, 0, "
" null); "
+#endif
+#ifdef SVN_WC__NODES
+ "insert into nodes values ("
+ " 1, '', 0, null, 1, 'M', 1, 'normal', 'infinity',"
+ " null, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null,"
+ " '()', null, null, null, null, null);"
+#endif
);
WC_QUERIES_SQL_DECLARE_STATEMENTS(statements);