On Fri, Apr 17, 2015 at 10:10 AM, Julian Foad <julianfoad_at_gmail.com> wrote:
> Stefan Fuhrmann wrote:
> > Thanks for the corrections!
> > Committed as r1674165.
>
> Thanks. Here's another:
>
> [[[
> Index: subversion/libsvn_fs_fs/fs.h
> ===================================================================
> --- subversion/libsvn_fs_fs/fs.h (revision 1674067)
> +++ subversion/libsvn_fs_fs/fs.h (working copy)
> @@ -527,7 +527,8 @@ typedef struct representation_t
> svn_filesize_t size;
>
> /* The size of the fulltext of the representation. If this is 0,
> - * the fulltext size is equal to representation size in the rev file, */
> + * for a plain rep, the real fulltext size is equal to the SIZE field.
> + * For a delta rep, this field is always the real fulltext size. */
> svn_filesize_t expanded_size;
>
> /* Is this a representation (still) within a transaction? */
>
Thanks! Committed with even more commentary as r1674404.
> Index: subversion/libsvn_fs_fs/fs_fs.c
> ===================================================================
> --- subversion/libsvn_fs_fs/fs_fs.c (revision 1674067)
> +++ subversion/libsvn_fs_fs/fs_fs.c (working copy)
> @@ -1386,11 +1386,11 @@ svn_fs_fs__file_length(svn_filesize_t *l
> {
> /* Work around a FSFS format quirk (see issue #4554).
>
> - A plain representation may specify its EXPANDED LENGTH as "0"
> + A plain representation may specify its EXPANDED_SIZE as "0"
> in which case, the SIZE value is what we want.
>
> - Because EXPANDED_LENGTH will also be 0 for empty files, while
> - SIZE is non-null, we need to check wether the content is
> + Because EXPANDED_SIZE will also be 0 for empty files, while
> + SIZE may be non-zero (a delta rep), we need to check whether
> the content is
> actually empty. We simply compare with the MD5 checksum of
> empty content (sha-1 is not always available).
> */
> @@ -1400,7 +1400,7 @@ svn_fs_fs__file_length(svn_filesize_t *l
> if (memcmp(empty_md5->digest, data_rep->md5_digest,
> sizeof(data_rep->md5_digest)))
> {
> - /* Contents is not empty, i.e. EXPANDED_LENGTH cannot be the
> + /* Contents is not empty, i.e. EXPANDED_SIZE cannot be the
> actual file length. */
> *length = data_rep->size;
> }
> ]]]
>
That should be implicitly fixed be r1674400.
It removed all the local handling for special case.
-- Stefan^2.
Received on 2015-04-17 23:14:27 CEST