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

AW: [PATCH]: Optimize merge_file_trivial()

From: Markus Schaber <m.schaber_at_3s-software.com>
Date: Fri, 15 Jun 2012 21:54:11 +0000

Hi, Philip,

I did address most of the issues. However, the following question is open:

Von: Philip Martin [philip.martin_at_wandisco.com]
> Markus Schaber <m.schaber_at_3s-software.com> writes:

>> +/* Function to prepare a single test file */
>> +
>> +static svn_error_t *
>> +create_test_file(struct test_file_definition_t* definition, apr_pool_t *pool, apr_pool_t *scratch_pool)
>> +{
>> + apr_status_t status;
>> + apr_file_t *file_h;
>> + apr_off_t midpos = definition->size / 2;
>> + svn_error_t *err = NULL;
>> + int i;
>> +
>> + if (definition->size < 5)
>> + SVN_ERR_ASSERT(strlen(definition->data) >= definition->size);
>> + else
>> + SVN_ERR_ASSERT(strlen(definition->data) >= 5);
>> +
>> + status = apr_filepath_merge(&definition->created_path,
>> + TEST_DIR,
>> + definition->name,
>> + 0,
>> + pool);

> Do you need to do that? Could you simply relative paths as is done
> subversion/tests/libsvn_diff/diff-diff3-test.c.

I used path concatenation to pack all of the files into one temporary
directory, so they can be easily cleaned up, and only one svn:ignore
entry is needed. I did model this after how the temporary
repositories are handled in svn_test_fs.c.

If you think it's better to clutter the directory with the full set of test files,
I'll change the code.

Best regards

Markus Schaber

--
We software Automation.
3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50
Email: m.schaber@3s-software.com | Web: http://www.3s-software.com
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects
Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915
Received on 2012-06-15 23:55:00 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.