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/28 19:35:26 UTC

svn commit: r1002283 [9/10] - in /subversion/branches/javahl-ra: ./ build/ notes/ notes/http-and-webdav/ notes/wc-ng/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/src/org/tig...

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/patch_tests.py?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/patch_tests.py Tue Sep 28 17:35:22 2010
@@ -2436,7 +2436,14 @@ def patch_same_twice(sbox):
     'G         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
     '>         hunk @@ -1,1 +1,1 @@ already applied\n',
     'G         %s\n' % os.path.join(wc_dir, 'iota'),
-    '>         hunk @@ -1,1 +1,2 @@ already applied\n',
+    # The iota patch inserts a line after the first line in the file,
+    # with no trailing context. Currently, Subversion applies this patch
+    # multiple times, which matches the behaviour of Larry Wall's patch
+    # implementation. A more complicated hunk matching algorithm is needed
+    # to detect the duplicate application in this case. GNU patch does detect
+    # the duplicate application. Should Subversion be taught to detect it,
+    # we need this line here:
+    # '>         hunk @@ -1,1 +1,2 @@ already applied\n',
     'G         %s\n' % os.path.join(wc_dir, 'new'),
     '>         hunk @@ -0,0 +1,1 @@ already applied\n',
     'G         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
@@ -2449,6 +2456,10 @@ def patch_same_twice(sbox):
 
   expected_skip = wc.State('', {beta_path : Item()})
 
+  # See above comment about the iota patch being applied twice.
+  iota_contents += "Some more bytes\n"
+  expected_disk.tweak('iota', contents=iota_contents)
+
   svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path),
                                        expected_output,
                                        expected_disk,
@@ -2976,7 +2987,7 @@ def patch_prop_with_fuzz(sbox):
                                        1, # check-props
                                        1) # dry-run
 
-def patch_git_add_file(sbox):
+def patch_git_empty_files(sbox):
   "patch that contains empty files"
 
   sbox.build()
@@ -2990,18 +3001,25 @@ def patch_git_add_file(sbox):
     "===================================================================\n",
     "diff --git a/new b/new\n",
     "new file mode 10644\n",
+    "Index: iota\n",
+    "===================================================================\n",
+    "diff --git a/iota b/iota\n",
+    "deleted file mode 10644\n",
   ]
 
   svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
   expected_output = [
     'A         %s\n' % os.path.join(wc_dir, 'new'),
+    'D         %s\n' % os.path.join(wc_dir, 'iota'),
   ]
   expected_disk = svntest.main.greek_state.copy()
   expected_disk.add({'new' : Item(contents="")})
+  expected_disk.remove('iota')
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({'new' : Item(status='A ', wc_rev=0)})
+  expected_status.tweak('iota', status='D ')
 
   expected_skip = wc.State('', { })
 
@@ -3013,6 +3031,333 @@ def patch_git_add_file(sbox):
                                        None, # expected err
                                        1, # check-props
                                        1) # dry-run
