subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r1334511 - in /subversion/trunk/subversion/libsvn_ra_serf: blame.c getlocations.c getlocationsegments.c log.c mergeinfo.c ra_serf.h util.c
Date Sat, 05 May 2012 21:35:17 GMT
Author: gstein
Date: Sat May  5 21:35:17 2012
New Revision: 1334511

URL: http://svn.apache.org/viewvc?rev=1334511&view=rev
Log:
Remove the STATUS_CODE and LOCATION from the parser context. This was
at the wrong level of abstraction -- all requests need that stuff, not
just the ones with XML responses.

* subversion/libsvn_ra_serf/ra_serf.h:
  (svn_ra_serf__xml_parser_t): remove STATUS_CODE and LOCATION

* subversion/libsvn_ra_serf/util.c:
  (svn_ra_serf__handle_xml_parser): don't bother filling in
    STATUS_CODE and HANDLER. remove a stale assertion.

* subversion/libsvn_ra_serf/mergeinfo.c:
  (svn_ra_serf__get_mergeinfo): use the right LOCATION

* subversion/libsvn_ra_serf/getlocationsegments.c:
  (svn_ra_serf__get_location_segments): use the right LOCATION

* subversion/libsvn_ra_serf/blame.c:
  (svn_ra_serf__get_file_revs): use the right LOCATION

* subversion/libsvn_ra_serf/log.c:
  (svn_ra_serf__get_log): use the right LOCATION

* subversion/libsvn_ra_serf/getlocations.c:
  (svn_ra_serF__get_locations): use the right LOCATION

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/blame.c
    subversion/trunk/subversion/libsvn_ra_serf/getlocations.c
    subversion/trunk/subversion/libsvn_ra_serf/getlocationsegments.c
    subversion/trunk/subversion/libsvn_ra_serf/log.c
    subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c
    subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h
    subversion/trunk/subversion/libsvn_ra_serf/util.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/blame.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/blame.c?rev=1334511&r1=1334510&r2=1334511&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/blame.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/blame.c Sat May  5 21:35:17 2012
@@ -475,7 +475,7 @@ svn_ra_serf__get_file_revs(svn_ra_sessio
   err = svn_error_compose_create(
             svn_ra_serf__error_on_status(handler->sline.code,
                                          handler->path,
-                                         parser_ctx->location),
+                                         handler->location),
             err);
 
   return svn_error_trace(err);

Modified: subversion/trunk/subversion/libsvn_ra_serf/getlocations.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/getlocations.c?rev=1334511&r1=1334510&r2=1334511&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/getlocations.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/getlocations.c Sat May  5 21:35:17 2012
@@ -275,7 +275,7 @@ svn_ra_serf__get_locations(svn_ra_sessio
   SVN_ERR(svn_error_compose_create(
               svn_ra_serf__error_on_status(handler->sline.code,
                                            req_url,
-                                           parser_ctx->location),
+                                           handler->location),
               err));
 
   return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/libsvn_ra_serf/getlocationsegments.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/getlocationsegments.c?rev=1334511&r1=1334510&r2=1334511&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/getlocationsegments.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/getlocationsegments.c Sat May  5 21:35:17 2012
@@ -234,7 +234,7 @@ svn_ra_serf__get_location_segments(svn_r
   err = svn_error_compose_create(
          svn_ra_serf__error_on_status(handler->sline.code,
                                       handler->path,
-                                      parser_ctx->location),
+                                      handler->location),
          err);
 
   svn_pool_destroy(gls_ctx->subpool);

Modified: subversion/trunk/subversion/libsvn_ra_serf/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/log.c?rev=1334511&r1=1334510&r2=1334511&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/log.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/log.c Sat May  5 21:35:17 2012
@@ -729,7 +729,7 @@ svn_ra_serf__get_log(svn_ra_session_t *r
   SVN_ERR(svn_error_compose_create(
               svn_ra_serf__error_on_status(handler->sline.code,
                                            req_url,
-                                           parser_ctx->location),
+                                           handler->location),
               err));
 
   return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c?rev=1334511&r1=1334510&r2=1334511&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c Sat May  5 21:35:17 2012
@@ -294,7 +294,7 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio
   err = svn_ra_serf__context_run_wait(&mergeinfo_ctx->done, session, pool);
 
   err2 = svn_ra_serf__error_on_status(handler->sline.code, handler->path,
-                                      parser_ctx->location);
+                                      handler->location);
   if (err2)
     {
       svn_error_clear(err);

Modified: subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h?rev=1334511&r1=1334510&r2=1334511&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h Sat May  5 21:35:17 2012
@@ -545,16 +545,6 @@ struct svn_ra_serf__xml_parser_t {
   /* Our previously used states (will be reused). */
   svn_ra_serf__xml_state_t *free_state;
 
-  /* If non-NULL, the status code of the response will be stored here.
-   *
-   * If this is NULL and an error is received, an abort will be triggered.
-   */
-  int *status_code;
-
-  /* If non-NULL, this is the value of the response's Location header.
-   */
-  const char *location;
-
   /* If non-NULL, this value will be set to TRUE when the response is
    * completed.
    */

Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1334511&r1=1334510&r2=1334511&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Sat May  5 21:35:17 2012
@@ -1399,31 +1399,16 @@ svn_ra_serf__handle_xml_parser(serf_requ
   svn_ra_serf__xml_parser_t *ctx = baton;
   svn_error_t *err;
 
+  /* ### get the HANDLER rather than fetching this.  */
   status = serf_bucket_response_status(response, &sl);
   if (SERF_BUCKET_READ_ERROR(status))
     {
       return svn_error_wrap_apr(status, NULL);
     }
 
-  if (ctx->status_code)
-    {
-      *ctx->status_code = sl.code;
-    }
-
-  if (sl.code == 301 || sl.code == 302 || sl.code == 307)
-    {
-      ctx->location = svn_ra_serf__response_get_location(response, ctx->pool);
-    }
-
   /* Woo-hoo.  Nothing here to see.  */
   if (sl.code == 404 && ctx->ignore_errors == FALSE)
     {
-      /* If our caller won't know about the 404, abort() for now. */
-#if 0
-      /* ### wrong thing to do anyways. and caller has HANDLER->SLINE.  */
-      SVN_ERR_ASSERT(ctx->status_code);
-#endif
-
       add_done_item(ctx);
 
       err = svn_ra_serf__handle_server_error(request, response, pool);



Mime
View raw message