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

Re: svn commit: r1526439 - in /subversion/trunk/subversion: libsvn_ra_serf/commit.c tests/cmdline/commit_tests.py

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Mon, 21 Oct 2013 16:50:11 +0400

On 26 September 2013 14:19, <rhuijben_at_apache.org> wrote:
> Author: rhuijben
> Date: Thu Sep 26 10:19:23 2013
> New Revision: 1526439
>
> URL: http://svn.apache.org/r1526439
> Log:
> Yet another serf server response handling improvement.
>
[...]

> if (handler->sline.code != 404)
> {
> - return svn_error_createf(SVN_ERR_RA_DAV_ALREADY_EXISTS, NULL,
> + if (handler->sline.code != 200)
> + {
> + svn_error_t *err;
> +
> + err = svn_ra_serf__error_on_status(handler->sline,
> + handler->path,
> + handler->location);
> +
> + SVN_ERR(err);
> + }
> +
> + return svn_error_createf(SVN_ERR_FS_ALREADY_EXISTS, NULL,
> _("File '%s' already exists"), path);
> }
Hi Bert,

What do you think about rewriting this condition in the following way?
[[[
      if (handler->sline.code != 404)
        {
          SVN_ERR(svn_ra_serf__error_on_status(handler->sline,
                                               handler->path,
                                               handler->location));

         return svn_error_createf(SVN_ERR_FS_ALREADY_EXISTS, NULL,
                                   _("File '%s' already exists"), path);
        }
]]]

Patch attached.

-- 
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com

Received on 2013-10-21 14:51:16 CEST

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