On the 'svn-update-new-depth' branch, make tests pass again.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
  Update this test data to match the new reality.

* subversion/tests/cmdline/checkout_tests.py
  (co_with_obstructing_local_adds): Re-work test to still cover the
    same ground, but do so in a way that doesn't violate new
    constraints on 'svn checkout -N'.

* subversion/tests/cmdline/depth_tests.py
  (depth_immediates_fill_in_dir, depth_mixed_bring_in_dir,
   depth_update_to_more_depth, diff_in_depthy_wc, upgrade_from_above,
   status_in_depthy_wc): Tweak tests to use --set-depth instead of
    --depth when trying to telescope working copy depth.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/svn-update-new-depth@868975 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/subversion/tests/cmdline/checkout_tests.py b/subversion/tests/cmdline/checkout_tests.py
index 830de56..6d22876 100755
--- a/subversion/tests/cmdline/checkout_tests.py
+++ b/subversion/tests/cmdline/checkout_tests.py
@@ -642,33 +642,35 @@
   # Test that file and dir obstructions scheduled for addition *with*
   # history fail when update tries to add the same path.
 
-  # URL to URL copy of A/D/G to A/M.
+  # URL to URL copy of A/D/G to A/D/M.
   G_URL = sbox.repo_url + '/A/D/G'
-  M_URL = sbox.repo_url + '/A/M'
+  M_URL = sbox.repo_url + '/A/D/M'
   svntest.actions.run_and_verify_svn("Copy error:", None, [],
                                      'cp', G_URL, M_URL, '-m', '')
 
-  # WC to WC copy of A/D/H to A/M, M now scheduled for addition with
-  # history in WC and pending addition from the repos.
+  # WC to WC copy of A/D/H to A/D/M.  (M is now scheduled for addition
+  # with history in WC and pending addition from the repos).
+  D_path = os.path.join(wc_dir, 'A', 'D')
   H_path = os.path.join(wc_dir, 'A', 'D', 'H')
-  A_path = os.path.join(wc_dir, 'A')
-  M_path = os.path.join(wc_dir, 'A', 'M')
+  M_path = os.path.join(wc_dir, 'A', 'D', 'M')
 
   svntest.actions.run_and_verify_svn("Copy error:", None, [],
                                      'cp', H_path, M_path)
 
-  # URL to URL copy of A/D/H/omega to omicron.
-  omega_URL = sbox.repo_url + '/A/D/H/omega'
-  omicron_URL = sbox.repo_url + '/omicron'
+  # URL to URL copy of A/B/E/alpha to A/B/F/omicron.
+  omega_URL = sbox.repo_url + '/A/B/E/alpha'
+  omicron_URL = sbox.repo_url + '/A/B/F/omicron'
   svntest.actions.run_and_verify_svn("Copy error:", None, [],
                                      'cp', omega_URL, omicron_URL,
                                      '-m', '')
 
-  # WC to WC copy of A/D/H/chi to omicron, omicron now scheduled for
-  # addition with history in WC and pending addition from the repos.
+  # WC to WC copy of A/D/H/chi to /A/B/F/omicron.  (omicron is now
+  # scheduled for addition with history in WC and pending addition
+  # from the repos).
+  F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+  omicron_path = os.path.join(wc_dir, 'A', 'B', 'F', 'omicron')
   chi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'chi')
-  omicron_path = os.path.join(wc_dir, 'omicron')
-
+  
   svntest.actions.run_and_verify_svn("Copy error:", None, [],
                                      'cp', chi_path,
                                      omicron_path)
@@ -676,8 +678,9 @@
   # Try to co M's Parent.
   sout, serr = svntest.actions.run_and_verify_svn("Checkout XPASS",
                                                   [], svntest.verify.AnyOutput,
-                                                  'co', sbox.repo_url + '/A',
-                                                  A_path)
+                                                  'checkout',
+                                                  sbox.repo_url + '/A/D',
+                                                  D_path)
 
   test_stderr("svn: Failed to add directory '.*M': a versioned " \
               "directory of the same name already exists\n", serr)
