You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/11/30 11:24:23 UTC

svn commit: r1717223 [43/50] - in /subversion/branches/ra-git: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/hook-scripts/ notes/ notes/api-errata/1.9/ notes/move-tracking/ subversion/ subversion/bindings/ctypes-python/...

Modified: subversion/branches/ra-git/subversion/tests/cmdline/README
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/README?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/README (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/README Mon Nov 30 10:24:16 2015
@@ -12,7 +12,7 @@ command-line client.  It has no access t
 looks inside the .svn/ directory; it only performs actions that a
 human user would do.
 
-These tests require Python 2.5 or later.
+These tests require Python 2.7 or later.
 
   [ For more general information on Subversion's testing system,
     please read the README in subversion/tests/. ]
@@ -83,6 +83,133 @@ paths adjusted appropriately:
      Require valid-user
    </Location>
 
+   <Location /authz-test-work/anon>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     # This may seem unnecessary but granting access to everyone here is necessary
+     # to exercise a bug with httpd 2.3.x+.  The "Require all granted" syntax is
+     # new to 2.3.x+ which we can detect with the mod_authz_core.c module
+     # signature.  Use the "Allow from all" syntax with older versions for symmetry.
+     <IfModule mod_authz_core.c>
+       Require all granted
+     </IfModule>
+     <IfModule !mod_authz_core.c>
+       Allow from all
+     </IfMOdule>
+   </Location>
+   <Location /authz-test-work/mixed>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     Satisfy Any
+   </Location>
+   <Location /authz-test-work/mixed-noauthwhenanon>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     AuthzSVNNoAuthWhenAnonymousAllowed On
+   </Location>
+   <Location /authz-test-work/authn>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+   </Location>
+   <Location /authz-test-work/authn-anonoff>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     AuthzSVNAnonymous Off
+   </Location>
+   <Location /authz-test-work/authn-lcuser>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     AuthzForceUsernameCase Lower
+   </Location>
+   <Location /authz-test-work/authn-lcuser>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     AuthzForceUsernameCase Lower
+   </Location>
+   <Location /authz-test-work/authn-group>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     AuthGroupFile /usr/local/apache2/conf/groups
+     Require           group random
+     AuthzSVNAuthoritative Off
+   </Location>
+   <IfModule mod_authz_core.c>
+     <Location /authz-test-work/sallrany>
+       DAV               svn
+       SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+       AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+       SVNListParentPath On
+       AuthType          Basic
+       AuthName          "Subversion Repository"
+       AuthUserFile /usr/local/apache2/conf/users
+       AuthzSendForbiddenOnFailure On
+       Satisfy All
+       <RequireAny>
+         Require valid-user
+         Require expr req('ALLOW') == '1'
+       </RequireAny>
+     </Location>
+     <Location /authz-test-work/sallrall>
+       DAV               svn
+       SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+       AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+       SVNListParentPath On
+       AuthType          Basic
+       AuthName          "Subversion Repository"
+       AuthUserFile /usr/local/apache2/conf/users
+       AuthzSendForbiddenOnFailure On
+       Satisfy All
+       <RequireAll>
+         Require valid-user
+         Require expr req('ALLOW') == '1'
+       </RequireAll>
+     </Location>
+   </IfModule>
+
+
    RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)$ /svn-test-work/repositories/$1
    RedirectMatch           ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$ /svn-test-work/repositories/$1
 
@@ -101,6 +228,15 @@ just drop the following 2-line snippet i
 ----------------------------
 jrandom:xCGl35kV9oWCY
 jconstant:xCGl35kV9oWCY
+JRANDOM:xCGl35kV9oWCY
+JCONSTANT:xCGl35kV9oWCY
+----------------------------
+
+and these lines into the
+/usr/local/apache/conf/groups file:
+----------------------------
+random: jrandom
+constant: jconstant
 ----------------------------
 
 Now, (re)start Apache and run the tests over mod_dav_svn.
@@ -138,6 +274,8 @@ Note [1]: It would be quite too much to
           ----------------------------
           jrandom:$apr1$3p1.....$FQW6RceW5QhJ2blWDQgKn0
           jconstant:$apr1$jp1.....$Usrqji1c9H6AbOxOGAzzb0
+          JRANDOM:$apr1$3p1.....$FQW6RceW5QhJ2blWDQgKn0
+          JCONSTANT:$apr1$jp1.....$Usrqji1c9H6AbOxOGAzzb0
           ----------------------------
 
 

