You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@wandisco.com> on 2011/04/28 15:01:53 UTC
Should mod_dav_svn turn SVN_ERR_FS_LOCK_OWNER_MISMATCH into HTTP_LOCKED?
If I lock a file in a wc using one user ID and then commit that wc using
a different user ID the commit fails, which is the expected behaviour.
Over HTTP I get "500 internal server error" which is not a good error
for something that is a client problem.
We could use "423 locked" instead, would that be sensible from a DAV
point of view?
Index: subversion/mod_dav_svn/util.c
===================================================================
--- subversion/mod_dav_svn/util.c (revision 1097437)
+++ subversion/mod_dav_svn/util.c (working copy)
@@ -130,6 +130,7 @@
case SVN_ERR_UNSUPPORTED_FEATURE:
status = HTTP_NOT_IMPLEMENTED;
break;
+ case SVN_ERR_FS_LOCK_OWNER_MISMATCH:
case SVN_ERR_FS_PATH_ALREADY_LOCKED:
status = HTTP_LOCKED;
break;
--
Philip
Re: Should mod_dav_svn turn SVN_ERR_FS_LOCK_OWNER_MISMATCH into HTTP_LOCKED?
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 04/28/2011 09:01 AM, Philip Martin wrote:
> If I lock a file in a wc using one user ID and then commit that wc using
> a different user ID the commit fails, which is the expected behaviour.
> Over HTTP I get "500 internal server error" which is not a good error
> for something that is a client problem.
>
> We could use "423 locked" instead, would that be sensible from a DAV
> point of view?
>
> Index: subversion/mod_dav_svn/util.c
> ===================================================================
> --- subversion/mod_dav_svn/util.c (revision 1097437)
> +++ subversion/mod_dav_svn/util.c (working copy)
> @@ -130,6 +130,7 @@
> case SVN_ERR_UNSUPPORTED_FEATURE:
> status = HTTP_NOT_IMPLEMENTED;
> break;
> + case SVN_ERR_FS_LOCK_OWNER_MISMATCH:
> case SVN_ERR_FS_PATH_ALREADY_LOCKED:
> status = HTTP_LOCKED;
> break;
That seems reasonable to me.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand