Thank you, Branko!
brane@tigris.org writes:
> Log:
> Fix even more timestamp breakage -- make sure we read what we wrote.
> We were usiing %03d to print/scan the tm_usec field and, while (apr_p)sprintf
> will expand the field to print all significant digits, it seems sscanf was
> confused.
>
> This should really, finally fix issue 404.
>
> * libsvn_subr/time.c (timestamp_format): Use %06d for tm_usec.
> * tests/libsvn_fs/fs-test.c (commit_date): Remove the #if 0 and comment.
>
> Revision Changes Path
> 1.3 +1 -1 subversion/subversion/libsvn_subr/time.c
>
> http://subversion.tigris.org/source/browse/subversion/subversion/libsvn_subr/time.c.diff?r1=1.2&r2=1.3
>
> (In the diff below, changes in quantity of whitespace are not shown.)
>
> Index: time.c
> ===================================================================
> RCS file: /usr/local/tigris/data/helm/cvs/repository/subversion/subversion/libsvn_subr/time.c,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -b -r1.2 -r1.3
> --- time.c 2001/07/02 21:17:06 1.2
> +++ time.c 2001/07/04 07:32:40 1.3
> @@ -38,7 +38,7 @@
> * the comment in svn_wc__time_to_string()).
> */
> static const char *timestamp_format =
> -"%s %d %s %d %02d:%02d:%02d.%03d (day %03d, dst %d, gmt_off %06d)";
> +"%s %d %s %d %02d:%02d:%02d.%06d (day %03d, dst %d, gmt_off %06d)";
>
>
> svn_stringbuf_t *
>
>
>
> 1.86 +0 -36 subversion/subversion/tests/libsvn_fs/fs-test.c
>
> http://subversion.tigris.org/source/browse/subversion/subversion/tests/libsvn_fs/fs-test.c.diff?r1=1.85&r2=1.86
>
> (In the diff below, changes in quantity of whitespace are not shown.)
>
> Index: fs-test.c
> ===================================================================
> RCS file: /usr/local/tigris/data/helm/cvs/repository/subversion/subversion/tests/libsvn_fs/fs-test.c,v
> retrieving revision 1.85
> retrieving revision 1.86
> diff -u -b -r1.85 -r1.86
> --- fs-test.c 2001/07/02 20:47:51 1.85
> +++ fs-test.c 2001/07/04 07:32:40 1.86
> @@ -3577,41 +3577,6 @@
>
> at_commit = svn_time_from_string (datestamp);
>
> -#if 0
> - /* ### todo:
> -
> - Ideally, we'd test that the commit happened between a point right
> - before it and a point right after. Unfortunately, I can't get
> - this to pass right now because there's a bug in either the
> - Subversion time library or the APR time library. I've tried the
> - following four combinations in libsvn_subr/time.c:
> -
> - 1. svn_time_to_string using apr_explode_localtime() with
> - svn_time_from_string using apr_implode_time()
> -
> - 2. svn_time_to_string using apr_explode_localtime() with
> - svn_time_from_string using apr_implode_gmt()
> -
> - 3. svn_time_to_string using apr_explode_gmt() with
> - svn_time_from_string using apr_implode_time()
> -
> - 4. svn_time_to_string using apr_explode_gmt() with
> - svn_time_from_string using apr_implode_gmt()
> -
> - and none of them seem to work. So I left them as they were,
> - which is that they don't match -- while the former uses
> - apr_explode_localtime(), while the latter is using
> - apr_implode_gmt(). This is the result of Branko's recent change
> - to svn_time_from_string (which at the time was called
> - svn_wc__string_to_time). I don't know whether Branko's change is
> - right, wrong, or neutral; don't even know if it fixes issue #404
> - as it was intended to.
> -
> - Until we can get this all sorted out, the extra checks below are
> - disabled, since they fail, or rather, the first one fails.
> -
> - */
> -
> if (at_commit < before_commit)
> return svn_error_create
> (SVN_ERR_FS_GENERAL, 0, NULL, pool,
> @@ -3621,7 +3586,6 @@
> return svn_error_create
> (SVN_ERR_FS_GENERAL, 0, NULL, pool,
> "datestamp too late");
> -#endif /* 0 */
>
> return SVN_NO_ERROR;
> }
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cvs-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: cvs-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 Sat Oct 21 14:36:33 2006