Modified: subversion/branches/ra-git/subversion/tests/cmdline/atomic-ra-revprop-change.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/atomic-ra-revprop-change.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/atomic-ra-revprop-change.c (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/atomic-ra-revprop-change.c Mon Nov 30 10:24:16 2015
@@ -58,13 +58,14 @@ construct_auth_baton(svn_auth_baton_t **
                      const char *config_dir,
                      apr_pool_t *pool)
 {
-  SVN_ERR(svn_cmdline_create_auth_baton(auth_baton_p,
-                                        TRUE  /* non_interactive */,
-                                        "jrandom", "rayjandom",
-                                        config_dir,
-                                        TRUE  /* no_auth_cache */,
-                                        FALSE /* trust_server_cert */,
-                                        NULL, NULL, NULL, pool));
+  SVN_ERR(svn_cmdline_create_auth_baton2(auth_baton_p,
+                                         TRUE  /* non_interactive */,
+                                         "jrandom", "rayjandom",
+                                         config_dir,
+                                         TRUE  /* no_auth_cache */,
+                                         FALSE /* trust_server_cert */,
+                                         FALSE, FALSE, FALSE, FALSE,
+                                         NULL, NULL, NULL, pool));
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/ra-git/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/authz_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/authz_tests.py Mon Nov 30 10:24:16 2015
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-#  authz_tests.py:  testing authentication.
+#  authz_tests.py:  testing authorization.
 #
 #  Subversion is a tool for revision control.
 #  See http://subversion.apache.org for more information.
@@ -359,7 +359,7 @@ def authz_write_access(sbox):
 def authz_checkout_test(sbox):
   "test authz for checkout"
 
-  sbox.build(create_wc = False, read_only = True)
+  sbox.build(create_wc = False)
   local_dir = sbox.wc_dir
 
   write_restrictive_svnserve_conf(sbox.repo_dir)
@@ -398,7 +398,7 @@ def authz_checkout_test(sbox):
 def authz_checkout_and_update_test(sbox):
   "test authz for checkout and update"
 
-  sbox.build(create_wc = False, read_only = True)
+  sbox.build(create_wc = False)
   local_dir = sbox.wc_dir
 
   write_restrictive_svnserve_conf(sbox.repo_dir)
@@ -460,7 +460,7 @@ def authz_checkout_and_update_test(sbox)
 def authz_partial_export_test(sbox):
   "test authz for export with unreadable subfolder"
 
-  sbox.build(create_wc = False, read_only = True)
+  sbox.build(create_wc = False)
   local_dir = sbox.wc_dir
 
   # cleanup remains of a previous test run.
@@ -587,7 +587,10 @@ def authz_log_and_tracing_test(sbox):
   ## cat
 
   # now see if we can look at the older version of rho
-  svntest.actions.run_and_verify_svn(None, expected_err,
+
+  expected_err2 = ".*svn: E195012: Unable to find repository location.*"
+
+  svntest.actions.run_and_verify_svn(None, expected_err2,
                                      'cat', '-r', '2', D_url+'/rho')
 
   if sbox.repo_url.startswith('http'):
@@ -604,10 +607,11 @@ def authz_log_and_tracing_test(sbox):
   svntest.actions.run_and_verify_svn(None, expected_err,
                                      'diff', '-r', 'HEAD', G_url+'/rho')
 
-  svntest.actions.run_and_verify_svn(None, expected_err,
+  # diff treats the unreadable path as indicating an add so no error
+  svntest.actions.run_and_verify_svn(None, [],
                                      'diff', '-r', '2', D_url+'/rho')
 
-  svntest.actions.run_and_verify_svn(None, expected_err,
+  svntest.actions.run_and_verify_svn(None, [],
                                      'diff', '-r', '2:4', D_url+'/rho')
 
 # test whether read access is correctly granted and denied
@@ -652,7 +656,7 @@ def authz_aliases(sbox):
 def authz_validate(sbox):
   "test the authz validation rules"
 
-  sbox.build(create_wc = False, read_only = True)
+  sbox.build(create_wc = False)
 
   write_restrictive_svnserve_conf(sbox.repo_dir)
 
@@ -724,10 +728,8 @@ def authz_locking(sbox):
 
   if sbox.repo_url.startswith('http'):
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
-    expected_status = 1
   else:
     expected_err = ".*svn: warning: W170001: Authorization failed.*"
-    expected_status = 0
 
   root_url = sbox.repo_url
   wc_dir = sbox.wc_dir
@@ -737,16 +739,16 @@ def authz_locking(sbox):
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   # lock a file url, target is readonly: should fail
-  svntest.actions.run_and_verify_svn2(None, expected_err, expected_status,
-                                      'lock',
-                                      '-m', 'lock msg',
-                                      iota_url)
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'lock',
+                                     '-m', 'lock msg',
+                                     iota_url)
 
   # lock a file path, target is readonly: should fail
-  svntest.actions.run_and_verify_svn2(None, expected_err, expected_status,
-                                      'lock',
-                                      '-m', 'lock msg',
-                                      iota_path)
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'lock',
+                                     '-m', 'lock msg',
+                                     iota_path)
 
   # Test for issue 2700: we have write access in folder /A, but not in root.
   # Get a lock on /A/mu and try to commit it.
@@ -779,16 +781,16 @@ def authz_locking(sbox):
   svntest.actions.run_and_verify_info([{'Lock Token' : None}],
                                       sbox.ospath('A/mu'))
 
-  ### Crazy serf SVN_ERR_FS_LOCK_OWNER_MISMATCH warning! Issue 3801?
   if sbox.repo_url.startswith('http'):
-    expected_err = ".*svn: warning: W160039: Unlock.*[Ff]orbidden.*"
-    expected_status = 0
+    expected_err = ".*svn: warning: W160039: .*([Aa]uth.*perf|[Ff]orbidden).*"
+  else:
+    expected_err = ".*svn: warning: W170001: Authorization failed.*"
 
-  svntest.actions.run_and_verify_svn2(None, expected_err, expected_status,
-                                      'lock',
-                                      '-m', 'lock msg',
-                                      mu_path,
-                                      iota_path)
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'lock',
+                                     '-m', 'lock msg',
+                                     mu_path,
+                                     iota_path)
 
   # One path locked, one still unlocked
   svntest.actions.run_and_verify_info([{'Lock Token' : None}],
@@ -872,7 +874,7 @@ def authz_svnserve_anon_access_read(sbox
 def authz_switch_to_directory(sbox):
   "switched to directory, no read access on parents"
 
-  sbox.build(read_only = True)
+  sbox.build()
 
   write_authz_file(sbox, {"/": "*=rw", "/A/B": "*=", "/A/B/E": "jrandom = rw"})
 

Modified: subversion/branches/ra-git/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/basic_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/basic_tests.py Mon Nov 30 10:24:16 2015
@@ -3073,6 +3073,48 @@ def mkdir_parents_target_exists_on_disk(
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
 
+@Skip(svntest.main.is_ra_type_file)
+def plaintext_password_storage_disabled(sbox):
+  "test store-plaintext-passwords = no"
+
+  sbox.build()
+
+  wc_dir = sbox.wc_dir
+  sbox.simple_append("iota", "New content for iota.")
+
+  config_dir_path = sbox.get_tempname(prefix="config-dir")
+  os.mkdir(config_dir_path)
+
+  # disable all encryped password stores
+  config_file = file(os.path.join(config_dir_path, "config"), "w")
+  config_file.write("[auth]\npassword-stores =\n")
+  config_file.close()
+
+  # disable plaintext password storage
+  servers_file = file(os.path.join(config_dir_path, "servers"), "w")
+  servers_file.write("[global]\nstore-plaintext-passwords=no\n")
+  servers_file.close()
+  
+  svntest.main.run_command(svntest.main.svn_binary, False, False,
+   "commit", "--config-dir", config_dir_path,
+    "-m", "committing with plaintext password storage disabled",
+    "--username", svntest.main.wc_author,
+    "--password", svntest.main.wc_passwd,
+    "--trust-server-cert-failures", "unknown-ca",
+    "--non-interactive", wc_dir)
+
+  # Verify that the password was not stored in plaintext
+  for root, dirs, files, in os.walk(os.path.join(config_dir_path, "auth")):
+    for file_name in files:
+      path = os.path.join(root, file_name)
+      f = file(path, "r")
+      for line in f.readlines():
+        if svntest.main.wc_passwd in line:
+          f.close()
+          raise svntest.Failure("password was found in '%s'" % path)
+      f.close()
+
+
 ########################################################################
 # Run the tests
 
@@ -3142,6 +3184,7 @@ test_list = [ None,
               delete_conflicts_one_of_many,
               peg_rev_on_non_existent_wc_path,
               mkdir_parents_target_exists_on_disk,
+              plaintext_password_storage_disabled,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ra-git/subversion/tests/cmdline/checkout_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/checkout_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/checkout_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/checkout_tests.py Mon Nov 30 10:24:16 2015
@@ -1044,6 +1044,7 @@ def co_with_obstructing_local_adds(sbox)
 
 #----------------------------------------------------------------------
 # Test if checking out from a Windows driveroot is supported.
+@SkipUnless(svntest.main.is_os_windows)
 def checkout_wc_from_drive(sbox):
   "checkout from the root of a Windows drive"
 
@@ -1070,10 +1071,6 @@ def checkout_wc_from_drive(sbox):
 
     return None
 
-  # Skip the test if not on Windows
-  if not svntest.main.windows:
-    raise svntest.Skip
-
   # just create an empty folder, we'll checkout later.
   sbox.build(create_wc = False)
   svntest.main.safe_rmtree(sbox.wc_dir)
@@ -1082,7 +1079,7 @@ def checkout_wc_from_drive(sbox):
   # create a virtual drive to the repository folder
   drive = find_the_next_available_drive_letter()
   if drive is None:
-    raise svntest.Skip
+    raise svntest.Skip('No drive letter available')
 
   subprocess.call(['subst', drive +':', sbox.repo_dir])
   repo_url = 'file:///' + drive + ':/'

Modified: subversion/branches/ra-git/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/commit_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/commit_tests.py Mon Nov 30 10:24:16 2015
@@ -3087,6 +3087,32 @@ def mkdir_conflict_proper_error(sbox):
                                      'mkdir', repo_url + '/A',
                                      '-m', '')
 
+def commit_xml(sbox):
+  "commit an xml file"
+
+  sbox.build()
+
+  sbox.simple_add_text('index.xml', 'index.xml')
+  sbox.simple_add_text('index.html', 'index.html')
+  sbox.simple_propset('svn:mime-type', 'text/xml', 'index.xml')
+  sbox.simple_propset('svn:mime-type', 'text/html', 'index.html')
+
+  # This currently (2015-04-09) makes mod_dav return a 'HTTP/1.1 201 Created'
+  # result with content type text/xml (copied from file), which used to
+  # invoke the error parsing.
+  #
+  # Depending on the Apache version and config, this may cause an xml error.
+  sbox.simple_commit()
+
+  # This currently (2015-04-09) makes mod_dav return a 'HTTP/1.1 204 Updated'
+  # result with content type text/xml (copied from file), which used to
+  # invoke the error parsing.
+  #
+  # Depending on the Apache version and config, this may cause an xml error.
+  sbox.simple_append('index.xml', '<Q></R>', True)
+  sbox.simple_append('index.html', '<Q></R>', True)
+  sbox.simple_commit()
+
 ########################################################################
 # Run the tests
 
@@ -3163,6 +3189,7 @@ test_list = [ None,
               commit_deep_deleted,
               commit_mergeinfo_ood,
               mkdir_conflict_proper_error,
+              commit_xml,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ra-git/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/copy_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/copy_tests.py Mon Nov 30 10:24:16 2015
@@ -545,7 +545,7 @@ def no_copy_overwrites(sbox):
 
   # Repeat the last command.  It should *fail* because A/D/H/G already exists.
   svntest.actions.run_and_verify_svn(
-    None, ".*'/A/D/H/G'.*",
+    None, ".*E160020: Path.*/A/D/H/G' already exists.*",
     'cp', dirURL1, dirURL2,
     '-m', 'fooogle')
 
@@ -5822,6 +5822,17 @@ def copy_subtree_deleted(sbox):
   svntest.actions.run_and_verify_commit(wc2_dir,
                                         expected_output, None)
 
+def resurrect_at_root(sbox):
+   "resurrect directory at root"
+
+   sbox.build(create_wc=False)
+
+   svntest.actions.run_and_verify_svn(None, [], 'rm', sbox.repo_url + '/A',
+                                      '-m', '')
+
+   svntest.actions.run_and_verify_svn(None, [], 'cp',
+                                      sbox.repo_url + '/A/D/H@1',
+                                      sbox.repo_url + '/A', '-m', '')
 
 ########################################################################
 # Run the tests
@@ -5943,6 +5954,7 @@ test_list = [ None,
               copy_relocate,
               ext_wc_copy_deleted,
               copy_subtree_deleted,
+              resurrect_at_root,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ra-git/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/davautocheck.sh?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/davautocheck.sh Mon Nov 30 10:24:16 2015
@@ -163,7 +163,8 @@ get_prog_name() {
 }
 
 # Don't assume sbin is in the PATH.
-# ### Presumably this is used to locate /usr/sbin/apxs or /usr/sbin/apache2
+# This is used to locate apxs when the script is invoked manually; when
+# invoked by 'make davautocheck' the APXS environment variable is set.
 PATH="$PATH:/usr/sbin:/usr/local/sbin"
 
 # Find the source and build directories. The build dir can be found if it is
@@ -296,8 +297,6 @@ LOAD_MOD_AUTHN_CORE="$(get_loadmodule_co
     || fail "Authn_Core module not found."
 LOAD_MOD_AUTHZ_CORE="$(get_loadmodule_config mod_authz_core)" \
     || fail "Authz_Core module not found."
-LOAD_MOD_AUTHZ_HOST="$(get_loadmodule_config mod_authz_host)" \
-    || fail "Authz_Host module not found."
 LOAD_MOD_UNIXD=$(get_loadmodule_config mod_unixd) \
     || fail "UnixD module not found"
 }
@@ -305,6 +304,10 @@ LOAD_MOD_AUTHN_FILE="$(get_loadmodule_co
     || fail "Authn_File module not found."
 LOAD_MOD_AUTHZ_USER="$(get_loadmodule_config mod_authz_user)" \
     || fail "Authz_User module not found."
+LOAD_MOD_AUTHZ_GROUPFILE="$(get_loadmodule_config mod_authz_groupfile)" \
+    || fail "Authz_GroupFile module not found."
+LOAD_MOD_AUTHZ_HOST="$(get_loadmodule_config mod_authz_host)" \
+    || fail "Authz_Host module not found."
 }
 if [ ${APACHE_MPM:+set} ]; then
     LOAD_MOD_MPM=$(get_loadmodule_config mod_mpm_$APACHE_MPM) \
@@ -318,12 +321,18 @@ fi
 # Stop any previous instances, os we can re-use the port.
 if [ -x $STOPSCRIPT ]; then $STOPSCRIPT ; sleep 1; fi
 
+ss > /dev/null 2>&1 || netstat > /dev/null 2>&1 || fail "unable to find ss or netstat required to find a free port"
+
 HTTPD_PORT=3691
-while netstat -an | grep $HTTPD_PORT | grep 'LISTEN' >/dev/null; do
+while \
+  (ss -ltn sport = :$HTTPD_PORT 2>&1 | grep :$HTTPD_PORT > /dev/null ) \
+  || \
+  (netstat -an 2>&1 | grep $HTTPD_PORT | grep 'LISTEN' > /dev/null ) \
+  do
   HTTPD_PORT=$(( HTTPD_PORT + 1 ))
   if [ $HTTPD_PORT -eq 65536 ]; then
     # Most likely the loop condition is true regardless of $HTTPD_PORT
-    fail "netstat claims you have no free ports for httpd to listen on."
+    fail "ss/netstat claim you have no free ports for httpd to listen on."
   fi
 done
 HTTPD_ROOT="$ABS_BUILDDIR/subversion/tests/cmdline/httpd-$(date '+%Y%m%d-%H%M%S')"
@@ -341,6 +350,7 @@ else
   BASE_URL="$BASE_URL:$HTTPD_PORT"
 fi
 HTTPD_USERS="$HTTPD_ROOT/users"
+HTTPD_GROUPS="$HTTPD_ROOT/groups"
 
 mkdir "$HTTPD_ROOT" \
   || fail "couldn't create temporary directory '$HTTPD_ROOT'"
@@ -402,6 +412,14 @@ say "Adding users for lock authenticatio
 $HTPASSWD -bc $HTTPD_USERS jrandom   rayjandom
 $HTPASSWD -b  $HTTPD_USERS jconstant rayjandom
 $HTPASSWD -b  $HTTPD_USERS __dumpster__ __loadster__
+$HTPASSWD -b  $HTTPD_USERS JRANDOM   rayjandom
+$HTPASSWD -b  $HTTPD_USERS JCONSTANT rayjandom
+
+say "Adding groups for mod_authz_svn tests"
+cat > "$HTTPD_GROUPS" <<__EOF__
+random: jrandom
+constant: jconstant
+__EOF__
 
 touch $HTTPD_MIME_TYPES
 
@@ -425,7 +443,9 @@ $LOAD_MOD_AUTHN_CORE
 $LOAD_MOD_AUTHN_FILE
 $LOAD_MOD_AUTHZ_CORE
 $LOAD_MOD_AUTHZ_USER
+$LOAD_MOD_AUTHZ_GROUPFILE
 $LOAD_MOD_AUTHZ_HOST
+$LOAD_MOD_ACCESS_COMPAT
 LoadModule          authz_svn_module "$MOD_AUTHZ_SVN"
 LoadModule          dontdothat_module "$MOD_DONTDOTHAT"
 
@@ -531,6 +551,147 @@ CustomLog           "$HTTPD_ROOT/ops" "%
   SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
   ${SVN_PATH_AUTHZ_LINE}
 </Location>
+<Location /authz-test-work/anon>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  # This may seem unnecessary but granting access to everyone here is necessary
+  # to exercise a bug with httpd 2.3.x+.  The "Require all granted" syntax is
+  # new to 2.3.x+ which we can detect with the mod_authz_core.c module
+  # signature.  Use the "Allow from all" syntax with older versions for symmetry.
+  <IfModule mod_authz_core.c>
+    Require all granted
+  </IfModule>
+  <IfModule !mod_authz_core.c>
+    Allow from all
+  </IfModule>
+  ${SVN_PATH_AUTHZ_LINE}
+</Location>
+<Location /authz-test-work/mixed>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  Satisfy Any
+  ${SVN_PATH_AUTHZ_LINE}
+</Location>
+<Location /authz-test-work/mixed-noauthwhenanon>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  AuthzSVNNoAuthWhenAnonymousAllowed On
+  SVNPathAuthz On
+</Location>
+<Location /authz-test-work/authn>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  ${SVN_PATH_AUTHZ_LINE}
+</Location>
+<Location /authz-test-work/authn-anonoff>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  AuthzSVNAnonymous Off
+  SVNPathAuthz On
+</Location>
+<Location /authz-test-work/authn-lcuser>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  AuthzForceUsernameCase Lower
+  ${SVN_PATH_AUTHZ_LINE}
+</Location>
+<Location /authz-test-work/authn-group>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  AuthGroupFile     $HTTPD_GROUPS
+  Require           group random
+  AuthzSVNAuthoritative Off
+  SVNPathAuthz On
+</Location>
+<IfModule mod_authz_core.c>
+  <Location /authz-test-work/sallrany>
+    DAV               svn
+    SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+    AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+    SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+    SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+    SVNListParentPath On
+    AuthType          Basic
+    AuthName          "Subversion Repository"
+    AuthUserFile      $HTTPD_USERS
+    AuthzSendForbiddenOnFailure On
+    Satisfy All
+    <RequireAny>
+      Require valid-user
+      Require expr req('ALLOW') == '1'
+    </RequireAny>
+    ${SVN_PATH_AUTHZ_LINE}
+  </Location>
+  <Location /authz-test-work/sallrall>
+    DAV               svn
+    SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+    AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+    SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+    SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+    SVNListParentPath On
+    AuthType          Basic
+    AuthName          "Subversion Repository"
+    AuthUserFile      $HTTPD_USERS
+    AuthzSendForbiddenOnFailure On
+    Satisfy All
+    <RequireAll>
+      Require valid-user
+      Require expr req('ALLOW') == '1'
+    </RequireAll>
+    ${SVN_PATH_AUTHZ_LINE}
+  </Location>
+</IfModule>
 RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)\$ /svn-test-work/repositories/\$1
 RedirectMatch           ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)\$ /svn-test-work/repositories/\$1
 __EOF__
@@ -596,12 +757,7 @@ if [ $# -eq 1 ] && [ "x$1" = 'x--gdb' ];
   exit
 fi
 
-
-if type time > /dev/null; then
-  TIME_CMD=time
-else
-  TIME_CMD=""
-fi
+if type time > /dev/null ; then TIME_CMD() { time "$@"; } ; else TIME_CMD() { "$@"; } ; fi
 
 MAKE=${MAKE:-make}
 
@@ -620,13 +776,13 @@ else
 fi
 
 if [ $# = 0 ]; then
-  $TIME_CMD "$MAKE" check "BASE_URL=$BASE_URL" $SSL_MAKE_VAR
+  TIME_CMD "$MAKE" check "BASE_URL=$BASE_URL" $SSL_MAKE_VAR
   r=$?
 else
   (cd "$ABS_BUILDDIR/subversion/tests/cmdline/"
   TEST="$1"
   shift
-  $TIME_CMD "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" $SSL_TEST_ARG "$@")
+  TIME_CMD "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" $SSL_TEST_ARG "$@")
   r=$?
 fi
 

Modified: subversion/branches/ra-git/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/diff_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/diff_tests.py Mon Nov 30 10:24:16 2015
@@ -4826,6 +4826,321 @@ def diff_local_copied_dir(sbox):
     os.chdir(was_cwd)
 
 
+def diff_summarize_ignore_properties(sbox):
+  "diff --summarize --ignore-properties"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Make a property change and a content change to 'iota'
+  sbox.simple_propset('svn:eol-style', 'native', 'iota')
+  svntest.main.file_append(sbox.ospath('iota'), 'new text')
+
+  # Make a property change to 'A/mu'
+  sbox.simple_propset('svn:eol-style', 'native', 'A/mu')
+
+  # Make a content change to 'A/B/lambda'
+  svntest.main.file_append(sbox.ospath('A/B/lambda'), 'new text')
+
+  # Add a file.
+  svntest.main.file_write(sbox.ospath('new'), 'new text')
+  sbox.simple_add('new')
+
+  # Delete a file
+  sbox.simple_rm('A/B/E/alpha')
+
+  expected_diff = svntest.wc.State(wc_dir, {
+    'iota': Item(status='M '),
+    'new': Item(status='A '),
+    'A/B/lambda': Item(status='M '),
+    'A/B/E/alpha': Item(status='D '),
+    })
+  svntest.actions.run_and_verify_diff_summarize(expected_diff,
+                                                '--ignore-properties',
+                                                sbox.wc_dir)
+
+  # test with --xml, too
+  paths = ['iota', 'new', 'A/B/lambda', 'A/B/E/alpha']
+  items = ['modified', 'added', 'modified', 'deleted' ]
+  kinds = ['file','file', 'file', 'file']
+  props = ['none', 'none', 'none', 'none']
+  svntest.actions.run_and_verify_diff_summarize_xml(
+    [], wc_dir, paths, items, props, kinds, wc_dir, '--ignore-properties')
+
+def diff_incomplete(sbox):
+  "diff incomplete directory"
+
+  sbox.build()
+  svntest.actions.run_and_verify_svn(None, [], 'rm', sbox.repo_url + '/A',
+                                     '-m', '')
+
+  # This works ok
+  _, out1a, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+                                                   '-r', 'HEAD',
+                                                   sbox.wc_dir,
+                                                   '--notice-ancestry')
+
+  _, out1b, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+                                                   sbox.wc_dir,
+                                                   '--notice-ancestry')
+
+
+  svntest.main.run_wc_incomplete_tester(sbox.ospath('A'), 1)
+
+  # And this used to miss certain changes
+  _, out2a, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+                                                  '-r', 'HEAD',
+                                                  sbox.wc_dir,
+                                                  '--notice-ancestry')
+
+  _, out2b, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+                                                   sbox.wc_dir,
+                                                   '--notice-ancestry')
+
+  # Ordering may be different, but length should match
+  if len(out1a) != len(out2a):
+    raise svntest.Failure('Different output when incomplete against repos')
+
+  svntest.verify.compare_and_display_lines('local diff', 'local diff', out1b,
+                                           out2b)
+
+  # And add a replacement on top of the incomplete, server side
+  svntest.actions.run_and_verify_svn(None, [], 'cp',
+                                     sbox.repo_url + '/A/D/H@1',
+                                     sbox.repo_url + '/A', '-m', '')
+
+  svntest.actions.run_and_verify_svn(None, [], 'diff',
+                                     '-r', 'HEAD',
+                                     sbox.wc_dir,
+                                     '--notice-ancestry')
+
+  # And client side
+  svntest.actions.run_and_verify_svn(None, [], 'rm', sbox.ospath('A'),
+                                     '--force')
+  sbox.simple_mkdir('A')
+  svntest.actions.run_and_verify_svn(None, [], 'diff',
+                                    '-r', 'HEAD',
+                                    sbox.wc_dir,
+                                    '--notice-ancestry')
+
+  svntest.actions.run_and_verify_svn(None, [], 'diff',
+                                    sbox.wc_dir,
+                                    '--notice-ancestry')
+
+def diff_incomplete_props(sbox):
+  "incomplete set of properties"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  sbox.simple_propset('r2-1', 'r2', 'iota', 'A')
+  sbox.simple_propset('r2-2', 'r2', 'iota', 'A')
+  sbox.simple_propset('r', 'r2', 'iota', 'A')
+  sbox.simple_commit() # r2
+
+  svntest.actions.run_and_verify_svnmucc(None, [],
+                                         '-U', sbox.repo_url,
+                                         'propset', 'r3-1', 'r3', 'iota',
+                                         'propset', 'r3-1', 'r3', 'A',
+                                         'propset', 'r3-2', 'r3', 'iota',
+                                         'propset', 'r3-2', 'r3', 'A',
+                                         'propset', 'r', 'r3', 'iota',
+                                         'propset', 'r', 'r3', 'A',
+                                         'propdel', 'r2-1', 'iota',
+                                         'propdel', 'r2-1', 'A',
+                                         'propdel', 'r2-2', 'iota',
+                                         'propdel', 'r2-2', 'A',
+                                         '-m', 'r3')
+
+  _, out1, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+                                                  '-r', 'HEAD', wc_dir,
+                                                  '--notice-ancestry')
+
+  # Now simulate a broken update to r3
+  svntest.actions.set_incomplete(wc_dir, 3)
+  svntest.actions.set_incomplete(sbox.ospath('A'), 3)
+
+  # The properties are still at r2
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('iota', 'A', props={'r2-1':'r2', 'r2-2':'r2', 'r':'r2'})
+  svntest.actions.verify_disk(wc_dir, expected_disk, True)
+
+  # But the working copy is incomplete at r3
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('iota', wc_rev=2)
+  expected_status.tweak('', 'A', wc_rev=3, status='! ')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  expected_output = svntest.wc.State(wc_dir, {
+    'A'    : Item(status=' U'),
+    'iota' : Item(status=' U'),
+  })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+  expected_disk = svntest.main.greek_state.copy()
+
+  # Expect that iota and A have the expected sets of properties
+  # The r2 set is properly deleted where necessary
+  expected_disk.tweak('iota', 'A', props={'r3-2':'r3', 'r':'r3', 'r3-1':'r3'})
+
+  _, out2, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+                                                  '-r', 'HEAD', wc_dir,
+                                                  '--notice-ancestry')
+
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output, expected_disk,
+                                        expected_status, [], True)
+
+  # Ok, we tested that the update worked properly, but we also do this
+  # in the update tests... Let's see, what the diffs said
+
+  _, out3, _ = svntest.actions.run_and_verify_svn(None, [], 'diff',
+                                                  '-r', 'BASE:2', wc_dir,
+                                                  '--notice-ancestry')
+
+  # Filter out all headers (which include revisions, etc.)
+  out1 = [i for i in out1 if i[0].isupper()]
+  out1.sort()
+
+  out2 = [i for i in out2 if i[0].isupper()]
+  out2.sort()
+
+  out3 = [i for i in out3 if i[0].isupper()]
+  out3.sort()
+
+  svntest.verify.compare_and_display_lines('base vs incomplete', 'local diff',
+                                           out1, out2)
+
+  svntest.verify.compare_and_display_lines('base vs after', 'local diff',
+                                           out1, out3)
+
+def diff_symlinks(sbox):
+  "diff some symlinks"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  sbox.simple_add_symlink('iota', 'to-iota')
+
+  svntest.actions.run_and_verify_svn([
+    'Index: %s\n' % sbox.path('to-iota'),
+    '===================================================================\n',
+    '--- %s\t(nonexistent)\n' % sbox.path('to-iota'),
+    '+++ %s\t(working copy)\n' % sbox.path('to-iota'),
+    '@@ -0,0 +1 @@\n',
+    '+link iota\n',
+    '\ No newline at end of file\n',
+    '\n',
+    'Property changes on: %s\n' % sbox.path('to-iota'),
+    '___________________________________________________________________\n',
+    'Added: svn:special\n',
+    '## -0,0 +1 ##\n',
+    '+*\n',
+    '\ No newline at end of property\n',
+  ], [], 'diff', wc_dir)
+
+  svntest.actions.run_and_verify_svn([
+    'Index: %s\n' % sbox.path('to-iota'),
+    '===================================================================\n',
+    'diff --git a/to-iota b/to-iota\n',
+    'new file mode 120644\n',
+    '--- /dev/null\t(nonexistent)\n',
+    '+++ b/to-iota\t(working copy)\n',
+    '@@ -0,0 +1 @@\n',
+    '+iota\n',
+    '\ No newline at end of file\n',
+    '\n',
+    'Property changes on: to-iota\n',
+    '___________________________________________________________________\n',
+    'Added: svn:special\n',
+    '## -0,0 +1 ##\n',
+    '+*\n',
+    '\ No newline at end of property\n',
+  ], [], 'diff', wc_dir, '--git')
+
+  sbox.simple_commit()
+  os.remove(sbox.ospath('to-iota'))
+  sbox.simple_symlink('A/B/E/alpha', 'to-iota')
+
+  svntest.actions.run_and_verify_svn([
+    'Index: %s\n' % sbox.path('to-iota'),
+    '===================================================================\n',
+    '--- %s\t(revision 2)\n' % sbox.path('to-iota'),
+    '+++ %s\t(working copy)\n' % sbox.path('to-iota'),
+    '@@ -1 +1 @@\n',
+    '-link iota\n',
+    '\ No newline at end of file\n',
+    '+link A/B/E/alpha\n',
+    '\ No newline at end of file\n',
+  ], [], 'diff', wc_dir)
+
+  svntest.actions.run_and_verify_svn([
+    'Index: %s\n' % sbox.path('to-iota'),
+    '===================================================================\n',
+    'diff --git a/to-iota b/to-iota\n',
+    'index 3ef26e44..9930f9a0 120644\n',
+    '--- a/to-iota\t(revision 2)\n',
+    '+++ b/to-iota\t(working copy)\n',
+    '@@ -1 +1 @@\n',
+    '-iota\n',
+    '\ No newline at end of file\n',
+    '+A/B/E/alpha\n',
+    '\ No newline at end of file\n',
+  ], [], 'diff', wc_dir, '--git')
+
+
+@Issue(4597)
+def diff_peg_resolve(sbox):
+  "peg resolving during diff"
+
+  sbox.build()
+  repo_url = sbox.repo_url
+  wc_dir = sbox.wc_dir
+
+  svntest.actions.run_and_verify_svnmucc(None, [],
+                                         '-U', repo_url, '-m', 'Q',
+                                         'mkdir', 'branches',
+                                         'cp', 1, 'A', 'branches/A1',
+                                         'cp', 1, 'A', 'branches/A2',
+                                         'rm', 'A')
+
+  svntest.actions.run_and_verify_svnmucc(None, [],
+                                         '-U', repo_url, '-m', 'Q2',
+                                         'rm', 'branches/A1')
+
+  svntest.actions.run_and_verify_svn(None, [],
+                                     'diff', repo_url + '/branches/A1@2',
+                                             sbox.wc_dir,
+                                     '--notice-ancestry')
+
+  svntest.actions.run_and_verify_svn(None, [],
+                                     'diff',
+                                     '--old=' + repo_url + '/branches/A1@2',
+                                     '--new=' + sbox.wc_dir,
+                                     '--git')
+
+  svntest.actions.run_and_verify_svn(None, [],
+                                     'diff',
+                                     '--old=' + repo_url + '/branches/A1@2',
+                                     '--new=' + repo_url + '/A@1',
+                                     '--git')
+
+  svntest.actions.run_and_verify_svn(None, '.*E160005: Target path.*A1',
+                                     'diff',
+                                     repo_url + '/branches/A1',
+                                     wc_dir,
+                                     '--summarize')
+
+  svntest.actions.run_and_verify_svn(None, [],
+                                     'diff',
+                                     repo_url + '/branches/A2',
+                                     wc_dir)
+
+  svntest.actions.run_and_verify_svn(None, '.*E200009: .*mix.*',
+                                     'diff',
+                                     repo_url + '/branches/A2',
+                                     wc_dir, '-r1:2')
+
+
 ########################################################################
 #Run the tests
 
@@ -4916,6 +5231,11 @@ test_list = [ None,
               diff_deleted_in_move_against_repos,
               diff_replaced_moved,
               diff_local_copied_dir,
+              diff_summarize_ignore_properties,
+              diff_incomplete,
+              diff_incomplete_props,
+              diff_symlinks,
+              diff_peg_resolve,
               ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ra-git/subversion/tests/cmdline/entries-dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/entries-dump.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/entries-dump.c (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/entries-dump.c Mon Nov 30 10:24:16 2015
@@ -74,12 +74,20 @@ entries_dump(const char *dir_path, svn_w
   apr_hash_index_t *hi;
   svn_boolean_t locked;
   svn_error_t *err;
+  svn_wc_context_t *wc_ctx = NULL;
+  const char *dir_abspath;
+
+  SVN_ERR(svn_dirent_get_absolute(&dir_abspath, dir_path, pool));
 
   err = svn_wc_adm_open3(&adm_access, related, dir_path, FALSE, 0,
                          NULL, NULL, pool);
   if (!err)
     {
-      SVN_ERR(svn_wc_locked(&locked, dir_path, pool));
+      SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL,
+                                             svn_wc__adm_get_db(adm_access),
+                                             pool));
+
+      SVN_ERR(svn_wc_locked2(NULL, &locked, wc_ctx, dir_abspath, pool));
       SVN_ERR(svn_wc_entries_read(&entries, adm_access, TRUE, pool));
     }
   else if (err && err->apr_err == SVN_ERR_WC_LOCKED
@@ -88,12 +96,17 @@ entries_dump(const char *dir_path, svn_w
     {
       /* Common caller error: Can't open a baton when there is one. */
       svn_error_clear(err);
-      SVN_ERR(svn_wc_locked(&locked, dir_path, pool));
+
+      SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL,
+                                             svn_wc__adm_get_db(related),
+                                             pool));
+
+      SVN_ERR(svn_wc_locked2(NULL, &locked, wc_ctx, dir_abspath, pool));
       SVN_ERR(svn_wc_entries_read(&entries, related, TRUE, pool));
     }
   else
     {
-      const char *dir_abspath, *lockfile_path;
+      const char *lockfile_path;
       svn_node_kind_t kind;
 
       /* ### Should svn_wc_adm_open3 be returning UPGRADE_REQUIRED? */
@@ -101,7 +114,6 @@ entries_dump(const char *dir_path, svn_w
         return err;
       svn_error_clear(err);
       adm_access = NULL;
-      SVN_ERR(svn_dirent_get_absolute(&dir_abspath, dir_path, pool));
       SVN_ERR(svn_wc__read_entries_old(&entries, dir_abspath, pool, pool));
       lockfile_path = svn_dirent_join_many(pool, dir_path,
                                            svn_wc_get_adm_dir(pool),
@@ -161,6 +173,9 @@ entries_dump(const char *dir_path, svn_w
       printf("entries['%s'] = e\n", (const char *)key);
     }
 
+  if (wc_ctx)
+    SVN_ERR(svn_wc_context_destroy(wc_ctx));
+
   if (adm_access)
     SVN_ERR(svn_wc_adm_close2(adm_access, pool));
 

Modified: subversion/branches/ra-git/subversion/tests/cmdline/export_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/export_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/export_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/export_tests.py Mon Nov 30 10:24:16 2015
@@ -1102,7 +1102,7 @@ test_list = [ None,
               export_file_overwrite_with_force,
               export_custom_keywords,
               export_file_external,
-              export_file_externals2
+              export_file_externals2,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ra-git/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/externals_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/externals_tests.py Mon Nov 30 10:24:16 2015
@@ -3849,8 +3849,8 @@ def copy_pin_externals_wc_mixed_revision
                                      '--pin-externals')
 
 @Issue(4558)
-def copy_pin_externals_whitepace_dir(sbox):
-  "copy --pin-externals with whitepace dir"
+def copy_pin_externals_whitespace_dir(sbox):
+  "copy --pin-externals with whitespace dir"
 
   sbox.build(empty=True)
   repo_url = sbox.repo_url
@@ -4155,6 +4155,204 @@ def file_external_to_normal_file(sbox):
   svntest.actions.run_and_verify_update(wc_dir, expected_output, None,
                                         expected_status)
 
+@Issue(4580)
+def file_external_recorded_info(sbox):
+  "check file external recorded info"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # r2 - Create file external
+  svntest.actions.run_and_verify_svnmucc(None, [],
+                                         '-U', sbox.repo_url,
+                                         '-m', '',
+                                         'propset', 'svn:externals',
+                                         '^/iota i', '')
+
+  expected_output = svntest.wc.State(wc_dir, {
+    ''                  : Item(status=' U'),
+    'i'                 : Item(status='A '),
+  })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+  expected_status.add({
+    'i'                 : Item(status='  ', wc_rev='2', switched='X')
+  })
+  svntest.actions.run_and_verify_update(wc_dir, expected_output, None,
+                                        expected_status, [], False,
+                                        '-r', 2, wc_dir)
+
+  expected_infos = [{
+    'Path': re.escape(sbox.ospath('i')),
+    'Relative URL': re.escape('^/iota'),
+    'Revision': '2',
+    'Last Changed Rev': '1',
+    'Last Changed Author': 'jrandom'
+  }]
+  svntest.actions.run_and_verify_info(expected_infos, sbox.ospath('i'))
+
+  # r3 - No-op change
+  svntest.actions.run_and_verify_svnmucc(None, [],
+                                         '-U', sbox.repo_url,
+                                         '-m', '',
+                                         'cp', '1', 'iota', 'iotb')
+
+  expected_output = svntest.wc.State(wc_dir, {
+    'iotb'              : Item(status='A '),
+  })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+  expected_status.add({
+    'i'                 : Item(status='  ', wc_rev='3', switched='X'),
+    'iotb'              : Item(status='  ', wc_rev='3')
+  })
+  svntest.actions.run_and_verify_update(wc_dir, expected_output, None,
+                                        expected_status, [], False,
+                                        '-r', 3, wc_dir)
+
+  expected_infos = [{
+    'Path': re.escape(sbox.ospath('i')),
+    'Relative URL': re.escape('^/iota'),
+    'Revision': '3',
+    'Last Changed Rev': '1',
+    'Last Changed Author': 'jrandom'
+  }]
+  svntest.actions.run_and_verify_info(expected_infos, sbox.ospath('i'))
+
+  # r4 - Update url
+  svntest.actions.run_and_verify_svnmucc(None, [],
+                                         '-U', sbox.repo_url,
+                                         '-m', '',
+                                         'propset', 'svn:externals',
+                                         '^/iotb i', '')
+
+
+  expected_output = svntest.wc.State(wc_dir, {
+    ''                  : Item(status=' U'),
+  })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 4)
+  expected_status.add({
+    'i'                 : Item(status='  ', wc_rev='4', switched='X'),
+    'iotb'              : Item(status='  ', wc_rev='4')
+  })
+  svntest.actions.run_and_verify_update(wc_dir, expected_output, None,
+                                        expected_status, [], False,
+                                        '-r', 4, wc_dir)
+
+  expected_infos = [{
+    'Path': re.escape(sbox.ospath('i')),
+    'Relative URL': re.escape('^/iotb'),
+    'Revision': '4',
+    'Last Changed Rev': '3',
+    'Last Changed Author': 'jrandom'
+  }]
+  svntest.actions.run_and_verify_info(expected_infos, sbox.ospath('i'))
+
+  # r5 - Replace file
+  svntest.actions.run_and_verify_svnmucc(None, [],
+                                         '-U', sbox.repo_url,
+                                         '-m', '',
+                                         'rm', 'iotb',
+                                         'cp', '3', 'A/mu', 'iotb')
+
+  expected_output = svntest.wc.State(wc_dir, {
+    'i'                 : Item(status='U '),
+    'iotb'              : Item(status='A ', prev_status='D '),
+  })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 5)
+  expected_status.add({
+    'i'                 : Item(status='  ', wc_rev='5', switched='X'),
+    'iotb'              : Item(status='  ', wc_rev='5')
+  })
+  svntest.actions.run_and_verify_update(wc_dir, expected_output, None,
+                                        expected_status, [], False,
+                                        '-r', 5, wc_dir)
+
+  expected_infos = [{
+    'Path': re.escape(sbox.ospath('i')),
+    'Relative URL': re.escape('^/iotb'),
+    'Revision': '5',
+    'Last Changed Rev': '5',
+    'Last Changed Author': 'jrandom'
+  }]
+  svntest.actions.run_and_verify_info(expected_infos, sbox.ospath('i'))
+
+  # Back to r2. But with a conflict
+  sbox.simple_append('i', 'i')
+  expected_output = svntest.wc.State(wc_dir, {
+    ''                  : Item(status=' U'),
+    'iotb'              : Item(status='D '),
+    'i'                 : Item(status='C '),
+  })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+  expected_status.add({
+    'i'                 : Item(status='C ', wc_rev='5', switched='X'),
+  })
+  svntest.actions.run_and_verify_update(wc_dir, expected_output, None,
+                                        expected_status, [], False,
+                                        '-r', 2, wc_dir)
+
+  expected_infos = [{
+    'Path': re.escape(sbox.ospath('i')),
+    'Relative URL': re.escape('^/iota'),
+    'Revision': '5',
+    'Last Changed Rev': '1',
+    'Last Changed Author': 'jrandom',
+    'Conflict Details': re.escape('incoming file edit upon switch'
+                                  ' Source  left: (file) ^/iotb@5'
+                                  ' Source right: (file) ^/iota@5')
+  }]
+  svntest.actions.run_and_verify_info(expected_infos, sbox.ospath('i'))
+
+def external_externally_removed(sbox):
+  "external externally removed"
+
+  sbox.build(read_only = True)
+
+  sbox.simple_propset('svn:externals', '^/A/B B', '')
+
+  # Try fetching the external with a versioned obstruction
+  sbox.simple_mkdir('B')
+  expected_err = ".*W155035: The external.*B' is already a versioned path"
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'up', sbox.wc_dir)
+  sbox.simple_rm('B')
+
+
+  os.makedirs(sbox.ospath('B'))
+  expected_err2 = "svn: warning: W155007:.*B'"
+  svntest.actions.run_and_verify_svn(None, expected_err2,
+                                     'up', sbox.wc_dir)
+  os.rmdir(sbox.ospath('B'))
+
+  # Fetch the external
+  sbox.simple_update()
+
+  svntest.main.safe_rmtree(sbox.ospath('B'))
+  sbox.simple_update() # Fetched again
+  if not os.path.isdir(sbox.ospath('B')):
+    raise svntest.Failure("B not recreated")
+
+  svntest.main.safe_rmtree(sbox.ospath('B'))
+  sbox.simple_propdel('svn:externals', '')
+
+  expected_output = [
+    "Updating '%s':\n" % sbox.wc_dir,
+    "Removed external '%s'\n" % sbox.ospath('B'),
+    "Updated to revision 1.\n"
+  ]
+  svntest.actions.run_and_verify_svn(expected_output, [],
+                                     'up', sbox.wc_dir)
+
+
+  sbox.simple_propset('svn:externals', '^/A/B B', '')
+  sbox.simple_update()
+  svntest.main.safe_rmtree(sbox.ospath('B'))
+  sbox.simple_mkdir('B')
+
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'up', sbox.wc_dir)
+
+  sbox.simple_propdel('svn:externals', '')
+  sbox.simple_update() # Should succeed
 
 ########################################################################
 # Run the tests
@@ -4226,9 +4424,11 @@ test_list = [ None,
               copy_pin_externals_wc_local_mods,
               copy_pin_externals_wc_switched_subtrees,
               copy_pin_externals_wc_mixed_revisions,
-              copy_pin_externals_whitepace_dir,
+              copy_pin_externals_whitespace_dir,
               nested_notification,
               file_external_to_normal_file,
+              file_external_recorded_info,
+              external_externally_removed,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py Mon Nov 30 10:24:16 2015
@@ -223,6 +223,18 @@ def getopt_help_bogus_cmd(sbox):
   "run svn help bogus-cmd"
   run_one_test(sbox, 'svn_help_bogus-cmd', 'help', 'bogus-cmd')
 
+def getopt_config_option(sbox):
+  "--config-option's spell checking"
+  sbox.build(create_wc=False, read_only=True)
+  expected_stderr = '.*W205000.*did you mean.*'
+  expected_stdout = svntest.verify.AnyOutput
+  svntest.actions.run_and_verify_svn2(expected_stdout, expected_stderr, 0,
+                                      'info', 
+                                      '--config-option',
+                                      'config:miscellanous:diff-extensions=' +
+                                        '-u -p',
+                                      sbox.repo_url)
+
 ########################################################################
 # Run the tests
 
@@ -237,6 +249,7 @@ test_list = [ None,
               getopt_help,
               getopt_help_bogus_cmd,
               getopt_help_log_switch,
+              getopt_config_option,
             ]
 
 if __name__ == '__main__':

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--help_stderr
------------------------------------------------------------------------------
    svn:eol-style = LF

Modified: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout Mon Nov 30 10:24:16 2015
@@ -1,8 +1,9 @@
 usage: svn <subcommand> [options] [args]
 Subversion command-line client.
 Type 'svn help <subcommand>' for help on a specific subcommand.
-Type 'svn --version' to see the program version and RA modules
-  or 'svn --version --quiet' to see just the version number.
+Type 'svn --version' to see the program version and RA modules,
+     'svn --version --verbose' to see dependency versions as well,
+     'svn --version --quiet' to see just the version number.
 
 Most subcommands take file and/or directory arguments, recursing
 on the directories.  If no arguments are supplied to such a

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version--quiet_stderr
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version--quiet_stdout
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stderr
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version--verbose_stdout
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version_stderr
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help--version_stderr
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help--version_stdout
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_bogus-cmd_stderr
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_bogus-cmd_stdout
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stderr
------------------------------------------------------------------------------
    svn:eol-style = LF

Modified: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Mon Nov 30 10:24:16 2015
@@ -122,18 +122,15 @@ Global options:
                              only if standard input is a terminal device)
   --force-interactive      : do interactive prompting even if standard input
                              is not a terminal device
-  --trust-server-cert      : deprecated; same as --trust-unknown-ca
-  --trust-unknown-ca       : with --non-interactive, accept SSL server
-                             certificates from unknown certificate authorities
-  --trust-cn-mismatch      : with --non-interactive, accept SSL server
-                             certificates even if the server hostname does not
-                             match the certificate's common name attribute
-  --trust-expired          : with --non-interactive, accept expired SSL server
-                             certificates
-  --trust-not-yet-valid    : with --non-interactive, accept SSL server
-                             certificates from the future
-  --trust-other-failure    : with --non-interactive, accept SSL server
-                             certificates with failures other than the above
+  --trust-server-cert      : deprecated; same as
+                             --trust-server-cert-failures=unknown-ca
+  --trust-server-cert-failures ARG : with --non-interactive, accept SSL server
+                             certificates with failures; ARG is comma-separated
+                             list of 'unknown-ca' (Unknown Authority),
+                             'cn-mismatch' (Hostname mismatch), 'expired'
+                             (Expired certificate), 'not-yet-valid' (Not yet
+                             valid certificate) and 'other' (all other not
+                             separately classified certificate errors).
   --config-dir ARG         : read user configuration files from directory ARG
   --config-option ARG      : set user configuration option in the format:
                                  FILE:SECTION:OPTION=[VALUE]
