subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hyrum K Wright <hy...@hyrumwright.org>
Subject Re: svn commit: r1144572 - in /subversion/trunk: ./ subversion/include/private/ subversion/libsvn_fs_fs/ subversion/libsvn_subr/ subversion/tests/cmdline/
Date Sat, 09 Jul 2011 16:08:20 GMT
Was this a merge from somewhere?  If so, would it be useful to note
that in the log message?

-Hyrum

On Fri, Jul 8, 2011 at 8:54 PM,  <danielsh@apache.org> wrote:
> Author: danielsh
> Date: Sat Jul  9 01:54:29 2011
> New Revision: 1144572
>
> URL: http://svn.apache.org/viewvc?rev=1144572&view=rev
> Log:
> Improve error reporting for parsing serialized hashes.
>
> * subversion/tests/cmdline/svnadmin_tests.py
>  (verify_with_invalid_revprops): Adjust expected text.
>
> * subversion/libsvn_subr/hash.c
>  (svn_private_config.h): Include
>  (hash_read): Improve error messages.
>
> Modified:
>    subversion/trunk/   (props changed)
>    subversion/trunk/subversion/include/private/svn_adler32.h   (props changed)
>    subversion/trunk/subversion/include/private/svn_string_private.h   (props changed)
>    subversion/trunk/subversion/include/private/svn_temp_serializer.h   (props changed)
>    subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c   (props changed)
>    subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h   (props changed)
>    subversion/trunk/subversion/libsvn_subr/adler32.c   (props changed)
>    subversion/trunk/subversion/libsvn_subr/hash.c   (contents, props changed)
>    subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c   (props changed)
>    subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py
>
> Propchange: subversion/trunk/
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Sat Jul  9 01:54:29 2011
> @@ -39,7 +39,7 @@
>  /subversion/branches/py-tests-as-modules:956579-1033052
>  /subversion/branches/ra_serf-digest-authn:875693-876404
>  /subversion/branches/reintegrate-improvements:873853-874164
> -/subversion/branches/revprop-packing:1143907,1143971,1143997,1144017,1144499
> +/subversion/branches/revprop-packing:1143907,1143971,1143997,1144017,1144499,1144568
>  /subversion/branches/subtree-mergeinfo:876734-878766
>  /subversion/branches/svn-mergeinfo-enhancements:870119-870195,870197-870288
>  /subversion/branches/svn-patch-improvements:918519-934609
>
> Propchange: subversion/trunk/subversion/include/private/svn_adler32.h
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Sat Jul  9 01:54:29 2011
> @@ -31,7 +31,7 @@
>  /subversion/branches/py-tests-as-modules/subversion/libsvn_diff/diff.h:956579-1033052
>  /subversion/branches/ra_serf-digest-authn/subversion/libsvn_diff/diff.h:875693-876404
>  /subversion/branches/reintegrate-improvements/subversion/libsvn_diff/diff.h:873853-874164
> -/subversion/branches/revprop-packing/subversion/include/private/svn_adler32.h:1143907,1143971,1144017
> +/subversion/branches/revprop-packing/subversion/include/private/svn_adler32.h:1143907,1143971,1144017,1144568
>  /subversion/branches/subtree-mergeinfo/subversion/libsvn_diff/diff.h:876734-878766
>  /subversion/branches/svn-mergeinfo-enhancements/subversion/libsvn_diff/diff.h:870119-870195,870197-870288
>  /subversion/branches/svn-patch-improvements/subversion/libsvn_diff/diff.h:918519-934609
>
> Propchange: subversion/trunk/subversion/include/private/svn_string_private.h
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Sat Jul  9 01:54:29 2011
> @@ -39,7 +39,7 @@
>  /subversion/branches/py-tests-as-modules/subversion/include/svn_string.h:956579-1033052
>  /subversion/branches/ra_serf-digest-authn/subversion/include/svn_string.h:875693-876404
>  /subversion/branches/reintegrate-improvements/subversion/include/svn_string.h:873853-874164
> -/subversion/branches/revprop-packing/subversion/include/private/svn_string_private.h:1143907,1143971,1144017
> +/subversion/branches/revprop-packing/subversion/include/private/svn_string_private.h:1143907,1143971,1144017,1144568
>  /subversion/branches/subtree-mergeinfo/subversion/include/svn_string.h:876734-878766
>  /subversion/branches/svn-mergeinfo-enhancements/subversion/include/svn_string.h:870119-870195,870197-870288
>  /subversion/branches/svn-patch-improvements/subversion/include/svn_string.h:918519-934609
>
> Propchange: subversion/trunk/subversion/include/private/svn_temp_serializer.h
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Sat Jul  9 01:54:29 2011
> @@ -1,2 +1,2 @@
> -/subversion/branches/revprop-packing/subversion/include/private/svn_temp_serializer.h:1143907,1143971,1144017
> +/subversion/branches/revprop-packing/subversion/include/private/svn_temp_serializer.h:1143907,1143971,1144017,1144568
>  /subversion/trunk/subversion/include/private/svn_temp_serializer.h:1067687-1072301
>
> Propchange: subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Sat Jul  9 01:54:29 2011
> @@ -1,2 +1,2 @@
> -/subversion/branches/revprop-packing/subversion/libsvn_fs_fs/temp_serializer.c:1143907,1143971,1144017
> +/subversion/branches/revprop-packing/subversion/libsvn_fs_fs/temp_serializer.c:1143907,1143971,1144017,1144568
>  /subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c:1067687-1072301
>
> Propchange: subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Sat Jul  9 01:54:29 2011
> @@ -1,2 +1,2 @@
> -/subversion/branches/revprop-packing/subversion/libsvn_fs_fs/temp_serializer.h:1143907,1143971,1144017
> +/subversion/branches/revprop-packing/subversion/libsvn_fs_fs/temp_serializer.h:1143907,1143971,1144017,1144568
>  /subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h:1067687-1072301
>
> Propchange: subversion/trunk/subversion/libsvn_subr/adler32.c
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Sat Jul  9 01:54:29 2011
> @@ -1,4 +1,4 @@
>  /subversion/branches/diff-optimizations/subversion/libsvn_subr/adler32.c:1031270-1037352
>  /subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/adler32.c:1037353-1067789
>  /subversion/branches/performance/subversion/libsvn_subr/adler32.c:1067697-1078365
> -/subversion/branches/revprop-packing/subversion/libsvn_subr/adler32.c:1143907,1143971,1144017
> +/subversion/branches/revprop-packing/subversion/libsvn_subr/adler32.c:1143907,1143971,1144017,1144568
>
> Modified: subversion/trunk/subversion/libsvn_subr/hash.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/hash.c?rev=1144572&r1=1144571&r2=1144572&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_subr/hash.c (original)
> +++ subversion/trunk/subversion/libsvn_subr/hash.c Sat Jul  9 01:54:29 2011
> @@ -25,10 +25,12 @@
>
>  #include <stdlib.h>
>  #include <limits.h>
> +
>  #include <apr_version.h>
>  #include <apr_pools.h>
>  #include <apr_hash.h>
>  #include <apr_file_io.h>
> +
>  #include "svn_types.h"
>  #include "svn_string.h"
>  #include "svn_error.h"
> @@ -36,8 +38,12 @@
>  #include "svn_sorts.h"
>  #include "svn_io.h"
>  #include "svn_pools.h"
> +
>  #include "private/svn_dep_compat.h"
>
> +#include "svn_private_config.h"
> +
> +
>
>
>  /*
> @@ -106,14 +112,16 @@ hash_read(apr_hash_t *hash, svn_stream_t
>
>       /* Check for unexpected end of stream */
>       if (eof)
> -        return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
> +        return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
> +                                _("Serialized hash missing terminator"));
>
>       if ((buf->len >= 3) && (buf->data[0] == 'K') && (buf->data[1]
== ' '))
>         {
>           /* Get the length of the key */
>           keylen = (size_t) strtoul(buf->data + 2, &end, 10);
>           if (keylen == (size_t) ULONG_MAX || *end != '\0')
> -            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
> +            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
> +                                    _("Serialized hash malformed"));
>
>           /* Now read that much into a buffer. */
>           keybuf = apr_palloc(pool, keylen + 1);
> @@ -124,7 +132,8 @@ hash_read(apr_hash_t *hash, svn_stream_t
>           len = 1;
>           SVN_ERR(svn_stream_read(stream, &c, &len));
>           if (c != '\n')
> -            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
> +            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
> +                                    _("Serialized hash malformed"));
>
>           /* Read a val length line */
>           SVN_ERR(svn_stream_readline(stream, &buf, "\n", &eof, iterpool));
> @@ -133,7 +142,8 @@ hash_read(apr_hash_t *hash, svn_stream_t
>             {
>               vallen = (size_t) strtoul(buf->data + 2, &end, 10);
>               if (vallen == (size_t) ULONG_MAX || *end != '\0')
> -                return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
> +                return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
> +                                        _("Serialized hash malformed"));
>
>               valbuf = apr_palloc(iterpool, vallen + 1);
>               SVN_ERR(svn_stream_read(stream, valbuf, &vallen));
> @@ -143,14 +153,16 @@ hash_read(apr_hash_t *hash, svn_stream_t
>               len = 1;
>               SVN_ERR(svn_stream_read(stream, &c, &len));
>               if (c != '\n')
> -                return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
> +                return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
> +                                        _("Serialized hash malformed"));
>
>               /* Add a new hash entry. */
>               apr_hash_set(hash, keybuf, keylen,
>                            svn_string_ncreate(valbuf, vallen, pool));
>             }
>           else
> -            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
> +            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
> +                                    _("Serialized hash malformed"));
>         }
>       else if (incremental && (buf->len >= 3)
>                && (buf->data[0] == 'D') && (buf->data[1]
== ' '))
> @@ -158,7 +170,8 @@ hash_read(apr_hash_t *hash, svn_stream_t
>           /* Get the length of the key */
>           keylen = (size_t) strtoul(buf->data + 2, &end, 10);
>           if (keylen == (size_t) ULONG_MAX || *end != '\0')
> -            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
> +            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
> +                                    _("Serialized hash malformed"));
>
>           /* Now read that much into a buffer. */
>           keybuf = apr_palloc(iterpool, keylen + 1);
> @@ -169,14 +182,16 @@ hash_read(apr_hash_t *hash, svn_stream_t
>           len = 1;
>           SVN_ERR(svn_stream_read(stream, &c, &len));
>           if (c != '\n')
> -            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
> +            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
> +                                    _("Serialized hash malformed"));
>
>           /* Remove this hash entry. */
>           apr_hash_set(hash, keybuf, keylen, NULL);
>         }
>       else
>         {
> -          return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
> +          return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
> +                                  _("Serialized hash malformed"));
>         }
>     }
>
>
> Propchange: subversion/trunk/subversion/libsvn_subr/hash.c
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (added)
> +++ svn:mergeinfo Sat Jul  9 01:54:29 2011
> @@ -0,0 +1,55 @@
> +/subversion/branches/1.5.x-r30215/subversion/libsvn_subr/hash.c:870312
> +/subversion/branches/atomic-revprop/subversion/libsvn_subr/hash.c:965046-1000689
> +/subversion/branches/bdb-reverse-deltas/subversion/libsvn_subr/hash.c:872050-872529
> +/subversion/branches/diff-callbacks3/subversion/libsvn_subr/hash.c:870059-870761
> +/subversion/branches/diff-optimizations/subversion/libsvn_subr/hash.c:1031270-1037352
> +/subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/hash.c:1037353-1067789
> +/subversion/branches/dont-save-plaintext-passwords-by-default/subversion/libsvn_subr/hash.c:870728-871118
> +/subversion/branches/double-delete/subversion/libsvn_subr/hash.c:870511-872970
> +/subversion/branches/explore-wc/subversion/libsvn_subr/hash.c:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997
> +/subversion/branches/file-externals/subversion/libsvn_subr/hash.c:871779-873302
> +/subversion/branches/fs-rep-sharing/subversion/libsvn_subr/hash.c:869036-873803
> +/subversion/branches/fsfs-pack/subversion/libsvn_subr/hash.c:873717-874575
> +/subversion/branches/gnome-keyring/subversion/libsvn_subr/hash.c:870558-871410
> +/subversion/branches/http-protocol-v2/subversion/libsvn_subr/hash.c:874395-876041
> +/subversion/branches/in-memory-cache/subversion/libsvn_subr/hash.c:869829-871452
> +/subversion/branches/integrate-cache-item-serialization/subversion/libsvn_subr/hash.c:1068724-1068739
> +/subversion/branches/integrate-cache-membuffer/subversion/libsvn_subr/hash.c:998649-998852
> +/subversion/branches/integrate-compression-level/subversion/libsvn_subr/hash.c:1068651-1072287
> +/subversion/branches/integrate-io-improvements/subversion/libsvn_subr/hash.c:1068684-1072297
> +/subversion/branches/integrate-is-cachable/subversion/libsvn_subr/hash.c:1072568-1074082
> +/subversion/branches/integrate-partial-getter/subversion/libsvn_subr/hash.c:1072558-1076552
> +/subversion/branches/integrate-readline-speedup/subversion/libsvn_subr/hash.c:1072553-1072555
> +/subversion/branches/integrate-stream-api-extensions/subversion/libsvn_subr/hash.c:1068695-1072516
> +/subversion/branches/integrate-txdelta-caching/subversion/libsvn_subr/hash.c:1072541-1078213
> +/subversion/branches/issue-2779-dev/subversion/libsvn_subr/hash.c:965496-984198
> +/subversion/branches/issue-2843-dev/subversion/libsvn_subr/hash.c:871432-874179
> +/subversion/branches/issue-3000/subversion/libsvn_subr/hash.c:871713,871716-871719,871721-871726,871728,871734
> +/subversion/branches/issue-3067-deleted-subtrees/subversion/libsvn_subr/hash.c:873375-874084
> +/subversion/branches/issue-3148-dev/subversion/libsvn_subr/hash.c:875193-875204
> +/subversion/branches/issue-3220-dev/subversion/libsvn_subr/hash.c:872210-872226
> +/subversion/branches/issue-3242-dev/subversion/libsvn_subr/hash.c:879653-896436
> +/subversion/branches/issue-3334-dirs/subversion/libsvn_subr/hash.c:875156-875867
> +/subversion/branches/issue-3668-3669/subversion/libsvn_subr/hash.c:1031000-1035744
> +/subversion/branches/kwallet/subversion/libsvn_subr/hash.c:870785-871314
> +/subversion/branches/log-g-performance/subversion/libsvn_subr/hash.c:870941-871032
> +/subversion/branches/merge-skips-obstructions/subversion/libsvn_subr/hash.c:874525-874615
> +/subversion/branches/nfc-nfd-aware-client/subversion/libsvn_subr/hash.c:870276,870376
> +/subversion/branches/performance/subversion/libsvn_subr/hash.c:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985695,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029090,1029092-1029093,1029111,1029151,1029158,1029229-1029230,1029232,1029335-1029336,10
>  29339-1029340,1029342,1029344,1030763,1030827,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365
> +/subversion/branches/py-tests-as-modules/subversion/libsvn_subr/hash.c:956579-1033052
> +/subversion/branches/ra_serf-digest-authn/subversion/libsvn_subr/hash.c:875693-876404
> +/subversion/branches/reintegrate-improvements/subversion/libsvn_subr/hash.c:873853-874164
> +/subversion/branches/revprop-packing/subversion/libsvn_subr/hash.c:1143907,1143971,1143997,1144017,1144499,1144565,1144568
> +/subversion/branches/subtree-mergeinfo/subversion/libsvn_subr/hash.c:876734-878766
> +/subversion/branches/svn-mergeinfo-enhancements/subversion/libsvn_subr/hash.c:870119-870195,870197-870288
> +/subversion/branches/svn-patch-improvements/subversion/libsvn_subr/hash.c:918519-934609
> +/subversion/branches/svnpatch-diff/subversion/libsvn_subr/hash.c:865738-876477
> +/subversion/branches/svnraisetc/subversion/libsvn_subr/hash.c:874709-875149
> +/subversion/branches/svnserve-logging/subversion/libsvn_subr/hash.c:869828-870893
> +/subversion/branches/tc-issue-3334/subversion/libsvn_subr/hash.c:874697-874773
> +/subversion/branches/tc-merge-notify/subversion/libsvn_subr/hash.c:874017-874062
> +/subversion/branches/tc-resolve/subversion/libsvn_subr/hash.c:874191-874239
> +/subversion/branches/tc_url_rev/subversion/libsvn_subr/hash.c:874351-874483
> +/subversion/branches/tree-conflicts/subversion/libsvn_subr/hash.c:868291-873154
> +/subversion/branches/tree-conflicts-notify/subversion/libsvn_subr/hash.c:873926-874008
> +/subversion/branches/uris-as-urls/subversion/libsvn_subr/hash.c:1060426-1064427
>
> Propchange: subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Sat Jul  9 01:54:29 2011
> @@ -1,2 +1,2 @@
> -/subversion/branches/revprop-packing/subversion/libsvn_subr/svn_temp_serializer.c:1143907,1143971,1144017
> +/subversion/branches/revprop-packing/subversion/libsvn_subr/svn_temp_serializer.c:1143907,1143971,1144017,1144568
>  /subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c:1067687-1072301
>
> Modified: subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py?rev=1144572&r1=1144571&r2=1144572&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py (original)
> +++ subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py Sat Jul  9 01:54:29
2011
> @@ -970,7 +970,7 @@ def verify_with_invalid_revprops(sbox):
>
>   if svntest.verify.verify_outputs(
>     "Output of 'svnadmin verify' is unexpected.", None, errput, None,
> -    ".*Malformed file"):
> +    ".*svnadmin: E200002:.*"):
>     raise svntest.Failure
>
>  #----------------------------------------------------------------------
>
>
>

Mime
View raw message