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/08/10 19:03:37 UTC

svn commit: r984122 [35/40] - in /subversion/branches/ignore-mergeinfo: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ build/generator/util/ build/hudson/ build/hudson/jobs/ build/hudson/jobs/subversion-1.6...

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=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/externals_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at
@@ -398,6 +398,10 @@ def update_lose_external(sbox):
   # Set and commit the property
   change_external(os.path.join(wc_dir, "A/D"), new_externals_desc)
 
+  # The code should handle a missing local externals item
+  svntest.main.safe_rmtree(os.path.join(other_wc_dir, "A", "D", "exdir_A", \
+                                        "D"))
+
   # Update other working copy, see if lose & preserve things appropriately
   svntest.actions.run_and_verify_svn(None, None, [], 'up', other_wc_dir)
 
@@ -679,9 +683,9 @@ def disallow_dot_or_dotdot_directory_ref
   external_urls = list(external_url_for.values())
 
   # The external_urls contains some examples of relative urls that are
-  # ambiguous with these local test paths, so we have to use the 
+  # ambiguous with these local test paths, so we have to use the
   # <url> <path> ordering here to check the local path validator.
-  
+
   externals_value_1 = external_urls.pop() + " ../foo\n"
   if not external_urls: external_urls = list(external_url_for.values())
   externals_value_2 = external_urls.pop() + " foo/bar/../baz\n"
@@ -1321,7 +1325,7 @@ def switch_relative_external(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
   repo_url = sbox.repo_url
-  
+
   # Create a relative external in A/D on ../B
   A_path = os.path.join(wc_dir, 'A')
   A_copy_path = os.path.join(wc_dir, 'A_copy')
@@ -1335,9 +1339,9 @@ def switch_relative_external(sbox):
                                      '--quiet', wc_dir)
 
   # Update our working copy, and create a "branch" (A => A_copy)
-  svntest.actions.run_and_verify_svn(None, None, [], 'up', 
+  svntest.actions.run_and_verify_svn(None, None, [], 'up',
                                      '--quiet', wc_dir)
-  svntest.actions.run_and_verify_svn(None, None, [], 'cp', 
+  svntest.actions.run_and_verify_svn(None, None, [], 'cp',
                                      '--quiet', A_path, A_copy_path)
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'ci', '-m', 'log msg',
@@ -1345,7 +1349,7 @@ def switch_relative_external(sbox):
 
   # Okay.  We now want to switch A to A_copy, which *should* cause
   # A/D/ext to point to the URL for A_copy/D/ext.
-  svntest.actions.run_and_verify_svn(None, None, [], 'sw', 
+  svntest.actions.run_and_verify_svn(None, None, [], 'sw',
                                      '--quiet', A_copy_url, A_path)
 
   expected_infos = [
@@ -1396,6 +1400,164 @@ def export_sparse_wc_with_externals(sbox
 
   svntest.main.safe_rmtree(export_target)
 
+#----------------------------------------------------------------------
+
+# Change external from one repo to another
+def relegate_external(sbox):
+  "relegate external from one repo to another"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  repo_dir = sbox.repo_dir
+  repo_url = sbox.repo_url
+  A_path = os.path.join(wc_dir, 'A')
+
+  # setup an external within the same repository
+  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)
+
+  # create another repository
+  other_repo_dir, other_repo_url = sbox.add_repo_path('other')
+  svntest.main.copy_repos(repo_dir, other_repo_dir, 2)
+
+  # point external to the other repository
+  externals_desc = other_repo_url + '/A/B/E        external\n'
+  (fd, tmp_f) = tempfile.mkstemp()
+  svntest.main.file_append(tmp_f, externals_desc)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'pset', '-F', tmp_f,
+                                     'svn:externals', A_path)
+
+  # Update "relegates", i.e. throws-away and recreates, the external
+  expected_output = svntest.wc.State(wc_dir, {
+      'A/external'       : Item(), # No A?
+      'A/external/alpha' : Item(status='A '),
+      'A/external/beta'  : Item(status='A '),
+    })
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('A', props={'svn:externals' : externals_desc})
+  expected_disk.add({
+      'A/external'       : Item(),
+      'A/external/alpha' : Item('This is the file \'alpha\'.\n'),
+      'A/external/beta'  : Item('This is the file \'beta\'.\n'),
+      })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+  expected_status.tweak('A', status=' M')
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None, None, None,
+                                        True)
+
+  ### TODO: Commit the propset and update a pristine working copy from
+  ### r2 to r3.
+
+#----------------------------------------------------------------------
+
+# Issue #3552
+def wc_repos_file_externals(sbox):
+  "tag directory with file externals from wc to url"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  repo_url = sbox.repo_url
+
+  # Add a file A/theta.
+  theta_path = os.path.join(wc_dir, 'A', 'theta')
+  svntest.main.file_write(theta_path, 'theta', 'w')
+  svntest.main.run_svn(None, 'add', theta_path)
+
+  # Created expected output tree for 'svn ci'
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/theta' : Item(verb='Adding'),
+    })
+
+  # Create expected status tree
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+    'A/theta' : Item(status='  ', wc_rev=2),
+    })
+
+  # Commit the new file, creating revision 2.
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+                                        expected_status, None, wc_dir)
+
+
+  # Create a file external on the file A/theta
+  C = os.path.join(wc_dir, 'A', 'C')
+  external = os.path.join(C, 'theta')
+  externals_prop = "^/A/theta theta\n"
+
+  # Set and commit the property.
+  change_external(C, externals_prop)
+
+
+  # Now, /A/C/theta is designated as a file external pointing to
+  # the file /A/theta, but the external file is not there yet.
+  # Try to actually insert the external file via a verified update:
+  expected_output = svntest.wc.State(wc_dir, {
+      'A/C/theta'      : Item(status='E '),
+    })
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.add({
+    'A/theta'      : Item('theta'),
+    'A/C'          : Item(props={'svn:externals':externals_prop}),
+    'A/C/theta'    : Item('theta'),
+    })
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+  expected_status.add({
+    'A/theta'   : Item(status='  ', wc_rev=3),
+    'A/C/theta' : Item(status='  ', wc_rev=3, switched='X'),
+    })
+
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None, None, None,
+                                        True)
+
+  # Copy A/C to a new tag in the repos
+  tag_url = repo_url + '/A/I'
+  svntest.main.run_svn(None, 'cp', C, tag_url, '-m', 'create tag')
+
+  # Try to actually insert the external file (A/I/theta) via a verified update:
+  expected_output = svntest.wc.State(wc_dir, {
+      'A/I'            : Item(status='A '),
+      'A/I/theta'      : Item(status='E '),
+    })
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.add({
+    'A/theta'      : Item('theta'),
+    'A/C'          : Item(props={'svn:externals':externals_prop}),
+    'A/C/theta'    : Item('theta'),
+    'A/I'          : Item(props={'svn:externals':externals_prop}),
+    'A/I/theta'    : Item('theta'),
+    })
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 4)
+  expected_status.add({
+    'A/theta'   : Item(status='  ', wc_rev=4),
+    'A/C/theta' : Item(status='  ', wc_rev=4, switched='X'),
+    'A/I'       : Item(status='  ', wc_rev=4),
+    'A/I/theta' : Item(status='  ', wc_rev=4, switched='X'),
+    })
+
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None, None, None,
+                                        True)
+
+
 ########################################################################
 # Run the tests
 
