Author: philip
Date: Mon Nov 26 14:59:13 2012
New Revision: 1413670

URL: http://svn.apache.org/viewvc?rev=1413670&view=rev
Log:
Make ra_serf handle the 500 response that occurs when requesting
inherited properties for revisions greater than HEAD for URLs that
are not the repository root.

* subversion/libsvn_ra_serf/inherited_props.c
  (svn_ra_serf__get_inherited_props): Handle a 500 response by using
   svn_ra_serf__context_run_one rather than svn_ra_serf__context_run_wait.

* subversion/tests/cmdline/update_tests.py
  (def update_to_HEAD_plus_1): Explicitly test non-repo-root working copy.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c
    subversion/trunk/subversion/tests/cmdline/update_tests.py

Modified: subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c?rev=1413670&r1=1413669&r2=1413670&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/inherited_props.c Mon Nov 26 
14:59:13 2012
@@ -277,8 +277,7 @@ svn_ra_serf__get_inherited_props(svn_ra_
                                  apr_pool_t *result_pool,
                                  apr_pool_t *scratch_pool)
 {
-  svn_error_t *err, *err2;
-
+  svn_error_t *err;
   iprops_context_t *iprops_ctx;
   svn_ra_serf__session_t *session = ra_session->priv;
   svn_ra_serf__handler_t *handler;
@@ -331,20 +330,12 @@ svn_ra_serf__get_inherited_props(svn_ra_
   handler->response_handler = svn_ra_serf__handle_xml_parser;
   handler->response_baton = parser_ctx;
 
-  svn_ra_serf__request_create(handler);
-
-  err = svn_ra_serf__context_run_wait(&iprops_ctx->done, session,
-                                      scratch_pool);
-
-  err2 = svn_ra_serf__error_on_status(handler->sline.code, handler->path,
-                                      handler->location);
-  if (err2)
-    {
-      svn_error_clear(err);
-      return err2;
-    }
-
-  SVN_ERR(err);
+  err = svn_ra_serf__context_run_one(handler, scratch_pool);
+  SVN_ERR(svn_error_compose_create(
+                    svn_ra_serf__error_on_status(handler->sline.code,
+                                                 handler->path,
+                                                 handler->location),
+                    err));
 
   if (iprops_ctx->done)
     *iprops = iprops_ctx->iprops;

Modified: subversion/trunk/subversion/tests/cmdline/update_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/update_tests.py?rev=1413670&r1=1413669&r2=1413670&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/update_tests.py Mon Nov 26 
14:59:13 2012
@@ -5523,6 +5523,16 @@ def update_to_HEAD_plus_1(sbox):
                                         None, None,
                                         None, None, None, wc_dir, '-r', '2')
 
+  other_wc = sbox.add_wc_path('other')
+  other_url = sbox.repo_url + '/A'
+  svntest.actions.run_and_verify_svn("subtree checkout", None, [],
+                                     'co', other_url, other_wc)
+  svntest.actions.run_and_verify_update(other_wc,
+                                        None, None, None,
+                                        "E160006.*No such.*revision",
+                                        None, None,
+                                        None, None, None, other_wc, '-r', '2')
+
 @XFail()
 def update_moved_dir_leaf_del(sbox):
   "update locally moved dir with leaf del"


Reply via email to