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

RE: Error for "svn up" when delta > 102400

From: Sander Striker <striker_at_apache.org>
Date: 2002-04-01 14:23:23 CEST

> From: Justin Erenkrantz [mailto:jerenkrantz@apache.org]
> Sent: 01 April 2002 13:02

> On Wed, Mar 27, 2002 at 09:45:43AM -0500, Ben Collins wrote:
>> Let's ignore this entire issue for now. I forgot that I was running
>> mod_deflate and the Neon compression patch. Either something is not
>> correct with the patch, or someting is broken in neon or mod_deflate.
>>
>> The checkout works when I disable this.
>
> What's the status of this? Is there a reproduction scheme for
> this out of svn's HEAD?
>
> I realize I'm a week late and a dollar short. =) -- justin

*grin*

Ben, could you please try and reproduce with this new patch, or
actually 2. You need neon from cvs though.

Joe, what's the status on neon, is 0.20.0 nearing release yet?
Any known problems in decompression?

Thanks,

Sander

-------------------------------------------------------------------
Patch 1: Update svn to neon 0.20.0 (CVS)

Index: ./build/buildcheck.sh
===================================================================
--- ./build/buildcheck.sh
+++ ./build/buildcheck.sh Mon Apr 1 12:23:34 2002
@@ -53,7 +53,7 @@
 #--------------------------------------------------------------------------
 # check for the correct version of Neon
 #
-NEON_WANTED_REGEX=0.19.[2-3]
+NEON_WANTED_REGEX=0.20.0
 NEON_LATEST_WORKING_VER=0.19.3
 NEON_URL="http://www.webdav.org/neon/neon-${NEON_LATEST_WORKING_VER}.tar.gz"
 if test -d ./neon; then
Index: ./subversion/libsvn_ra_dav/ra_dav.h
===================================================================
--- ./subversion/libsvn_ra_dav/ra_dav.h
+++ ./subversion/libsvn_ra_dav/ra_dav.h Mon Apr 1 13:11:06 2002
@@ -40,7 +40,7 @@
   apr_pool_t *pool;
 
   const char *url; /* original, unparsed url for this session */
- struct uri root; /* parsed version of above */
+ ne_uri root; /* parsed version of above */
 
   ne_session *sess; /* HTTP session to server */
   ne_session *sess2;
Index: ./subversion/libsvn_ra_dav/session.c
===================================================================
--- ./subversion/libsvn_ra_dav/session.c
+++ ./subversion/libsvn_ra_dav/session.c Mon Apr 1 13:16:58 2002
@@ -317,22 +317,22 @@
   const char *repository = repos_URL->data;
   apr_size_t len;
   ne_session *sess, *sess2;
- struct uri uri = { 0 };
+ ne_uri uri = { 0 };
   svn_ra_session_t *ras;
   int is_ssl_session;
 
   /* Sanity check the URI */
- if (uri_parse(repository, &uri, NULL)
+ if (ne_uri_parse(repository, &uri)
       || uri.host == NULL || uri.path == NULL)
     {
- uri_free(&uri);
+ ne_uri_free(&uri);
       return svn_error_create(SVN_ERR_RA_ILLEGAL_URL, 0, NULL, pool,
                               "illegal URL for repository");
     }
 
   /* Can we initialize network? */
   if (sock_init() != 0) {
- uri_free(&uri);
+ ne_uri_free(&uri);
     return svn_error_create(SVN_ERR_RA_SOCK_INIT, 0, NULL, pool,
                             "network socket initialization failed");
   }
@@ -354,7 +354,7 @@
         }
       if (ne_supports_ssl() == 0)
         {
- uri_free(&uri);
+ ne_uri_free(&uri);
           return svn_error_create(SVN_ERR_RA_SOCK_INIT, 0, NULL, pool,
                                   "SSL is not supported");
         }