@@ -1423,6 +1585,8 @@ test_list = [ None,
               XFail(update_lose_file_external),
               XFail(switch_relative_external),
               export_sparse_wc_with_externals,
+              relegate_external,
+              wc_repos_file_externals,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at
@@ -78,8 +78,9 @@ rep_lines_res = [
                  (re.compile(r'version \d+\.\d+\.\d+ \(.*\)'),
                   'version X.Y.Z '),
                  # The copyright end date keeps changing; fix forever.
-                 (re.compile(r'Copyright \(C\) 2000-\d+ CollabNet\.'),
-                  'Copyright (C) YYYY-YYYY CollabNet'),
+                 (re.compile(r'Copyright \(C\) 20\d\d The Apache '
+                              'Software Foundation\.'),
+                  'Copyright (C) YYYY The Apache Software Foundation'),
                  # In 'svn --version --quiet', we print only the version
                  # number in a single line.
                  (re.compile(r'^\d+\.\d+\.\d+(-[a-zA-Z0-9]+)?$'), 'X.Y.Z\n'),

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=984122&r1=984121&r2=984122&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 Tue Aug 10 17:03:06 2010
@@ -46,4 +46,4 @@ Available subcommands:
    upgrade
 
 Subversion is a tool for version control.
-For additional information, see http://subversion.tigris.org/
+For additional information, see http://subversion.apache.org/

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout Tue Aug 10 17:03:06 2010
@@ -1,10 +1,10 @@
 svn, version 0.16.0 (r3987)
    compiled Dec  5 2002, 00:02:51
 
-Copyright (C) 2009 The Subversion Corporation.
+Copyright (C) 2010 The Apache Software Foundation.
 This software consists of contributions made by many people;
 see the NOTICE file for more information.
-Subversion is open source software, see http://subversion.tigris.org/
+Subversion is open source software, see http://subversion.apache.org/
 
 The following repository access (RA) modules are available:
 

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=984122&r1=984121&r2=984122&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 Tue Aug 10 17:03:06 2010
@@ -46,6 +46,7 @@ Valid options:
   -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]
   --incremental            : give output suitable for concatenation
   --xml                    : output in XML
   -l [--limit] ARG         : maximum number of log entries
@@ -57,16 +58,17 @@ Global options:
   --username ARG           : specify a username ARG
   --password ARG           : specify a password ARG
   --no-auth-cache          : do not cache authentication tokens
+                             [alias: --nac]
   --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-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.
 usage: 1. switch URL[@PEGREV] [PATH]
        2. switch --relocate FROM TO [PATH...]
@@ -89,9 +91,7 @@ usage: 1. switch URL[@PEGREV] [PATH]
      are applied to the obstructing path.
 
      Use the --set-depth option to set a new working copy depth on the
-     targets of this operation.  Currently, the depth of a working copy
-     directory can only be increased (telescoped more deeply); you cannot
-     make a directory more shallow.
+     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
@@ -126,11 +126,12 @@ Valid options:
                             'immediates', or 'infinity')
   --set-depth ARG          : set new working copy depth to ARG ('exclude',
                             'empty', 'files', 'immediates', or 'infinity')
+                            [alias: --sd]
   -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
-                             [aliases: --ie]
+                             [alias: --ie]
   --force                  : force operation to run
   --accept ARG             : specify automatic conflict resolution action
                             ('postpone', 'base', 'mine-conflict',
@@ -141,13 +142,14 @@ Global options:
   --username ARG           : specify a username ARG
   --password ARG           : specify a password ARG
   --no-auth-cache          : do not cache authentication tokens
+                             [alias: --nac]
   --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-option ARG      : set user configuration option in the format:
                                  FILE:SECTION:OPTION=[VALUE]
                              For example:
                                  servers:global:http-library=serf
 
-

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=984122&r1=984121&r2=984122&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 Tue Aug 10 17:03:06 2010
@@ -46,4 +46,4 @@ Available subcommands:
    upgrade
 
 Subversion is a tool for version control.
-For additional information, see http://subversion.tigris.org/
+For additional information, see http://subversion.apache.org/

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/history_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/history_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/history_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/history_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at

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=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/import_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/import_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at

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=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/info_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/info_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at

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=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/lock_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at
@@ -1395,31 +1395,31 @@ def lock_funky_comment_chars(sbox):
 # in a working copy, not to the working copy overall.
 def lock_twice_in_one_wc(sbox):
   "try to lock a file twice in one working copy"
-  
+
   sbox.build()
   wc_dir = sbox.wc_dir
-  
+
   mu_path = os.path.join(wc_dir, 'A', 'mu')
   mu2_path = os.path.join(wc_dir, 'A', 'B', 'mu')
-  
+
   # Create a needs-lock file
   svntest.actions.set_prop('svn:needs-lock', '*', mu_path)
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'commit', wc_dir, '-m', '')
-  
+
   # Mark the file readonly
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'update', wc_dir)
-  
+
   # Switch a second location for the same file in the same working copy
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'switch', sbox.repo_url + '/A',
                                      os.path.join(wc_dir, 'A', 'B'))
-  
+
   # Lock location 1
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'lock', mu_path, '-m', 'Locked here')
-  
+
   # Locking in location 2 should fail ### Currently returns exitcode 0
   svntest.actions.run_and_verify_svn2(None, None, ".*is already locked.*", 0,
                                       'lock', '-m', '', mu2_path)
@@ -1427,12 +1427,51 @@ def lock_twice_in_one_wc(sbox):
   # Change the file anyway
   os.chmod(mu2_path, 0700)
   svntest.main.file_append(mu2_path, "Updated text")
-  
+
   # Commit should fail because it is locked in the other location
   svntest.actions.run_and_verify_svn(None, None,
                                      '.*(([Nn]o)|(Server)).*[lL]ock.*',
                                      'commit', mu2_path, '-m', '')
 
+#----------------------------------------------------------------------
+# Test for issue #3524 'Locking path via ra_serf which doesn't exist in
+# HEAD triggers assert'
+def lock_path_not_in_head(sbox):
+  "lock path that does not exist in HEAD"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  D_path      = os.path.join(wc_dir, 'A', 'D')
+  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
+
+  # Commit deletion of A/D and A/B/lambda as r2, then update the WC
+  # back to r1.  Then attempt to lock some paths that no longer exist
+  # in HEAD.  These should fail gracefully.
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'delete', lambda_path, D_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'commit',
+                                     '-m', 'Some deletions', wc_dir)  
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', '-r1', wc_dir)
+  expected_lock_fail_err_re = "svn: warning:.*" \
+  "((Path .* doesn't exist in HEAD revision)" \
+  "|(Lock request failed: 405 Method Not Allowed))"
+  # Issue #3524 These lock attemtps were triggering an assert over ra_serf:
+  #
+  # working_copies\lock_tests-37>svn lock A\D
+  # ..\..\..\subversion\libsvn_client\ra.c:275: (apr_err=235000)
+  # svn: In file '..\..\..\subversion\libsvn_ra_serf\util.c' line 1120:
+  #  assertion failed (ctx->status_code)
+  #
+  # working_copies\lock_tests-37>svn lock A\B\lambda
+  # ..\..\..\subversion\libsvn_client\ra.c:275: (apr_err=235000)
+  # svn: In file '..\..\..\subversion\libsvn_ra_serf\util.c' line 1120:
+  #  assertion failed (ctx->status_code)
+  svntest.actions.run_and_verify_svn2(None, None, expected_lock_fail_err_re,
+                                      0, 'lock', D_path)
+  svntest.actions.run_and_verify_svn2(None, None, expected_lock_fail_err_re,
+                                      0, 'lock', lambda_path)
+
 ########################################################################
 # Run the tests
 
@@ -1475,6 +1514,7 @@ test_list = [ None,
                     svntest.main.is_ra_type_dav),
               lock_funky_comment_chars,
               lock_twice_in_one_wc,
+              lock_path_not_in_head,
             ]
 
 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=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/log_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at

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=984122&r1=984121&r2=984122&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 Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/merge_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/merge_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at
@@ -40,6 +40,7 @@ SkipUnless = svntest.testcase.SkipUnless
 
 from svntest.main import SVN_PROP_MERGEINFO
 from svntest.main import server_has_mergeinfo
