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/12/11 01:16:08 UTC

svn commit: r1044548 [34/39] - in /subversion/branches/ignore-mergeinfo: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/client-side/ contrib/hook-scripts/ contrib/server-side/ notes/api-errata/ notes/api-err...

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/authz_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/authz_tests.py Sat Dec 11 00:15:55 2010
@@ -995,10 +995,15 @@ def wc_wc_copy(sbox):
                                           expected_output,
                                           expected_wc)
 
+  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+  expected_status.remove('A/B/E', 'A/B/E/alpha', 'A/B/E/beta')
+  svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
+
   svntest.actions.run_and_verify_svn(None, None,
                                      'svn: Cannot copy.*excluded by server',
                                      'cp', sbox.ospath('A'), sbox.ospath('A2'))
 
+
   # The copy failed and A2/B/E is incomplete.  That means A2 and A2/B
   # are complete, but for the other parts of A2 the status is undefined.
   expected_output = svntest.verify.ExpectedOutput(
@@ -1007,7 +1012,6 @@ def wc_wc_copy(sbox):
      '!               ?        ?   ?           ' + sbox.ospath('A2/B/E') + '\n',
      ])
   expected_output.match_all = False
-
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'st', '--verbose', sbox.ospath('A2'))
 
@@ -1016,9 +1020,6 @@ def wc_wc_copy_revert(sbox):
 
   wc_wc_copy(sbox)
 
-  # Fails with a "No write-lock" error, as does "rm --force", on a
-  # path under A2.  Multiple repeats fail on different paths until the
-  # command completes.
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'revert', '--recursive', sbox.ospath('A2'))
   
@@ -1089,14 +1090,14 @@ test_list = [ None,
                    svntest.main.is_ra_type_file),
               Skip(multiple_matches, svntest.main.is_ra_type_file),
               Skip(wc_wc_copy, svntest.main.is_ra_type_file),
-              Skip(wc_wc_copy_revert,
-                   svntest.main.is_ra_type_file),
+              Skip(wc_wc_copy_revert, svntest.main.is_ra_type_file),
               Skip(authz_recursive_ls,
                    svntest.main.is_ra_type_file),
              ]
+serial_only = True
 
 if __name__ == '__main__':
-  svntest.main.run_tests(test_list, serial_only = True)
+  svntest.main.run_tests(test_list, serial_only = serial_only)
   # NOTREACHED
 
 

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/basic_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/basic_tests.py Sat Dec 11 00:15:55 2010
@@ -38,6 +38,9 @@ XFail = svntest.testcase.XFail
 Wimp = svntest.testcase.Wimp
 Item = wc.StateItem
 
+# Generic UUID-matching regular expression
+uuid_regex = re.compile(r"[a-fA-F0-9]{8}(-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}")
+
 ######################################################################
 # Tests
 #
@@ -208,16 +211,6 @@ def basic_update(sbox):
     "update xx/xx", [], [],
     'update', '--quiet', xx_path)
 
-  # URL's are also skipped.
-  urls = ('http://localhost/a/b/c', 'http://localhost', 'svn://localhost')
-  for url in urls:
-    exit_code, out, err = svntest.actions.run_and_verify_svn(
-      "update " + url,
-      ["Skipped '"+url+"'\n",
-      "Summary of conflicts:\n",
-      "  Skipped paths: 1\n"], [],
-      'update', url)
-
 #----------------------------------------------------------------------
 def basic_mkdir_url(sbox):
   "basic mkdir URL"
@@ -2483,12 +2476,14 @@ def basic_add_svn_format_file(sbox):
   svntest.actions.run_and_verify_status(wc_dir, output)
 
 # Issue 2586, Unhelpful error message: Unrecognized URL scheme for ''
+# See also input_validation_tests.py:invalid_mkdir_targets(), which tests
+# the same thing the other way around.
 def basic_mkdir_mix_targets(sbox):
   "mkdir mix url and local path should error"
 
   sbox.build()
   Y_url = sbox.repo_url + '/Y'
-  expected_error = ".*Illegal repository URL 'subdir'"
+  expected_error = "svn: Cannot mix repository and working copy targets"
 
   svntest.actions.run_and_verify_svn(None, None, expected_error,
                                      'mkdir', '-m', 'log_msg', Y_url, 'subdir')
@@ -2497,9 +2492,9 @@ def delete_from_url_with_spaces(sbox):
   "delete a directory with ' ' using its url"
   
   sbox.build()
-  sbox.simple_mkdir(os.path.join(sbox.wc_dir, 'Dir With Spaces'))
-  sbox.simple_mkdir(os.path.join(sbox.wc_dir, 'Dir With'))
-  sbox.simple_mkdir(os.path.join(sbox.wc_dir, 'Dir With/Spaces'))
+  sbox.simple_mkdir('Dir With Spaces')
+  sbox.simple_mkdir('Dir With')
+  sbox.simple_mkdir('Dir With/Spaces')
 
   svntest.actions.run_and_verify_svn(None, None, [],
                                       'ci', sbox.wc_dir, '-m', 'Added dir')
@@ -2551,8 +2546,136 @@ def delete_and_add_same_file(sbox):
                                         None,
                                         wc_dir)
 
+def delete_child_parent_update(sbox):
+  "rm child, commit, rm parent"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  svntest.main.run_svn(wc_dir, 'rm', sbox.ospath('A/B/E/alpha'))
+
+  expected_output = wc.State(wc_dir, {
+    'A/B/E/alpha' : Item(verb='Deleting'),
+    })
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.remove('A/B/E/alpha')
+
+  svntest.actions.run_and_verify_commit(wc_dir,
+                                        expected_output,
+                                        expected_status,
+                                        None,
+                                        wc_dir)
+
+  svntest.main.run_svn(wc_dir, 'rm', sbox.ospath('A/B/E'))
+  expected_status.tweak('A/B/E', 'A/B/E/beta', status='D ')
+
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.remove('A/B/E/alpha', 'A/B/E/beta', 'A/B/E')
+
+  # This produces a tree-conflict
+  expected_status.tweak(wc_rev=2)
+  expected_status.tweak('A/B/E', treeconflict='C')
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        [],
+                                        expected_disk,
+                                        expected_status)
+
+
+
 #----------------------------------------------------------------------
 
+def basic_relocate(sbox):
+  "basic relocate of a wc"
+  sbox.build(read_only = True)
+
+  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')
+  shutil.copytree(repo_dir, other_repo_dir)
+
+  def _verify_url(wc_path, url):
+    name = os.path.basename(wc_path)
+    expected = {'Path' : re.escape(wc_path),
+                'URL' : url,
+                'Repository Root' : '.*',
+                'Revision' : '.*',
+                'Node Kind' : 'directory',
+                'Repository UUID' : uuid_regex,
+              }
+    svntest.actions.run_and_verify_info([expected], wc_path)
+
+  # No-op relocation of just the scheme.
+  scheme = repo_url[:repo_url.index('://')+3]
+  svntest.actions.run_and_verify_svn(None, None, [], 'switch', '--relocate',
+                                     scheme, scheme, wc_dir)
+  _verify_url(wc_dir, repo_url)
+
+  # No-op relocation of a bit more of the URL.
+  substring = repo_url[:repo_url.index('://')+7]
+  svntest.actions.run_and_verify_svn(None, None, [], 'switch', '--relocate',
+                                     substring, substring, wc_dir)
+  _verify_url(wc_dir, repo_url)
+  
+  # Real relocation to OTHER_REPO_URL.
+  svntest.actions.run_and_verify_svn(None, None, [], 'switch', '--relocate',
+                                     repo_url, other_repo_url, wc_dir)
+  _verify_url(wc_dir, other_repo_url)
+
+  # ... and back again, using the newer 'svn relocate' subcommand.
+  svntest.actions.run_and_verify_svn(None, None, [], 'relocate',
+                                     other_repo_url, repo_url, wc_dir)
+  _verify_url(wc_dir, repo_url)
+
+  # To OTHER_REPO_URL again, this time with the single-URL form of
+  # 'svn relocate'.
+  svntest.actions.run_and_verify_svn(None, None, [], 'relocate',
+                                     other_repo_url, wc_dir)
+  _verify_url(wc_dir, other_repo_url)
+
+  ### TODO: When testing ra_dav or ra_svn, do relocations between
+  ### those and ra_local URLs.
+
+#----------------------------------------------------------------------
+
+def delete_urls_with_spaces(sbox):
+  "delete multiple targets with spaces"
+  sbox.build(create_wc = False)
+  
+  # Create three directories with a space in their name  
+  svntest.actions.run_and_verify_svn(None, None, [], 'mkdir',
+                                     sbox.repo_url + '/A spaced',
+                                     sbox.repo_url + '/B spaced',
+                                     sbox.repo_url + '/C spaced',
+                                     '-m', 'Created dirs')
+
+  # Try to delete the first                                     
+  svntest.actions.run_and_verify_svn(None, None, [], 'rm',
+                                     sbox.repo_url + '/A spaced',
+                                     '-m', 'Deleted A') 
+
+  # And then two at once
+  svntest.actions.run_and_verify_svn(None, None, [], 'rm',
+                                     sbox.repo_url + '/B spaced',
+                                     sbox.repo_url + '/C spaced',
+                                     '-m', 'Deleted B and C') 
+
+def ls_url_special_characters(sbox):
+  """special characters in svn ls URL"""
+  sbox.build(create_wc = False)
+
+  special_urls = [sbox.repo_url + '/A' + '/%2E',
+                  sbox.repo_url + '%2F' + 'A']
+
+  for url in special_urls:
+    svntest.actions.run_and_verify_svn('ls URL with special characters',
+                                       ['B/\n', 'C/\n', 'D/\n', 'mu\n'],
+                                       [], 'ls', 
+                                       url)
+
 ########################################################################
 # Run the tests
 
@@ -2611,6 +2734,10 @@ test_list = [ None,
               SkipUnless(meta_correct_library_being_used,
                          svntest.main.is_ra_type_dav),
               delete_and_add_same_file,
+              delete_child_parent_update,
+              basic_relocate,
+              delete_urls_with_spaces,
+              ls_url_special_characters,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/blame_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/blame_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/blame_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/blame_tests.py Sat Dec 11 00:15:55 2010
@@ -462,10 +462,10 @@ def blame_merge_info(sbox):
 
   wc_dir = sbox.wc_dir
   iota_path = os.path.join(wc_dir, 'trunk', 'iota')
+  mu_path = os.path.join(wc_dir, 'trunk', 'A', 'mu')
 
   exit_code, output, error = svntest.actions.run_and_verify_svn(
-    None, None, [],
-    'blame', '-g', iota_path)
+    None, None, [], 'blame', '-g', iota_path)
 
   expected_blame = [
       { 'revision' : 2,
@@ -481,6 +481,45 @@ def blame_merge_info(sbox):
     ]
   parse_and_verify_blame(output, expected_blame, 1)
 
+  exit_code, output, error = svntest.actions.run_and_verify_svn(
+    None, None, [], 'blame', '-g', '-r10:11', iota_path)
+
+  expected_blame = [
+      { 'revision' : None,
+        'author' : None,
+        'text' : "This is the file 'iota'.\n",
+        'merged' : 0,
+      },
+      { 'revision' : None,
+        'author' : None,
+        'text' : "'A' has changed a bit.\n",
+        'merged' : 0,
+      },
+    ]
+  parse_and_verify_blame(output, expected_blame, 1)
+
+  exit_code, output, error = svntest.actions.run_and_verify_svn(
+    None, None, [], 'blame', '-g', '-r16:17', mu_path)
+
+  expected_blame = [
+      { 'revision' : None,
+        'author' : None,
+        'text' : "This is the file 'mu'.\n",
+        'merged' : 0,
+      },
+      { 'revision' : 16,
+        'author' : 'jrandom',
+        'text' : "Don't forget to look at 'upsilon', as well.\n",
+        'merged' : 1,
+      },
+      { 'revision' : 16,
+        'author' : 'jrandom',
+        'text' : "This is yet more content in 'mu'.\n",
+        'merged' : 1,
+      },
+    ]
+  parse_and_verify_blame(output, expected_blame, 1)
+
 
 def blame_merge_out_of_range(sbox):
   "don't look for merged files out of range"

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/cat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/cat_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/cat_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/cat_tests.py Sat Dec 11 00:15:55 2010
@@ -196,6 +196,20 @@ def cat_keywords(sbox):
                                      ["This is the file 'iota'.\n", "$Revision: 2 $\n"],
                                      [], 'cat', iota_path)
 
+def cat_url_special_characters(sbox):
+  """special characters in svn cat URL"""
+  sbox.build(create_wc = False)
+  wc_dir = sbox.wc_dir
+
+  special_urls = [sbox.repo_url + '/A' + '/%2E',
+                  sbox.repo_url + '%2F' + 'A']
+
+  expected_err = ["svn: warning: URL '" + sbox.repo_url + '/A'  + "'"
+                   + " refers to a directory\n"]
+
+  for url in special_urls:
+    svntest.actions.run_and_verify_svn2(None, None, expected_err, 0,
+                                        'cat', url)
 
 ########################################################################
 # Run the tests
@@ -210,6 +224,7 @@ test_list = [ None,
               cat_skip_uncattable,
               cat_unversioned_file,
               cat_keywords,
+              cat_url_special_characters,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/copy_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/copy_tests.py Sat Dec 11 00:15:55 2010
@@ -38,7 +38,7 @@ SkipUnless = svntest.testcase.SkipUnless
 XFail = svntest.testcase.XFail
 Wimp = svntest.testcase.Wimp
 Item = svntest.wc.StateItem
-
+exp_noop_up_out = svntest.actions.expected_noop_update_output
 
 #
 #----------------------------------------------------------------------
@@ -1543,7 +1543,7 @@ def wc_to_wc_copy_deleted(sbox):
     'A/B2'         : Item(status='A ', wc_rev='-', copied='+'),
     'A/B2/E'       : Item(status='  ', wc_rev='-', copied='+'),
     'A/B2/E/beta'  : Item(status='  ', wc_rev='-', copied='+'),
-    'A/B2/E/alpha' : Item(status='D ', wc_rev=2),
+    'A/B2/E/alpha' : Item(status='D ', wc_rev='-', copied='+'),
     'A/B2/lambda'  : Item(status='D ', wc_rev='-', copied='+'),
     'A/B2/F'       : Item(status='D ', wc_rev='-', copied='+'),
     })
@@ -2411,6 +2411,8 @@ def move_dir_out_of_moved_dir(sbox):
                                         None,
                                         wc_dir)
 
+# Includes regression testing for issue #3429 ("svn mv A B; svn mv B A"
+# generates replace without history).
 def move_file_back_and_forth(sbox):
   "move a moved file back to original location"
 
@@ -2420,25 +2422,27 @@ def move_file_back_and_forth(sbox):
   rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
   rho_move_path = os.path.join(wc_dir, 'A', 'D', 'rho_moved')
 
-  # Move A/D/G/rho to A/D/rho_moved
+  # Move A/D/G/rho away from and then back to its original path
   svntest.actions.run_and_verify_svn(None, None, [], 'mv',
                                      rho_path, rho_move_path)
-
-  # Move the moved file: A/D/rho_moved to A/B/F/rho_move_moved
   svntest.actions.run_and_verify_svn(None, None, [], 'mv',
                                      rho_move_path, rho_path)
 
-  # Created expected output tree for 'svn ci':
+  # Check expected status before commit
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+    'A/D/G/rho' : Item(status='R ', copied='+', wc_rev='-'),
+    })
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Commit, and check expected output and status
   expected_output = svntest.wc.State(wc_dir, {
     'A/D/G/rho' : Item(verb='Replacing'),
     })
-
-  # Create expected status tree
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
     'A/D/G/rho' : Item(status='  ', wc_rev=2),
     })
-
   svntest.actions.run_and_verify_commit(wc_dir,
                                         expected_output,
                                         expected_status,
@@ -2446,6 +2450,8 @@ def move_file_back_and_forth(sbox):
                                         wc_dir)
 
 
+# Includes regression testing for issue #3429 ("svn mv A B; svn mv B A"
+# generates replace without history).
 def move_dir_back_and_forth(sbox):
   "move a moved dir back to original location"
 
@@ -2474,6 +2480,23 @@ def move_dir_back_and_forth(sbox):
   svntest.actions.run_and_verify_svn(None, None, expected_err,
                                      'mv', D_move_path, D_path)
 
+  if svntest.main.wc_is_singledb(wc_dir):
+    # Verify that the status indicates a replace with history
+    expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+    expected_status.add({
+      'A/D'               : Item(status='R ', copied='+', wc_rev='-'),
+      'A/D/G'             : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/G/pi'          : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/G/rho'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/G/tau'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/gamma'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/H'             : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/H/chi'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/H/omega'       : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/H/psi'         : Item(status='  ', copied='+', wc_rev='-'),
+      })
+    svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
 def copy_move_added_paths(sbox):
   "copy and move added paths without commits"
 
@@ -4228,7 +4251,7 @@ def reverse_merge_move(sbox):
   rav_svn(None, None, [], 'co', sbox.repo_url, wc2_dir)
 
   # Update working directory and ensure that we are at revision 1.
-  rav_svn(None, ["At revision 1.\n"], [], 'up', wc_dir)
+  rav_svn(None, exp_noop_up_out(1), [], 'up', wc_dir)
 
   # Add new folder and file, later commit
   new_path = os.path.join(a_dir, 'New')
@@ -4237,12 +4260,12 @@ def reverse_merge_move(sbox):
   svntest.main.file_append(first_path, 'appended first text')
   svntest.main.run_svn(None, "add", new_path)
   rav_svn(None, None, [], 'ci', wc_dir, '-m', 'Add new folder %s' % new_path)
-  rav_svn(None, ["At revision 2.\n"], [], 'up', wc_dir)
+  rav_svn(None, exp_noop_up_out(2), [], 'up', wc_dir)
 
   # Reverse merge to revert previous changes and commit
   rav_svn(None, None, [], 'merge', '-c', '-2', a_repo_url, a_dir)
   rav_svn(None, None, [], 'ci', '-m', 'Reverting svn merge -c -2.', a_dir)
-  rav_svn(None, ["At revision 3.\n"], [], 'up', wc_dir)
+  rav_svn(None, exp_noop_up_out(3), [], 'up', wc_dir)
 
   # Reverse merge again to undo last revert.
   rav_svn(None, None, [], 'merge', '-c', '-3', a_repo_url, a_dir)
@@ -4332,6 +4355,8 @@ def nonrecursive_commit_of_copy(sbox):
                                         None,
                                         wc_dir, '--depth', 'immediates')
 
+# Regression test for issue #3474 - making a new subdir, moving files into it
+# and then renaming the subdir, breaks history of the moved files.
 def copy_added_dir_with_copy(sbox):
   """copy of new dir with copied file keeps history"""
 
@@ -4358,8 +4383,6 @@ def copy_added_dir_with_copy(sbox):
       'NewDir2/mu'        : Item(status='A ', copied='+', wc_rev='-'),
     })
 
-  # Currently this fails because NewDir2/mu loses its history in the copy
-  # from NewDir to NewDir2
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
 
@@ -4422,10 +4445,10 @@ def move_dir_containing_move(sbox):
       'A/B_tmp'               : Item(status='A ', copied='+', wc_rev='-'),
       # alpha has a revision that isn't reported by status.
       'A/B_tmp/E'             : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B_tmp/E/alpha'       : Item(status='D ', wc_rev='?', entry_rev='1'),
