On Mon, Sep 10, 2012 at 8:04 PM, Daniel Shahaf <[email protected]> wrote:
> [email protected] wrote on Fri, Sep 07, 2012 at 00:22:46 -0000: > > Author: stefan2 > > Date: Fri Sep 7 00:22:45 2012 > > New Revision: 1381817 > > > > URL: http://svn.apache.org/viewvc?rev=1381817&view=rev > > Log: > > Follow-up to r1381814. > > > > * subversion/libsvn_fs_fs/fs_fs.c > > (get_dir_contents): expanded_size may not be given > > Can you explain this please? The structure file says that the expanded > size and the md5sum are always present (but the sha1 and uniquifier are > not present in reps written by pre-format-4 servers). Under what > circumstances is expanded_size unknown? > For PLAIN representations, compressed and uncompressed size are equal. In that case, the second value may be given as 0 (for empty reps, both would be 0). -- Stefan^2. > > > > Modified: > > subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c > > > > Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c > > URL: > http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1381817&r1=1381816&r2=1381817&view=diff > > > ============================================================================== > > --- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original) > > +++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Fri Sep 7 00:22:45 > 2012 > > @@ -5070,7 +5070,9 @@ get_dir_contents(apr_hash_t *entries, > > * parse it byte-by-byte. > > */ > > apr_pool_t *text_pool = svn_pool_create(pool); > > - apr_size_t len = noderev->data_rep->expanded_size; > > + apr_size_t len = noderev->data_rep->expanded_size > > + ? noderev->data_rep->expanded_size > > + : noderev->data_rep->size; > > svn_stringbuf_t *text = svn_stringbuf_create_ensure(len, > text_pool); > > text->len = len; > > > > > > > -- * Join us this October at Subversion Live 2012<http://www.wandisco.com/svn-live-2012> for two days of best practice SVN training, networking, live demos, committer meet and greet, and more! Space is limited, so get signed up today<http://www.wandisco.com/svn-live-2012> ! *