+from svntest.main import is_fs_case_insensitive
 from svntest.actions import fill_file_with_lines
 from svntest.actions import make_conflict_marker_text
 from svntest.actions import inject_conflict_into_expected_state
@@ -3481,7 +3482,21 @@ def merge_file_replace_to_mixed_rev_wc(s
                                         None, wc_dir)
 
 
-  # merge changes from r3:1
+  # merge changes from r3:1...
+  #
+  # ...but first:
+  #
+  # Since "." is at revision 2, r3 is not part of "."'s implicit mergeinfo.
+  # Merge tracking permits only reverse merges from explicit or implicit
+  # mergeinfo, so only r2 would be reverse merged if we left the WC as is.
+  # Normally we'd simply update the whole working copy, but since that would
+  # defeat the purpose of this test (see the comment below), instead we'll
+  # update only "." using --depth empty.  This preserves the intent of the
+  # orginal mixed-rev test for this issue, but allows the merge tracking
+  # logic to consider r3 as valid for reverse merging.
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'up', '--depth', 'empty', wc_dir)
+  expected_status.tweak('', wc_rev=3)
   expected_output = svntest.wc.State(wc_dir, {
     'A/D/G/rho': Item(status='R ')
     })
@@ -5097,7 +5112,7 @@ def mergeinfo_elision(sbox):
   # mergeinfo is removed leaving no prop mods.  In the case of
   # A_COPY/B/E/beta its committed mergeinfo prop is removed leaving a prop
   # change.
-  
+
   # to A_COPY.
   expected_output = wc.State(A_COPY_path, {})
   expected_status.tweak('B/E/beta', status=' M')
@@ -5812,7 +5827,7 @@ def merge_to_path_with_switched_children
                                        expected_output, expected_disk,
                                        expected_status, expected_skip,
                                        None, None, None, None, None, 1)
- 
+
   # Non-inheritable mergeinfo ranges on a target do prevent repeat
   # merges on the target itself.
   #
@@ -6228,7 +6243,7 @@ def foreign_repos_does_not_update_mergei
   # Set up for test of issue #3383.
   svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir)
 
-  # Get a working copy for the foreign repos.  
+  # Get a working copy for the foreign repos.
   svntest.actions.run_and_verify_svn(None, None, [], 'co', other_repo_url,
                                      other_wc_dir)
 
@@ -6286,7 +6301,7 @@ def foreign_repos_does_not_update_mergei
   svntest.actions.run_and_verify_svn(None, [], [], 'pg',
                                      SVN_PROP_MERGEINFO, '-vR',
                                      wc_dir)
-  
+
 # This test involves tree conflicts.
 def avoid_reflected_revs(sbox):
   "avoid repeated merges for cyclic merging"
@@ -7155,7 +7170,7 @@ def merge_away_subtrees_noninheritable_r
   # mergeinfo changes to that child (i.e. as part of the diff) properly
   # records mergeinfo on the child that includes both the incoming mergeinfo
   # *and* the mergeinfo inherited from it's parent.
-  #   
+  #
   # First revert all local changes and remove A_COPY/C/nu from disk.
   svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir)
   os.remove(os.path.join(wc_dir, "A_COPY", "nu"))
@@ -7592,7 +7607,7 @@ def merge_to_sparse_directories(sbox):
     'D/H'       : Item(),
     'D/H/chi'   : Item("This is the file 'chi'.\n"),
     'D/H/psi'   : Item("This is the file 'psi'.\n"),
-    'D/H/omega' : Item("New content"), 
+    'D/H/omega' : Item("New content"),
     })
   expected_skip = wc.State(immediates_dir, {})
   svntest.actions.run_and_verify_merge(immediates_dir, '5', '6',
@@ -13024,7 +13039,7 @@ def merge_two_edits_to_same_prop(sbox):
   A_COPY_path      = "A_COPY"
   mu_path          = os.path.join(A_path, "mu")
   mu_COPY_path     = os.path.join(A_COPY_path, "mu")
-  
+
   # In the source, make two successive changes to the same property
   svn_propset('p', 'new-val-1', mu_path)
   rev1 = svn_commit('A/mu')
@@ -15171,12 +15186,12 @@ def set_up_natural_history_gap(sbox):
   expected_output = wc.State(wc_dir, {'A/D/gamma' : Item(verb='Sending')})
   wc_status.tweak('A/D/gamma', wc_rev=9)
 
-  # Update the WC to a uniform revision.  
+  # Update the WC to a uniform revision.
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         wc_status, None, wc_dir)
   svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [],
                                      'up', wc_dir)
-  return wc_disk, wc_status  
+  return wc_disk, wc_status
 
 def dont_merge_gaps_in_history(sbox):
   "mergeinfo aware merges ignore natural history gaps"
@@ -15288,7 +15303,7 @@ def handle_gaps_in_implicit_mergeinfo(sb
 
   # Some paths we'll care about.
   A_COPY_path = os.path.join(wc_dir, "A_COPY")
-  
+
   # Merge r4 to 'A_COPY' from A@4, which is *not* part of A_COPY's history.
   expected_output = wc.State(A_COPY_path, {
     'B/E/beta' : Item(status='U '),
@@ -15364,7 +15379,7 @@ def handle_gaps_in_implicit_mergeinfo(sb
                                        expected_status,
                                        expected_skip,
                                        None, None, None, None,
-                                       None, 1)  
+                                       None, 1)
 
   # Now merge all available revisions from 'A' to 'A_COPY'.
   # The mergeinfo '/A:4' on 'A_COPY' should have no impact on this merge
@@ -15684,7 +15699,7 @@ def multiple_reintegrates_from_the_same_
   # the reintegrate target.
   #
   # r7 - Create the feature branch.
-  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)  
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'copy', A_path, Feature_branch_path)
   svntest.actions.run_and_verify_svn(None, None, [],
@@ -15697,7 +15712,7 @@ def multiple_reintegrates_from_the_same_
                                      "A text change under 'A'",
                                      wc_dir)
 
-  # r9 - Make a change on the feature branch.  
+  # r9 - Make a change on the feature branch.
   svntest.main.file_write(Feature_beta_path, "New branch content.\n")
   svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
                                      "A text change on the feature branch",
@@ -15732,7 +15747,7 @@ def multiple_reintegrates_from_the_same_
                                      "Sync merge 'A' to feature branch",
                                      wc_dir)
 
-  # r13 - Make another change on the feature branch.  
+  # r13 - Make another change on the feature branch.
   svntest.main.file_write(Feature_beta_path, "Even newer branch content.\n")
   svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
                                      "Different text on the feature branch",
@@ -15849,7 +15864,7 @@ def merge_replace_setup(sbox):
   #      svn delete branch/mu branch/B/E branch/D/G/pi branch/D/H
   #      svn ci
   #      svn up
-  # 
+  #
   #      # replacements.
   #      # file-with-file
   #      echo "replacement for mu" > branch/mu
@@ -16167,10 +16182,10 @@ def copy_then_replace_via_merge(sbox):
   branch_J = j(wc_dir, 'branch', 'J')
   url_A = sbox.repo_url + '/A'
   url_branch = sbox.repo_url + '/branch'
-  
+
   # Create a branch.
   main.run_svn(None, 'cp', url_A, url_branch, '-m', 'create branch') # r2
-  
+
   # Create a tree J in A.
   os.makedirs(AJK)
   os.makedirs(AJL)
@@ -16750,6 +16765,530 @@ def merge_automatic_conflict_resolution(
                                        None, None, 1, 0,
                                        '--accept', 'base')
 
