* subversion/libsvn_ra_serf/getlocks.c
(svn_ra_serf__get_locks): Wrap server error with the
SVN_ERR_RA_NOT_IMPLEMENTED implementations expect when the ra layer
doesn't support obtaining locks.
git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.8.x-serf-no-lock-support@1584585 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/subversion/libsvn_ra_serf/getlocks.c b/subversion/libsvn_ra_serf/getlocks.c
index 04e5561..b446702 100644
--- a/subversion/libsvn_ra_serf/getlocks.c
+++ b/subversion/libsvn_ra_serf/getlocks.c
@@ -264,11 +264,18 @@
/* We get a 404 when a path doesn't exist in HEAD, but it might
have existed earlier (E.g. 'svn ls http://s/svn/trunk/file@1' */
- if (handler->sline.code != 404)
+ if (handler->sline.code != 200
+ && handler->sline.code != 404)
{
- SVN_ERR(svn_ra_serf__error_on_status(handler->sline,
- handler->path,
- handler->location));
+ svn_error_t *err = svn_ra_serf__error_on_status(handler->sline,
+ handler->path,
+ handler->location);
+
+ if (handler->sline.code == 500 || handler->sline.code == 501)
+ return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, err,
+ _("Server does not support locking features"));
+
+ SVN_ERR(err);
}
*locks = lock_ctx->hash;