+
+def patch_old_target_names(sbox):
+  "patch using old target names"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  patch_file_path = make_patch_path(sbox)
+  mu_path = os.path.join(wc_dir, 'A', 'mu')
+
+  mu_contents = [
+    "Dear internet user,\n",
+    "\n",
+    "We wish to congratulate you over your email success in our computer\n",
+    "Balloting. This is a Millennium Scientific Electronic Computer Draw\n",
+    "in which email addresses were used. All participants were selected\n",
+    "through a computer ballot system drawn from over 100,000 company\n",
+    "and 50,000,000 individual email addresses from all over the world.\n",
+    "\n",
+    "Your email address drew and have won the sum of  750,000 Euros\n",
+    "( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
+    "file with\n",
+    "    REFERENCE NUMBER: ESP/WIN/008/05/10/MA;\n",
+    "    WINNING NUMBER : 14-17-24-34-37-45-16\n",
+    "    BATCH NUMBERS :\n",
+    "    EULO/1007/444/606/08;\n",
+    "    SERIAL NUMBER: 45327\n",
+    "and PROMOTION DATE: 13th June. 2009\n",
+    "\n",
+    "To claim your winning prize, you are to contact the appointed\n",
+    "agent below as soon as possible for the immediate release of your\n",
+    "winnings with the below details.\n",
+    "\n",
+    "Again, we wish to congratulate you over your email success in our\n"
+    "computer Balloting.\n"
+  ]
+
+  # Set mu contents
+  svntest.main.file_write(mu_path, ''.join(mu_contents))
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/mu'       : Item(verb='Sending'),
+    })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/mu', wc_rev=2)
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+                                        expected_status, None, wc_dir)
+
+  # Apply patch
+
+  unidiff_patch = [
+    "--- A/mu	2009-06-24 15:23:55.000000000 +0100\n",
+    "+++ A/mu.new	2009-06-24 15:21:23.000000000 +0100\n",
+    "@@ -6,6 +6,9 @@\n",
+    " through a computer ballot system drawn from over 100,000 company\n",
+    " and 50,000,000 individual email addresses from all over the world.\n",
+    " \n",
+    "+It is a promotional program aimed at encouraging internet users;\n",
+    "+therefore you do not need to buy ticket to enter for it.\n",
+    "+\n",
+    " Your email address drew and have won the sum of  750,000 Euros\n",
+    " ( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
+    " file with\n",
+    "@@ -14,11 +17,8 @@\n",
+    "     BATCH NUMBERS :\n",
+    "     EULO/1007/444/606/08;\n",
+    "     SERIAL NUMBER: 45327\n",
+    "-and PROMOTION DATE: 13th June. 2009\n",
+    "+and PROMOTION DATE: 14th June. 2009\n",
+    " \n",
+    " To claim your winning prize, you are to contact the appointed\n",
+    " agent below as soon as possible for the immediate release of your\n",
+    " winnings with the below details.\n",
+    "-\n",
+    "-Again, we wish to congratulate you over your email success in our\n",
+    "-computer Balloting.\n",
+  ]
+
+  svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
+
+  mu_contents = [
+    "Dear internet user,\n",
+    "\n",
+    "We wish to congratulate you over your email success in our computer\n",
+    "Balloting. This is a Millennium Scientific Electronic Computer Draw\n",
+    "in which email addresses were used. All participants were selected\n",
+    "through a computer ballot system drawn from over 100,000 company\n",
+    "and 50,000,000 individual email addresses from all over the world.\n",
+    "\n",
+    "It is a promotional program aimed at encouraging internet users;\n",
+    "therefore you do not need to buy ticket to enter for it.\n",
+    "\n",
+    "Your email address drew and have won the sum of  750,000 Euros\n",
+    "( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
+    "file with\n",
+    "    REFERENCE NUMBER: ESP/WIN/008/05/10/MA;\n",
+    "    WINNING NUMBER : 14-17-24-34-37-45-16\n",
+    "    BATCH NUMBERS :\n",
+    "    EULO/1007/444/606/08;\n",
+    "    SERIAL NUMBER: 45327\n",
+    "and PROMOTION DATE: 14th June. 2009\n",
+    "\n",
+    "To claim your winning prize, you are to contact the appointed\n",
+    "agent below as soon as possible for the immediate release of your\n",
+    "winnings with the below details.\n",
+  ]
+
+  expected_output = [
+    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+  ]
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('A/mu', contents=''.join(mu_contents))
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/mu', status='M ', wc_rev=2)
+
+  expected_skip = wc.State('', { })
+
+  svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path),
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, # expected err
+                                       1, # check-props
+                                       1, # dry-run
+                                       "--old-patch-target-names")
+
+def patch_reverse_revert(sbox):
+  "revert a patch by reverse patching"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  patch_file_path = make_patch_path(sbox)
+  mu_path = os.path.join(wc_dir, 'A', 'mu')
+
+  mu_contents_pre_patch = [
+    "Dear internet user,\n",
+    "\n",
+    "We wish to congratulate you over your email success in our computer\n",
+    "Balloting. This is a Millennium Scientific Electronic Computer Draw\n",
+    "in which email addresses were used. All participants were selected\n",
+    "through a computer ballot system drawn from over 100,000 company\n",
+    "and 50,000,000 individual email addresses from all over the world.\n",
+    "\n",
+    "Your email address drew and have won the sum of  750,000 Euros\n",
+    "( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
+    "file with\n",
+    "    REFERENCE NUMBER: ESP/WIN/008/05/10/MA;\n",
+    "    WINNING NUMBER : 14-17-24-34-37-45-16\n",
+    "    BATCH NUMBERS :\n",
+    "    EULO/1007/444/606/08;\n",
+    "    SERIAL NUMBER: 45327\n",
+    "and PROMOTION DATE: 13th June. 2009\n",
+    "\n",
+    "To claim your winning prize, you are to contact the appointed\n",
+    "agent below as soon as possible for the immediate release of your\n",
+    "winnings with the below details.\n",
+    "\n",
+    "Again, we wish to congratulate you over your email success in our\n"
+    "computer Balloting.\n"
+  ]
+
+  # Set mu contents
+  svntest.main.file_write(mu_path, ''.join(mu_contents_pre_patch), 'wb')
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/mu'       : Item(verb='Sending'),
+    })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/mu', wc_rev=2)
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+                                        expected_status, None, wc_dir)
+
+  # Apply patch
+
+  unidiff_patch = [
+    "Index: A/D/gamma\n",
+    "===================================================================\n",
+    "--- A/D/gamma\t(revision 1)\n",
+    "+++ A/D/gamma\t(working copy)\n",
+    "@@ -1 +1 @@\n",
+    "-This is the file 'gamma'.\n",
+    "+It is the file 'gamma'.\n",
+    "Index: iota\n",
+    "===================================================================\n",
+    "--- iota\t(revision 1)\n",
+    "+++ iota\t(working copy)\n",
+    "@@ -1 +1,2 @@\n",
+    " This is the file 'iota'.\n",
+    "+Some more bytes\n",
+    "\n",
+    "Index: new\n",
+    "===================================================================\n",
+    "--- new	(revision 0)\n",
+    "+++ new	(revision 0)\n",
+    "@@ -0,0 +1 @@\n",
+    "+new\n",
+    "\n",
+    "--- A/mu.orig	2009-06-24 15:23:55.000000000 +0100\n",
+    "+++ A/mu	2009-06-24 15:21:23.000000000 +0100\n",
+    "@@ -6,6 +6,9 @@\n",
+    " through a computer ballot system drawn from over 100,000 company\n",
+    " and 50,000,000 individual email addresses from all over the world.\n",
+    " \n",
+    "+It is a promotional program aimed at encouraging internet users;\n",
+    "+therefore you do not need to buy ticket to enter for it.\n",
+    "+\n",
+    " Your email address drew and have won the sum of  750,000 Euros\n",
+    " ( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
+    " file with\n",
+    "@@ -14,11 +17,8 @@\n",
+    "     BATCH NUMBERS :\n",
+    "     EULO/1007/444/606/08;\n",
+    "     SERIAL NUMBER: 45327\n",
+    "-and PROMOTION DATE: 13th June. 2009\n",
+    "+and PROMOTION DATE: 14th June. 2009\n",
+    " \n",
+    " To claim your winning prize, you are to contact the appointed\n",
+    " agent below as soon as possible for the immediate release of your\n",
+    " winnings with the below details.\n",
+    "-\n",
+    "-Again, we wish to congratulate you over your email success in our\n",
+    "-computer Balloting.\n",
+    "Index: A/B/E/beta\n",
+    "===================================================================\n",
+    "--- A/B/E/beta	(revision 1)\n",
+    "+++ A/B/E/beta	(working copy)\n",
+    "@@ -1 +0,0 @@\n",
+    "-This is the file 'beta'.\n",
+  ]
+
+  svntest.main.file_write(patch_file_path, ''.join(unidiff_patch), 'wb')
+
+  gamma_contents = "It is the file 'gamma'.\n"
+  iota_contents = "This is the file 'iota'.\nSome more bytes\n"
+  new_contents = "new\n"
+  mu_contents_post_patch = [
+    "Dear internet user,\n",
+    "\n",
+    "We wish to congratulate you over your email success in our computer\n",
+    "Balloting. This is a Millennium Scientific Electronic Computer Draw\n",
+    "in which email addresses were used. All participants were selected\n",
+    "through a computer ballot system drawn from over 100,000 company\n",
+    "and 50,000,000 individual email addresses from all over the world.\n",
+    "\n",
+    "It is a promotional program aimed at encouraging internet users;\n",
+    "therefore you do not need to buy ticket to enter for it.\n",
+    "\n",
+    "Your email address drew and have won the sum of  750,000 Euros\n",
+    "( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
+    "file with\n",
+    "    REFERENCE NUMBER: ESP/WIN/008/05/10/MA;\n",
+    "    WINNING NUMBER : 14-17-24-34-37-45-16\n",
+    "    BATCH NUMBERS :\n",
+    "    EULO/1007/444/606/08;\n",
+    "    SERIAL NUMBER: 45327\n",
+    "and PROMOTION DATE: 14th June. 2009\n",
+    "\n",
+    "To claim your winning prize, you are to contact the appointed\n",
+    "agent below as soon as possible for the immediate release of your\n",
+    "winnings with the below details.\n",
+  ]
+
+  expected_output = [
+    'U         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
+    'U         %s\n' % os.path.join(wc_dir, 'iota'),
+    'A         %s\n' % os.path.join(wc_dir, 'new'),
+    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+    'D         %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+  ]
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('A/D/gamma', contents=gamma_contents)
+  expected_disk.tweak('iota', contents=iota_contents)
+  expected_disk.add({'new' : Item(contents=new_contents)})
+  expected_disk.tweak('A/mu', contents=''.join(mu_contents_post_patch))
+  expected_disk.remove('A/B/E/beta')
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/D/gamma', status='M ')
+  expected_status.tweak('iota', status='M ')
+  expected_status.add({'new' : Item(status='A ', wc_rev=0)})
+  expected_status.tweak('A/mu', status='M ', wc_rev=2)
+  expected_status.tweak('A/B/E/beta', status='D ')
+
+  expected_skip = wc.State('', { })
+
+  svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path),
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, # expected err
+                                       1, # check-props
+                                       1) # dry-run
+
+  # Applying the same patch in reverse should undo local mods
+  expected_output = [
+    'G         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
+    'G         %s\n' % os.path.join(wc_dir, 'iota'),
+    'D         %s\n' % os.path.join(wc_dir, 'new'),
+    'G         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+    'A         %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+  ]
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('A/mu', contents=''.join(mu_contents_pre_patch))
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/mu', wc_rev=2)
+
+  ### svn patch should check whether the deleted file has the same
+  ### content as the file added by the patch and revert the deletion
+  ### instead of causing a replacement.
+  expected_status.tweak('A/B/E/beta', status='R ')
+
+  svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path),
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, # expected err
+                                       1, # check-props
+                                       1, # dry-run
+                                       '--reverse-diff',
+                                       '--old-patch-target-names')
+
 ########################################################################
 #Run the tests
 