+# Test for issue #3440 'Skipped paths get incorrect override mergeinfo
+# during merge'.
+def skipped_files_get_correct_mergeinfo(sbox):
+  "skipped files get correct mergeinfo set"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Some paths we'll care about
+  A_COPY_path   = os.path.join(wc_dir, "A_COPY")
+  psi_COPY_path = os.path.join(wc_dir, "A_COPY", "D", "H", "psi")
+  psi_path      = os.path.join(wc_dir, "A", "D", "H", "psi")
+
+  # Setup our basic 'trunk' and 'branch':
+  # r2 - Copy A to A_COPY
+  # r3 - Text change to A/D/H/psi
+  # r4 - Text change to A/D/G/rho
+  # r5 - Text change to A/B/E/beta
+  # r6 - Text change to A/D/H/omega
+  wc_disk, wc_status = set_up_branch(sbox, False, 1)
+
+  # r7 Make another text change to A/D/H/psi
+  svntest.main.file_write(psi_path, "Even newer content")
+  expected_output = wc.State(wc_dir, {'A/D/H/psi' : Item(verb='Sending')})
+  svntest.main.run_svn(None, 'commit', '-m', 'another change to A/D/H/psi',
+                       wc_dir)
+
+  # Merge r3 from A to A_COPY, this will create explicit mergeinfo of
+  # '/A:3' on A_COPY.  Commit this merge as r8.
+  svntest.actions.run_and_verify_svn(None,
+                                     expected_merge_output([[3]], 'U    ' +
+                                                           psi_COPY_path +
+                                                           '\n'),
+                                     [], 'merge', '-c3',
+                                     sbox.repo_url + '/A',
+                                     A_COPY_path)
+  svntest.main.run_svn(None, 'commit', '-m', 'initial merge', wc_dir)
+
+  # Update WC to uniform revision and then delete, via the OS, A_COPY/D/H/psi
+  # and then merge all available revisions from A to A_COPY.  A_COPY/D/H/psi
+  # should be reported as skipped and get explicit mergeinfo set on it
+  # reflecting what it previously inherited from A_COPY after the first
+  # merge, i.e. '/A/D/H/psi:3'.  Issue #3440 occurred when empty mergeinfo
+  # was set on A_COPY/D/H/psi, making it appear that r3 was never merged.
+  svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [],
+                                     'up', wc_dir)
+  os.remove(psi_COPY_path)
+  expected_status = wc.State(A_COPY_path, {
+    ''          : Item(status=' M'),
+    'B'         : Item(status='  '),
+    'mu'        : Item(status='  '),
+    'B/E'       : Item(status='  '),
+    'B/E/alpha' : Item(status='  '),
+    'B/E/beta'  : Item(status='M '),
+    'B/lambda'  : Item(status='  '),
+    'B/F'       : Item(status='  '),
+    'C'         : Item(status='  '),
+    'D'         : Item(status='  '),
+    'D/G'       : Item(status='  '),
+    'D/G/pi'    : Item(status='  '),
+    'D/G/rho'   : Item(status='M '),
+    'D/G/tau'   : Item(status='  '),
+    'D/gamma'   : Item(status='  '),
+    'D/H'       : Item(status='  '),
+    'D/H/chi'   : Item(status='  '),
+    'D/H/psi'   : Item(status='!M'),
+    'D/H/omega' : Item(status='M '),
+    })
+  expected_status.tweak(wc_rev=8)
+  expected_disk = wc.State('', {
+    ''          : Item(props={SVN_PROP_MERGEINFO : '/A:2-8'}),
+    'B'         : Item(),
+    'mu'        : Item("This is the file 'mu'.\n"),
+    'B/E'       : Item(),
+    'B/E/alpha' : Item("This is the file 'alpha'.\n"),
+    'B/E/beta'  : Item("New content"),
+    'B/lambda'  : Item("This is the file 'lambda'.\n"),
+    'B/F'       : Item(),
+    'C'         : Item(),
+    'D'         : Item(),
+    'D/G'       : Item(),
+    'D/G/pi'    : Item("This is the file 'pi'.\n"),
+    'D/G/rho'   : Item("New content"),
+    'D/G/tau'   : Item("This is the file 'tau'.\n"),
+    'D/gamma'   : Item("This is the file 'gamma'.\n"),
+    'D/H'       : Item(),
+    'D/H/chi'   : Item("This is the file 'chi'.\n"),
+    #'D/H/psi'  : Nothing here, this file was deleted via the OS.
+    'D/H/omega' : Item("New content"),
+    })
+  expected_skip = wc.State(A_COPY_path,
+                           {'D/H/psi' : Item()})
+  expected_output = wc.State(A_COPY_path,
+                             {'B/E/beta'  : Item(status='U '),
+                              'D/G/rho'   : Item(status='U '),
+                              'D/H/omega' : Item(status='U '),})
+  svntest.actions.run_and_verify_merge(A_COPY_path, None, None,
+                                       sbox.repo_url + \
+                                       '/A',
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None, None,
+                                       1, 1)
+  # run_and_verify_merge cannot check the properties on A_COPY/D/H/psi
+  # since that file is not on disk, so we'll check the file's mergeinfo
+  # directly with svn propget.
+  svntest.actions.run_and_verify_svn(
+    'Incorrect override mergeinfo set on skipped path',
+    ["/A/D/H/psi:3\n"], [], 'pg', 'svn:mergeinfo', psi_COPY_path)
+
+  # Now test another aspect of issue #3440, that a skipped path with
+  # explicit mergeinfo doesn't get it's mergeinfo updated.
+  #
+  # First revert all changes to the WC and then merge -r2:6 from A/D/H/psi
+  # to A_COPY/D/H/psi, creating explicit mergeinfo of '/A/D/H/psi:3-6' on
+  # the latter.  Commit this merge as r9 and then update the WC.
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'revert', '-R', wc_dir)
+  svntest.actions.run_and_verify_svn(None, [], [], 'merge', '-r2:6',
+                                     sbox.repo_url + '/A/D/H/psi',
+                                     psi_COPY_path)
+  svntest.main.run_svn(None, 'commit', '-m',
+                       'subtree merge to create explicit mergeinfo',
+                       wc_dir)
+  svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [],
+                                     'up', wc_dir)
+
+  # Remove A_COPY/D/H/psi again and then merge all available revisions
+  # from A to A_COPY.  The results should be mostly similar to the
+  # previous merge we did above, execept that A_COPY/D/H/psi should not
+  # have it's mergeinfo changed.
+  os.remove(psi_COPY_path)
+  expected_status.tweak(wc_rev=9)
+  expected_status.tweak('D/H/psi', status='! ')
+  expected_disk.tweak('', props={SVN_PROP_MERGEINFO : '/A:2-9'})
+  svntest.actions.run_and_verify_merge(A_COPY_path, None, None,
+                                       sbox.repo_url + \
+                                       '/A',
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None, None,
+                                       1, 1)
+
+  # run_and_verify_merge cannot check the properties on A_COPY/D/H/psi
+  # since that file is not on disk, so we'll check the file's mergeinfo
+  # directly with svn propget.  Issue #3440 also occurred here, when an
+  # the missing file's mergeinfo was updated, making it appear that r2
+  # and r7-9 were also merged into A_COPY/D/H/psi, which is clearly not
+  # the case since psi isn't present.
+  svntest.actions.run_and_verify_svn(
+    'Mergeinfo on skipped path altered',
+    ["/A/D/H/psi:3-6\n"], [], 'pg', 'svn:mergeinfo', psi_COPY_path)
+
+# Test for issue #3115 'Case only renames resulting from merges don't
+# work or break the WC on case-insensitive file systems'.
+def committed_case_only_move_and_revert(sbox):
+  "committed case only move causes revert to fail"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  wc_disk, wc_status = set_up_branch(sbox, True)
+
+  # Some paths we'll care about
+  A_COPY_path = os.path.join(wc_dir, "A_COPY")
+
+  # r3: A case-only file rename on the server
+  svntest.actions.run_and_verify_svn(None,
+                                     ['\n', 'Committed revision 3.\n'],
+                                     [], 'move',
+                                     sbox.repo_url + '/A/mu',
+                                     sbox.repo_url + '/A/MU',
+                                     '-m', 'Move A/mu to A/MU')
+
+  # Now merge that rename into the WC
+  expected_output = wc.State(A_COPY_path, {
+    'mu' : Item(status='D '),
+    'MU' : Item(status='A '),
+    })
+  expected_status = wc.State(A_COPY_path, {
+    ''          : Item(status=' M', wc_rev=2),
+    'B'         : Item(status='  ', wc_rev=2),
+    'mu'        : Item(status='D ', wc_rev=2),
+    'MU'        : Item(status='A ', wc_rev='-', copied='+'),
+    'B/E'       : Item(status='  ', wc_rev=2),
+    'B/E/alpha' : Item(status='  ', wc_rev=2),
+    'B/E/beta'  : Item(status='  ', wc_rev=2),
+    'B/lambda'  : Item(status='  ', wc_rev=2),
+    'B/F'       : Item(status='  ', wc_rev=2),
+    'C'         : Item(status='  ', wc_rev=2),
+    'D'         : Item(status='  ', wc_rev=2),
+    'D/G'       : Item(status='  ', wc_rev=2),
+    'D/G/pi'    : Item(status='  ', wc_rev=2),
+    'D/G/rho'   : Item(status='  ', wc_rev=2),
+    'D/G/tau'   : Item(status='  ', wc_rev=2),
+    'D/gamma'   : Item(status='  ', wc_rev=2),
+    'D/H'       : Item(status='  ', wc_rev=2),
+    'D/H/chi'   : Item(status='  ', wc_rev=2),
+    'D/H/psi'   : Item(status='  ', wc_rev=2),
+    'D/H/omega' : Item(status='  ', wc_rev=2),
+    })
+  expected_disk = wc.State('', {
+    ''          : Item(props={SVN_PROP_MERGEINFO : '/A:3'}),
+    'B'         : Item(),
+    'MU'        : Item("This is the file 'mu'.\n"),
+    'B/E'       : Item(),
+    'B/E/alpha' : Item("This is the file 'alpha'.\n"),
+    'B/E/beta'  : Item("This is the file 'beta'.\n"),
+    'B/lambda'  : Item("This is the file 'lambda'.\n"),
+    'B/F'       : Item(),
+    'C'         : Item(),
+    'D'         : Item(),
+    'D/G'       : Item(),
+    'D/G/pi'    : Item("This is the file 'pi'.\n"),
+    'D/G/rho'   : Item("This is the file 'rho'.\n"),
+    'D/G/tau'   : Item("This is the file 'tau'.\n"),
+    'D/gamma'   : Item("This is the file 'gamma'.\n"),
+    'D/H'       : Item(),
+    'D/H/chi'   : Item("This is the file 'chi'.\n"),
+    'D/H/psi'   : Item("This is the file 'psi'.\n"),
+    'D/H/omega' : Item("This is the file 'omega'.\n"),
+    })
+  expected_skip = wc.State(A_COPY_path, { })
+  svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3',
+                                       sbox.repo_url + '/A',
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1, 0)
+
+  # Commit the merge
+  expected_output = svntest.wc.State(wc_dir, {
+    'A_COPY'    : Item(verb='Sending'),
+    'A_COPY/mu' : Item(verb='Deleting'),
+    'A_COPY/MU' : Item(verb='Adding'),
+    })
+  wc_status.tweak('A_COPY', wc_rev=4)
+  wc_status.remove('A_COPY/mu')
+  wc_status.add({'A_COPY/MU': Item(status='  ', wc_rev=4)})
+
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output, wc_status,
+                                        None, wc_dir)
+
+  # In issue #3115 the WC gets corrupted and any subsequent revert
+  # attempts fail with this error:
+  #  svn.exe revert -R "svn-test-work\working_copies\merge_tests-139"
+  #  ..\..\..\subversion\svn\revert-cmd.c:81: (apr_err=2)
+  #  ..\..\..\subversion\libsvn_client\revert.c:167: (apr_err=2)
+  #  ..\..\..\subversion\libsvn_client\revert.c:103: (apr_err=2)
+  #  ..\..\..\subversion\libsvn_wc\adm_ops.c:2232: (apr_err=2)
+  #  ..\..\..\subversion\libsvn_wc\adm_ops.c:2232: (apr_err=2)
+  #  ..\..\..\subversion\libsvn_wc\adm_ops.c:2232: (apr_err=2)
+  #  ..\..\..\subversion\libsvn_wc\adm_ops.c:2176: (apr_err=2)
+  #  ..\..\..\subversion\libsvn_wc\adm_ops.c:2053: (apr_err=2)
+  #  ..\..\..\subversion\libsvn_wc\adm_ops.c:1869: (apr_err=2)
+  #  ..\..\..\subversion\libsvn_wc\workqueue.c:520: (apr_err=2)
+  #  ..\..\..\subversion\libsvn_wc\workqueue.c:490: (apr_err=2)
+  #  svn: Error restoring text for 'C:\SVN\src-trunk\Debug\subversion\tests
+  #    \cmdline\svn-test-work\working_copies\merge_tests-139\A_COPY\MU'
+  svntest.actions.run_and_verify_svn(None, [], [], 'revert', '-R', wc_dir)
+
+  # r5: A case-only directory rename on the server
+  svntest.actions.run_and_verify_svn(None,
+                                     ['\n', 'Committed revision 5.\n'],
+                                     [], 'move',
+                                     sbox.repo_url + '/A/C',
+                                     sbox.repo_url + '/A/c',
+                                     '-m', 'Move A/C to A/c')
+  expected_output = wc.State(A_COPY_path, {
+    'C' : Item(status='D '),
+    'c' : Item(status='A '),
+    })
+  expected_disk.tweak('', props={SVN_PROP_MERGEINFO : '/A:3,5'})
+  expected_disk.add({'c' : Item()})
+  expected_status.tweak('MU', status='  ', wc_rev=4, copied=None)
+  expected_status.remove('mu')
+  expected_status.tweak('C', status='D ')
+  expected_status.tweak('', wc_rev=4)
+  expected_status.add({'c' : Item(status='A ', copied='+', wc_rev='-')})
+  # This merge succeeds, but A_COPY/c is in a strange state, added with
+  # history but missing:
+  #
+  #   M      merge_tests-139\A_COPY
+  #  !  +    merge_tests-139\A_COPY\c
+  #  R  +    merge_tests-139\A_COPY\C
+  svntest.actions.run_and_verify_merge(A_COPY_path, '4', '5',
+                                       sbox.repo_url + '/A',
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1, 0)
+
+# This is a test for issue #3221 'Unable to merge into working copy of
+# deleted branch'.
+def merge_into_wc_for_deleted_branch(sbox):
+  "merge into WC of deleted branch should work"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Copy 'A' to 'A_COPY' then make some changes under 'A'
+  wc_disk, wc_status = set_up_branch(sbox)
+
+  # Some paths we'll care about
+  A_COPY_path = os.path.join(wc_dir, "A_COPY")
+  gamma_path  = os.path.join(wc_dir, "A", "D", "gamma")
+  
+  # r7 - Delete the branch on the repository, obviously it still
+  # exists in our WC.
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'delete', sbox.repo_url + '/A_COPY',
+                                     '-m', 'Delete A_COPY directly in repos')
+
+  # r8 - Make another change under 'A'.
+  svntest.main.file_write(gamma_path, "Content added after A_COPY deleted")
+  expected_output = wc.State(wc_dir, {'A/D/gamma' : Item(verb='Sending')})
+  svntest.main.run_svn(None, 'commit',
+                       '-m', 'Change made on A after A_COPY was deleted',
+                       wc_dir)
+
+  # Now merge all available revisions from A to A_COPY:
+  expected_output = wc.State(A_COPY_path, {
+    'B/E/beta'  : Item(status='U '),
+    'D/G/rho'   : Item(status='U '),
+    'D/H/omega' : Item(status='U '),
+    'D/H/psi'   : Item(status='U '),
+    'D/gamma'   : Item(status='U '),
+    })
+  expected_status = wc.State(A_COPY_path, {
+    ''          : Item(status=' M'),
+    'B'         : Item(status='  '),
+    'mu'        : Item(status='  '),
+    'B/E'       : Item(status='  '),
+    'B/E/alpha' : Item(status='  '),
+    'B/E/beta'  : Item(status='M '),
+    'B/lambda'  : Item(status='  '),
+    'B/F'       : Item(status='  '),
+    'C'         : Item(status='  '),
+    'D'         : Item(status='  '),
+    'D/G'       : Item(status='  '),
+    'D/G/pi'    : Item(status='  '),
+    'D/G/rho'   : Item(status='M '),
+    'D/G/tau'   : Item(status='  '),
+    'D/gamma'   : Item(status='M '),
+    'D/H'       : Item(status='  '),
+    'D/H/chi'   : Item(status='  '),
+    'D/H/psi'   : Item(status='M '),
+    'D/H/omega' : Item(status='M '),
+    })
+  expected_status.tweak(wc_rev=2)
+  expected_disk = wc.State('', {
+    ''          : Item(props={SVN_PROP_MERGEINFO : '/A:2-8'}),
+    'B'         : Item(),
+    'mu'        : Item("This is the file 'mu'.\n"),
+    'B/E'       : Item(),
+    'B/E/alpha' : Item("This is the file 'alpha'.\n"),
+    'B/E/beta'  : Item("New content"),
+    'B/lambda'  : Item("This is the file 'lambda'.\n"),
+    'B/F'       : Item(),
+    'C'         : Item(),
+    'D'         : Item(),
+    'D/G'       : Item(),
+    'D/G/pi'    : Item("This is the file 'pi'.\n"),
+    'D/G/rho'   : Item("New content"),
+    'D/G/tau'   : Item("This is the file 'tau'.\n"),
+    'D/gamma'   : Item("Content added after A_COPY deleted"),
+    'D/H'       : Item(),
+    'D/H/chi'   : Item("This is the file 'chi'.\n"),
+    'D/H/psi'   : Item("New content"),
+    'D/H/omega' : Item("New content"),
+    })
+  expected_skip = wc.State(A_COPY_path, { })
+  # Issue #3221: Previously this merge failed with:
+  #   ..\..\..\subversion\svn\util.c:900: (apr_err=160013)
+  #   ..\..\..\subversion\libsvn_client\merge.c:9383: (apr_err=160013)
+  #   ..\..\..\subversion\libsvn_client\merge.c:8029: (apr_err=160013)
+  #   ..\..\..\subversion\libsvn_client\merge.c:7577: (apr_err=160013)
+  #   ..\..\..\subversion\libsvn_client\merge.c:4132: (apr_err=160013)
+  #   ..\..\..\subversion\libsvn_client\merge.c:3312: (apr_err=160013)
+  #   ..\..\..\subversion\libsvn_client\ra.c:659: (apr_err=160013)
+  #   ..\..\..\subversion\libsvn_repos\rev_hunt.c:696: (apr_err=160013)
+  #   ..\..\..\subversion\libsvn_repos\rev_hunt.c:539: (apr_err=160013)
+  #   ..\..\..\subversion\libsvn_fs_fs\tree.c:2818: (apr_err=160013)
+  #   svn: File not found: revision 8, path '/A_COPY'
+  svntest.actions.run_and_verify_merge(A_COPY_path, None, None,
+                                       sbox.repo_url + '/A',
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1, 0)  
+
+# Test for a reintegrate bug which can occur when the merge source
+# has mergeinfo that explicitly describes common history with the reintegrate
+# target, see http://mail-archives.apache.org/mod_mbox/subversion-dev/
+# 200912.mbox/%3C6cfe18eb0912161438wfb5234bj118aacdff7ffb25f@mail.gmail.com%3E
+def reintegrate_with_self_referential_mergeinfo(sbox):
+  "source has target's history as explicit mergeinfo"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Make some changes under 'A' in r2-5.
+  wc_disk, wc_status = set_up_branch(sbox, nbr_of_branches=0)
+
+  # Some paths we'll care about
+  A_path       = os.path.join(wc_dir, "A")
+  A2_path      = os.path.join(wc_dir, "A2")
+  A2_B_path    = os.path.join(wc_dir, "A2", "B")
+  A2_1_path    = os.path.join(wc_dir, "A2.1")
+  A2_1_mu_path = os.path.join(wc_dir, "A2.1", "mu")
+  
+  # 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"], [],
+                                     'up', wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'copy', A_path, A2_path)
+  # /A:3 describes A2's natural history, a.k.a. it's implicit mergeinfo, so
+  # it is self-referential.  Same for /A/B:4 and A2/B.  Normally this is
+  # redundant but not harmful.
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'ps', 'svn:mergeinfo', '/A:3', A2_path)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'ps', 'svn:mergeinfo', '/A/B:4', A2_B_path)
+  svntest.actions.run_and_verify_svn(
+    None, None, [], 'ci', '-m',
+    'copy A to A2 and set some self-referential mergeinfo on the latter.',
+    wc_dir)
+
+  # r7 Copy A2 to A2.1
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'copy', A2_path, A2_1_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci',
+                                     '-m', 'copy A2to A2.1.', wc_dir)
+
+  # r8 Make a change on A2.1/mu
+  svntest.main.file_write(A2_1_mu_path, 'New A2.1 stuff')
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci',
+                                     '-m', 'Work done on the A2.1 branch.',
+                                     wc_dir)
+  
+  # Update to uniform revision and reintegrated A2.1 back to A2.
+  svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [],
+                                     'up', wc_dir)
+
+  # Now merge all available revisions from A to A_COPY:
+  expected_output = wc.State(A2_path, {
+    'mu' : Item(status='U '),
+    })
+  expected_status = wc.State(A2_path, {
+    ''          : Item(status=' M'),
+    'B'         : Item(status=' M'),
+    'mu'        : Item(status='M '),
+    'B/E'       : Item(status='  '),
+    'B/E/alpha' : Item(status='  '),
+    'B/E/beta'  : Item(status='  '),
+    'B/lambda'  : Item(status='  '),
+    'B/F'       : Item(status='  '),
+    'C'         : Item(status='  '),
+    'D'         : Item(status='  '),
+    'D/G'       : Item(status='  '),
+    'D/G/pi'    : Item(status='  '),
+    'D/G/rho'   : Item(status='  '),
+    'D/G/tau'   : Item(status='  '),
+    'D/gamma'   : Item(status='  '),
+    'D/H'       : Item(status='  '),
+    'D/H/chi'   : Item(status='  '),
+    'D/H/psi'   : Item(status='  '),
+    'D/H/omega' : Item(status='  '),
+    })
+  expected_status.tweak(wc_rev=8)
+  expected_disk = wc.State('', {
+    ''          : Item(props={SVN_PROP_MERGEINFO : '/A:3\n/A2.1:7-8'}),
+    'B'         : Item(props={SVN_PROP_MERGEINFO : '/A/B:4\n/A2.1/B:7-8'}),
+    'mu'        : Item("New A2.1 stuff"),
+    'B/E'       : Item(),
+    'B/E/alpha' : Item("This is the file 'alpha'.\n"),
+    'B/E/beta'  : Item("New content"),
+    'B/lambda'  : Item("This is the file 'lambda'.\n"),
+    'B/F'       : Item(),
+    'C'         : Item(),
+    'D'         : Item(),
+    'D/G'       : Item(),
+    'D/G/pi'    : Item("This is the file 'pi'.\n"),
+    'D/G/rho'   : Item("New content"),
+    'D/G/tau'   : Item("This is the file 'tau'.\n"),
+    'D/gamma'   : Item("This is the file 'gamma'.\n"),
+    'D/H'       : Item(),
+    'D/H/chi'   : Item("This is the file 'chi'.\n"),
+    'D/H/psi'   : Item("New content"),
+    'D/H/omega' : Item("New content"),
+    })
+  expected_skip = wc.State(A2_path, { })
+  # Previously failed with this error:
+  #
+  #   svn merge ^/A2.1" A2 --reintegrate
+  #  ..\..\..\subversion\svn\merge-cmd.c:349: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_client\merge.c:9219: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_client\ra.c:728: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_client\mergeinfo.c:733: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_client\ra.c:526: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_repos\rev_hunt.c:908: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_repos\rev_hunt.c:607: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_fs_fs\tree.c:2886: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_fs_fs\tree.c:669: (apr_err=160013)
+  #  svn: File not found: revision 4, path '/A2'
+  svntest.actions.run_and_verify_merge(A2_path, None, None,
+                                       sbox.repo_url + '/A2.1',
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1, 0, '--reintegrate')
+  
 ########################################################################
 # Run the tests
 
