subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1584708 - /subversion/branches/1.8.x-serf-no-lock-support/subversion/libsvn_ra_serf/getlocks.c
Date Fri, 04 Apr 2014 14:19:21 GMT
Author: rhuijben
Date: Fri Apr  4 14:19:21 2014
New Revision: 1584708

URL: http://svn.apache.org/r1584708
Log:
* subversion/libsvn_ra_serf/getlocks.c
  (svn_ra_serf__get_locks): Wrap the server generated error with the
    documented error. This makes the error handling similar to the
    trunk behavior introduced in r1584606.

Modified:
    subversion/branches/1.8.x-serf-no-lock-support/subversion/libsvn_ra_serf/getlocks.c

Modified: subversion/branches/1.8.x-serf-no-lock-support/subversion/libsvn_ra_serf/getlocks.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-serf-no-lock-support/subversion/libsvn_ra_serf/getlocks.c?rev=1584708&r1=1584707&r2=1584708&view=diff
==============================================================================
--- subversion/branches/1.8.x-serf-no-lock-support/subversion/libsvn_ra_serf/getlocks.c (original)
+++ subversion/branches/1.8.x-serf-no-lock-support/subversion/libsvn_ra_serf/getlocks.c Fri
Apr  4 14:19:21 2014
@@ -234,6 +234,7 @@ svn_ra_serf__get_locks(svn_ra_session_t 
   svn_ra_serf__handler_t *handler;
   svn_ra_serf__xml_context_t *xmlctx;
   const char *req_url, *rel_path;
+  svn_error_t *err;
 
   req_url = svn_path_url_add_component2(session->session_url.path, path, pool);
   SVN_ERR(svn_ra_serf__get_relative_path(&rel_path, req_url, session,
@@ -260,7 +261,14 @@ svn_ra_serf__get_locks(svn_ra_session_t 
   handler->body_delegate = create_getlocks_body;
   handler->body_delegate_baton = lock_ctx;
 
-  SVN_ERR(svn_ra_serf__context_run_one(handler, pool));
+  err = svn_ra_serf__context_run_one(handler, pool);
+  
+  /* Wrap the server generated error for an unsupported report with the
+     documented error for this ra function. */
+  if (svn_error_find_cause(err, SVN_ERR_UNSUPPORTED_FEATURE))
+    err = svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, err, NULL);
+    
+  SVN_ERR(err);
 
   /* 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' */



Mime
View raw message