Index: ./subversion/libsvn_ra_dav/props.c
===================================================================
--- ./subversion/libsvn_ra_dav/props.c
+++ ./subversion/libsvn_ra_dav/props.c Mon Apr 1 13:14:57 2002
@@ -132,7 +132,7 @@
 static void *create_private(void *userdata, const char *url)
 {
   prop_ctx_t *pc = userdata;
- struct uri parsed_url;
+ ne_uri parsed_url;
   char *url_path;
   svn_ra_dav_resource_t *r = apr_pcalloc(pc->pool, sizeof(*r));
   apr_size_t len;
@@ -150,9 +150,9 @@
      Note: mod_dav does not (currently) use an absolute URL, but simply a
      server-relative path (i.e. this uri_parse is effectively a no-op).
   */
- (void) uri_parse(url_str->data, &parsed_url, NULL);
+ (void) ne_uri_parse(url_str->data, &parsed_url);
   url_path = apr_pstrdup(pc->pool, parsed_url.path);
- uri_free(&parsed_url);
+ ne_uri_free(&parsed_url);
 
   /* clean up trailing slashes from the URL */
   len = strlen(url_path);
@@ -457,7 +457,7 @@
 {
   svn_ra_dav_resource_t *rsrc;
   const char *vcc;
- struct uri parsed_url;
+ ne_uri parsed_url;
 
   /* ### we may be able to replace some/all of this code with an
      ### expand-property REPORT when that is available on the server. */
@@ -479,14 +479,14 @@
 
   /* Split the copyfrom url into it's component pieces (schema,
      host, path, etc). We want the path part. */
- uri_parse (url, &parsed_url, NULL);
+ ne_uri_parse (url, &parsed_url);
 
   /* ### do we want to optimize the props we fetch, based on what the
      ### user has requested? i.e. omit resourcetype when is_dir is NULL
      ### and omit relpath when bc_relative is NULL. */
   SVN_ERR( svn_ra_dav__get_props_resource(&rsrc, sess, parsed_url.path,
                                           NULL, starting_props, pool) );
- uri_free(&parsed_url);
+ ne_uri_free(&parsed_url);
 
   if (is_dir != NULL)
     *is_dir = rsrc->is_collection;
Index: ./subversion/libsvn_ra_dav/commit.c
===================================================================
--- ./subversion/libsvn_ra_dav/commit.c
+++ ./subversion/libsvn_ra_dav/commit.c Mon Apr 1 13:12:27 2002
@@ -358,7 +358,7 @@
   int code;
   const char *body;
   const char *locn = NULL;
- struct uri parse;
+ ne_uri parse;
   svn_stringbuf_t *url_str;
   svn_error_t *err;
 
@@ -425,9 +425,9 @@
   /* The location is an absolute URI. We want just the path portion. */
   /* ### what to do with the rest? what if it points somewhere other
      ### than the current session? */
- uri_parse(locn, &parse, NULL);
+ ne_uri_parse(locn, &parse);
   res->wr_url = apr_pstrdup(cc->ras->pool, parse.path);
- uri_free(&parse);
+ ne_uri_free(&parse);
   free((void *)locn);
 
   return NULL;
Index: ./subversion/libsvn_ra_dav/fetch.c
===================================================================
--- ./subversion/libsvn_ra_dav/fetch.c
+++ ./subversion/libsvn_ra_dav/fetch.c Mon Apr 1 13:53:44 2002
@@ -352,7 +352,7 @@
                                    apr_pool_t *pool)
 {
   apr_hash_t *dirents;
- struct uri parsed_url;
+ ne_uri parsed_url;
   apr_hash_index_t *hi;
 
   /* Fetch all properties so we can snarf ones out of the svn:custom
@@ -383,7 +383,7 @@
    * :-)
    */
 
- uri_parse(url, &parsed_url, NULL);
+ ne_uri_parse(url, &parsed_url);
 
   for (hi = apr_hash_first(pool, dirents); hi; hi = apr_hash_next(hi))
     {
@@ -395,7 +395,7 @@
 
       if (r->is_collection)
         {
- if (uri_compare(parsed_url.path, r->url) == 0)
+ if (ne_path_compare(parsed_url.path, r->url) == 0)
             {
               /* don't insert "this dir" into the set of subdirs */
 
@@ -422,7 +422,7 @@
         }
     }
 
- uri_free(&parsed_url);
+ ne_uri_free(&parsed_url);
 
   return SVN_NO_ERROR;
 }
Index: ./subversion/libsvn_ra_dav/util.c
===================================================================
--- ./subversion/libsvn_ra_dav/util.c
+++ ./subversion/libsvn_ra_dav/util.c Mon Apr 1 13:55:05 2002
@@ -32,7 +32,7 @@
 
 void svn_ra_dav__copy_href(svn_stringbuf_t *dst, const char *src)
 {
- struct uri parsed_url;
+ ne_uri parsed_url;
 
   /* parse the PATH element out of the URL and store it.
 
@@ -41,9 +41,9 @@
      Note: mod_dav does not (currently) use an absolute URL, but simply a
      server-relative path (i.e. this uri_parse is effectively a no-op).
   */
- (void) uri_parse(src, &parsed_url, NULL);
+ (void) ne_uri_parse(src, &parsed_url);
   svn_stringbuf_set(dst, parsed_url.path);
- uri_free(&parsed_url);
+ ne_uri_free(&parsed_url);
 }
 
 svn_error_t *svn_ra_dav__convert_error(ne_session *sess,

-------------------------------------------------------------------
Patch 2: Enable deflate

--- subversion/libsvn_ra_dav/fetch.c Mon Apr 1 14:03:20 2002
+++ subversion/libsvn_ra_dav/fetch.c.deflate Mon Apr 1 14:02:27 2002
@@ -33,6 +33,7 @@
 #include <ne_props.h>
 #include <ne_xml.h>
 #include <ne_request.h>
+#include <ne_compress.h>
 
 #include "svn_error.h"
 #include "svn_pools.h"
@@ -439,6 +440,7 @@
   custom_get_ctx_t cgc = { 0 };
   const char *delta_base;
   ne_request *req;
+ ne_decompress *decompress;
   svn_error_t *err;
   int code;
 
@@ -474,13 +476,16 @@
     }
 
   /* add in a reader to capture the body of the response. */
- ne_add_response_body_reader(req, ne_accept_2xx, reader, &cgc);
+ decompress = ne_decompress_reader(req, ne_accept_2xx, reader, &cgc);
 
   /* complete initialization of the body reading context */
   cgc.subctx = subctx;
 
   /* run the request and get the resulting status code (and svn_error_t) */
   err = svn_ra_dav__request_dispatch(&code, req, sess, "GET", url, pool);
+
+ /* ### TODO: Add error checking */
+ ne_decompress_destroy(decompress);
 
   /* we no longer need this */
   if (cgc.ctype.value != NULL)
--- subversion/libsvn_ra_dav/util.c Mon Apr 1 14:03:20 2002
+++ subversion/libsvn_ra_dav/util.c.deflate Mon Apr 1 14:12:16 2002
@@ -20,6 +20,7 @@
 #include <apr_want.h>
 
 #include <ne_uri.h>
+#include <ne_compress.h>
 
 #include "svn_string.h"
 #include "svn_xml.h"
@@ -220,6 +221,8 @@
                                         apr_pool_t *pool)
 {
   ne_request *req;
+ ne_decompress *decompress_main;
+ ne_decompress *decompress_err;
   ne_xml_parser *success_parser;
   ne_xml_parser *error_parser;
   int rv;
@@ -253,16 +256,20 @@
 
   /* Register the "main" accepter and body-reader with the request --
      the one to use when the HTTP status is 2XX */
- ne_add_response_body_reader(req, ne_accept_2xx,
- ne_xml_parse_v, success_parser);
+ decompress_main = ne_decompress_reader(req, ne_accept_2xx,
+ ne_xml_parse_v, success_parser);
 
   /* Register the "error" accepter and body-reader with the request --
      the one to use when HTTP status is *not* 2XX */
- ne_add_response_body_reader(req, ra_dav_error_accepter,
- ne_xml_parse_v, error_parser);
+ decompress_err = ne_decompress_reader(req, ra_dav_error_accepter,
+ ne_xml_parse_v, error_parser);
 
   /* run the request and get the resulting status code. */
   rv = ne_request_dispatch(req);
+
+ /* ### TODO: Add error checking */
+ ne_decompress_destroy(decompress_main);
+ ne_decompress_destroy(decompress_err);
 
   code = ne_get_status(req)->code;
   ne_request_destroy(req);

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 1 14:19:04 2002

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