@@ -16975,6 +17514,11 @@ test_list = [ None,
               SkipUnless(record_only_merge,
                          server_has_mergeinfo),
               XFail(merge_automatic_conflict_resolution),
+              skipped_files_get_correct_mergeinfo,
+              XFail(committed_case_only_move_and_revert,
+                    is_fs_case_insensitive),
+              merge_into_wc_for_deleted_branch,
+              reintegrate_with_self_referential_mergeinfo,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/mergeinfo_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/mergeinfo_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at
@@ -166,9 +166,9 @@ def non_inheritable_mergeinfo(sbox):
   A_COPY_path   = os.path.join(wc_dir, "A_COPY")
   D_COPY_path   = os.path.join(wc_dir, "A_COPY", "D")
   rho_COPY_path = os.path.join(wc_dir, "A_COPY", "D", "G", "rho")
-  
+
   # Update the WC, then merge r4 from A to A_COPY and r6 from A to A_COPY
-  # at --depth empty and commit the merges as r7.  
+  # at --depth empty and commit the merges as r7.
   svntest.actions.run_and_verify_svn(None, ["At revision 6.\n"], [], 'up',
                                      wc_dir)
   expected_status.tweak(wc_rev=6)
@@ -238,8 +238,8 @@ def recursive_mergeinfo(sbox):
   A2_path         = os.path.join(wc_dir, "A2")
   nu_path         = os.path.join(wc_dir, "A2", "B", "F", "nu")
   nu_COPY_path    = os.path.join(wc_dir, "A_COPY", "B", "F", "nu")
-  nu2_path        = os.path.join(wc_dir, "A2", "C", "nu2") 
-  
+  nu2_path        = os.path.join(wc_dir, "A2", "C", "nu2")
+
   # Rename A to A2 in r7.
   svntest.actions.run_and_verify_svn(None, ["At revision 6.\n"], [], 'up', wc_dir)
   svntest.actions.run_and_verify_svn(None, None, [],
@@ -266,7 +266,7 @@ def recursive_mergeinfo(sbox):
                                      [], [], 'merge', '-c4', '--depth', 'empty',
                                      sbox.repo_url + '/A2',
                                      A_COPY_path)
-  
+
   # Merge r6 from A2/D/H to A_COPY/D/H
   svntest.actions.run_and_verify_svn(None,
                                      expected_merge_output([[6]], 'U    ' +
@@ -284,12 +284,12 @@ def recursive_mergeinfo(sbox):
                                      [], 'merge', '-c5',
                                      sbox.repo_url + '/A2',
                                      A_COPY_path)
- 
+
   # Reverse merge -r5 from A2/C to A_COPY/C leaving empty mergeinfo on
   # A_COPY/C.
   svntest.actions.run_and_verify_svn(None, [], [], 'merge', '-c-5',
                                      sbox.repo_url + '/A2/C', C_COPY_path)
-  
+
   # Merge r8 from A2/B/F to A_COPY/B/F
   svntest.actions.run_and_verify_svn(None,
                                      expected_merge_output([[8]], 'A    ' +
@@ -299,7 +299,7 @@ def recursive_mergeinfo(sbox):
                                      sbox.repo_url + '/A2/B/F',
                                      F_COPY_path)
 
-  # Commit everything this far as r9  
+  # Commit everything this far as r9
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'ci', wc_dir, '-m', 'Many merges')
   svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [], 'up',
@@ -344,7 +344,105 @@ def recursive_mergeinfo(sbox):
                                            A_COPY_path,
                                            '--show-revs', 'merged',
                                            '--depth', 'infinity')
-  
+
+# Test for issue #3180 'svn mergeinfo ignores peg rev for WC target'.
+def mergeinfo_on_pegged_wc_path(sbox):
+  "svn mergeinfo on pegged working copy target"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  expected_disk, expected_status = set_up_branch(sbox)
+
+  # Some paths we'll care about
+  A_path          = os.path.join(wc_dir, "A")
+  A_COPY_path     = os.path.join(wc_dir, "A_COPY")
+  psi_COPY_path   = os.path.join(wc_dir, "A_COPY", "D", "H", "psi")
+  omega_COPY_path = os.path.join(wc_dir, "A_COPY", "D", "H", "omega")
+  beta_COPY_path  = os.path.join(wc_dir, "A_COPY", "B", "E", "beta")
+ 
+  # Do a couple merges
+  #
+  # r7 - Merge -c3,6 from A to A_COPY.
+  svntest.actions.run_and_verify_svn(
+    None,
+    expected_merge_output([[3],[6]],
+                          ['U    ' + psi_COPY_path + '\n',
+                           'U    ' + omega_COPY_path + '\n']),
+    [], 'merge', '-c3,6', sbox.repo_url + '/A', A_COPY_path)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'ci', wc_dir,
+                                     '-m', 'Merge r3 and r6')
+
+  # r8 - Merge -c5 from A to A_COPY.
+  svntest.actions.run_and_verify_svn(
+    None,
+    expected_merge_output([[5]],
+                          'U    ' + beta_COPY_path + '\n'),
+    [], 'merge', '-c5', sbox.repo_url + '/A', A_COPY_path)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'ci', wc_dir,
+                                     '-m', 'Merge r5')
+
+  # Ask for merged and eligible revisions to A_COPY pegged at various values.
+  # Prior to issue #3180 fix the peg revision was ignored.
+  #
+  # A_COPY pegged to non-existent revision
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version('.*No such revision 99'),
+    [], A_path, A_COPY_path + '@99', '--show-revs', 'merged')
+
+  # A_COPY@BASE
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''),
+    ['3','5','6'], A_path, A_COPY_path + '@BASE', '--show-revs', 'merged')
+
+  # A_COPY@HEAD
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''),
+    ['3','5','6'], A_path, A_COPY_path + '@HEAD', '--show-revs', 'merged')
+
+  # A_COPY@4 (Prior to any merges)
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''),
+    [], A_path, A_COPY_path + '@4', '--show-revs', 'merged')
+
+  # A_COPY@COMMITTED (r8)
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''),
+    ['3','5','6'], A_path, A_COPY_path + '@COMMITTED', '--show-revs',
+    'merged')
+
+  # A_COPY@PREV (r7)
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''),
+    ['3', '6'], A_path, A_COPY_path + '@PREV', '--show-revs', 'merged')
+
+  # A_COPY@BASE
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''),
+    ['4'], A_path, A_COPY_path + '@BASE', '--show-revs', 'eligible')
+
+  # A_COPY@HEAD
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''),
+    ['4'], A_path, A_COPY_path + '@HEAD', '--show-revs', 'eligible')
+
+  # A_COPY@4 (Prior to any merges)
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''),
+    ['3', '4', '5', '6'], A_path, A_COPY_path + '@4', '--show-revs', 'eligible')
+
+  # A_COPY@COMMITTED (r8)
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''),
+    ['4'], A_path, A_COPY_path + '@COMMITTED', '--show-revs',
+    'eligible')
+
+  # A_COPY@PREV (r7)
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''),
+    ['4', '5'], A_path, A_COPY_path + '@PREV', '--show-revs', 'eligible')
+
 ########################################################################
 # Run the tests
 