+      'A/B_tmp/E/alpha'       : Item(status='D ', copied='+', wc_rev='-'),
       'A/B_tmp/E/alpha_moved' : Item(status='A ', copied='+', wc_rev='-'),
       'A/B_tmp/E/beta'        : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B_tmp/F'             : Item(status='D ', wc_rev='?'),
+      'A/B_tmp/F'             : Item(status='D ', copied='+', wc_rev='-'),
       'A/B_tmp/F_moved'       : Item(status='A ', copied='+', wc_rev='-'),
       'A/B_tmp/lambda'        : Item(status='  ', copied='+', wc_rev='-'),
     })
@@ -4445,12 +4468,11 @@ def move_dir_containing_move(sbox):
                          'A/B_tmp/lambda')
   expected_status.add({
       'A/B_moved'               : Item(status='A ', copied='+', wc_rev='-'),
-      # alpha has a revision that isn't reported by status.
       'A/B_moved/E'             : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B_moved/E/alpha'       : Item(status='D ', wc_rev='?', entry_rev='1'),
+      'A/B_moved/E/alpha'       : Item(status='D ', copied='+', wc_rev='-'),
       'A/B_moved/E/alpha_moved' : Item(status='A ', copied='+', wc_rev='-'),
       'A/B_moved/E/beta'        : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B_moved/F'             : Item(status='D ', wc_rev='?'),
+      'A/B_moved/F'             : Item(status='D ', copied='+', wc_rev='-'),
       'A/B_moved/F_moved'       : Item(status='A ', copied='+', wc_rev='-'),
       'A/B_moved/lambda'        : Item(status='  ', copied='+', wc_rev='-'),
     })
@@ -4588,7 +4610,7 @@ def changed_data_should_match_checkout(s
 
   svntest.actions.run_and_verify_svn(None, None, [], 'copy', A_B_E, E_new)
 
-  sbox.simple_commit(wc_dir)
+  sbox.simple_commit()
 
   svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
 
@@ -4618,7 +4640,7 @@ def changed_dir_data_should_match_checko
 
   svntest.actions.run_and_verify_svn(None, None, [], 'copy', A_B, B_new)
 
-  sbox.simple_commit(wc_dir)
+  sbox.simple_commit()
 
   svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
 
@@ -4671,7 +4693,6 @@ def move_added_nodes(sbox):
   expected_status.add({'X/Z' : Item(status='A ', wc_rev='0')})
   svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
 
-# This test currently fails, but should work ok once we move to single DB
 def copy_over_deleted_dir(sbox):
   "copy a directory over a deleted directory"
   sbox.build(read_only = True)
@@ -4680,6 +4701,247 @@ def copy_over_deleted_dir(sbox):
   main.run_svn(None, 'cp', os.path.join(sbox.wc_dir, 'A/D'),
                os.path.join(sbox.wc_dir, 'A/B'))
 
+def mixed_rev_copy_del(sbox):
+  """copy mixed-rev and delete children"""
+  
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Delete and commit A/B/E/alpha
+  svntest.main.run_svn(None, 'rm', sbox.ospath('A/B/E/alpha'))
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/B/E/alpha', status='D ')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/B/E/alpha': Item(verb='Deleting'),
+    })
+  expected_status.remove('A/B/E/alpha')
+  svntest.actions.run_and_verify_commit(wc_dir,
+                                        expected_output,
+                                        expected_status,
+                                        None,
+                                        wc_dir)
+
+  # Update to r2, then update A/B/E/alpha and A/B/E/beta to r1
+  svntest.main.run_svn(None, 'up', wc_dir)
+  expected_status.tweak(wc_rev=2)
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+  svntest.main.run_svn(None, 'up', '-r1',
+                       sbox.ospath('A/B/E/alpha'),
+                       sbox.ospath('A/B/E/beta'))
+  expected_status.add({
+    'A/B/E/alpha' : Item(status='  ', wc_rev=1),
+    })
+  expected_status.tweak('A/B/E/beta', wc_rev=1)
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Copy A/B/E to A/B/E_copy
+  svntest.actions.run_and_verify_svn(None, None, [], 'cp',
+                                     sbox.ospath('A/B/E'),
+                                     sbox.ospath('A/B/E_copy'))
+  expected_status.add({
+    'A/B/E_copy'       : Item(status='A ', copied='+', wc_rev='-'),
+    'A/B/E_copy/alpha' : Item(status='  ', copied='+', wc_rev='-'),
+    'A/B/E_copy/beta'  : Item(status='  ', copied='+', wc_rev='-'),
+    })
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Delete A/B/E_copy/alpha and A/B/E_copy/beta
+  svntest.main.run_svn(None, 'rm',
+                       sbox.ospath('A/B/E_copy/alpha'),
+                       sbox.ospath('A/B/E_copy/beta'))
+  expected_status.tweak('A/B/E_copy/alpha', 'A/B/E_copy/beta', status='D ')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # This test currently fails above, as both alpha and beta disappear
+  # from status, what should happen is unclear.  In 1.6 both names
+  # remained in status 'D'.
+
+  # The commit doesn't work either, it should not delete alpha but
+  # must delete beta.  In 1.6 both alpha and beta were deleted and the
+  # commit failed.  It's not clear how the client can determine that
+  # alpha and beta should be treated differently.
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/B/E_copy'      : Item(verb='Adding'),
+    'A/B/E_copy/beta' : Item(verb='Deleting'),
+    })
+  expected_status.tweak('A/B/E_copy', wc_rev=3, copied=None)
+  expected_status.remove('A/B/E_copy/alpha', 'A/B/E_copy/beta')
+  svntest.actions.run_and_verify_commit(wc_dir,
+                                        expected_output,
+                                        expected_status,
+                                        None,
+                                        wc_dir)
+def copy_delete_undo(sbox, use_revert):
+  "copy, delete child, undo"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Copy directory with children
+  svntest.main.run_svn(wc_dir, 'copy',
+                       sbox.ospath('A/B/E'), sbox.ospath('A/B/E-copied'))
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+    'A/B/E-copied'       : Item(status='A ', copied='+', wc_rev='-'),
+    'A/B/E-copied/alpha' : Item(status='  ', copied='+', wc_rev='-'),
+    'A/B/E-copied/beta'  : Item(status='  ', copied='+', wc_rev='-'),
+    })
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Delete a child
+  svntest.main.run_svn(wc_dir, 'rm', sbox.ospath('A/B/E-copied/alpha'))
+  expected_status.tweak('A/B/E-copied/alpha', status='D ')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Undo the whole copy
+  if (use_revert):
+    svntest.main.run_svn(wc_dir, 'revert', '--recursive',
+                         sbox.ospath('A/B/E-copied'))
+    svntest.main.safe_rmtree(os.path.join(wc_dir, 'A/B/E-copied'))
+  else:
+    svntest.main.run_svn(wc_dir, 'rm', '--force', sbox.ospath('A/B/E-copied'))
+  expected_status.remove('A/B/E-copied',
+                         'A/B/E-copied/alpha',
+                         'A/B/E-copied/beta')
+
+  # Undo via revert FAILs here because a wq item remains
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Copy a directory without children.
+  svntest.main.run_svn(wc_dir, 'copy',
+                       sbox.ospath('A/B/F'), sbox.ospath('A/B/E-copied'))
+  expected_status.add({
+    'A/B/E-copied'       : Item(status='A ', copied='+', wc_rev='-'),
+    })
+
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+def copy_delete_delete(sbox):
+  "copy, delete child, delete copy"
+  copy_delete_undo(sbox, False)
+
+def copy_delete_revert(sbox):
+  "copy, delete child, revert copy"
+  copy_delete_undo(sbox, True)
+
+def delete_replace_delete(sbox):
+  "delete, replace, delete"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Delete directory with children
+  svntest.main.run_svn(wc_dir, 'rm', sbox.ospath('A/B/E'))
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/B/E', 'A/B/E/alpha', 'A/B/E/beta', status='D ')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Replace with directory with different children
+  svntest.main.run_svn(wc_dir, 'copy',
+                       sbox.ospath('A/D/G'), sbox.ospath('A/B/E'))
+  expected_status.tweak('A/B/E', status='R ', copied='+', wc_rev='-')
+  expected_status.add({
+    'A/B/E/pi' : Item(status='  ', copied='+', wc_rev='-'),
+    'A/B/E/rho' : Item(status='  ', copied='+', wc_rev='-'),
+    'A/B/E/tau' : Item(status='  ', copied='+', wc_rev='-'),
+    })
+  # A/B/E/alpha and A/B/E/beta show up as deleted, is that right?
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Delete replacement
+  svntest.main.run_svn(wc_dir, 'rm', '--force', sbox.ospath('A/B/E'))
+  expected_status.tweak('A/B/E', status='D ', copied=None, wc_rev='1')
+  expected_status.remove('A/B/E/pi', 'A/B/E/rho', 'A/B/E/tau')
+  # Currently fails because pi, rho, tau get left behind
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+A_B_children = ['A/B/lambda', 'A/B/F', 'A/B/E/alpha', 'A/B/E/beta', 'A/B/E']
+A_D_children = ['A/D/gamma', 'A/D/G', 'A/D/G/pi', 'A/D/G/rho', 'A/D/G/tau',
+                'A/D/H', 'A/D/H/chi', 'A/D/H/psi', 'A/D/H/omega']
+
+def copy_repos_over_deleted_same_kind(sbox):
+  "copy repos node over deleted node, same kind"
+  sbox.build(read_only = True)
+  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+
+  # Set up some deleted paths
+  sbox.simple_rm('iota', 'A/B')
+  for path in ['iota', 'A/B'] + A_B_children:
+    expected_status.tweak(path, status='D ')
+
+  # Test copying
+  main.run_svn(None, 'cp', sbox.repo_url + '/A/mu', sbox.ospath('iota'))
+  expected_status.tweak('iota', status='R ', wc_rev='-', copied='+')
+  main.run_svn(None, 'cp', sbox.repo_url + '/A/D', sbox.ospath('A/B'))
+  expected_status.tweak('A/B', status='R ', wc_rev='-', copied='+')
+  for child in A_D_children:
+    expected_status.add({ child.replace('A/D', 'A/B'):
+                          Item(status='  ', wc_rev='-', copied='+')})
+  svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
+
+def copy_repos_over_deleted_other_kind(sbox):
+  "copy repos node over deleted node, other kind"
+  sbox.build(read_only = True)
+  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+
+  # Set up some deleted paths
+  sbox.simple_rm('iota', 'A/B')
+  for path in ['iota', 'A/B'] + A_B_children:
+    expected_status.tweak(path, status='D ')
+
+  # Test copying
+  main.run_svn(None, 'cp', sbox.repo_url + '/iota', sbox.ospath('A/B'))
+  expected_status.tweak('A/B', status='R ', wc_rev='-', copied='+')
+  expected_status.remove(*A_B_children)
+  main.run_svn(None, 'cp', sbox.repo_url + '/A/B', sbox.ospath('iota'))
+  expected_status.tweak('iota', status='R ', wc_rev='-', copied='+')
+  for child in A_B_children:
+    expected_status.add({ child.replace('A/B', 'iota'):
+                          Item(status='  ', wc_rev='-', copied='+')})
+  svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
+
+def copy_wc_over_deleted_same_kind(sbox):
+  "copy WC node over a deleted node, same kind"
+  sbox.build(read_only = True)
+  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+
+  # Set up some deleted paths
+  sbox.simple_rm('iota', 'A/B')
+  for path in ['iota', 'A/B'] + A_B_children:
+    expected_status.tweak(path, status='D ')
+
+  # Test copying
+  main.run_svn(None, 'cp', sbox.ospath('A/mu'), sbox.ospath('iota'))
+  expected_status.tweak('iota', status='R ', wc_rev='-', copied='+')
+  main.run_svn(None, 'cp', sbox.ospath('A/D'), sbox.ospath('A/B'))
+  expected_status.tweak('A/B', status='R ', wc_rev='-', copied='+')
+  for child in A_D_children:
+    expected_status.add({ child.replace('A/D', 'A/B'):
+                          Item(status='  ', wc_rev='-', copied='+')})
+  svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
+
+def copy_wc_over_deleted_other_kind(sbox):
+  "copy WC node over deleted node, other kind"
+  sbox.build(read_only = True)
+  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+
+  # Set up some deleted paths
+  sbox.simple_rm('iota', 'A/B')
+  for path in ['iota', 'A/B'] + A_B_children:
+    expected_status.tweak(path, status='D ')
+
+  # Test copying
+  main.run_svn(None, 'cp', sbox.ospath('A/mu'), sbox.ospath('A/B'))
+  expected_status.tweak('A/B', status='R ', wc_rev='-', copied='+')
+  expected_status.remove(*A_B_children)
+  main.run_svn(None, 'cp', sbox.ospath('A/D'), sbox.ospath('iota'))
+  expected_status.tweak('iota', status='R ', wc_rev='-', copied='+')
+  for child in A_D_children:
+    expected_status.add({ child.replace('A/D', 'iota'):
+                          Item(status='  ', wc_rev='-', copied='+')})
+  svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
+
 
 ########################################################################
 # Run the tests
