subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1622235 - /subversion/trunk/subversion/mod_dav_svn/lock.c
Date Wed, 03 Sep 2014 12:20:03 GMT
Author: rhuijben
Date: Wed Sep  3 12:20:03 2014
New Revision: 1622235

URL: http://svn.apache.org/r1622235
Log:
In mod_dav_svn: Properly forward post lock and post unlock failures that are
wrapped with different errors like SVN_ERR_REPOS_POST_LOCK_HOOK_FAILED,
instead of just reporting a generic message.

This will make 'svn' properly report:
svn: E165008: Locking succeeded, but post-lock hook failed
instead of
svn: E165008: Failed to create new lock.

which more accurately describes the result.

* subversion/mod_dav_svn/lock.c
  (append_locks,
   refresh_locks): Check for hook as error cause instead of only as
     outer error code.

Modified:
    subversion/trunk/subversion/mod_dav_svn/lock.c

Modified: subversion/trunk/subversion/mod_dav_svn/lock.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/lock.c?rev=1622235&r1=1622234&r2=1622235&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/lock.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/lock.c Wed Sep  3 12:20:03 2014
@@ -787,7 +787,7 @@ append_locks(dav_lockdb *lockdb,
                                 DAV_ERR_LOCK_SAVE_LOCK,
                                 "Anonymous lock creation is not allowed.");
     }
-  else if (serr && (serr->apr_err == SVN_ERR_REPOS_HOOK_FAILURE ||
+  else if (serr && (svn_error_find_cause(serr, SVN_ERR_REPOS_HOOK_FAILURE) ||
                     serr->apr_err == SVN_ERR_FS_NO_SUCH_LOCK ||
                     serr->apr_err == SVN_ERR_FS_LOCK_EXPIRED ||
                     SVN_ERR_IS_LOCK_ERROR(serr)))
@@ -1016,7 +1016,7 @@ refresh_locks(dav_lockdb *lockdb,
                                 DAV_ERR_LOCK_SAVE_LOCK,
                                 "Anonymous lock refreshing is not allowed.");
     }
-  else if (serr && (serr->apr_err == SVN_ERR_REPOS_HOOK_FAILURE ||
+  else if (serr && (svn_error_find_cause(serr, SVN_ERR_REPOS_HOOK_FAILURE) ||
                     serr->apr_err == SVN_ERR_FS_NO_SUCH_LOCK ||
                     serr->apr_err == SVN_ERR_FS_LOCK_EXPIRED ||
                     SVN_ERR_IS_LOCK_ERROR(serr)))



Mime
View raw message