@@ -358,6 +456,8 @@ test_list = [ None,
               mergeinfo_on_unknown_url,
               non_inheritable_mergeinfo,
               SkipUnless(recursive_mergeinfo, server_has_mergeinfo),
+              SkipUnless(mergeinfo_on_pegged_wc_path,
+                         server_has_mergeinfo),
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/patch_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/patch_tests.py Tue Aug 10 17:03:06 2010
@@ -3,14 +3,14 @@
 #
 #  patch_tests.py:  some basic patch tests
 #
-#  Subversion is a tool for revision control. 
+#  Subversion is a tool for revision control.
 #  See http://subversion.tigris.org for more information.
-#    
+#
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at
@@ -253,11 +253,13 @@ def patch_unidiff_absolute_paths(sbox):
   ]
 
   svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
-  
+
   lambda_path = os.path.join(os.path.sep, 'A', 'B', 'lambda')
   expected_output = [
     'U    %s\n' % os.path.join('A', 'B', 'E', 'alpha'),
-    'Skipped \'%s\'\n' % lambda_path
+    'Skipped \'%s\'\n' % lambda_path,
+    'Summary of conflicts:\n',
+    '  Skipped paths: 1\n'
   ]
 
   alpha_contents = "This is the file 'alpha'.\nWhoooo whooooo whoooooooo!\n"
