[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Should mod_dav_svn turn SVN_ERR_FS_LOCK_OWNER_MISMATCH into HTTP_LOCKED?

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Mon, 02 May 2011 12:58:16 -0400

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 <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2011-05-02 18:58:46 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.