@@ -215,18 +212,15 @@ Global options:
                              only if standard input is a terminal device)
   --force-interactive      : do interactive prompting even if standard input
                              is not a terminal device
-  --trust-server-cert      : deprecated; same as --trust-unknown-ca
-  --trust-unknown-ca       : with --non-interactive, accept SSL server
-                             certificates from unknown certificate authorities
-  --trust-cn-mismatch      : with --non-interactive, accept SSL server
-                             certificates even if the server hostname does not
-                             match the certificate's common name attribute
-  --trust-expired          : with --non-interactive, accept expired SSL server
-                             certificates
-  --trust-not-yet-valid    : with --non-interactive, accept SSL server
-                             certificates from the future
-  --trust-other-failure    : with --non-interactive, accept SSL server
-                             certificates with failures other than the above
+  --trust-server-cert      : deprecated; same as
+                             --trust-server-cert-failures=unknown-ca
+  --trust-server-cert-failures ARG : with --non-interactive, accept SSL server
+                             certificates with failures; ARG is comma-separated
+                             list of 'unknown-ca' (Unknown Authority),
+                             'cn-mismatch' (Hostname mismatch), 'expired'
+                             (Expired certificate), 'not-yet-valid' (Not yet
+                             valid certificate) and 'other' (all other not
+                             separately classified certificate errors).
   --config-dir ARG         : read user configuration files from directory ARG
   --config-option ARG      : set user configuration option in the format:
                                  FILE:SECTION:OPTION=[VALUE]

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_stderr
------------------------------------------------------------------------------
    svn:eol-style = LF