@@ -445,7 +447,7 @@ def patch_unidiff_offset(sbox):
     "agent below as soon as possible for the immediate release of your\n",
     "winnings with the below details.\n",
   ]
-  
+
   iota_contents = [
     "iota\n",
     "iota\n",
@@ -837,11 +839,11 @@ def patch_unidiff_strip1(sbox):
 
 # list all tests here, starting with None:
 test_list = [ None,
-              XFail(patch_unidiff, is_os_windows),
+              patch_unidiff,
               patch_unidiff_absolute_paths,
-              XFail(patch_unidiff_offset, is_os_windows),
-              XFail(patch_chopped_leading_spaces, is_os_windows),
-              XFail(patch_unidiff_strip1, is_os_windows),
+              patch_unidiff_offset,
+              patch_chopped_leading_spaces,
+              patch_unidiff_strip1,
             ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/prop_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/prop_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at
@@ -716,6 +716,13 @@ def inappropriate_props(sbox):
                                      'propset', SVN_PROP_MERGEINFO,
                                      '/trunk:', path)
 
+  # ...contain non-inheritable ranges when the target is a file.
+  svntest.actions.run_and_verify_svn('empty ranges', None,
+                                     "svn: Cannot set non-inheritable "
+                                     "mergeinfo on a non-directory*",
+                                     'propset', SVN_PROP_MERGEINFO,
+                                     '/A/D/H/psi:1*', iota_path)
+
 #----------------------------------------------------------------------
 
 # Issue #976.  When copying a file, do not determine svn:executable
@@ -1703,6 +1710,30 @@ def delete_nonexistent_property(sbox):
                                      'propdel', 'yellow',
                                      os.path.join(wc_dir, 'A', 'D', 'G'))
 
