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

Re: svn commit: r34449 - trunk/subversion/libsvn_fs_fs

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Fri, 28 Nov 2008 16:10:30 -0600

David Glasser wrote:
> On Thu, Nov 27, 2008 at 4:13 PM, <hwright_at_tigris.org> wrote:
>> Author: hwright
>> Date: Thu Nov 27 13:13:00 2008
>> New Revision: 34449
>>
>> Log:
>> A bit of tryptophan-induced hacking: Use a string buf when writing the FSFS
>> format file, to enable easy addition of additional options in that file.
>>
>> * subversion/libsvn_fs_fs/fs_fs.c
>> (write_format): Simplify format file content generation.
>>
>> Modified:
>> trunk/subversion/libsvn_fs_fs/fs_fs.c
>>
>> Modified: trunk/subversion/libsvn_fs_fs/fs_fs.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs_fs/fs_fs.c?pathrev=34449&r1=34448&r2=34449
>> ==============================================================================
>> --- trunk/subversion/libsvn_fs_fs/fs_fs.c Thu Nov 27 01:53:55 2008 (r34448)
>> +++ trunk/subversion/libsvn_fs_fs/fs_fs.c Thu Nov 27 13:13:00 2008 (r34449)
>> @@ -898,34 +898,31 @@ static svn_error_t *
>> write_format(const char *path, int format, int max_files_per_dir,
>> svn_boolean_t overwrite, apr_pool_t *pool)
>> {
>> - const char *contents;
>> + svn_stringbuf_t *sb;
>> + svn_string_t *contents;
>>
>> SVN_ERR_ASSERT(1 <= format && format <= SVN_FS_FS__FORMAT_NUMBER);
>> +
>> + sb = svn_stringbuf_create(apr_psprintf(pool, "%d\n", format), pool);
>> +
>> if (format >= SVN_FS_FS__MIN_LAYOUT_FORMAT_OPTION_FORMAT)
>> {
>> if (max_files_per_dir)
>> - contents = apr_psprintf(pool,
>> - "%d\n"
>> - "layout sharded %d\n",
>> - format, max_files_per_dir);
>> + svn_stringbuf_appendcstr(sb, apr_psprintf(pool, "layout sharded %d\n",
>> + max_files_per_dir));
>> else
>> - contents = apr_psprintf(pool,
>> - "%d\n"
>> - "layout linear",
>> - format);
>> - }
>> - else
>> - {
>> - contents = apr_psprintf(pool, "%d\n", format);
>> + svn_stringbuf_appendcstr(sb, "layout linear");
>
> Not a regression, but there should probably be a newline here.

r34466.

-Hyrum

Received on 2008-11-28 23:10:51 CET

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.