Modified: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout Mon Nov 30 10:24:16 2015
@@ -1,8 +1,9 @@
 usage: svn <subcommand> [options] [args]
 Subversion command-line client.
 Type 'svn help <subcommand>' for help on a specific subcommand.
-Type 'svn --version' to see the program version and RA modules
-  or 'svn --version --quiet' to see just the version number.
+Type 'svn --version' to see the program version and RA modules,
+     'svn --version --verbose' to see dependency versions as well,
+     'svn --version --quiet' to see just the version number.
 
 Most subcommands take file and/or directory arguments, recursing
 on the directories.  If no arguments are supplied to such a

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_stderr
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests_data/svn_stdout
------------------------------------------------------------------------------
    svn:eol-style = LF

Modified: subversion/branches/ra-git/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/lock_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/lock_tests.py Mon Nov 30 10:24:16 2015
@@ -275,11 +275,11 @@ def steal_lock(sbox):
 
   # attempt (and fail) to lock file
 
-  # This should give a "iota' is already locked... error, but exits 0.
-  svntest.actions.run_and_verify_svn2(None,
-                                      ".*already locked", 0,
-                                      'lock',
-                                      '-m', 'trying to break', file_path_b)
+  # This should give a "iota' is already locked error
+  svntest.actions.run_and_verify_svn(None,
+                                     ".*already locked",
+                                     'lock',
+                                     '-m', 'trying to break', file_path_b)
 
   svntest.actions.run_and_verify_svn(".*locked by user", [],
                                      'lock', '--force',
@@ -703,11 +703,11 @@ def out_of_date(sbox):
                        '-m', '', file_path)
 
   # --- Meanwhile, in our other working copy... ---
-  svntest.actions.run_and_verify_svn2(None,
-                                      ".*newer version of '/iota' exists", 0,
-                                      'lock',
-                                      '--username', svntest.main.wc_author2,
-                                      '-m', '', file_path_b)
+  svntest.actions.run_and_verify_svn(None,
+                                     ".*newer version of '/iota' exists",
+                                     'lock',
+                                     '--username', svntest.main.wc_author2,
+                                     '-m', '', file_path_b)
 
 #----------------------------------------------------------------------
 # Tests reverting a svn:needs-lock file
@@ -1164,10 +1164,10 @@ def unlock_already_unlocked_files(sbox):
 
   error_msg = ".*Path '/A/B/E/alpha' is already locked by user '" + \
               svntest.main.wc_author2 + "'.*"
-  svntest.actions.run_and_verify_svn2(None, error_msg, 0,
-                                      'lock',
-                                      '--username', svntest.main.wc_author2,
-                                      alpha_path, gamma_path)
+  svntest.actions.run_and_verify_svn(None, error_msg,
+                                     'lock',
+                                     '--username', svntest.main.wc_author2,
+                                     alpha_path, gamma_path)
   expected_status.tweak('A/D/gamma', writelocked='K')
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
@@ -1180,11 +1180,11 @@ def unlock_already_unlocked_files(sbox):
 
   error_msg = "(.*No lock on path '/A/B/lambda'.*)" + \
               "|(.*'A/B/lambda' is not locked.*)"
-  svntest.actions.run_and_verify_svn2(None, error_msg, 0,
-                                      'unlock',
-                                      '--username', svntest.main.wc_author2,
-                                      '--force',
-                                      iota_path, lambda_path, alpha_path)
+  svntest.actions.run_and_verify_svn(None, error_msg,
+                                     'unlock',
+                                     '--username', svntest.main.wc_author2,
+                                     '--force',
+                                     iota_path, lambda_path, alpha_path)
 
 
   expected_status.tweak('iota', 'A/B/E/alpha', writelocked=None)
@@ -1305,9 +1305,8 @@ def unlock_wrong_token(sbox):
   # Then, unlocking the WC path should fail.
   ### The error message returned is actually this, but let's worry about that
   ### another day...
-  svntest.actions.run_and_verify_svn2(
-    None, ".*(No lock on path)", 0,
-    'unlock', file_path)
+  svntest.actions.run_and_verify_svn(None, ".*(No lock on path)",
+                                     'unlock', file_path)
 
 #----------------------------------------------------------------------
 # Verify that info shows lock info for locked files with URI-unsafe names
@@ -1361,15 +1360,12 @@ def unlocked_lock_of_other_user(sbox):
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # now try to unlock with user jconstant, should fail but exit 0.
-  if sbox.repo_url.startswith("http"):
-    expected_err = "svn: warning: W160039: .*[Uu]nlock of .*403 Forbidden.*"
-  else:
-    expected_err = "svn: warning: W160039: User '%s' is trying to use a lock owned by "\
-                   "'%s'.*" % (svntest.main.wc_author2, svntest.main.wc_author)
-  svntest.actions.run_and_verify_svn2([], expected_err, 0,
-                                      'unlock',
-                                      '--username', svntest.main.wc_author2,
-                                      pi_path)
+  expected_err = "svn: warning: W160039: User '%s' is trying to use a lock owned by "\
+                 "'%s'.*" % (svntest.main.wc_author2, svntest.main.wc_author)
+  svntest.actions.run_and_verify_svn([], expected_err,
+                                     'unlock',
+                                     '--username', svntest.main.wc_author2,
+                                     pi_path)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
 
@@ -1421,9 +1417,9 @@ def lock_twice_in_one_wc(sbox):
   svntest.actions.run_and_verify_svn(None, [],
                                      'lock', mu_path, '-m', 'Locked here')
 
-  # Locking in location 2 should fail ### Currently returns exitcode 0
-  svntest.actions.run_and_verify_svn2(None, ".*is already locked.*", 0,
-                                      'lock', '-m', '', mu2_path)
+  # Locking in location 2 should fail
+  svntest.actions.run_and_verify_svn(None, ".*is already locked.*",
+                                     'lock', '-m', '', mu2_path)
 
   # Change the file anyway
   os.chmod(mu2_path, 0700)
