You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2014/04/03 01:10:04 UTC
svn commit: r1584212 - in /subversion/trunk/subversion:
libsvn_ra_serf/lock.c tests/cmdline/authz_tests.py
Author: philip
Date: Wed Apr 2 23:10:03 2014
New Revision: 1584212
URL: http://svn.apache.org/r1584212
Log:
* subversion/tests/cmdline/authz_tests.py
(authz_locking): Extend to test multiple paths, some of which fail.
* subversion/libsvn_ra_serf/lock.c
(run_locks): Add comment about 403.
Modified:
subversion/trunk/subversion/libsvn_ra_serf/lock.c
subversion/trunk/subversion/tests/cmdline/authz_tests.py
Modified: subversion/trunk/subversion/libsvn_ra_serf/lock.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/lock.c?rev=1584212&r1=1584211&r2=1584212&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/lock.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/lock.c Wed Apr 2 23:10:03 2014
@@ -263,6 +263,7 @@ run_locks(svn_ra_serf__session_t *sess,
ctx->handler->sline.reason);
break;
case 403:
+ /* ### Authz can also lead to 403. */
err = svn_error_createf(SVN_ERR_FS_LOCK_OWNER_MISMATCH,
NULL,
_("Unlock of '%s' failed (%d %s)"),
Modified: subversion/trunk/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/authz_tests.py?rev=1584212&r1=1584211&r2=1584212&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/authz_tests.py Wed Apr 2 23:10:03 2014
@@ -800,6 +800,36 @@ def authz_locking(sbox):
None,
mu_path)
+ # Lock two paths one of which fails. First add read access to '/' so
+ # that OPTIONS on common ancestor works.
+ write_authz_file(sbox, {"/": "jrandom = r", "/A": "jrandom = rw"})
+
+ # Two unlocked paths
+ svntest.actions.run_and_verify_info([{'Lock Token' : None}],
+ sbox.ospath('iota'))
+ 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
+
+ svntest.actions.run_and_verify_svn2(None,
+ None, expected_err, expected_status,
+ 'lock',
+ '-m', 'lock msg',
+ mu_path,
+ iota_path)
+
+ # One path locked, one still unlocked
+ svntest.actions.run_and_verify_info([{'Lock Token' : None}],
+ sbox.ospath('iota'))
+ svntest.actions.run_and_verify_info([{'Lock Token' : 'opaquelocktoken:.*'}],
+ sbox.ospath('A/mu'))
+
+
+
# test for issue #2712: if anon-access == read, svnserve should also check
# authz to determine whether a checkout/update is actually allowed for
# anonymous users, and, if not, attempt authentication.