sussman@tigris.org writes:
> Author: sussman
> Date: 2002-07-29 14:22:29 -0500 (Mon, 29 Jul 2002)
> New Revision: 2772
> 
> Modified:
>    trunk/subversion/libsvn_repos/dump.c
> Log:
> 
> Dumper bugfix from William Uther <will+@cs.cmu.edu>.
> 
> * dump.c (dump_node): 
>   Apparently on his Mac OS X box, the Prop-content-length: was being
>   printf'ed as a '0', even though gdb clearly showed that its value
>   was 10.  That's what happens when you mix up your apr_off_t's with
>   your apr_size_t's, and choose the wrong *_FMT printf macro.
William, can you explain something please?  I'm trying to figure out
why, instead of just making TEXTLEN, PROPLEN, and CONTENT_LENGTH all
apr_size_t or apr_off_t, you swapped the types used for PROPLEN and
CONTENT_LENGTH?  It would seem that we should just use apr_off_t or
apr_size_t for all three values.
> Modified: trunk/subversion/libsvn_repos/dump.c
> ==============================================================================
> --- trunk/subversion/libsvn_repos/dump.c	(original)
> +++ trunk/subversion/libsvn_repos/dump.c	Mon Jul 29 14:22:30 2002
> @@ -222,8 +222,8 @@
>  {
>    svn_stringbuf_t *propstring;
>    apr_hash_t *prophash;
> -  apr_off_t textlen = 0, proplen = 0;
> -  apr_size_t content_length = 0, len;
> +  apr_off_t textlen = 0, content_length = 0;
> +  apr_size_t proplen = 0, len;
>    svn_boolean_t must_dump_text = FALSE, must_dump_props = FALSE;
>    const char *compare_path = path;
>    svn_revnum_t compare_rev = eb->current_rev - 1;
> @@ -407,7 +407,7 @@
>        content_length += textlen;
>        SVN_ERR (svn_stream_printf (eb->stream, pool,
>                                    SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH 
> -                                  ": %" APR_SIZE_T_FMT "\n", textlen));
> +                                  ": %" APR_OFF_T_FMT "\n", textlen));
>        /* ### someday write a node-content-checksum here.  */
>      }
>  
> @@ -417,7 +417,7 @@
>       parsers. */
>    SVN_ERR (svn_stream_printf (eb->stream, pool,
>                                SVN_REPOS_DUMPFILE_CONTENT_LENGTH 
> -                              ": %" APR_SIZE_T_FMT "\n\n", content_length));
> +                              ": %" APR_OFF_T_FMT "\n\n", content_length));
>  
>    /* Dump property content if we're supposed to do so. */
>    if (must_dump_props)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jul 29 21:52:12 2002