@@ -4775,6 +5037,14 @@ test_list = [ None,
               XFail(changed_dir_data_should_match_checkout),
               move_added_nodes,
               copy_over_deleted_dir,
+              XFail(mixed_rev_copy_del),
+              copy_delete_delete,
+              XFail(copy_delete_revert),
+              delete_replace_delete,
+              copy_repos_over_deleted_same_kind,
+              copy_repos_over_deleted_other_kind,
+              copy_wc_over_deleted_same_kind,
+              copy_wc_over_deleted_other_kind,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/depth_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/depth_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/depth_tests.py Sat Dec 11 00:15:55 2010
@@ -2718,6 +2718,90 @@ def update_depth_empty_root_of_infinite_
                                         None, None,
                                         None, None, None, None, wc_dir)
 
+def sparse_update_with_dash_dash_parents(sbox):
+  """update --parents"""
+
+  sbox.build(create_wc = False)
+  sbox.add_test_path(sbox.wc_dir, True)
+  alpha_path = os.path.join(sbox.wc_dir, 'A', 'B', 'E', 'alpha')
+  pi_path = os.path.join(sbox.wc_dir, 'A', 'D', 'G', 'pi')
+  omega_path = os.path.join(sbox.wc_dir, 'A', 'D', 'H', 'omega')
+  
+  # Start with a depth=empty root checkout.
+  svntest.actions.run_and_verify_svn(
+      "Unexpected error from co --depth=empty",
+      svntest.verify.AnyOutput, [],
+      "co", "--depth", "empty", sbox.repo_url, sbox.wc_dir)
+
+  # Now, let's use --parents to pull in some scattered file children.
+  expected_output = svntest.wc.State(sbox.wc_dir, {
+    'A'            : Item(status='A '),
+    'A/B'          : Item(status='A '),
+    'A/B/E'        : Item(status='A '),
+    'A/B/E/alpha'  : Item(status='A '),
+    })
+  expected_disk = svntest.wc.State('', {
+    'A'            : Item(contents=None),
+    'A/B'          : Item(contents=None),
+    'A/B/E'        : Item(contents=None),
+    'A/B/E/alpha'  : Item(contents="This is the file 'alpha'.\n"),
+    })
+  expected_status = svntest.wc.State(sbox.wc_dir, {
+    ''             : Item(status='  ', wc_rev=1),
+    'A'            : Item(status='  ', wc_rev=1),
+    'A/B'          : Item(status='  ', wc_rev=1),
+    'A/B/E'        : Item(status='  ', wc_rev=1),
+    'A/B/E/alpha'  : Item(status='  ', wc_rev=1),
+    })
+  svntest.actions.run_and_verify_update(sbox.wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None, None, None, False,
+                                        '--parents', alpha_path)
+
+  expected_output = svntest.wc.State(sbox.wc_dir, {
+    'A/D'          : Item(status='A '),
+    'A/D/G'        : Item(status='A '),
+    'A/D/G/pi'     : Item(status='A '),
+    })
+  expected_disk.add({
+    'A/D'          : Item(contents=None),
+    'A/D/G'        : Item(contents=None),
+    'A/D/G/pi'     : Item(contents="This is the file 'pi'.\n"),
+    })
+  expected_status.add({
+    'A/D'          : Item(status='  ', wc_rev=1),
+    'A/D/G'        : Item(status='  ', wc_rev=1),
+    'A/D/G/pi'     : Item(status='  ', wc_rev=1),
+    })    
+  svntest.actions.run_and_verify_update(sbox.wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None, None, None, False,
+                                        '--parents', pi_path)
+                    
+  expected_output = svntest.wc.State(sbox.wc_dir, {
+    'A/D/H'        : Item(status='A '),
+    'A/D/H/omega'  : Item(status='A '),
+    })
+  expected_disk.add({
+    'A/D/H'        : Item(contents=None),
+    'A/D/H/omega'  : Item(contents="This is the file 'omega'.\n"),
+    })
+  expected_status.add({
+    'A/D/H'        : Item(status='  ', wc_rev=1),
+    'A/D/H/omega'  : Item(status='  ', wc_rev=1),
+    })    
+  svntest.actions.run_and_verify_update(sbox.wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None, None, None, False,
+                                        '--parents', omega_path)
+  
+
 #----------------------------------------------------------------------
 # list all tests here, starting with None:
 test_list = [ None,
@@ -2763,6 +2847,7 @@ test_list = [ None,
               tree_conflicts_resolved_depth_infinity,
               update_excluded_path_sticky_depths,
               update_depth_empty_root_of_infinite_children,
+              sparse_update_with_dash_dash_parents,
               ]
 
 if __name__ == "__main__":

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/diff_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/diff_tests.py Sat Dec 11 00:15:55 2010
@@ -34,6 +34,7 @@ import svntest
 # (abbreviation)
 Skip = svntest.testcase.Skip
 XFail = svntest.testcase.XFail
+Wimp = svntest.testcase.Wimp
 Item = svntest.wc.StateItem
 
 
@@ -2409,8 +2410,12 @@ def diff_repos_wc_add_with_props(sbox):
   diff_X_bar_base_r3 = make_diff_header("X/bar", "revision 0",
                                                  "revision 3") + diff_X_bar
 
-  expected_output_r1_base = diff_X_r1_base + diff_X_bar_r1_base + diff_foo_r1_base
-  expected_output_base_r3 = diff_foo_base_r3 + diff_X_bar_base_r3 + diff_X_base_r3
+  expected_output_r1_base = svntest.verify.UnorderedOutput(diff_X_r1_base +
+                                                           diff_X_bar_r1_base +
+                                                           diff_foo_r1_base)
+  expected_output_base_r3 = svntest.verify.UnorderedOutput(diff_foo_base_r3 +
+                                                           diff_X_bar_base_r3 +
+                                                           diff_X_base_r3)
 
   os.chdir(sbox.wc_dir)
 
@@ -2581,9 +2586,9 @@ def basic_diff_summarize(sbox):
 
   # Add props to some items that will be deleted, and commit.
   sbox.simple_propset('prop', 'val',
-                      p('A/C'),
-                      p('A/D/gamma'),
-                      p('A/D/H/chi'))
+                      'A/C',
+                      'A/D/gamma',
+                      'A/D/H/chi')
   sbox.simple_commit() # r2
   sbox.simple_update()
 
