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

Re: r1673875: Provide a central and complete implementation for handling FSFS quirks...

From: Julian Foad <julianfoad_at_gmail.com>
Date: Fri, 17 Apr 2015 09:10:26 +0100

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? */
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;
         }
]]]

- Julian
Received on 2015-04-17 10:11:15 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.