@@ -3042,7 +3387,9 @@ test_list = [ None,
               patch_add_path_with_props,
               patch_prop_offset,
               patch_prop_with_fuzz,
-              patch_git_add_file,
+              patch_git_empty_files,
+              patch_old_target_names,
+              patch_reverse_revert,
             ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/prop_tests.py?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/prop_tests.py Tue Sep 28 17:35:22 2010
@@ -1973,6 +1973,82 @@ def obstructed_subdirs(sbox):
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
 
+def atomic_over_ra(sbox):
+  "test revprop atomicity guarantees of libsvn_ra"
+
+  sbox.build(create_wc=False)
+  repo_url = sbox.repo_url
+
+  # From this point on, similar to ../libsvn_fs-fs-test.c:revision_props().
+  s1 = "violet"
+  s2 = "wrong value"
+
+  # But test "" explicitly, since the RA layers have to marshal "" and <unset>
+  # differently.
+  s3 = ""
+
+  # Initial state.
+  svntest.actions.enable_revprop_changes(sbox.repo_dir)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'propset', '--revprop', '-r', '0',
+                                     'flower', s1, repo_url)
+
+  # Helpers.
+  
+  def expect_old_server_fail(old_value, proposed_value):
+    # We are setting a (possibly "not present") expectation for the old value,
+    # so we should fail.
+    expected_stderr = ".*doesn't advertise.*ATOMIC_REVPROP"
+    svntest.actions.run_and_verify_atomic_ra_revprop_change(
+       None, None, expected_stderr, 1, repo_url, 0, 'flower',
+       old_value, proposed_value)
+
+    # The original value is still there.
+    svntest.actions.check_prop('flower', repo_url, [s1], 0)
+
+  def FAILS_WITH_BPV(not_the_old_value, proposed_value):
+    if svntest.main.server_has_atomic_revprop():
+      svntest.actions.run_and_verify_atomic_ra_revprop_change(
+         None, None, [], 0, repo_url, 0, 'flower',
+         not_the_old_value, proposed_value, True)
+    else:
+      expect_old_server_fail(not_the_old_value, proposed_value)
+
+  def PASSES_WITHOUT_BPV(yes_the_old_value, proposed_value):
+    if svntest.main.server_has_atomic_revprop():
+      svntest.actions.run_and_verify_atomic_ra_revprop_change(
+         None, None, [], 0, repo_url, 0, 'flower',
+         yes_the_old_value, proposed_value, False)
+    else:
+      expect_old_server_fail(yes_the_old_value, proposed_value)
+
+  # Value of "flower" is 's1'.
+  FAILS_WITH_BPV(s2, s1)
+  FAILS_WITH_BPV(s3, s1)
+  PASSES_WITHOUT_BPV(s1, s2)
+
+  # Value of "flower" is 's2'.
+  PASSES_WITHOUT_BPV(s2, s3)
+
+  # Value of "flower" is 's3'.
+  FAILS_WITH_BPV(None, s3)
+  FAILS_WITH_BPV(s1, s3)
+  PASSES_WITHOUT_BPV(s3, s2)
+
+  # Value of "flower" is 's2'.
+  FAILS_WITH_BPV(None, None)
+  FAILS_WITH_BPV(s1, None)
+  FAILS_WITH_BPV(s3, None)
+  PASSES_WITHOUT_BPV(s2, None)
+
+  # Value of "flower" is <not set>.
+  FAILS_WITH_BPV(s2, s1)
+  FAILS_WITH_BPV(s3, s1)
+  PASSES_WITHOUT_BPV(None, s1)
+
+  # Value of "flower" is 's1'.
+  svntest.actions.check_prop('flower', repo_url, [s1], 0)
+
 ########################################################################
 # Run the tests
 