@@ -2591,37 +2596,37 @@ def basic_diff_summarize(sbox):
   svntest.main.file_append(p('A/mu'), 'new text\n')
 
   # Prop modification.
-  sbox.simple_propset('prop', 'val', p('iota'))
+  sbox.simple_propset('prop', 'val', 'iota')
 
   # Both content and prop mods.
   svntest.main.file_append(p('A/D/G/tau'), 'new text\n')
-  sbox.simple_propset('prop', 'val', p('A/D/G/tau'))
+  sbox.simple_propset('prop', 'val', 'A/D/G/tau')
 
   # File addition.
   svntest.main.file_append(p('newfile'), 'new text\n')
   svntest.main.file_append(p('newfile2'), 'new text\n')
-  sbox.simple_add(p('newfile'),
-                  p('newfile2'))
-  sbox.simple_propset('prop', 'val', p('newfile'))
+  sbox.simple_add('newfile',
+                  'newfile2')
+  sbox.simple_propset('prop', 'val', 'newfile')
 
   # File deletion.
-  sbox.simple_rm(p('A/B/lambda'),
-                 p('A/D/gamma'))
-                 
+  sbox.simple_rm('A/B/lambda',
+                 'A/D/gamma')
+
   # Directory addition.
   os.makedirs(p('P'))
   os.makedirs(p('Q/R'))
   svntest.main.file_append(p('Q/newfile'), 'new text\n')
   svntest.main.file_append(p('Q/R/newfile'), 'new text\n')
-  sbox.simple_add(p('P'),
-                  p('Q'))
+  sbox.simple_add('P',
+                  'Q')
   sbox.simple_propset('prop', 'val',
-                      p('P'),
-                      p('Q/newfile'))
+                      'P',
+                      'Q/newfile')
 
   # Directory deletion.
-  sbox.simple_rm(p('A/D/H'),
-                 p('A/C'))
+  sbox.simple_rm('A/D/H',
+                 'A/C')
  
   # Commit, because diff-summarize handles repos-repos only.
   #svntest.main.run_svn(False, 'st', wc_dir)
@@ -3709,6 +3714,42 @@ def diff_git_with_props(sbox):
   svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', 
                                      '--git', wc_dir)
 
+def diff_git_with_props_on_dir(sbox):
+  "diff in git format showing prop changes on dir"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Now commit the local mod, creating rev 2.
+  expected_output = svntest.wc.State(wc_dir, {
+    '.' : Item(verb='Sending'),
+    })
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+    '' : Item(status='  ', wc_rev=2),
+    })
+
+  svntest.main.run_svn(None, 'ps', 'a','b', wc_dir)
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+                                        expected_status, None, wc_dir)
+
+  was_cwd = os.getcwd()
+  os.chdir(wc_dir)
+  expected_output = make_git_diff_header(".", "", "revision 1",
+                                         "revision 2",
+                                         add=False, text_changes=False) + [
+      "\n",
+      "Property changes on: \n",
+      "___________________________________________________________________\n",
+      "Added: a\n",
+      "## -0,0 +1 ##\n",
+      "+b\n",
+  ]
+
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff',
+                                     '-c2', '--git')
+  os.chdir(was_cwd)
+
 
 # Check ignoring mergeinfo in a diff
 def diff_ignore_mergeinfo(sbox):
@@ -3853,7 +3894,7 @@ test_list = [ None,
               diff_weird_author,
               diff_ignore_whitespace,
               diff_ignore_eolstyle,
-              XFail(diff_in_renamed_folder),
+              diff_in_renamed_folder,
               diff_with_depth,
               diff_ignore_eolstyle_empty_lines,
               diff_backward_repos_wc_copy,
@@ -3869,7 +3910,8 @@ test_list = [ None,
               diff_prop_missing_context,
               diff_prop_multiple_hunks,
               diff_git_empty_files,
-              diff_git_with_props,
+              diff_git_with_props, 
+              diff_git_with_props_on_dir,
               diff_ignore_mergeinfo,
               ]
 

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/entries_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/entries_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/entries_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/entries_tests.py Sat Dec 11 00:15:55 2010
@@ -233,12 +233,9 @@ def deletion_details(sbox):
   entries = svntest.main.run_entriesdump(D2_G_path)
   check_names(entries, 'pi')
 
-  # case (1) of the DELETED nodes COPIED handling (see comment in
-  # read_entries). we are a deletion of a copied subtree. thus, extra
-  # work at commit time. thus, not COPIED.
   # oh, and this sucker has a URL, too
   validate(entries['pi'], url='%s/A/D2/G/pi' % sbox.repo_url,
-           copied=False, schedule=SCHEDULE_DELETE)
+           copied=True, schedule=SCHEDULE_DELETE)
 
   ### hmm. somehow, subtrees can be *added* over a *deleted* subtree.
   ### maybe this can happen via 'svn merge' ? ... the operations below

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/export_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/export_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/export_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/export_tests.py Sat Dec 11 00:15:55 2010
@@ -413,8 +413,8 @@ def export_HEADplus1_fails(sbox):
                                      'export', sbox.repo_url, sbox.wc_dir,
                                      '-r', 38956)
 
-def export_to_explicit_cwd(sbox):
-  "export a single file to '.'"
+def export_url_to_explicit_cwd(sbox):
+  "export a single file to '.', via url"
   sbox.build(create_wc = False, read_only = True)
 
   svntest.main.safe_rmtree(sbox.wc_dir)
@@ -431,6 +431,47 @@ def export_to_explicit_cwd(sbox):
                                         '.', expected_output,
                                         expected_disk)
 
+def export_file_to_explicit_cwd(sbox):
+  "export a single file to '.', via wc"
+  sbox.build(create_wc = True, read_only = True)
+
+  iota_path = os.path.abspath(os.path.join(sbox.wc_dir, 'iota'))
+
+  tmpdir = sbox.get_tempname('file-exports')
+  expected_output = svntest.wc.State('', {
+      'iota': Item(status='A '),
+      })
+  expected_disk = svntest.wc.State('', {
+      'iota': Item(contents="This is the file 'iota'.\n"),
+      })
+
+  os.mkdir(tmpdir)
+  os.chdir(tmpdir)
+  svntest.actions.run_and_verify_export(iota_path,
+                                        '.', expected_output,
+                                        expected_disk)
+
+def export_file_overwrite_fails(sbox):
+  "exporting a file refuses to silently overwrite"
+  sbox.build(create_wc = True, read_only = True)
+
+  iota_path = os.path.abspath(os.path.join(sbox.wc_dir, 'iota'))
+  not_iota_contents = "This obstructs 'iota'.\n"
+
+  tmpdir = sbox.get_tempname('file-overwrites')
+  os.mkdir(tmpdir)
+
+  # Run it
+  open(os.path.join(tmpdir, 'iota'), 'w').write(not_iota_contents)
+  svntest.actions.run_and_verify_svn(None, [], '.*exist.*',
+                                     'export', iota_path, tmpdir)
+
+  # Verify it failed
+  expected_disk = svntest.wc.State('', {
+      'iota': Item(contents=not_iota_contents),
+      })
+  svntest.actions.verify_disk(tmpdir, expected_disk)
+
 def export_ignoring_keyword_translation(sbox):
   "export ignoring keyword translation"
   sbox.build()
@@ -621,6 +662,36 @@ def export_externals_with_native_eol(sbo
                                         expected_disk,
                                         '--native-eol', 'CR')
 
+def export_to_current_dir(sbox):
+  "export to current dir"
+  # Issue 3727: Forced export in current dir creates unexpected subdir.
+  sbox.build(create_wc = False, read_only = True)
+
+  svntest.main.safe_rmtree(sbox.wc_dir)
+  os.mkdir(sbox.wc_dir)
+
+  orig_dir = os.getcwd()
+  os.chdir(sbox.wc_dir)
+
+  export_url = sbox.repo_url + '/A/B/E'
+  export_target = '.'
+  expected_output = svntest.wc.State('', {
+    '.'         : Item(status='A '),
+    'alpha'     : Item(status='A '),
+    'beta'      : Item(status='A '),
+    })
+  expected_disk = svntest.wc.State('', {
+    'alpha'     : Item("This is the file 'alpha'.\n"),
+    'beta'      : Item("This is the file 'beta'.\n"),
+    })
+  svntest.actions.run_and_verify_export(export_url,
+                                        export_target,
+                                        expected_output,
+                                        expected_disk,
+                                        '--force')
+
+  os.chdir(orig_dir)
+
 ########################################################################
 # Run the tests
 
@@ -644,12 +715,15 @@ test_list = [ None,
               export_with_state_deleted,
               export_creates_intermediate_folders,
               export_HEADplus1_fails,
-              export_to_explicit_cwd,
+              export_url_to_explicit_cwd,
+              export_file_to_explicit_cwd,
+              XFail(export_file_overwrite_fails),
               export_ignoring_keyword_translation,
               export_working_copy_ignoring_keyword_translation,
               export_with_url_unsafe_characters,
               XFail(export_working_copy_with_depths),
               export_externals_with_native_eol,
+              export_to_current_dir,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/externals_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/externals_tests.py Sat Dec 11 00:15:55 2010
@@ -947,7 +947,7 @@ def old_style_externals_ignore_peg_reg(s
   svntest.actions.run_and_verify_svn2("External '%s' used pegs" % ext.strip(),
                                       None,
                                       expected_error,
-                                      0,
+                                      1,
                                       'up',
                                       wc_dir)
 
@@ -1007,8 +1007,7 @@ def cannot_move_or_remove_file_externals
   # Bring the working copy up to date and check that the file the file
   # external is switched to still exists.
   svntest.actions.run_and_verify_svn(None, None, [],
-                                     'up',
-                                     repo_url, wc_dir)
+                                     'up', wc_dir)
 
   open(os.path.join(wc_dir, 'A', 'D', 'gamma')).close()
 
@@ -1036,8 +1035,7 @@ def can_place_file_external_into_dir_ext
   # Bring the working copy up to date and check that the file the file
   # external is switched to still exists.
   svntest.actions.run_and_verify_svn(None, None, [],
-                                     'up',
-                                     repo_url, wc_dir)
+                                     'up', wc_dir)
 
   beta1_path = os.path.join(wc_dir, 'A', 'B', 'E', 'beta')
   beta1_contents = open(beta1_path).read()
