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

Re: [PATCH]: Optimize merge_file_trivial()

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

Hi, As an addition to the merge_trivial optimizations, I added test cases for the new file comparison functions, and also included test cases for the old comparison functions which were not yet covered. This way I also discovered a bug in the comparison functions, which is fixed in this version of the patch. [[[ Optimize merge_file_trivial() by avoiding to read the files twice by using a new comparison function which compares 3 files at once. Also add C tests for the new and existing file comparison functions in libsvn_subr/io.c * subversion/include/svn_io.h (svn_io_filesizes_three_different_p): Add new declaration (svn_io_files_contents_three_same_p): Add new declaration * subversion/libsvn_subr/io.c (svn_io_filesizes_three_different_p): Add new function in analogy to svn_io_filesizes_different_p(). (contents_three_identical_p): Add new function in analogy to contents_identical_p(). (svn_io_files_contents_three_same_p): Add new function in analogy to svn_io_files_contents_same_p. * subversion/libsvn_wc/merge.c (merge_file_trivial): Use the new three-file comparison functions to avoid reading files twice. * build.conf Add the new io-test.c file to the build configuration. * subversion/tests add the temporary test file folder to svn:ignore. * subversion/tests/libsvn_subr/io-test.c (create_test_file): Helper function to create a test data file. (create_comparison_candidates): Helper function to create the full set of test data files. (test_two_file_size_comparison): Test function for svn_io_filesizes_different_p. (test_two_file_content_comparison): Test function for svn_io_files_contents_same_p. (test_three_file_size_comparison): Test function for test_three_file_size_comparison. (test_three_file_content_comparison): Test function for svn_io_files_contents_three_same_p. Patch by: Markus Schaber <m.schaber@3s-software.com> ]]] 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 17:02:36 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.