@@ -2016,6 +2092,7 @@ test_list = [ None,
               rm_of_replaced_file,
               prop_reject_grind,
               obstructed_subdirs,
+              atomic_over_ra,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/resolve_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/resolve_tests.py?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/resolve_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/resolve_tests.py Tue Sep 28 17:35:22 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/javahl-ra/subversion/tests/cmdline/resolved_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/resolved_tests.py?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/resolved_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/resolved_tests.py Tue Sep 28 17:35:22 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/javahl-ra/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svnrdump_tests.py?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svnrdump_tests.py Tue Sep 28 17:35:22 2010
@@ -41,6 +41,18 @@ XFail = svntest.testcase.XFail
 Item = svntest.wc.StateItem
 Wimp = svntest.testcase.Wimp
 
+## Mismatched headers during dumping operation
+# Text-copy-source-* and *-sha1 headers are not provided by the RA
+# layer. `svnadmin dump` is able to provide them because it works on
+# the FS layer. Also, svnrdump attaches "Prop-delta: true" with
+# everything whether it's really a delta or a new prop (delta from
+# /dev/null). This is really harmless, but `svnadmin dump` contains
+# the logic for differentiating between these two cases.
+
+mismatched_headers_re = \
+    "Prop-delta: |Text-content-sha1: |Text-copy-source-md5: |" \
+    "Text-copy-source-sha1: |Text-delta-base-sha1: .*"
+
 ######################################################################
 # Helper routines
 
@@ -53,9 +65,12 @@ def build_repos(sbox):
   # Create an empty repository.
   svntest.main.create_repos(sbox.repo_dir)
 
-def run_dump_test(sbox, dumpfile_name):
+def run_dump_test(sbox, dumpfile_name, expected_dumpfile_name = None,
+                  subdir = None):
   """Load a dumpfile using 'svnadmin load', dump it with 'svnrdump
-  dump' and check that the same dumpfile is produced"""
+  dump' and check that the same dumpfile is produced or that
+  expected_dumpfile_name is produced if provided. Additionally, the
+  subdir argument appends itself to the URL"""
 
   # Create an empty sanbox repository
   build_repos(sbox)
@@ -71,18 +86,28 @@ def run_dump_test(sbox, dumpfile_name):
                            'rb').readlines()
 
   svntest.actions.run_and_verify_load(sbox.repo_dir, svnadmin_dumpfile)
+  
+  repo_url = sbox.repo_url
+  if subdir:
+    repo_url = repo_url + subdir
 
   # Create a dump file using svnrdump
   svnrdump_dumpfile = \
       svntest.actions.run_and_verify_svnrdump(None, svntest.verify.AnyOutput,
                                               [], 0, '-q', 'dump',
-                                              sbox.repo_url)
+                                              repo_url)
+
+  if expected_dumpfile_name:
+    svnadmin_dumpfile = open(os.path.join(svnrdump_tests_dir,
+                                          expected_dumpfile_name),
+                             'rb').readlines()
 
   # Compare the output from stdout
   svntest.verify.compare_and_display_lines(
-    "Dump files", "DUMP", svnadmin_dumpfile, svnrdump_dumpfile)
+    "Dump files", "DUMP", svnadmin_dumpfile, svnrdump_dumpfile,
+    None, mismatched_headers_re)
 
-def run_load_test(sbox, dumpfile_name):
+def run_load_test(sbox, dumpfile_name, expected_dumpfile_name = None):
   """Load a dumpfile using 'svnrdump load', dump it with 'svnadmin
   dump' and check that the same dumpfile is produced"""
 
@@ -117,6 +142,11 @@ def run_load_test(sbox, dumpfile_name):
   # Create a dump file using svnadmin dump
   svnadmin_dumpfile = svntest.actions.run_and_verify_dump(sbox.repo_dir, True)
 
+  if expected_dumpfile_name:
+    svnrdump_dumpfile = open(os.path.join(svnrdump_tests_dir,
+                                          expected_dumpfile_name),
+                             'rb').readlines()
+
   # Compare the output from stdout
   svntest.verify.compare_and_display_lines(
     "Dump files", "DUMP", svnrdump_dumpfile, svnadmin_dumpfile)
@@ -125,7 +155,7 @@ def run_load_test(sbox, dumpfile_name):
 # Tests
 
 def basic_dump(sbox):
-  "dump the standard sbox repos"
+  "dump: standard sbox repos"
   sbox.build(read_only = True, create_wc = False)
 
   out = \
@@ -137,11 +167,11 @@ def basic_dump(sbox):
     raise svntest.Failure('No valid output')
 
 def revision_0_dump(sbox):
-  "dump revision zero"
+  "dump: revision zero"
   run_dump_test(sbox, "revision-0.dump")
 
 def revision_0_load(sbox):
-  "load revision zero"
+  "load: revision zero"
   run_load_test(sbox, "revision-0.dump")
 
 # skeleton.dump repository layout
@@ -154,18 +184,138 @@ def revision_0_load(sbox):
 #     docs/         (Added r6)
 #       README      (Added r6)
 
+def skeleton_dump(sbox):
+  "dump: skeleton repository"
+  run_dump_test(sbox, "skeleton.dump")
+
 def skeleton_load(sbox):
-  "skeleton repository"
+  "load: skeleton repository"
   run_load_test(sbox, "skeleton.dump")
 
 def copy_and_modify_dump(sbox):
-  "copy and modify dump"
+  "dump: copy and modify"
   run_dump_test(sbox, "copy-and-modify.dump")
 
 def copy_and_modify_load(sbox):
-  "copy and modify load"
+  "load: copy and modify"
   run_load_test(sbox, "copy-and-modify.dump")
   
+def no_author_dump(sbox):
+  "dump: copy revs with no svn:author revprops"
+  run_dump_test(sbox, "no-author.dump")
+
+def no_author_load(sbox):
+  "load: copy revs with no svn:author revprops"
+  run_load_test(sbox, "no-author.dump")
+
+def copy_from_previous_version_and_modify_dump(sbox):
+  "dump: copy from previous version and modify"
+  run_dump_test(sbox, "copy-from-previous-version-and-modify.dump")
+  
+def copy_from_previous_version_and_modify_load(sbox):
+  "load: copy from previous version and modify"
+  run_load_test(sbox, "copy-from-previous-version-and-modify.dump")
+
+def modified_in_place_dump(sbox):
+  "dump: modified in place"
+  run_dump_test(sbox, "modified-in-place.dump")
+
+def modified_in_place_load(sbox):
+  "load: modified in place"
+  run_load_test(sbox, "modified-in-place.dump")
+
+def move_and_modify_in_the_same_revision_dump(sbox):
+  "dump: move parent & modify child file in same rev"
+  run_dump_test(sbox, "move-and-modify.dump")
+
+def move_and_modify_in_the_same_revision_load(sbox):
+  "load: move parent & modify child file in same rev"
+  run_load_test(sbox, "move-and-modify.dump")
+
+def tag_empty_trunk_dump(sbox):
+  "dump: tag empty trunk"
+  run_dump_test(sbox, "tag-empty-trunk.dump")
+
+def tag_empty_trunk_load(sbox):
+  "load: tag empty trunk"
+  run_load_test(sbox, "tag-empty-trunk.dump")
+
+def tag_trunk_with_file_dump(sbox):
+  "dump: tag trunk containing a file"
+  run_dump_test(sbox, "tag-trunk-with-file.dump")
+
+def tag_trunk_with_file_load(sbox):
+  "load: tag trunk containing a file"
+  run_load_test(sbox, "tag-trunk-with-file.dump")
+
+def tag_trunk_with_file2_dump(sbox):
+  "dump: tag trunk containing a file (#2)"
+  run_dump_test(sbox, "tag-trunk-with-file2.dump")
+
+def tag_trunk_with_file2_load(sbox):
+  "load: tag trunk containing a file (#2)"
+  run_load_test(sbox, "tag-trunk-with-file2.dump")
+
+def dir_prop_change_dump(sbox):
+  "dump: directory property changes"
+  run_dump_test(sbox, "dir-prop-change.dump")
+  
+def dir_prop_change_load(sbox):
+  "load: directory property changes"
+  run_load_test(sbox, "dir-prop-change.dump")
+
+def copy_parent_modify_prop_dump(sbox):
+  "dump: copy parent and modify prop"
+  run_dump_test(sbox, "copy-parent-modify-prop.dump")
+
+def copy_parent_modify_prop_load(sbox):
+  "load: copy parent and modify prop"
+  run_load_test(sbox, "copy-parent-modify-prop.dump")
+
+def copy_revprops_dump(sbox):
+  "dump: copy revprops other than svn:*"
+  run_dump_test(sbox, "revprops.dump")
+
+def copy_revprops_load(sbox):
+  "load: copy revprops other than svn:*"
+  run_load_test(sbox, "revprops.dump")
+
+def only_trunk_dump(sbox):
+  "dump: subdirectory"
+  run_dump_test(sbox, "trunk-only.dump", subdir="/trunk",
+                expected_dumpfile_name="trunk-only.expected.dump")
+
+def only_trunk_A_with_changes_dump(sbox):
+  "dump: subdirectory with changes on root"
+  run_dump_test(sbox, "trunk-A-changes.dump", subdir="/trunk/A",
+           expected_dumpfile_name="trunk-A-changes.expected.dump")
+
+def url_encoding_dump(sbox):
+  "dump: url encoding issues"
+  run_dump_test(sbox, "url-encoding-bug.dump")
+
+def url_encoding_load(sbox):
+  "load: url encoding issues"
+  run_load_test(sbox, "url-encoding-bug.dump")
+
+def copy_bad_line_endings_dump(sbox):
+  "dump: inconsistent line endings in svn:props"
+  run_dump_test(sbox, "copy-bad-line-endings.dump",
+           expected_dumpfile_name="copy-bad-line-endings.expected.dump")
+
+def commit_a_copy_of_root_dump(sbox):
+  "dump: commit a copy of root"
+  run_dump_test(sbox, "repo-with-copy-of-root-dir.dump")
+
+def commit_a_copy_of_root_load(sbox):
+  "load: commit a copy of root"
+  run_load_test(sbox, "repo-with-copy-of-root-dir.dump")
+
+def descend_into_replace_dump(sbox):
+  "dump: descending into replaced dir looks in src"
+  run_dump_test(sbox, "descend-into-replace.dump", subdir='/trunk/H',
+                expected_dumpfile_name = "descend-into-replace.expected.dump")
+
 ########################################################################
 # Run the tests
 
@@ -175,9 +325,38 @@ test_list = [ None,
               basic_dump,
               revision_0_dump,
               revision_0_load,
+              skeleton_dump,
               skeleton_load,
+              copy_and_modify_dump,
               copy_and_modify_load,
-              Wimp("Need to fix headers in RA layer", copy_and_modify_dump),
+              copy_from_previous_version_and_modify_dump,
+              copy_from_previous_version_and_modify_load,
+              modified_in_place_dump,
+              modified_in_place_load,
+              tag_empty_trunk_dump,
+              tag_empty_trunk_load,
+              tag_trunk_with_file_dump,
+              tag_trunk_with_file_load,
+              tag_trunk_with_file2_dump,
+              tag_trunk_with_file2_load,
+              dir_prop_change_dump,
+              Wimp("TODO", dir_prop_change_load, svntest.main.is_ra_type_dav),
+              copy_parent_modify_prop_dump,
+              copy_parent_modify_prop_load,
+              url_encoding_dump,
+              url_encoding_load,
+              copy_revprops_dump,
+              copy_revprops_load,
+              only_trunk_dump,
+              only_trunk_A_with_changes_dump,
+              no_author_dump,
+              no_author_load,
+              move_and_modify_in_the_same_revision_dump,
+              move_and_modify_in_the_same_revision_load,
+              copy_bad_line_endings_dump,
+              commit_a_copy_of_root_dump,
+              commit_a_copy_of_root_load,
+              descend_into_replace_dump,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/actions.py?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/actions.py Tue Sep 28 17:35:22 2010
@@ -147,6 +147,41 @@ def guarantee_greek_repository(path):
   main.chmod_tree(path, 0666, 0666)
 
 
+def run_and_verify_atomic_ra_revprop_change(message,
+                                            expected_stdout,
+                                            expected_stderr,
+                                            expected_exit, 
+                                            url, revision, propname,
+                                            old_propval, propval,
+                                            want_error):
+  """Run atomic-ra-revprop-change helper and check its output and exit code.
+  Transforms OLD_PROPVAL and PROPVAL into a skel.
+  For HTTP, the default HTTP library is used."""
+
+  KEY_OLD_PROPVAL = "old_value_p"
+  KEY_NEW_PROPVAL = "value"
+
+  def skel_make_atom(word):
+    return "%d %s" % (len(word), word)
+
+  def make_proplist_skel_part(nick, val):
+    if val is None:
+      return ""
+    else:
+      return "%s %s" % (skel_make_atom(nick), skel_make_atom(val))
+
+  skel = "( %s %s )" % (make_proplist_skel_part(KEY_OLD_PROPVAL, old_propval),
+                        make_proplist_skel_part(KEY_NEW_PROPVAL, propval))
+
+  exit_code, out, err = main.run_atomic_ra_revprop_change(url, revision,
+                                                          propname, skel,
+                                                          want_error)
+  verify.verify_outputs("Unexpected output", out, err,
+                        expected_stdout, expected_stderr)
+  verify.verify_exit_code(message, exit_code, expected_exit)
+  return exit_code, out, err
+
+
 def run_and_verify_svnlook(message, expected_stdout,
                            expected_stderr, *varargs):
   """Like run_and_verify_svnlook2, but the expected exit code is
@@ -1628,21 +1663,7 @@ def get_virginal_state(wc_dir, rev):
 # Cheap administrative directory locking
 def lock_admin_dir(wc_dir):
   "Lock a SVN administrative directory"
-  dot_svn = svntest.main.get_admin_name()
-  root_path = wc_dir
-  relpath = ''
-
-  while True:
-    db_path = os.path.join(root_path, dot_svn, 'wc.db')
-    try:
-      db = svntest.sqlite3.connect(db_path)
-      break
-    except: pass
-    head, tail = os.path.split(root_path)
-    if head == root_path:
-      raise svntest.Failure("No DB for " + wc_dir)
-    root_path = head
-    relpath = os.path.join(tail, relpath).replace(os.path.sep, '/').rstrip('/')
+  db, root_path, relpath = wc.open_wc_db(wc_dir)
 
   db.execute('insert into wc_lock (wc_id, local_dir_relpath, locked_levels) '
              + 'values (?, ?, ?)',
@@ -1735,15 +1756,22 @@ def set_prop(name, value, path, expected
   else:
     main.run_svn(expected_err, 'propset', name, value, path)
 
-def check_prop(name, path, exp_out):
-  """Verify that property NAME on PATH has a value of EXP_OUT"""
+def check_prop(name, path, exp_out, revprop=None):
+  """Verify that property NAME on PATH has a value of EXP_OUT.
+  If REVPROP is not None, then it is a revision number and
+  a revision property is sought."""
+  if revprop is not None:
+    revprop_options = ['--revprop', '-r', revprop]
+  else:
+    revprop_options = []
   # Not using run_svn because binary_mode must be set
   exit_code, out, err = main.run_command(main.svn_binary, None, 1, 'pg',
                                          '--strict', name, path,
                                          '--config-dir',
                                          main.default_config_dir,
                                          '--username', main.wc_author,
-                                         '--password', main.wc_passwd)
+                                         '--password', main.wc_passwd,
+                                         *revprop_options)
   if out != exp_out:
     print("svn pg --strict %s output does not match expected." % name)
     print("Expected standard output:  %s\n" % exp_out)

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py Tue Sep 28 17:35:22 2010
@@ -158,6 +158,8 @@ svnversion_binary = os.path.abspath('../
 svndumpfilter_binary = os.path.abspath('../../svndumpfilter/svndumpfilter' + \
                                        _exe)
 entriesdump_binary = os.path.abspath('entries-dump' + _exe)
+atomic_ra_revprop_change_binary = os.path.abspath('atomic-ra-revprop-change' + \
+                                                  _exe)
 
 # Location to the pristine repository, will be calculated from test_area_url
 # when we know what the user specified for --url.
@@ -639,6 +641,20 @@ def run_entriesdump_subdirs(path):
                                                         0, 0, None, '--subdirs', path)
   return [line.strip() for line in stdout_lines if not line.startswith("DBG:")]
 
+def run_atomic_ra_revprop_change(url, revision, propname, skel, want_error):
+  """Run the atomic-ra-revprop-change helper, returning its exit code, stdout, 
+  and stderr.  For HTTP, default HTTP library is used."""
+  # use spawn_process rather than run_command to avoid copying all the data
+  # to stdout in verbose mode.
+  #exit_code, stdout_lines, stderr_lines = spawn_process(entriesdump_binary,
+  #                                                      0, 0, None, path)
+
+  # This passes HTTP_LIBRARY in addition to our params.
+  return run_command(atomic_ra_revprop_change_binary, True, False, 
+                     url, revision, propname, skel,
+                     options.http_library, want_error and 1 or 0)
+
+
 # Chmod recursively on a whole subtree
 def chmod_tree(path, mode, mask):
   for dirpath, dirs, files in os.walk(path):
@@ -1060,9 +1076,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
 
@@ -1075,6 +1088,9 @@ def server_has_partial_replay():
 def server_enforces_date_syntax():
   return options.server_minor_version >= 5
 
+def server_has_atomic_revprop():
+  return options.server_minor_version >= 7
+
 ######################################################################
 
 

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/verify.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/verify.py?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/verify.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/verify.py Tue Sep 28 17:35:22 2010
@@ -108,7 +108,7 @@ class ExpectedOutput:
   def __cmp__(self, other):
     raise 'badness'
 
-  def matches(self, other):
+  def matches(self, other, except_re=None):
     """Return whether SELF.output matches OTHER (which may be a list
     of newline-terminated lines, or a single string).  Either value
     may be None."""
@@ -126,7 +126,31 @@ class ExpectedOutput:
     if not isinstance(expected, list):
       expected = [expected]
 
-    return self.is_equivalent_list(expected, actual)
+    if except_re:
+      return self.matches_except(expected, actual, except_re)
+    else:
+      return self.is_equivalent_list(expected, actual)
+
+  def matches_except(self, expected, actual, except_re):
+    "Return whether EXPECTED and ACTUAL match except for except_re."
+    if not self.is_regex:
+      i_expected = 0
+      i_actual = 0
+      while i_expected < len(expected) and i_actual < len(actual):
+        if re.match(except_re, actual[i_actual]):
+          i_actual += 1
+        elif re.match(except_re, expected[i_expected]):
+          i_expected += 1
+        elif expected[i_expected] == actual[i_actual]:
+          i_expected += 1
+          i_actual += 1
+        else:
+          return False
+      if i_expected == len(expected) and i_actual == len(actual):
+            return True
+      return False
+    else:
+      raise Exception("is_regex and except_re are mutually exclusive")
 
   def is_equivalent_list(self, expected, actual):
     "Return whether EXPECTED and ACTUAL are equivalent."
@@ -308,7 +332,7 @@ def display_lines(message, label, expect
       sys.stdout.write(x)
 
 def compare_and_display_lines(message, label, expected, actual,
-                              raisable=None):
+                              raisable=None, except_re=None):
   """Compare two sets of output lines, and print them if they differ,
   preceded by MESSAGE iff not None.  EXPECTED may be an instance of
   ExpectedOutput (and if not, it is wrapped as such).  RAISABLE is an
@@ -325,7 +349,7 @@ def compare_and_display_lines(message, l
     actual = [actual]
   actual = [line for line in actual if not line.startswith('DBG:')]
 
-  if not expected.matches(actual):
+  if not expected.matches(actual, except_re):
     expected.display_differences(message, label, actual)
     raise raisable
 

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/wc.py?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/wc.py Tue Sep 28 17:35:22 2010
@@ -816,50 +816,64 @@ def svn_url_quote(url):
 
 # ------------
 
-def text_base_path(file_path):
-  """Return the path to the text-base file for the versioned file
-     FILE_PATH."""
+def open_wc_db(local_path):
+  """Open the SQLite DB for the WC path LOCAL_PATH.
+     Return (DB object, WC root path, WC relpath of LOCAL_PATH)."""
   dot_svn = svntest.main.get_admin_name()
-  root_path, relpath = os.path.split(file_path)
+  root_path = local_path
+  relpath = ''
 
   while True:
     db_path = os.path.join(root_path, dot_svn, 'wc.db')
     try:
-      if os.path.exists(db_path):
-        db = svntest.sqlite3.connect(db_path)
-        break
+      db = svntest.sqlite3.connect(db_path)
+      break
     except: pass
     head, tail = os.path.split(root_path)
     if head == root_path:
-      raise svntest.Failure("No DB for " + file_path)
+      raise svntest.Failure("No DB for " + local_path)
     root_path = head
-    relpath = os.path.join(tail, relpath).replace(os.sep, '/')
+    relpath = os.path.join(tail, relpath).replace(os.path.sep, '/').rstrip('/')
+
+  return db, root_path, relpath
+
+# ------------
+
+def text_base_path(file_path):
+  """Return the path to the text-base file for the versioned file
+     FILE_PATH."""
+  db, root_path, relpath = open_wc_db(file_path)
 
   c = db.cursor()
-  c.execute("""select checksum from working_node
-               where local_relpath = '""" + relpath + """'""")
-  checksum = c.fetchone()
-  if checksum is None:
+  # NODES conversion is complete enough that we can use it if it exists
+  c.execute("""pragma table_info(nodes)""")
+  if c.fetchone():
+    c.execute("""select checksum from nodes
+                 where local_relpath = '""" + relpath + """'
+                 and op_depth = 0""")
+  else:
     c.execute("""select checksum from base_node
                  where local_relpath = '""" + relpath + """'""")
-    checksum = c.fetchone()[0]
-  if checksum is not None and checksum[0:6] == "$md5 $":
-    c.execute("""select checksum from pristine
-                 where md5_checksum = '""" + checksum + """'""")
-    checksum = c.fetchone()[0]
-  if checksum is None:
+  row = c.fetchone()
+  if row is not None:
+    checksum = row[0]
+    if checksum is not None and checksum[0:6] == "$md5 $":
+      c.execute("""select checksum from pristine
+                   where md5_checksum = '""" + checksum + """'""")
+      checksum = c.fetchone()[0]
+  if row is None or checksum is None:
     raise svntest.Failure("No SHA1 checksum for " + relpath)
   db.close()
 
   checksum = checksum[6:]
   # Calculate single DB location
+  dot_svn = svntest.main.get_admin_name()
   fn = os.path.join(root_path, dot_svn, 'pristine', checksum[0:2], checksum)
 
   if os.path.isfile(fn):
     return fn
 
-  # Calculate per dir location
-  return os.path.join(root_path, dot_svn, 'pristine', checksum)
+  raise svntest.Failure("No pristine text for " + relpath)
 
 
 # ------------

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/switch_tests.py?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/switch_tests.py Tue Sep 28 17:35:22 2010
@@ -1049,18 +1049,25 @@ def commit_mods_below_switch(sbox):
 
 def relocate_beyond_repos_root(sbox):
   "relocate with prefixes longer than repo root"
-  sbox.build(read_only = True)
+  sbox.build(read_only=True, create_wc=False)
+
+  wc_backup = sbox.add_wc_path('backup')
 
   wc_dir = sbox.wc_dir
   repo_dir = sbox.repo_dir
   repo_url = sbox.repo_url
   other_repo_dir, other_repo_url = sbox.add_repo_path('other')
-  svntest.main.copy_repos(repo_dir, other_repo_dir, 1, 0)
-
   A_url = repo_url + "/A"
+  A_wc_dir = wc_dir
   other_A_url = other_repo_url + "/A"
   other_B_url = other_repo_url + "/B"
-  A_wc_dir = os.path.join(wc_dir, "A")
+
+  svntest.main.safe_rmtree(wc_dir, 1)
+  svntest.actions.run_and_verify_svn(None, None, [], 'checkout',
+                                     repo_url + '/A', wc_dir)
+  
+  svntest.main.copy_repos(repo_dir, other_repo_dir, 1, 0)
+  
 
   # A relocate that changes the repo path part of the URL shouldn't work.
   # This tests for issue #2380.
@@ -2959,7 +2966,7 @@ def single_file_relocate(sbox):
   svntest.main.copy_repos(repo_dir, other_repo_dir, 1, 0)
   svntest.main.safe_rmtree(repo_dir, 1)
   svntest.actions.run_and_verify_svn(None, None,
-                                     ".*Cannot relocate a single file\n",
+                                     ".*Cannot relocate.*",
                                      'switch', '--relocate',
                                      iota_url, other_iota_url, iota_path)
 

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py Tue Sep 28 17:35:22 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/javahl-ra/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/upgrade_tests.py?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/upgrade_tests.py Tue Sep 28 17:35:22 2010
@@ -108,13 +108,20 @@ def check_dav_cache(dir_path, wc_id, exp
   for local_relpath, expected_dav_cache in expected_dav_caches.items():
     c.execute('select dav_cache from base_node ' +
               'where wc_id=? and local_relpath=?',
-        (wc_id, local_relpath))
-    dav_cache = str(c.fetchone()[0])
-
+              (wc_id, local_relpath))
+    row = c.fetchone()
+    if row is None:
+      c.execute('select dav_cache from nodes ' +
+                'where wc_id=? and local_relpath=? and op_depth = 0',
+                (wc_id, local_relpath))
+      row = c.fetchone()
+    if row is None:
+      raise svntest.Failure("no dav cache for '%s'" % (local_relpath))
+    dav_cache = str(row[0])
     if dav_cache != expected_dav_cache:
       raise svntest.Failure(
               "wrong dav cache for '%s'\n  Found:    '%s'\n  Expected: '%s'" %
-                (dir_path, dav_cache, expected_dav_cache))
+                (local_relpath, dav_cache, expected_dav_cache))
 
   db.close()
 

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_client/client-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_client/client-test.c?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_client/client-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_client/client-test.c Tue Sep 28 17:35:22 2010
@@ -379,7 +379,7 @@ test_patch(const svn_test_opts_t *opts,
   pcb.patched_tempfiles = apr_hash_make(pool);
   pcb.reject_tempfiles = apr_hash_make(pool);
   pcb.state_pool = pool;
-  SVN_ERR(svn_client_patch(patch_file_path, wc_path, FALSE, 0, FALSE,
+  SVN_ERR(svn_client_patch(patch_file_path, wc_path, FALSE, 0, FALSE, FALSE,
                            FALSE, FALSE, patch_collection_func, &pcb,
                            ctx, pool, pool));
   SVN_ERR(svn_io_file_close(patch_file, pool));

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_fs/fs-test.c?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_fs/fs-test.c Tue Sep 28 17:35:22 2010
@@ -586,12 +586,12 @@ list_directory(const svn_test_opts_t *op
 }
 
 
-/* If EXPR raises SVN_ERR_BAD_PROPERTY_VALUE, continue; else, fail
+/* If EXPR raises SVN_ERR_FS_PROP_BASEVALUE_MISMATCH, continue; else, fail
  * the test. */
-#define FAILS_WITH_BPV(expr) \
+#define FAILS_WITH_BOV(expr) \
   do { \
       svn_error_t *__err = (expr); \
-      if (!__err || __err->apr_err != SVN_ERR_BAD_PROPERTY_VALUE) \
+      if (!__err || __err->apr_err != SVN_ERR_FS_PROP_BASEVALUE_MISMATCH) \
         return svn_error_create(SVN_ERR_TEST_FAILED, __err, \
                                 "svn_fs_change_rev_prop2() failed to " \
                                 "detect unexpected old value"); \
@@ -662,18 +662,18 @@ revision_props(const svn_test_opts_t *op
 
       /* Value of "flower" is 's1'. */
 
-      FAILS_WITH_BPV(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, s1_p, pool));
+      FAILS_WITH_BOV(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, s1_p, pool));
       s1_dup = svn_string_dup(&s1, pool);
       SVN_ERR(svn_fs_change_rev_prop2(fs, 0, "flower", &s1_dup, s2_p, pool));
 
       /* Value of "flower" is 's2'. */
 
-      FAILS_WITH_BPV(svn_fs_change_rev_prop2(fs, 0, "flower", &s1_p, NULL, pool));
+      FAILS_WITH_BOV(svn_fs_change_rev_prop2(fs, 0, "flower", &s1_p, NULL, pool));
       SVN_ERR(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, NULL, pool));
 
       /* Value of "flower" is <not set>. */
 
-      FAILS_WITH_BPV(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, s1_p, pool));
+      FAILS_WITH_BOV(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, s1_p, pool));
       SVN_ERR(svn_fs_change_rev_prop2(fs, 0, "flower", &unset, s1_p, pool));
 
       /* Value of "flower" is 's1'. */

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_subr/cache-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_subr/cache-test.c?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_subr/cache-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_subr/cache-test.c Tue Sep 28 17:35:22 2010
@@ -71,11 +71,12 @@ deserialize_revnum(void **out,
                    apr_size_t data_len,
                    apr_pool_t *pool)
 {
-  svn_revnum_t *in_rev, *out_rev;
+  const svn_revnum_t *in_rev = (const svn_revnum_t *) data;
+  svn_revnum_t *out_rev;
+
   if (data_len != sizeof(*in_rev))
     return svn_error_create(SVN_ERR_REVNUM_PARSE_FAILURE, NULL,
                             _("Bad size for revision number in cache"));
-  in_rev = (svn_revnum_t *) data;
   out_rev = apr_palloc(pool, sizeof(*out_rev));
   *out_rev = *in_rev;
   *out = out_rev;

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_subr/target-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_subr/target-test.c?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_subr/target-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_subr/target-test.c Tue Sep 28 17:35:22 2010
@@ -64,7 +64,8 @@ condense_targets_tests_helper(const char
   apr_array_header_t *targets;
   apr_array_header_t *condensed_targets;
   const char *common_path, *common_path2, *curdir;
-  char *token, *iter, *exp_common_abs = (char*)exp_common;
+  char *token, *iter;
+  const char *exp_common_abs = exp_common;
   int i;
   char buf[8192];
 

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_wc/db-test.c?rev=1002283&r1=1002282&r2=1002283&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_wc/db-test.c Tue Sep 28 17:35:22 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,"
@@ -486,17 +486,15 @@ static const char * const TESTING_DATA =
    "  null, null, null, null, null, "
    "  null, null, null, 0, null, null, '()', 0); "
 #endif
-#ifdef SVN_WC__NODES_not_enabled_yet
+#ifdef SVN_WC__NODES
    "insert into nodes values ("
-   "  1, 'M', null, null, '', 'normal', 'dir', "
-   "  1, null, null, "
-   "  1, " TIME_1s ", '" AUTHOR_1 "', null, null, null, '()', null, null, "
-   "  null); "
+   "  1, 'M', 0, '', null, null, null, 'normal', null, "
+   "  1, null, 'dir', 1, " TIME_1s ", '" AUTHOR_1 "', null, '()', "
+   "  null, null, null, null, null);"
    "insert into nodes values ("
-   "  1, 'M/M-a', 'M', 'not-present', 'file', "
-   "  null, null, "
-   "  null, null, null, null, null, "
-   "  null, null, null, 0, null, null, '()', 0); "
+   "  1, 'M/M-a', 1, 'M', null, null, null, 'not-present', null, "
+   "  null, null, 'file', null, null, null, null, '()', "
+   "  null, 0, null, null, null);"
 #endif
    );
 
@@ -915,10 +913,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));