@@ -1469,8 +1465,8 @@ def lock_path_not_in_head(sbox):
   # ..\..\..\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, expected_lock_fail_err_re,
-                                      0, 'lock', lambda_path)
+  svntest.actions.run_and_verify_svn(None, expected_lock_fail_err_re,
+                                     'lock', lambda_path)
 
   expected_err = 'svn: E155008: The node \'.*D\' is not a file'
   svntest.actions.run_and_verify_svn(None, expected_err,
@@ -1679,8 +1675,8 @@ def block_unlock_if_pre_unlock_hook_fail
 
   # Make sure the unlock operation fails as pre-unlock hook blocks it.
   expected_unlock_fail_err_re = ".*error text"
-  svntest.actions.run_and_verify_svn2(None, expected_unlock_fail_err_re,
-                                      0, 'unlock', pi_path)
+  svntest.actions.run_and_verify_svn(None, expected_unlock_fail_err_re,
+                                     'unlock', pi_path)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
 #----------------------------------------------------------------------
@@ -1699,10 +1695,10 @@ def lock_invalid_token(sbox):
   fname = 'iota'
   file_path = os.path.join(sbox.wc_dir, fname)
 
-  svntest.actions.run_and_verify_svn2(None,
-                                      "svn: warning: W160037: " \
-                                      ".*scheme.*'opaquelocktoken'", 0,
-                                      'lock', '-m', '', file_path)
+  svntest.actions.run_and_verify_svn(None,
+                                     "svn: warning: W160037: " \
+                                     ".*scheme.*'opaquelocktoken'",
+                                     'lock', '-m', '', file_path)
 
 @Issue(3105)
 def lock_multi_wc(sbox):
@@ -1922,27 +1918,29 @@ def lock_hook_messages(sbox):
   svntest.actions.create_failing_hook(repo_dir, "pre-lock", error_msg)
   svntest.actions.create_failing_hook(repo_dir, "pre-unlock", error_msg)
 
-  _, _, actual_stderr = svntest.actions.run_and_verify_svn2(
-                                     [], svntest.verify.AnyOutput, 0,
+  _, _, actual_stderr = svntest.actions.run_and_verify_svn(
+                                     [], svntest.verify.AnyOutput,
                                      'lock', mu_url)
-  if len(actual_stderr) > 2:
-    actual_stderr = actual_stderr[-2:]
+  if len(actual_stderr) > 4:
+    actual_stderr = actual_stderr[-4:-2] + actual_stderr[-1:]
   expected_err = [
     'svn: warning: W165001: ' + svntest.actions.hook_failure_message('pre-lock'),
     error_msg + "\n",
+    "svn: E200009: One or more locks could not be obtained\n",
   ]
   svntest.verify.compare_and_display_lines(None, 'STDERR',
                                            expected_err, actual_stderr)
 
 
-  _, _, actual_stderr = svntest.actions.run_and_verify_svn2(
-                                     [], svntest.verify.AnyOutput, 0,
+  _, _, actual_stderr = svntest.actions.run_and_verify_svn(
+                                     [], svntest.verify.AnyOutput,
                                      'unlock', iota_url)
-  if len(actual_stderr) > 2:
-    actual_stderr = actual_stderr[-2:]
+  if len(actual_stderr) > 4:
+    actual_stderr = actual_stderr[-4:-2] + actual_stderr[-1:]
   expected_err = [
     'svn: warning: W165001: ' + svntest.actions.hook_failure_message('pre-unlock'),
     error_msg + "\n",
+    "svn: E200009: One or more locks could not be released\n",
   ]
   svntest.verify.compare_and_display_lines(None, 'STDERR',
                                            expected_err, actual_stderr)
@@ -2036,15 +2034,15 @@ def dav_lock_timeout(sbox):
   expiration_date = svntest.actions.run_and_parse_info(sbox.repo_url + '/iota')[0]['Lock Expires']
 
   # Verify that there is a lock, by trying to obtain one
-  svntest.actions.run_and_verify_svn2(None, ".*locked by user", 0,
-                                      'lock', '-m', '', sbox.ospath('iota'))
+  svntest.actions.run_and_verify_svn(None, ".*locked by user",
+                                     'lock', '-m', '', sbox.ospath('iota'))
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.tweak('iota', writelocked='O')
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # This used to fail over serf with a parse error of the timeout.
   expected_err = "svn: warning: W160039:"
-  svntest.actions.run_and_verify_svn2(None, expected_err, 0,
+  svntest.actions.run_and_verify_svn(None, expected_err,
                                      'unlock', sbox.repo_url + '/iota')
 
   # Force unlock via working copy, this also used to fail over serf.
@@ -2081,17 +2079,12 @@ def create_dav_lock_timeout(sbox):
   "create generic DAV lock with timeout"
 
   import httplib
-  from urlparse import urlparse
   import base64
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  loc = urlparse(sbox.repo_url)
 
-  if loc.scheme == 'http':
-    h = httplib.HTTPConnection(loc.hostname, loc.port)
-  else:
-    h = httplib.HTTPSConnection(loc.hostname, loc.port)
+  h = svntest.main.create_http_connection(sbox.repo_url)
 
   lock_body = '<?xml version="1.0" encoding="utf-8" ?>' \
               '<D:lockinfo xmlns:D="DAV:">' \
@@ -2107,9 +2100,6 @@ def create_dav_lock_timeout(sbox):
     'Timeout': 'Second-86400'
   }
 
-  # Enabling the following line makes this test easier to debug
-  h.set_debuglevel(9)
-
   h.request('LOCK', sbox.repo_url + '/iota', lock_body, lock_headers)
 
   r = h.getresponse()
@@ -2193,27 +2183,27 @@ def many_locks_hooks(sbox):
                                          '  sys.exit(1)\n'
                                          'sys.exit(0)\n')
 
-  svntest.actions.run_and_verify_svn2(".* locked",
-                                      "svn: warning: W165001: .*", 0,
-                                      'lock',
-                                      sbox.ospath('iota'),
-                                      sbox.ospath('A/mu'),
-                                      sbox.ospath('A/B/E/alpha'),
-                                      sbox.ospath('A/D/G/pi'),
-                                      sbox.ospath('A/D/G/rho'))
+  svntest.actions.run_and_verify_svn(".* locked",
+                                     "svn: warning: W165001: .*",
+                                     'lock',
+                                     sbox.ospath('iota'),
+                                     sbox.ospath('A/mu'),
+                                     sbox.ospath('A/B/E/alpha'),
+                                     sbox.ospath('A/D/G/pi'),
+                                     sbox.ospath('A/D/G/rho'))
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.tweak('iota', 'A/mu', 'A/B/E/alpha', 'A/D/G/rho',
                         writelocked='K')
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
-  svntest.actions.run_and_verify_svn2(".* unlocked",
-                                      "svn: warning: W165001: .*", 0,
-                                      'unlock',
-                                      sbox.ospath('iota'),
-                                      sbox.ospath('A/mu'),
-                                      sbox.ospath('A/B/E/alpha'),
-                                      sbox.ospath('A/D/G/rho'))
+  svntest.actions.run_and_verify_svn(".* unlocked",
+                                     "svn: warning: W165001: .*",
+                                     'unlock',
+                                     sbox.ospath('iota'),
+                                     sbox.ospath('A/mu'),
+                                     sbox.ospath('A/B/E/alpha'),
+                                     sbox.ospath('A/D/G/rho'))
 
   expected_status.tweak('iota', 'A/B/E/alpha', 'A/D/G/rho',
                         writelocked=None)
@@ -2227,7 +2217,6 @@ def dav_lock_refresh(sbox):
   "refresh timeout of DAV lock"
 
   import httplib
-  from urlparse import urlparse
   import base64
 
   sbox.build(create_wc = False)
@@ -2237,12 +2226,7 @@ def dav_lock_refresh(sbox):
                                      sbox.repo_url + '/iota')
 
   # Try to refresh lock using 'If' header
-  loc = urlparse(sbox.repo_url)
-
-  if loc.scheme == 'http':
-    h = httplib.HTTPConnection(loc.hostname, loc.port)
-  else:
-    h = httplib.HTTPSConnection(loc.hostname, loc.port)
+  h = svntest.main.create_http_connection(sbox.repo_url)
 
   lock_token = svntest.actions.run_and_parse_info(sbox.repo_url + '/iota')[0]['Lock Token']
 
@@ -2252,9 +2236,6 @@ def dav_lock_refresh(sbox):
     'Timeout': 'Second-7200'
   }
 
-  # Enabling the following line makes this test easier to debug
-  h.set_debuglevel(9)
-
   h.request('LOCK', sbox.repo_url + '/iota', '', lock_headers)
 
   # XFAIL Refreshing of DAV lock fails with error '412 Precondition Failed'