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 2013/12/18 13:10:52 UTC
svn commit: r1551919 - in /subversion/trunk/subversion:
libsvn_ra_serf/lock.c tests/cmdline/lock_tests.py
Author: rhuijben
Date: Wed Dec 18 12:10:52 2013
New Revision: 1551919
URL: http://svn.apache.org/r1551919
Log:
Use the standard ra serf error reporting from ra serfs unlock handling,
and improve a specific unlock error.
* subversion/libsvn_ra_serf/lock.c
(svn_ra_serf__unlock): Handle all http status errors instead of just a few.
* subversion/tests/cmdline/lock_tests.py
(unlock_wrong_token): Use stricter check. Remove TODO.
Modified:
subversion/trunk/subversion/libsvn_ra_serf/lock.c
subversion/trunk/subversion/tests/cmdline/lock_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=1551919&r1=1551918&r2=1551919&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/lock.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/lock.c Wed Dec 18 12:10:52 2013
@@ -538,20 +538,25 @@ svn_ra_serf__unlock(svn_ra_session_t *ra
switch (handler->sline.code)
{
- case 204:
- break; /* OK */
case 403:
/* Api users expect this specific error code to detect failures */
err = svn_error_createf(SVN_ERR_FS_LOCK_OWNER_MISMATCH, NULL,
- _("Unlock request failed: %d %s"),
+ _("Unlock of '%s' failed: %d %s"),
+ path,
handler->sline.code,
handler->sline.reason);
break;
- default:
- err = svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
- _("Unlock request failed: %d %s"),
+ case 400:
+ err = svn_error_createf(SVN_ERR_FS_NO_SUCH_LOCK, NULL,
+ _("No lock on path '%s': %d %s"),
+ path,
handler->sline.code,
handler->sline.reason);
+ break;
+ default:
+ err = svn_ra_serf__error_on_status(handler->sline,
+ handler->path,
+ handler->location);
}
if (lock_func)
Modified: subversion/trunk/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/lock_tests.py?rev=1551919&r1=1551918&r2=1551919&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/lock_tests.py Wed Dec 18 12:10:52 2013
@@ -1309,7 +1309,7 @@ def unlock_wrong_token(sbox):
### The error message returned is actually this, but let's worry about that
### another day...
svntest.actions.run_and_verify_svn2(
- None, None, ".*((No lock on path)|(400 Bad Request))", 0,
+ None, None, ".*(No lock on path)", 0,
'unlock', file_path)
#----------------------------------------------------------------------