@@ -685,18 +688,19 @@
   # --force shouldn't help either.
   sout, serr = svntest.actions.run_and_verify_svn("Checkout XPASS",
                                                   [], svntest.verify.AnyOutput,
-                                                  'co', sbox.repo_url + '/A',
-                                                  A_path, '--force')
+                                                  'checkout',
+                                                  sbox.repo_url + '/A/D',
+                                                  D_path, '--force')
 
   test_stderr("svn: Failed to add directory '.*M': a versioned " \
               "directory of the same name already exists\n", serr)
 
-  # Try to co omicron's parent, non-recusively so as not to
-  # try and update M first.
+  # Try to co omicron's parent.
   sout, serr = svntest.actions.run_and_verify_svn("Checkout XPASS",
                                                   [], svntest.verify.AnyOutput,
-                                                  'co', sbox.repo_url,
-                                                  wc_dir, '-N')
+                                                  'checkout',
+                                                  sbox.repo_url + '/A/B/F',
+                                                  F_path)
 
   test_stderr("svn: Failed to add file '.*omicron': a file of the same " \
               "name is already scheduled for addition with history\n", serr)
@@ -704,8 +708,9 @@
   # Again, --force shouldn't matter.
   sout, serr = svntest.actions.run_and_verify_svn("Checkout XPASS",
                                                   [], svntest.verify.AnyOutput,
-                                                  'co', sbox.repo_url,
-                                                  wc_dir, '-N', '--force')
+                                                  'checkout',
+                                                  sbox.repo_url + '/A/B/F',
+                                                  F_path, '--force')
 
   test_stderr("svn: Failed to add file '.*omicron': a file of the same " \
               "name is already scheduled for addition with history\n", serr)
diff --git a/subversion/tests/cmdline/depth_tests.py b/subversion/tests/cmdline/depth_tests.py
index bca8895..b3a90e6 100755
--- a/subversion/tests/cmdline/depth_tests.py
+++ b/subversion/tests/cmdline/depth_tests.py
@@ -491,7 +491,8 @@
 def depth_immediates_fill_in_dir(sbox):
   "bring a dir into a depth-immediates working copy"
 
-  # Run 'svn up A' to fill in A as a depth-infinity subdir.
+  # Run 'svn up A --set-depth=infinity' to fill in A as a
+  # depth-infinity subdir.
   ign_a, ign_b, wc_immediates, wc \
                         = set_up_depthy_working_copies(sbox, immediates=True)
   A_path = os.path.join(wc_immediates, 'A')
@@ -523,14 +524,14 @@
                                         expected_status,
                                         None, None,
                                         None, None, None, None,
-                                        '--depth', 'infinity',
+                                        '--set-depth', 'infinity',
                                         A_path)
 
 #----------------------------------------------------------------------
 def depth_mixed_bring_in_dir(sbox):
   "bring a dir into a mixed-depth working copy"
 
-  # Run 'svn up --depth=immediates A' in a depth-empty working copy.
+  # Run 'svn up --set-depth=immediates A' in a depth-empty working copy.
   wc_empty, ign_a, ign_b, wc = set_up_depthy_working_copies(sbox, empty=True)
   A_path = os.path.join(wc_empty, 'A')
   B_path = os.path.join(wc_empty, 'A', 'B')
@@ -556,7 +557,7 @@
                                         expected_status,
                                         None, None,
                                         None, None, None, None,
-                                        '--depth', 'files',
+                                        '--set-depth', 'files',
                                         A_path)
   # Check that A was added at depth=files.
   svntest.actions.run_and_verify_svn(None, "Depth: files|Path.+|URL.+|" \
@@ -587,7 +588,7 @@
                                         expected_status,
                                         None, None,
                                         None, None, None, None,
-                                        '--depth', 'immediates',
+                                        '--set-depth', 'immediates',
                                         B_path)
   # Check that A/B was added at depth=immediates.
   svntest.actions.run_and_verify_svn(None, "Depth: immediates|Path.+|URL.+|" \
@@ -615,7 +616,7 @@
                                         expected_status,
                                         None, None,
                                         None, None, None, None,
-                                        '--depth', 'empty',
+                                        '--set-depth', 'empty',
                                         C_path)
   # Check that A/C was added at depth=empty.
   svntest.actions.run_and_verify_svn(None, "Depth: empty|Path.+|URL.+|" \
@@ -820,7 +821,7 @@
 
   os.chdir(wc_dir)
 
-  # Run 'svn up --depth=files' in a depth-empty working copy.
+  # Run 'svn up --set-depth=files' in a depth-empty working copy.
   expected_output = svntest.wc.State('', {
     'iota'              : Item(status='A '),
     })
@@ -837,12 +838,12 @@
                                         expected_status,
                                         None, None,
                                         None, None, None, None,
-                                        '--depth', 'files')
+                                        '--set-depth', 'files')
   svntest.actions.run_and_verify_svn(None, "Depth: files|Path.+|URL.+|" \
                                      "Repository.+|Revision.+|Node Kind.+|" \
                                      "Schedule.+|Last.+|\n", [], "info")
 
-  # Run 'svn up --depth=immediates' in the now depth-files working copy.
+  # Run 'svn up --set-depth=immediates' in the now depth-files working copy.
   expected_output = svntest.wc.State('', {
     'A'              : Item(status='A '),
     })
@@ -861,7 +862,7 @@
                                         expected_status,
                                         None, None,
                                         None, None, None, None,
-                                        '--depth', 'immediates')
+                                        '--set-depth', 'immediates')
   svntest.actions.run_and_verify_svn(None, "Depth: immediates|Path.+|URL.+|" \
                                      "Repository.+|Revision.+|Node Kind.+|" \
                                      "Schedule.+|Last.+|\n", [], "info")
@@ -890,7 +891,7 @@
                                         expected_status,
                                         None, None,
                                         None, None, None, None,
-                                        '--depth', 'files', 'A')
+                                        '--set-depth', 'files', 'A')
   svntest.actions.run_and_verify_svn(None, "Depth: immediates|Path.+|URL.+|" \
                                      "Repository.+|Revision.+|Node Kind.+|" \
                                      "Schedule.+|Last.+|\n", [], "info")
@@ -898,7 +899,7 @@
                                      "Repository.+|Revision.+|Node Kind.+|" \
                                      "Schedule.+|Last.+|\n", [], "info", "A")
 
-  # Run 'svn up --depth=infinity' in the working copy.
+  # Run 'svn up --set-depth=infinity' in the working copy.
   expected_output = svntest.wc.State('', {
     'A/B'            : Item(status='A '),
     'A/B/lambda'     : Item(status='A '),
@@ -926,7 +927,7 @@
                                         expected_status,
                                         None, None,
                                         None, None, None, None,
-                                        '--depth', 'infinity')
+                                        '--set-depth', 'infinity')
   # svn info doesn't print a 'Depth:' line for infinity, so we verify
   # that no such line is present in the output.
   output1, err = svntest.actions.run_and_verify_svn(None, None, [], "info")
@@ -1049,7 +1050,7 @@
 
   # Upgrade to depth-files.
   svntest.actions.run_and_verify_svn(None, None, [], 'up',
-                                     '--depth', 'files', '-r1')
+                                     '--set-depth', 'files', '-r1')
   # The diff should contain only the propchange on '.' and the
   # contents change on iota.
   expected_output = svntest.verify.UnorderedOutput(diff[:13])
@@ -1062,7 +1063,7 @@
 
   # Upgrade to depth-immediates.
   svntest.actions.run_and_verify_svn(None, None, [], 'up',
-                                     '--depth', 'immediates', '-r1')
+                                     '--set-depth', 'immediates', '-r1')
   # The diff should contain the propchanges on '.' and 'A' and the
   # contents change on iota.
   expected_output = svntest.verify.UnorderedOutput(diff[:19])
@@ -1075,7 +1076,7 @@
 
   # Upgrade A to depth-files.
   svntest.actions.run_and_verify_svn(None, None, [], 'up',
-                                     '--depth', 'files', '-r1', 'A')
+                                     '--set-depth', 'files', '-r1', 'A')
   # The diff should contain everything but the contents change on
   # gamma (which does not exist in this working copy).
   expected_output = svntest.verify.UnorderedOutput(diff)
@@ -1226,7 +1227,7 @@
 def upgrade_from_above(sbox):
   "upgrade a depth=empty wc from above"
 
-  # The bug was that 'svn up --depth=files' worked from within the
+  # The bug was that 'svn up --set-depth=files' worked from within the
   # working copy, but not from without with working copy top given
   # as an argument.  Both ways would correctly cause 'iota' to
   # appear, but only the former actually upgraded the depth of the