@@ -1063,9 +1061,8 @@ def can_place_file_external_into_dir_ext
   svntest.actions.run_and_verify_svn2("Able to put file external in foreign wc",
                                       None,
                                       expected_error,
-                                      0,
-                                      'up',
-                                      repo_url, wc_dir)
+                                      1,
+                                      'up', wc_dir)
 
 #----------------------------------------------------------------------
 
@@ -1082,8 +1079,7 @@ def external_into_path_with_spaces(sbox)
   change_external(wc_dir, ext)
 
   svntest.actions.run_and_verify_svn(None, None, [],
-                                     'up',
-                                     repo_url, wc_dir)
+                                     'up', wc_dir)
   probe_paths_exist([
       os.path.join(wc_dir, 'A', 'copy of D'),
       os.path.join(wc_dir, 'A', 'another copy of D'),
@@ -1334,8 +1330,7 @@ def relegate_external(sbox):
   externals_desc = '^/A/B/E        external'
   change_external(A_path, externals_desc)
   svntest.actions.run_and_verify_svn(None, None, [],
-                                     'up',
-                                     repo_url, wc_dir)
+                                     'up', wc_dir)
 
   # create another repository
   other_repo_dir, other_repo_url = sbox.add_repo_path('other')

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout Sat Dec 11 00:15:55 2010
@@ -36,6 +36,7 @@ Available subcommands:
    propget (pget, pg)
    proplist (plist, pl)
    propset (pset, ps)
+   relocate
    resolve
    resolved
    revert

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Sat Dec 11 00:15:55 2010
@@ -50,19 +50,16 @@ Valid options:
                              history
   -c [--change] ARG        : the change made in revision ARG
   --targets ARG            : pass contents of file ARG as additional args
-  --stop-on-copy           : do not cross copies while traversing history
-                             [alias: --soc]
+  --stop-on-copy [--soc]   : do not cross copies while traversing history
   --incremental            : give output suitable for concatenation
   --xml                    : output in XML
   -l [--limit] ARG         : maximum number of log entries
   --with-all-revprops      : retrieve all revision properties
   --with-no-revprops       : retrieve no revision properties
   --with-revprop ARG       : retrieve revision property ARG
-  --show-diff              : produce diff output
-                             [alias: --diff]
+  --diff                   : produce diff output
   --diff-cmd ARG           : use ARG as diff command
-  --internal-diff          : override diff-cmd specified in config file
-                             [alias: --idiff]
+  --internal-diff [--idiff] : override diff-cmd specified in config file
   -x [--extensions] ARG    : Default: '-u'. When Subversion is invoking an
                              external diff program, ARG is simply passed along
                              to the program. But when Subversion is using its
@@ -83,21 +80,19 @@ Valid options:
 Global options:
   --username ARG           : specify a username ARG
   --password ARG           : specify a password ARG
-  --no-auth-cache          : do not cache authentication tokens
-                             [alias: --nac]
+  --no-auth-cache [--nac]  : do not cache authentication tokens
   --non-interactive        : do no interactive prompting
   --trust-server-cert      : accept unknown SSL server certificates without
                              prompting (but only with '--non-interactive')
-  --config-dir ARG         : read user configuration files from directory ARG
-                             [alias: --cd]
+  --config-dir [--cd] ARG  : read user configuration files from directory ARG
   --config-option ARG      : set user configuration option in the format:
                                  FILE:SECTION:OPTION=[VALUE]
                              For example:
                                  servers:global:http-library=serf
 
-switch (sw): Update the working copy to a different URL.
+switch (sw): Update the working copy to a different URL within the same repository.
 usage: 1. switch URL[@PEGREV] [PATH]
-       2. switch --relocate FROM TO [PATH...]
+       2. switch --relocate FROM-PREFIX TO-PREFIX [PATH...]
 
   1. Update the working copy to mirror a new URL within the repository.
      This behavior is similar to 'svn update', and is the way to
@@ -119,22 +114,15 @@ usage: 1. switch URL[@PEGREV] [PATH]
      Use the --set-depth option to set a new working copy depth on the
      targets of this operation.
 
-  2. Rewrite working copy URL metadata to reflect a syntactic change only.
-     This is used when repository's root URL changes (such as a scheme
-     or hostname change) but your working copy still reflects the same
-     directory within the same repository.
-
-     FROM is the root URL which will be relocated from.
-     You can use 'svn info' to determine the root URL of the current
-     working copy directory (look for 'URL:' in its output).
-
-     TO is the root URL which will be relocated to.
+  2. The '--relocate' option is deprecated. This syntax is equivalent to
+     'svn relocate FROM-PREFIX TO-PREFIX [PATH]'.
 
   See also 'svn help update' for a list of possible characters
   reporting the action taken.
 
   Examples:
     svn switch ^/branches/1.x-release
+    svn switch --relocate http:// svn://
     svn switch --relocate http://www.example.com/repo/project \
                           svn://svn.example.com/repo/project
 
@@ -149,31 +137,27 @@ Valid options:
                                 'PREV'       revision just before COMMITTED
   -N [--non-recursive]     : obsolete; try --depth=files or --depth=immediates
   --depth ARG              : limit operation by depth ARG ('empty', 'files',
-                            'immediates', or 'infinity')
-  --set-depth ARG          : set new working copy depth to ARG ('exclude',
-                            'empty', 'files', 'immediates', or 'infinity')
-                            [alias: --sd]
+                             'immediates', or 'infinity')
+  --set-depth [--sd] ARG   : set new working copy depth to ARG ('exclude',
+                             'empty', 'files', 'immediates', or 'infinity')
   -q [--quiet]             : print nothing, or only summary information
   --diff3-cmd ARG          : use ARG as merge command
   --relocate               : relocate via URL-rewriting
-  --ignore-externals       : ignore externals definitions
-                             [alias: --ie]
+  --ignore-externals [--ie] : ignore externals definitions
   --force                  : force operation to run
   --accept ARG             : specify automatic conflict resolution action
-                            ('postpone', 'base', 'mine-conflict',
+                             ('postpone', 'base', 'mine-conflict',
                              'theirs-conflict', 'mine-full', 'theirs-full',
                              'edit', 'launch')
 
 Global options:
   --username ARG           : specify a username ARG
   --password ARG           : specify a password ARG
-  --no-auth-cache          : do not cache authentication tokens
-                             [alias: --nac]
+  --no-auth-cache [--nac]  : do not cache authentication tokens
   --non-interactive        : do no interactive prompting
   --trust-server-cert      : accept unknown SSL server certificates without
                              prompting (but only with '--non-interactive')
-  --config-dir ARG         : read user configuration files from directory ARG
-                             [alias: --cd]
+  --config-dir [--cd] ARG  : read user configuration files from directory ARG
   --config-option ARG      : set user configuration option in the format:
                                  FILE:SECTION:OPTION=[VALUE]
                              For example:

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout Sat Dec 11 00:15:55 2010
@@ -36,6 +36,7 @@ Available subcommands:
    propget (pget, pg)
    proplist (plist, pl)
    propset (pset, ps)
+   relocate
    resolve
    resolved
    revert

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/import_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/import_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/import_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/import_tests.py Sat Dec 11 00:15:55 2010
@@ -36,6 +36,7 @@ Skip = svntest.testcase.Skip
 SkipUnless = svntest.testcase.SkipUnless
 XFail = svntest.testcase.XFail
 Item = wc.StateItem
+exp_noop_up_out = svntest.actions.expected_noop_update_output
 
 ######################################################################
 # Tests
@@ -286,7 +287,8 @@ def import_avoid_empty_revision(sbox):
   svntest.main.safe_rmtree(empty_dir)
 
   # Verify that an empty revision has not been created
-  svntest.actions.run_and_verify_svn(None, [ "At revision 1.\n"],
+  svntest.actions.run_and_verify_svn(None,
+                                     exp_noop_up_out(1),
                                      [], "update",
                                      empty_dir)
 #----------------------------------------------------------------------

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/info_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/info_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/info_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/info_tests.py Sat Dec 11 00:15:55 2010
@@ -285,6 +285,55 @@ def info_on_mkdir(sbox):
                        ('depth',    {}, 'infinity'),
                        ('schedule', {}, 'add')])
 
+def info_wcroot_abspaths(sbox):
+  """wc root paths in 'svn info' output"""
+
+  def check_wcroot_paths(lines, wcroot_abspath):
+    "check that paths found on input lines beginning 'Path: ' are as expected"
+    path = None
+    target = None
+    for line in lines:
+      if line.startswith('Path: '):
+        target = line[6:].rstrip()
+      if line.startswith('Working Copy Root Path: '):
+        path = line[24:].rstrip()
+      if target is not None and path is not None:
+        break
+
+    if target is None:
+      target = "(UNKNOWN)"
+      
+    if path is None:
+      print "No WC root path for '%s'" % (target)
+      raise svntest.Failure
+    
+    if path != wcroot_abspath:
+      print("For target '%s'..." % (target))
+      print("   Reported WC root path: %s" % (path))
+      print("   Expected WC root path: %s" % (wcroot_abspath))
+      raise svntest.Failure
+
+  sbox.build(read_only=True)
+  exit_code, output, errput = svntest.main.run_svn(None, 'info', '-R', sbox.wc_dir)
+  check_wcroot_paths(output, os.path.abspath(sbox.wc_dir))
+
+def info_url_special_characters(sbox):
+  """special characters in svn info URL"""
+  sbox.build(create_wc = False)
+  wc_dir = sbox.wc_dir
+
+  special_urls = [sbox.repo_url + '/A' + '/%2E',
+                  sbox.repo_url + '%2F' + 'A']
+
+  expected = {'Path' : 'A',
+              'Repository Root' : '.*',
+              'Revision' : '1',
+              'Node Kind' : 'dir',
+             }
+
+  for url in special_urls:
+    svntest.actions.run_and_verify_info([expected], url)
+  
 ########################################################################
 # Run the tests
 