+#----------------------------------------------------------------------
+def post_revprop_change_hook(sbox):
+  "post-revprop-change hook"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  repo_dir = sbox.repo_dir
+
+  # Include a non-XML-safe message to regression-test issue #3553.
+  error_msg = 'Text with <angle brackets> & ampersand'
+
+  svntest.actions.enable_revprop_changes(repo_dir)
+  svntest.actions.create_failing_hook(repo_dir, 'post-revprop-change',
+                                      error_msg)
+
+  expected_error = svntest.verify.ExpectedOutput([
+    "svn: " + svntest.actions.hook_failure_message('post-revprop-change'),
+    error_msg + "\n",
+  ], match_all = False)
+
+  svntest.actions.run_and_verify_svn(None, [], expected_error,
+                                     'ps', '--revprop', '-r0', 'p', 'v',
+                                     wc_dir)
+
 
 ########################################################################
 # Run the tests
@@ -1743,6 +1774,7 @@ test_list = [ None,
               same_replacement_props,
               added_moved_file,
               delete_nonexistent_property,
+              XFail(post_revprop_change_hook, svntest.main.is_ra_type_dav),
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/resolved_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/resolved_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/resolved_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/resolved_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at
@@ -326,6 +326,27 @@ def resolved_on_deleted_item(sbox):
 
 
 
+def theirs_conflict_in_subdir(sbox):
+  "resolve to 'theirs-conflict' in sub-directory"
+
+  sbox.build()
+  wc = sbox.wc_dir
+  wc2 = sbox.add_wc_path('wc2')
+  svntest.actions.duplicate_dir(sbox.wc_dir, wc2)
+
+  alpha_path = os.path.join(wc, 'A', 'B', 'E', 'alpha')
+  alpha_path2 = os.path.join(wc2, 'A', 'B', 'E', 'alpha')
+
+  svntest.main.file_append(alpha_path, "Modified alpha.\n")
+  svntest.main.run_svn(None, 'ci', '-m', 'logmsg', wc)
+
+  svntest.main.file_append(alpha_path2, "Modified alpha, too.\n")
+  svntest.main.run_svn(None, 'up', wc2)
+
+  svntest.actions.run_and_verify_resolve([alpha_path2],
+                                         '--accept=theirs-conflict',
+                                         alpha_path2)
+
 #######################################################################
 # Run the tests
 
@@ -334,6 +355,7 @@ def resolved_on_deleted_item(sbox):
 test_list = [ None,
               resolved_on_wc_root,
               resolved_on_deleted_item,
+              theirs_conflict_in_subdir,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/revert_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/revert_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/revert_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/revert_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/schedule_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/schedule_tests.py Tue Aug 10 17:03:06 2010
@@ -7,10 +7,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at
@@ -497,6 +497,8 @@ def delete_missing(sbox):
 #----------------------------------------------------------------------
 # Regression test for issue #854:
 # Revert . inside an svn added empty directory should generate an error.
+# Not anymore!  wc-ng uses absolute paths for everything, which means we
+# can handle this case without too much trouble.
 
 def revert_inside_newly_added_dir(sbox):
   "revert inside a newly added dir"
@@ -511,9 +513,9 @@ def revert_inside_newly_added_dir(sbox):
   svntest.main.run_svn(None, 'add', 'foo')
 
   # Now change into the newly added directory, revert and make sure
-  # an error is output.
+  # no error is output.
   os.chdir('foo')
-  svntest.actions.run_and_verify_svn(None, None, svntest.verify.AnyOutput,
+  svntest.actions.run_and_verify_svn(None, None, [],
                                      'revert', '.')
 
 #----------------------------------------------------------------------

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/special_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/special_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/special_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/stat_tests.py?rev=984122&r1=984121&r2=984122&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/stat_tests.py Tue Aug 10 17:03:06 2010
@@ -6,10 +6,10 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-#    Licensed to the Subversion Corporation (SVN Corp.) under one
+#    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
 #    distributed with this work for additional information
-#    regarding copyright ownership.  The SVN Corp. licenses this file
+#    regarding copyright ownership.  The ASF licenses this file
 #    to you under the Apache License, Version 2.0 (the
 #    "License"); you may not use this file except in compliance
 #    with the License.  You may obtain a copy of the License at
@@ -636,6 +636,9 @@ def timestamp_behaviour(sbox):
   config_dir = os.path.join(os.path.abspath(svntest.main.temp_dir),
                             'use_commit_config')
   config_contents = '''\
+[auth]
+password-stores =
+
 [miscellany]
 use-commit-times = yes
 '''