@@ -1260,7 +1261,7 @@
                                           expected_disk,
                                           expected_status,
                                           None, None, None, None, None, None,
-                                          '--depth=files')
+                                          '--set-depth=files')
     svntest.actions.run_and_verify_svn(None, "Depth: +files|Path.+|URL.+|" \
                                        "Repository.+|Revision.+|Node Kind.+|" \
                                        "Schedule.+|Last.+|\n", [], "info")
@@ -1285,7 +1286,7 @@
                                         expected_disk,
                                         expected_status,
                                         None, None, None, None, None, None,
-                                        '--depth=files', wc)
+                                        '--set-depth=files', wc)
   svntest.actions.run_and_verify_svn(None, "Depth: +files|Path.+|URL.+|" \
                                      "Repository.+|Revision.+|Node Kind.+|" \
                                      "Schedule.+|Last.+|\n", [], "info", wc)
@@ -1329,7 +1330,7 @@
 
   # Upgrade to depth-files.
   svntest.actions.run_and_verify_svn(None, None, [], 'up',
-                                     '--depth', 'files', '-r1')
+                                     '--set-depth', 'files', '-r1')
   # The output should contain only the changes on '.' and 'iota'.
   expected_output = svntest.verify.UnorderedOutput(status[:3])
   svntest.actions.run_and_verify_svn(None, expected_output, [],
@@ -1341,7 +1342,7 @@
 
   # Upgrade to depth-immediates.
   svntest.actions.run_and_verify_svn(None, None, [], 'up',
-                                     '--depth', 'immediates', '-r1')
+                                     '--set-depth', 'immediates', '-r1')
   # The output should contain the changes on '.', 'A' and 'iota'.
   expected_output = svntest.verify.UnorderedOutput(status[:4])
   svntest.actions.run_and_verify_svn(None, expected_output, [],
@@ -1353,7 +1354,7 @@
 
   # Upgrade A to depth-files.
   svntest.actions.run_and_verify_svn(None, None, [], 'up',
-                                     '--depth', 'files', '-r1', 'A')
+                                     '--set-depth', 'files', '-r1', 'A')
   # The output should contain everything but the change on
   # gamma (which does not exist in this working copy).
   expected_output = svntest.verify.UnorderedOutput(status)
diff --git a/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout b/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
index 6d07c02..aa871ec 100644
--- a/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
+++ b/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
@@ -64,22 +64,27 @@
      If specified, PEGREV determines in which revision the target is first
      looked up.
 
+     If --force is used, unversioned obstructing paths in the working
+     copy do not automatically cause a failure if the switch attempts to
+     add the same path.  If the obstructing path is the same type (file
+     or directory) as the corresponding path in the repository it becomes
+     versioned but its contents are left 'as-is' in the working copy.
+     This means that an obstructing directory's unversioned children may
+     also obstruct and become versioned.  For files, any content differences
+     between the obstruction and the repository are treated like a local
+     modification to the working copy.  All properties from the repository
+     are applied to the obstructing path.
+
+     Use the --set-depth option to set a new working copy depth on the
+     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.
+
   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.
 
-  If --force is used, unversioned obstructing paths in the working
-  copy do not automatically cause a failure if the switch attempts to
-  add the same path.  If the obstructing path is the same type (file
-  or directory) as the corresponding path in the repository it becomes
-  versioned but its contents are left 'as-is' in the working copy.
-  This means that an obstructing directory's unversioned children may
-  also obstruct and become versioned.  For files, any content differences
-  between the obstruction and the repository are treated like a local
-  modification to the working copy.  All properties from the repository
-  are applied to the obstructing path.
-
 Valid options:
   -r [--revision] ARG      : ARG (some commands also take ARG1:ARG2 range)
                              A revision argument can be one of:
@@ -90,8 +95,10 @@
                                 'COMMITTED'  last commit at or before BASE
                                 'PREV'       revision just before COMMITTED
   -N [--non-recursive]     : obsolete; try --depth=files or --depth=immediates
-  --depth ARG              : pass depth ('empty', 'files', 'immediates', or
-                            'infinity') as ARG
+  --depth ARG              : limit operation by depth ARG ('empty', 'files',
+                            'immediates', or 'infinity')
+  --set-depth ARG          : set new working copy depth to ARG ('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