@@ -293,6 +342,8 @@ test_list = [ None,
               info_with_tree_conflicts,
               info_on_added_file,
               info_on_mkdir,
+              info_wcroot_abspaths,
+              info_url_special_characters,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/input_validation_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/input_validation_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/input_validation_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/input_validation_tests.py Sat Dec 11 00:15:55 2010
@@ -173,6 +173,80 @@ def invalid_wcpath_upgrade(sbox):
     run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'upgrade',
                              target, target)
 
+def invalid_resolve_targets(sbox):
+  "non-working copy paths for 'resolve'"
+  sbox.build(read_only=True)
+  for target in _invalid_wc_path_targets:
+    run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'resolve',
+                             '--accept', 'base', target)
+
+def invalid_resolved_targets(sbox):
+  "non-working copy paths for 'resolved'"
+  sbox.build(read_only=True)
+  for target in _invalid_wc_path_targets:
+    run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'resolved',
+                             target)
+
+def invalid_revert_targets(sbox):
+  "non-working copy paths for 'revert'"
+  sbox.build(read_only=True)
+  for target in _invalid_wc_path_targets:
+    run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'revert',
+                             target)
+
+def invalid_lock_targets(sbox):
+  "wc paths and repo URL target mixture for 'lock'"
+  sbox.build(read_only=True)
+  for (target1, target2) in [("iota", "^/"), ("file://", "iota")]:
+    run_and_verify_svn_in_wc(sbox, "svn: Cannot mix repository and working "
+                             "copy targets", 'lock', target1, target2)
+
+def invalid_unlock_targets(sbox):
+  "wc paths and repo URL target mixture for 'unlock'"
+  sbox.build(read_only=True)
+  for (target1, target2) in [("iota", "^/"), ("file://", "iota")]:
+    run_and_verify_svn_in_wc(sbox, "svn: Cannot mix repository and working "
+                             "copy targets", 'unlock', target1, target2)
+
+def invalid_status_targets(sbox):
+  "non-working copy paths for 'status'"
+  sbox.build(read_only=True)
+  for target in _invalid_wc_path_targets:
+    run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'status',
+                             target)
+
+def invalid_patch_targets(sbox):
+  "non-working copy paths for 'patch'"
+  sbox.build(read_only=True)
+  for (target1, target2) in [("foo", "^/"), ("^/", "^/"), ("^/", "foo")]:
+    run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'patch',
+                             target1, target2)
+
+def invalid_switch_targets(sbox):
+  "non-working copy paths for 'switch'"
+  sbox.build(read_only=True)
+  run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'switch',
+                           "^/", "^/")
+
+def invalid_relocate_targets(sbox):
+  "non-working copy paths for 'relocate'"
+  sbox.build(read_only=True)
+  run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'relocate',
+                           "^/", "^/", "^/")
+
+# See also basic_tests.py:basic_mkdir_mix_targets(), which tests
+# the same thing the other way around.
+def invalid_mkdir_targets(sbox):
+  "invalid targets for 'mkdir'"
+  sbox.build(read_only=True)
+  run_and_verify_svn_in_wc(sbox, "svn: Cannot mix repository and working "
+                           "copy targets", 'mkdir', "folder", "^/folder")
+
+def invalid_update_targets(sbox):
+  "non-working copy paths for 'update'"
+  sbox.build(read_only=True)
+  run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'update',
+                           "^/")
 
 ########################################################################
 # Run the tests
@@ -192,6 +266,17 @@ test_list = [ None,
               invalid_log_targets,
               invalid_merge_args,
               invalid_wcpath_upgrade,
+              invalid_resolve_targets,
+              invalid_resolved_targets,
+              invalid_revert_targets,
+              invalid_lock_targets,
+              invalid_unlock_targets,
+              invalid_status_targets,
+              invalid_patch_targets,
+              invalid_switch_targets,
+              invalid_relocate_targets,
+              invalid_mkdir_targets,
+              invalid_update_targets,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/lock_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/lock_tests.py Sat Dec 11 00:15:55 2010
@@ -37,6 +37,24 @@ XFail = svntest.testcase.XFail
 Item = svntest.wc.StateItem
 
 ######################################################################
+# Helpers
+
+def check_writability(path, writable):
+  bits = stat.S_IWGRP | stat.S_IWOTH | stat.S_IWRITE
+  mode = os.stat(path)[0]
+  if bool(mode & bits) != writable:
+    raise svntest.Failure("path '%s' is unexpectedly %s (mode %o)"
+                          % (path, ["writable", "read-only"][writable], mode))
+
+def is_writable(path):
+  "Raise if PATH is not writable."
+  check_writability(path, True)
+
+def is_readonly(path):
+  "Raise if PATH is not readonly."
+  check_writability(path, False)
+
+######################################################################
 # Tests
 
 #----------------------------------------------------------------------
@@ -1573,6 +1591,48 @@ def replace_and_propset_locked_path(sbox
                                      'commit', '-m', '', G_path)
 
 
+#----------------------------------------------------------------------
+def cp_isnt_ro(sbox):
+  "uncommitted svn:needs-lock add/cp not read-only"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  mu_URL = sbox.repo_url + '/A/mu'
+  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu2_path = os.path.join(wc_dir, 'A', 'mu2')
+  mu3_path = os.path.join(wc_dir, 'A', 'mu3')
+  kappa_path = os.path.join(wc_dir, 'kappa')
+  open(kappa_path, 'w').write("This is the file 'kappa'.\n")
+
+  ## added file
+  sbox.simple_add('kappa')
+  svntest.actions.set_prop('svn:needs-lock', 'yes', kappa_path)
+  is_writable(kappa_path)
+  sbox.simple_commit('kappa')
+  is_readonly(kappa_path)
+
+  ## versioned file
+  svntest.actions.set_prop('svn:needs-lock', 'yes', mu_path)
+  is_writable(mu_path)
+  sbox.simple_commit('A/mu')
+  is_readonly(mu_path)
+
+  # At this point, mu has 'svn:needs-lock' set
+
+  ## wc->wc copied file
+  svntest.main.run_svn(None, 'copy', mu_path, mu2_path)
+  is_writable(mu2_path)
+  sbox.simple_commit('A/mu2')
+  is_readonly(mu2_path)
+
+  ## URL->wc copied file
+  svntest.main.run_svn(None, 'copy', mu_URL, mu3_path)
+  is_writable(mu3_path)
+  sbox.simple_commit('A/mu3')
+  is_readonly(mu3_path)
+
+
 ########################################################################
 # Run the tests
 
@@ -1619,6 +1679,7 @@ test_list = [ None,
               verify_path_escaping,
               XFail(replace_and_propset_locked_path,
                     svntest.main.is_ra_type_dav),
+              cp_isnt_ro,
             ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/log_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/log_tests.py Sat Dec 11 00:15:55 2010
@@ -35,6 +35,9 @@ from svntest.main import server_has_merg
 from svntest.main import SVN_PROP_MERGEINFO
 from merge_tests import set_up_branch
 
+# (abbreviation)
+exp_noop_up_out = svntest.actions.expected_noop_update_output
+
 ######################################################################
 #
 # The Plan:
@@ -298,7 +301,8 @@ def merge_history_repos(sbox):
   # Mergeinfo changes on /trunk:
   #    Merged /branches/a:r7
   os.chdir('trunk')
-  svntest.main.run_svn(None, 'merge', '--record-only', '-r6:7',
+  svntest.main.run_svn(None, 'merge', '--allow-mixed-revisions',
+                       '--record-only', '-r6:7',
                        os.path.join('..', branch_a))
   svntest.main.run_svn(None, 'ci', '-m',
                        "Block r7 from merging to trunk.",
@@ -392,7 +396,8 @@ def merge_history_repos(sbox):
   #    Merged /trunk:r2
   #    Merged /branches/c:r3-16
   os.chdir('trunk')
-  svntest.main.run_svn(None, 'merge', os.path.join('..', branch_c) + '@HEAD')
+  svntest.main.run_svn(None, 'merge', '--allow-mixed-revisions',
+                       os.path.join('..', branch_c) + '@HEAD')
   svntest.main.file_write(os.path.join('A', 'mu'),
                           "This is the file 'mu'.\n" +
                           "Don't forget to look at 'upsilon', as well.\n" +
@@ -1297,7 +1302,7 @@ def log_changes_range(sbox):
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
                                                               'log', '-c',
-                                                              '2:5', repo_url)
+                                                              '2-5', repo_url)
 
   log_chain = parse_log_output(output)
   check_log_chain(log_chain, [2, 3, 4, 5])
@@ -1316,6 +1321,19 @@ def log_changes_list(sbox):
   log_chain = parse_log_output(output)
   check_log_chain(log_chain, [2, 5, 7])
 
+def log_changes_complex(sbox):
+  "test log -c on complex set of ranges"
+
+  guarantee_repos_and_wc(sbox)
+  repo_url = sbox.repo_url
+
+  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
+                                                              'log', '-c',
+                                                              '2,5-3,-8,6-7', repo_url)
+
+  log_chain = parse_log_output(output)
+  check_log_chain(log_chain, [2, 5, 4, 3, 8, 6, 7])
+
 #----------------------------------------------------------------------
 def only_one_wc_path(sbox):
   "svn log of two wc paths is disallowed"
@@ -1549,7 +1567,8 @@ def merge_sensitive_log_added_mergeinfo_
   # Reverse merge r3 from 'A/D/H' to 'A_COPY/D/H' and commit as r8.
   # First update the wc so mergeinfo inheritance can occur.  This is
   # necessary so A_COPY/D/H 'knows' that r3 has been merged into it.
-  svntest.actions.run_and_verify_svn(None, ["At revision 7.\n"], [],
+  svntest.actions.run_and_verify_svn(None,
+                                     exp_noop_up_out(7), [],
                                      'up', wc_dir)
   wc_status.tweak(wc_rev=7)
   expected_output = wc.State(H_COPY_path, {
@@ -1760,8 +1779,9 @@ test_list = [ None,
               SkipUnless(merge_sensitive_log_added_path,
                          server_has_mergeinfo),
               log_single_change,
-              XFail(log_changes_range),
+              log_changes_range,
               log_changes_list,
+              log_changes_complex,
               only_one_wc_path,
               retrieve_revprops,
               log_xml_with_bad_data,

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/merge_authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/merge_authz_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/merge_authz_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/merge_authz_tests.py Sat Dec 11 00:15:55 2010
@@ -689,9 +689,10 @@ test_list = [ None,
                               svntest.main.is_ra_type_file),
                          svntest.main.server_has_mergeinfo),
              ]
+serial_only = True
 
 if __name__ == '__main__':
-  svntest.main.run_tests(test_list, serial_only = True)
+  svntest.main.run_tests(test_list, serial_only = serial_only)
   # NOTREACHED
 
 

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/merge_reintegrate_tests.py Sat Dec 11 00:15:55 2010
@@ -37,6 +37,7 @@ Item = wc.StateItem
 XFail = svntest.testcase.XFail
 Skip = svntest.testcase.Skip
 SkipUnless = svntest.testcase.SkipUnless
+exp_noop_up_out = svntest.actions.expected_noop_update_output
 
 from svntest.main import SVN_PROP_MERGEINFO
 from svntest.main import server_has_mergeinfo
@@ -669,7 +670,7 @@ def reintegrate_fail_on_modified_wc(sbox
   svntest.actions.run_and_verify_merge(
     A_path, None, None, sbox.repo_url + '/A_COPY', None, None, None, None,
     None, None, None,
-    ".*Cannot reintegrate into a working copy that has local modifications.*",
+    ".*Cannot merge into a working copy that has local modifications.*",
     None, None, None, None, True, False, '--reintegrate', A_path)
 
 #----------------------------------------------------------------------
@@ -692,7 +693,7 @@ def reintegrate_fail_on_mixed_rev_wc(sbo
   svntest.actions.run_and_verify_merge(
     A_path, None, None, sbox.repo_url + '/A_COPY', None, None, None, None,
     None, None, None,
-    ".*Cannot reintegrate into mixed-revision working copy.*",
+    ".*Cannot merge into mixed-revision working copy.*",
     None, None, None, None, True, False, '--reintegrate', A_path)
 
 #----------------------------------------------------------------------
@@ -737,7 +738,7 @@ def reintegrate_fail_on_switched_wc(sbox
   svntest.actions.run_and_verify_merge(
     A_path, None, None, sbox.repo_url + '/A_COPY', None, None, None, None,
     None, None, None,
-    ".*Cannot reintegrate into a working copy with a switched subtree.*",
+    ".*Cannot merge into a working copy with a switched subtree.*",
     None, None, None, None, True, False, '--reintegrate', A_path)
 
 #----------------------------------------------------------------------
@@ -1005,7 +1006,7 @@ def reintegrate_with_subtree_mergeinfo(s
   # r10 - Merge r9 from A_COPY_3/D to A/D, creating explicit subtree
   # mergeinfo under A.  For this and every subsequent merge we update the WC
   # first to allow full inheritance and elision.
-  svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [], 'up',
+  svntest.actions.run_and_verify_svn(None, exp_noop_up_out(9), [], 'up',
                                      wc_dir)
   expected_status.tweak(wc_rev=9)
   svntest.actions.run_and_verify_svn(
@@ -1032,7 +1033,7 @@ def reintegrate_with_subtree_mergeinfo(s
   expected_disk.tweak('A_COPY_2/mu', contents="New content")
 
   # r12 - Merge r11 from A_COPY_2/mu to A_COPY/mu
-  svntest.actions.run_and_verify_svn(None, ["At revision 11.\n"], [], 'up',
+  svntest.actions.run_and_verify_svn(None, exp_noop_up_out(11), [], 'up',
                                      wc_dir)
   expected_status.tweak(wc_rev=11)
   svntest.actions.run_and_verify_svn(
@@ -1050,7 +1051,7 @@ def reintegrate_with_subtree_mergeinfo(s
 
   # r13 - Do a 'synch' cherry harvest merge of all available revisions
   # from A to A_COPY
-  svntest.actions.run_and_verify_svn(None, ["At revision 12.\n"], [], 'up',
+  svntest.actions.run_and_verify_svn(None, exp_noop_up_out(12), [], 'up',
                                      wc_dir)
   expected_status.tweak(wc_rev=12)
   svntest.actions.run_and_verify_svn(
@@ -1105,7 +1106,7 @@ def reintegrate_with_subtree_mergeinfo(s
   expected_disk.tweak('A_COPY/B/E/alpha', contents="New content")
 
   # Now, reintegrate A_COPY to A.  This should succeed.
-  svntest.actions.run_and_verify_svn(None, ["At revision 14.\n"], [], 'up',
+  svntest.actions.run_and_verify_svn(None, exp_noop_up_out(14), [], 'up',
                                      wc_dir)
   expected_status.tweak(wc_rev=14)
   expected_output = wc.State(A_path, {
@@ -1319,7 +1320,7 @@ def reintegrate_with_subtree_mergeinfo(s
                            ' U   ' + A_COPY_path + '\n',
                            ' U   ' + D_COPY_path + '\n',
                            ' U   ' + gamma_moved_COPY_path + '\n']),
-    [], 'merge', sbox.repo_url + '/A',  A_COPY_path)
+    [], 'merge', '--allow-mixed-revisions', sbox.repo_url + '/A',  A_COPY_path)
   expected_output = wc.State(
     wc_dir,
     {'A_COPY'               : Item(verb='Sending'), # Mergeinfo update
@@ -1341,7 +1342,7 @@ def reintegrate_with_subtree_mergeinfo(s
   #   /A_COPY/D/gamma_moved:17-19
   #
   # shows that it is fully synched up with trunk.
-  svntest.actions.run_and_verify_svn(None, ["At revision 19.\n"], [], 'up',
+  svntest.actions.run_and_verify_svn(None, exp_noop_up_out(19), [], 'up',
                                      wc_dir)
   expected_output = wc.State(A_path, {
     'B/E/alpha'     : Item(status='U '),
@@ -1611,7 +1612,7 @@ def multiple_reintegrates_from_the_same_
     expected_merge_output([[2,3],[2,16]],
                           ['U    ' + psi_COPY_path + '\n',
                            ' U   ' + A_COPY_path   + '\n',]),
-    [], 'merge', sbox.repo_url + '/A', A_COPY_path)
+    [], 'merge', '--allow-mixed-revisions', sbox.repo_url + '/A', A_COPY_path)
 
 #----------------------------------------------------------------------
 # Test for a reintegrate bug which can occur when the merge source
@@ -1638,7 +1639,7 @@ def reintegrate_with_self_referential_me
 
   # r6 Copy A to A2 and then manually set some self-referential mergeinfo on
   # A2/B and A2.
-  svntest.actions.run_and_verify_svn(None, ["At revision 5.\n"], [],
+  svntest.actions.run_and_verify_svn(None, exp_noop_up_out(5), [],
                                      'up', wc_dir)
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'copy', A_path, A2_path)
@@ -1669,7 +1670,7 @@ def reintegrate_with_self_referential_me
   # Update to uniform revision and reintegrate A2.1 back to A2.
   # Note that the mergeinfo on A2/B is not changed by the reintegration
   # and so is not expected to by updated to describe the merge.
-  svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [],
+  svntest.actions.run_and_verify_svn(None, exp_noop_up_out(8), [],
                                      'up', wc_dir)
   expected_output = wc.State(A2_path, {
     'mu' : Item(status='U '),
@@ -1997,7 +1998,7 @@ def added_subtrees_with_mergeinfo_break_
     })
   expected_mergeinfo_output = wc.State(A_path, {
     ''     : Item(status=' U'),
-    'C/nu' : Item(status=' G'),
+    'C/nu' : Item(status=' U'),
     })
   expected_elision_output = wc.State(A_path, {
     })
@@ -2075,8 +2076,8 @@ def added_subtrees_with_mergeinfo_break_
 #----------------------------------------------------------------------
 # Test for issue #3648 '2-URL merges incorrectly reverse-merge mergeinfo
 # for merge target'.
-def two_URL_merge_removes_valid_mergefino_from_target(sbox):
-  "2-URL merge removes valid mergefino from target"
+def two_URL_merge_removes_valid_mergeinfo_from_target(sbox):
+  "2-URL merge removes valid mergeinfo from target"
 
   sbox.build()
   wc_dir = sbox.wc_dir
@@ -2254,7 +2255,7 @@ test_list = [ None,
                          server_has_mergeinfo),
               reintegrate_with_self_referential_mergeinfo,
               added_subtrees_with_mergeinfo_break_reintegrate,
-              two_URL_merge_removes_valid_mergefino_from_target,
+              two_URL_merge_removes_valid_mergeinfo_from_target,
              ]
 
 if __name__ == '__main__':