Re: svn commit: r1411629 - /subversion/trunk/subversion/tests/libsvn_fs/fs-test.c
Sure, if philip thinks it's appropriate. On Sat, Nov 24, 2012 at 1:08 AM, Daniel Shahaf d...@daniel.shahaf.namewrote: Revert r1412515 then? Hyrum K Wright wrote on Fri, Nov 23, 2012 at 15:29:32 -0500: I did a little poking and fixed this in r1413046. On Fri, Nov 23, 2012 at 2:18 PM, Hyrum K Wright hy...@hyrumwright.org wrote: This test isn't cleaning up after itself (or before a subsequent run). The first time I run it in a working copy, it passes, but the next time, I get the following error: $ ./fs-test 37 subversion/tests/libsvn_fs/fs-test.c:4908: (apr_err=160033) subversion/tests/svn_test_fs.c:183: (apr_err=160033) subversion/tests/svn_test_fs.c:121: (apr_err=160033) svn_tests: E160033: cannot create fs 'test-delete-fs' there is already a directory of that name subversion/libsvn_fs/fs-loader.c:515: (apr_err=160033) subversion/libsvn_fs/fs-loader.c:322: (apr_err=160033) subversion/libsvn_fs/fs-loader.c:162: (apr_err=160033) svn_tests: E160033: Failed to load module for FS type 'bdb' FAIL: fs-test 37: test svn_fs_delete_fs I suspect there's some boilerplate somewhere that was left out. -Hyrum On Tue, Nov 20, 2012 at 6:52 AM, phi...@apache.org wrote: Author: philip Date: Tue Nov 20 11:52:56 2012 New Revision: 1411629 URL: http://svn.apache.org/viewvc?rev=1411629view=rev Log: Explicitly test svn_fs_delete_fs. * subversion/tests/libsvn_fs/fs-test.c (delete_fs): New test. (test_list): Add new test. Modified: subversion/trunk/subversion/tests/libsvn_fs/fs-test.c Modified: subversion/trunk/subversion/tests/libsvn_fs/fs-test.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs/fs-test.c?rev=1411629r1=1411628r2=1411629view=diff == --- subversion/trunk/subversion/tests/libsvn_fs/fs-test.c (original) +++ subversion/trunk/subversion/tests/libsvn_fs/fs-test.c Tue Nov 20 11:52:56 2012 @@ -4896,6 +4896,26 @@ node_history(const svn_test_opts_t *opts return SVN_NO_ERROR; } +/* Test svn_fs_delete_fs(). */ +static svn_error_t * +delete_fs(const svn_test_opts_t *opts, + apr_pool_t *pool) +{ + svn_fs_t *fs; + const char *path; + svn_node_kind_t kind; + + SVN_ERR(svn_test__create_fs(fs, test-delete-fs, opts, pool)); + path = svn_fs_path(fs, pool); + SVN_ERR(svn_io_check_path(path, kind, pool)); + SVN_TEST_ASSERT(kind != svn_node_none); + SVN_ERR(svn_fs_delete_fs(path, pool)); + SVN_ERR(svn_io_check_path(path, kind, pool)); + SVN_TEST_ASSERT(kind == svn_node_none); + + return SVN_NO_ERROR; +} + /* */ @@ -4979,5 +4999,7 @@ struct svn_test_descriptor_t test_funcs[ create and modify small file), SVN_TEST_OPTS_PASS(node_history, test svn_fs_node_history), +SVN_TEST_OPTS_PASS(delete_fs, + test svn_fs_delete_fs), SVN_TEST_NULL };
Re: svn commit: r1411629 - /subversion/trunk/subversion/tests/libsvn_fs/fs-test.c
This test isn't cleaning up after itself (or before a subsequent run). The first time I run it in a working copy, it passes, but the next time, I get the following error: $ ./fs-test 37 subversion/tests/libsvn_fs/fs-test.c:4908: (apr_err=160033) subversion/tests/svn_test_fs.c:183: (apr_err=160033) subversion/tests/svn_test_fs.c:121: (apr_err=160033) svn_tests: E160033: cannot create fs 'test-delete-fs' there is already a directory of that name subversion/libsvn_fs/fs-loader.c:515: (apr_err=160033) subversion/libsvn_fs/fs-loader.c:322: (apr_err=160033) subversion/libsvn_fs/fs-loader.c:162: (apr_err=160033) svn_tests: E160033: Failed to load module for FS type 'bdb' FAIL: fs-test 37: test svn_fs_delete_fs I suspect there's some boilerplate somewhere that was left out. -Hyrum On Tue, Nov 20, 2012 at 6:52 AM, phi...@apache.org wrote: Author: philip Date: Tue Nov 20 11:52:56 2012 New Revision: 1411629 URL: http://svn.apache.org/viewvc?rev=1411629view=rev Log: Explicitly test svn_fs_delete_fs. * subversion/tests/libsvn_fs/fs-test.c (delete_fs): New test. (test_list): Add new test. Modified: subversion/trunk/subversion/tests/libsvn_fs/fs-test.c Modified: subversion/trunk/subversion/tests/libsvn_fs/fs-test.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs/fs-test.c?rev=1411629r1=1411628r2=1411629view=diff == --- subversion/trunk/subversion/tests/libsvn_fs/fs-test.c (original) +++ subversion/trunk/subversion/tests/libsvn_fs/fs-test.c Tue Nov 20 11:52:56 2012 @@ -4896,6 +4896,26 @@ node_history(const svn_test_opts_t *opts return SVN_NO_ERROR; } +/* Test svn_fs_delete_fs(). */ +static svn_error_t * +delete_fs(const svn_test_opts_t *opts, + apr_pool_t *pool) +{ + svn_fs_t *fs; + const char *path; + svn_node_kind_t kind; + + SVN_ERR(svn_test__create_fs(fs, test-delete-fs, opts, pool)); + path = svn_fs_path(fs, pool); + SVN_ERR(svn_io_check_path(path, kind, pool)); + SVN_TEST_ASSERT(kind != svn_node_none); + SVN_ERR(svn_fs_delete_fs(path, pool)); + SVN_ERR(svn_io_check_path(path, kind, pool)); + SVN_TEST_ASSERT(kind == svn_node_none); + + return SVN_NO_ERROR; +} + /* */ @@ -4979,5 +4999,7 @@ struct svn_test_descriptor_t test_funcs[ create and modify small file), SVN_TEST_OPTS_PASS(node_history, test svn_fs_node_history), +SVN_TEST_OPTS_PASS(delete_fs, + test svn_fs_delete_fs), SVN_TEST_NULL };
Re: svn commit: r1411629 - /subversion/trunk/subversion/tests/libsvn_fs/fs-test.c
I did a little poking and fixed this in r1413046. On Fri, Nov 23, 2012 at 2:18 PM, Hyrum K Wright hy...@hyrumwright.orgwrote: This test isn't cleaning up after itself (or before a subsequent run). The first time I run it in a working copy, it passes, but the next time, I get the following error: $ ./fs-test 37 subversion/tests/libsvn_fs/fs-test.c:4908: (apr_err=160033) subversion/tests/svn_test_fs.c:183: (apr_err=160033) subversion/tests/svn_test_fs.c:121: (apr_err=160033) svn_tests: E160033: cannot create fs 'test-delete-fs' there is already a directory of that name subversion/libsvn_fs/fs-loader.c:515: (apr_err=160033) subversion/libsvn_fs/fs-loader.c:322: (apr_err=160033) subversion/libsvn_fs/fs-loader.c:162: (apr_err=160033) svn_tests: E160033: Failed to load module for FS type 'bdb' FAIL: fs-test 37: test svn_fs_delete_fs I suspect there's some boilerplate somewhere that was left out. -Hyrum On Tue, Nov 20, 2012 at 6:52 AM, phi...@apache.org wrote: Author: philip Date: Tue Nov 20 11:52:56 2012 New Revision: 1411629 URL: http://svn.apache.org/viewvc?rev=1411629view=rev Log: Explicitly test svn_fs_delete_fs. * subversion/tests/libsvn_fs/fs-test.c (delete_fs): New test. (test_list): Add new test. Modified: subversion/trunk/subversion/tests/libsvn_fs/fs-test.c Modified: subversion/trunk/subversion/tests/libsvn_fs/fs-test.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs/fs-test.c?rev=1411629r1=1411628r2=1411629view=diff == --- subversion/trunk/subversion/tests/libsvn_fs/fs-test.c (original) +++ subversion/trunk/subversion/tests/libsvn_fs/fs-test.c Tue Nov 20 11:52:56 2012 @@ -4896,6 +4896,26 @@ node_history(const svn_test_opts_t *opts return SVN_NO_ERROR; } +/* Test svn_fs_delete_fs(). */ +static svn_error_t * +delete_fs(const svn_test_opts_t *opts, + apr_pool_t *pool) +{ + svn_fs_t *fs; + const char *path; + svn_node_kind_t kind; + + SVN_ERR(svn_test__create_fs(fs, test-delete-fs, opts, pool)); + path = svn_fs_path(fs, pool); + SVN_ERR(svn_io_check_path(path, kind, pool)); + SVN_TEST_ASSERT(kind != svn_node_none); + SVN_ERR(svn_fs_delete_fs(path, pool)); + SVN_ERR(svn_io_check_path(path, kind, pool)); + SVN_TEST_ASSERT(kind == svn_node_none); + + return SVN_NO_ERROR; +} + /* */ @@ -4979,5 +4999,7 @@ struct svn_test_descriptor_t test_funcs[ create and modify small file), SVN_TEST_OPTS_PASS(node_history, test svn_fs_node_history), +SVN_TEST_OPTS_PASS(delete_fs, + test svn_fs_delete_fs), SVN_TEST_NULL };
Re: svn commit: r1387696 - /subversion/trunk/subversion/libsvn_wc/conflicts.c
On Wed, Sep 19, 2012 at 2:06 PM, s...@apache.org wrote: Author: stsp Date: Wed Sep 19 18:06:13 2012 New Revision: 1387696 URL: http://svn.apache.org/viewvc?rev=1387696view=rev Log: * subversion/libsvn_wc/conflicts.c (read_prop_conflicts): New helper to prepare for the times when new conflict storage is enabled. Currently, this describes each property conflict in a separate svn_wc_conflict_description2_t, within the limitations of svn_wc_conflict_description2_t. These limitations and suggested improvements have been recorded in comments. (svn_wc__read_conflicts): Use the new read_prop_conflicts() helper instead of creating just one conflict description. Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/conflicts.c?rev=1387696r1=1387695r2=1387696view=diff == --- subversion/trunk/subversion/libsvn_wc/conflicts.c (original) +++ subversion/trunk/subversion/libsvn_wc/conflicts.c Wed Sep 19 18:06:13 2012 @@ -1907,6 +1907,153 @@ svn_wc__conflict_invoke_resolver(svn_wc_ return SVN_NO_ERROR; } +/* Read all property conflicts contained in CONFLICT_SKEL into + * individual conflict descriptions, and append those descriptions + * to the CONFLICTS array. Allocate results in RESULT_POOL. + * SCRATCH_POOL is used for temporary allocations. */ +static svn_error_t * +read_prop_conflicts(apr_array_header_t *conflicts, +svn_wc__db_t *db, +const char *local_abspath, +svn_skel_t *conflict_skel, +apr_pool_t *result_pool, +apr_pool_t *scratch_pool) +{ + const char *prop_reject_file; + apr_hash_t *my_props; + apr_hash_t *their_old_props; + apr_hash_t *their_props; + apr_hash_t *conflicted_props; + apr_hash_index_t *hi; + apr_pool_t *iterpool; + + SVN_ERR(svn_wc__conflict_read_prop_conflict(prop_reject_file, + my_props, + their_old_props, + their_props, + conflicted_props, + db, local_abspath, + conflict_skel, + scratch_pool, scratch_pool)); + + if (apr_hash_count(conflicted_props) == 0) +{ + /* Legacy prop conflict with only a .reject file. */ + svn_wc_conflict_description2_t *desc; + + desc = svn_wc_conflict_description_create_prop2(local_abspath, + svn_node_unknown, + , result_pool); + + /* ### This should be changed. The prej file should be stored + * ### separately from the other files. We need to rev the + * ### conflict description struct for this. */ + desc-their_abspath = apr_pstrdup(result_pool, prop_reject_file); + + APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description2_t*) = desc; + + return SVN_NO_ERROR; +} + + iterpool = svn_pool_create(scratch_pool); + for (hi = apr_hash_first(scratch_pool, conflicted_props); + hi; + hi = apr_hash_next(hi)) +{ + const char *propname = svn__apr_hash_index_key(hi); + svn_string_t *old_value; + svn_string_t *my_value; + svn_string_t *their_value; + svn_wc_conflict_description2_t *desc; + + svn_pool_clear(iterpool); + + desc = svn_wc_conflict_description_create_prop2(local_abspath, + svn_node_unknown, + propname, + result_pool); + + desc-property_name = apr_pstrdup(result_pool, propname); + + my_value = apr_hash_get(my_props, propname, APR_HASH_KEY_STRING); + their_value = apr_hash_get(their_props, propname, + APR_HASH_KEY_STRING); + + /* Compute the incoming side of the conflict ('action'). */ + if (their_value == NULL) +desc-action = svn_wc_conflict_action_delete; + else if (my_value == NULL) +desc-action = svn_wc_conflict_action_add; Wrong enum type assignment here, the source is an svn_wc_conflict_reason_t, but the destination is an svn_wc_conflict_action_t. While this might work now, it feels like a real opportunity for obscure bugs later. (And my compiler complains about it. :) ) + else +desc-action = svn_wc_conflict_action_edit; Same. + + /* Compute the local side of the conflict ('reason'). */ + if (my_value == NULL) +
Re: svn commit: r1390438 - in /subversion/trunk: ./ subversion/include/private/ subversion/libsvn_ra_svn/ subversion/libsvn_subr/ tools/client-side/svn-bench/ tools/dist/
On Wed, Oct 10, 2012 at 1:46 PM, Hyrum K Wright hy...@hyrumwright.org wrote: On Wed, Sep 26, 2012 at 8:39 AM, stef...@apache.org wrote: Author: stefan2 Date: Wed Sep 26 12:38:59 2012 New Revision: 1390438 URL: http://svn.apache.org/viewvc?rev=1390438view=rev Log: Merge second batch of changes from the 10Gb branch. These add the svn-bench tool. ... Modified: subversion/trunk/subversion/libsvn_subr/string.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/string.c?rev=1390438r1=1390437r2=1390438view=diff == --- subversion/trunk/subversion/libsvn_subr/string.c (original) +++ subversion/trunk/subversion/libsvn_subr/string.c Wed Sep 26 12:38:59 2012 @@ -1093,3 +1093,44 @@ svn__i64toa(char * dest, apr_int64_t num *dest = '-'; return svn__ui64toa(dest + 1, (apr_uint64_t)(0-number)) + 1; } + +static void +ui64toa_sep(apr_uint64_t number, char seperator, char *buffer) +{ + apr_size_t length = svn__ui64toa(buffer, number); + apr_size_t i; + + for (i = length; i 3; i -= 3) +{ + memmove(buffer[i - 2], buffer[i - 3], length - i + 3); + buffer[i-3] = seperator; + length++; +} + + buffer[length] = 0; +} + +char * +svn__ui64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool) +{ + char buffer[2 * SVN_INT64_BUFFER_SIZE]; + ui64toa_sep(number, seperator, buffer); + + return apr_pstrdup(pool, buffer); +} + +char * +svn__i64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool) This function name looks like it takes a signed integer, but the actual argument type is an unsigned int... +{ + char buffer[2 * SVN_INT64_BUFFER_SIZE]; + if (number 0) ...which means this conditional will never evaluate as true. +{ + buffer[0] = '-'; + ui64toa_sep((apr_uint64_t)(-number), seperator, buffer[1]); +} + else +ui64toa_sep((apr_uint64_t)(number), seperator, buffer); + + return apr_pstrdup(pool, buffer); +} ... Talked to Stefan about this in person, and updated in r1397148. -Hyrum
Re: svn commit: r1390438 - in /subversion/trunk: ./ subversion/include/private/ subversion/libsvn_ra_svn/ subversion/libsvn_subr/ tools/client-side/svn-bench/ tools/dist/
On Wed, Sep 26, 2012 at 8:39 AM, stef...@apache.org wrote: Author: stefan2 Date: Wed Sep 26 12:38:59 2012 New Revision: 1390438 URL: http://svn.apache.org/viewvc?rev=1390438view=rev Log: Merge second batch of changes from the 10Gb branch. These add the svn-bench tool. ... Modified: subversion/trunk/subversion/libsvn_subr/string.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/string.c?rev=1390438r1=1390437r2=1390438view=diff == --- subversion/trunk/subversion/libsvn_subr/string.c (original) +++ subversion/trunk/subversion/libsvn_subr/string.c Wed Sep 26 12:38:59 2012 @@ -1093,3 +1093,44 @@ svn__i64toa(char * dest, apr_int64_t num *dest = '-'; return svn__ui64toa(dest + 1, (apr_uint64_t)(0-number)) + 1; } + +static void +ui64toa_sep(apr_uint64_t number, char seperator, char *buffer) +{ + apr_size_t length = svn__ui64toa(buffer, number); + apr_size_t i; + + for (i = length; i 3; i -= 3) +{ + memmove(buffer[i - 2], buffer[i - 3], length - i + 3); + buffer[i-3] = seperator; + length++; +} + + buffer[length] = 0; +} + +char * +svn__ui64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool) +{ + char buffer[2 * SVN_INT64_BUFFER_SIZE]; + ui64toa_sep(number, seperator, buffer); + + return apr_pstrdup(pool, buffer); +} + +char * +svn__i64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool) This function name looks like it takes a signed integer, but the actual argument type is an unsigned int... +{ + char buffer[2 * SVN_INT64_BUFFER_SIZE]; + if (number 0) ...which means this conditional will never evaluate as true. +{ + buffer[0] = '-'; + ui64toa_sep((apr_uint64_t)(-number), seperator, buffer[1]); +} + else +ui64toa_sep((apr_uint64_t)(number), seperator, buffer); + + return apr_pstrdup(pool, buffer); +} ... -Hyrum
Re: svn commit: r1349661 - /subversion/trunk/subversion/libsvn_subr/cache-memcache.c
On Wed, Jun 13, 2012 at 9:22 AM, gst...@apache.org wrote: Author: gstein Date: Wed Jun 13 07:22:00 2012 New Revision: 1349661 URL: http://svn.apache.org/viewvc?rev=1349661view=rev Log: Followup to r1349277: old APRs do not have APR_INT16_MAX * subversion/libsvn_subr/cache-memcache.c: (...): define APR_INT16_MAX if it is undefined Modified: subversion/trunk/subversion/libsvn_subr/cache-memcache.c Modified: subversion/trunk/subversion/libsvn_subr/cache-memcache.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-memcache.c?rev=1349661r1=1349660r2=1349661view=diff == --- subversion/trunk/subversion/libsvn_subr/cache-memcache.c (original) +++ subversion/trunk/subversion/libsvn_subr/cache-memcache.c Wed Jun 13 07:22:00 2012 @@ -36,6 +36,11 @@ #include apr_memcache.h +/* Older APRs do not have this. */ +#ifndef APR_INT16_MAX +#define APR_INT16_MAX (0x7fff) +#endif + Instead defining this macro here, just include private/svn_dep_compat.h, which conditionally defines this macro if the APR version isn't high enough. -Hyrum /* A note on thread safety: The apr_memcache_t object does its own mutex handling, and nothing -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1349944 - /subversion/trunk/gen-make.py
On Wed, Jun 13, 2012 at 6:10 PM, rhuij...@apache.org wrote: Author: rhuijben Date: Wed Jun 13 16:10:25 2012 New Revision: 1349944 URL: http://svn.apache.org/viewvc?rev=1349944view=rev Log: * gen-make.py Make the --with-neon= and --without-neon arguments on gen-make.py optional, just like how ./configure handles those. Windows doesn't use ./configure and this breaks tools that are friendly enough to provide hints. I don't like this change. ./configure *doesn't* work this way: it errors when attempting to provide the now-defunct neon options. Neon is gone, dead, buried. We shouldn't be special casing it in this manner: people who rely on neon will have more work to do than just updating their scripts, and we don't need to coddle them along the way. -Hyrum Modified: subversion/trunk/gen-make.py Modified: subversion/trunk/gen-make.py URL: http://svn.apache.org/viewvc/subversion/trunk/gen-make.py?rev=1349944r1=1349943r2=1349944view=diff == --- subversion/trunk/gen-make.py (original) +++ subversion/trunk/gen-make.py Wed Jun 13 16:10:25 2012 @@ -257,6 +257,13 @@ if __name__ == '__main__': 'disable-shared', 'installed-libs=', 'vsnet-version=', + + # Keep distributions that help by adding a path + # working. On unix this would be filtered by + # configure, but on Windows gen-make.py is used + # directly. + 'with-neon=', + 'without-neon', ]) if len(args) 1: _usage_exit(Too many arguments) @@ -281,6 +288,9 @@ if __name__ == '__main__': if opt != '--debug': rest.add(opt, val) del prev_conf + elif opt == '--with-neon' or opt == '--without-neon': + # Provide a warning that we ignored these arguments + print(Ignoring no longer supported argument '%s' % opt) else: rest.add(opt, val) -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1348770 - /subversion/trunk/subversion/libsvn_subr/pool.c
On Mon, Jun 11, 2012 at 11:33 AM, i...@apache.org wrote: Author: ivan Date: Mon Jun 11 09:33:36 2012 New Revision: 1348770 URL: http://svn.apache.org/viewvc?rev=1348770view=rev Log: Fix compiler warning. * subversion/libsvn_subr/pool.c (abort_on_pool_failure): Add return statement to make compiler happy. Modified: subversion/trunk/subversion/libsvn_subr/pool.c Modified: subversion/trunk/subversion/libsvn_subr/pool.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/pool.c?rev=1348770r1=1348769r2=1348770view=diff == --- subversion/trunk/subversion/libsvn_subr/pool.c (original) +++ subversion/trunk/subversion/libsvn_subr/pool.c Mon Jun 11 09:33:36 2012 @@ -53,6 +53,7 @@ abort_on_pool_failure(int retcode) And we don't have any of it... */ printf(Out of memory - terminating application.\n); abort(); + return 0; /* not reached */ } This change actually *adds* the following warning for (clang on Darwin): [[[ clang: warning: argument unused during compilation: '-no-cpp-precomp' subversion/libsvn_subr/pool.c:56:10: warning: will never be executed [-Wunreachable-code] return 0; /* not reached */ ^ 1 warning generated. ]]] I know this isn't the only place in our code where we have such constructions. Can we do something compiler-specific which then applies to all such places? -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1348782 - /subversion/trunk/subversion/tests/cmdline/blame_tests.py
Greg, As soon as I do the merge, this will fix the last test failure on the ev2-export branch. It looks like we've got a solid commit editor driving Ev2. My next target, hopefully for this week, is to implement replay using Ev2. Since this is about reading data, and is mainly server-side, I plan on implementing it on trunk. -Hyrum On Mon, Jun 11, 2012 at 12:08 PM, hwri...@apache.org wrote: Author: hwright Date: Mon Jun 11 10:08:17 2012 New Revision: 1348782 URL: http://svn.apache.org/viewvc?rev=1348782view=rev Log: In blame test 7, ensure we don't have any pre-existing properties which may interfere with the running of subsequent loops. * subversion/tests/cmdline/blame_tests.py (blame_eol_styles): For each eol-style, delete the property before manipulating the file. Modified: subversion/trunk/subversion/tests/cmdline/blame_tests.py Modified: subversion/trunk/subversion/tests/cmdline/blame_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/blame_tests.py?rev=1348782r1=1348781r2=1348782view=diff == --- subversion/trunk/subversion/tests/cmdline/blame_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/blame_tests.py Mon Jun 11 10:08:17 2012 @@ -333,6 +333,7 @@ def blame_eol_styles(sbox): # do the test for each eol-style for eol in ['CR', 'LF', 'CRLF', 'native']: + svntest.main.run_svn(None, 'propdel', 'svn:eol-style', file_path) svntest.main.file_write(file_path, This is no longer the file 'iota'.\n) for i in range(1,3): -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1342676 - in /subversion/branches/javahl-ra/subversion/bindings/javahl: native/ src/org/apache/subversion/javahl/ tests/org/apache/subversion/javahl/
A couple stylistic nits on the log message: On Fri, May 25, 2012 at 10:12 AM, v...@apache.org wrote: Author: vmpn Date: Fri May 25 15:12:56 2012 New Revision: 1342676 URL: http://svn.apache.org/viewvc?rev=1342676view=rev Log: On the javahl-ra branch: Brought RA implementation up to date with changes merged from trunk in r1329205 [in subversion/bindings/javahl/native] * SVNReposAccess.cpp (SVNReposAccess): Drop the global pool mutex as it is not necessary, as per r1154119 (getDatedRev, getLocks, checkPath): Use getPool() instead of pool as per r1154155 [in subversion/bindings/javahl/src/org/apache/subversion/javahl/] * ISVNReposAccess.java, SVNReposAccess.java: Added imports for org.apache.subversion.javahl.types.* because classes moved from the org.apache.subversion.javahl package When including the same comment for multiple files, please put the file names on separate lines. Also, please wrap comments to 80-character line widths. You can propedit this log message to fix. -Hyrum [in subversion/bindings/javahl/test/org/apache/subversion/javahl/] * SVNRATests.java: Added imports for org.apache.subversion.javahl.types.* because classes moved from the org.apache.subversion.javahl package Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNReposAccess.cpp subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReposAccess.java subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNReposAccess.java subversion/branches/javahl-ra/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRATests.java Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNReposAccess.cpp URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNReposAccess.cpp?rev=1342676r1=1342675r2=1342676view=diff == --- subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNReposAccess.cpp (original) +++ subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNReposAccess.cpp Fri May 25 15:12:56 2012 @@ -36,7 +36,6 @@ SVNReposAccess::SVNReposAccess(const char *repos_url) { - JNICriticalSection criticalSection(*JNIUtil::getGlobalPoolMutex()); m_sess_pool = svn_pool_create(JNIUtil::getPool()); svn_ra_callbacks2_t *cbtable = @@ -74,7 +73,7 @@ SVNReposAccess::getDatedRev(apr_time_t t svn_revnum_t rev; SVN_JNI_ERR(svn_ra_get_dated_revision(m_ra_session, rev, tm, - requestPool.pool()), + requestPool.getPool()), SVN_INVALID_REVNUM); return rev; @@ -87,10 +86,10 @@ SVNReposAccess::getLocks(const char *pat apr_hash_t *locks; SVN_JNI_ERR(svn_ra_get_locks2(m_ra_session, locks, path, depth, - requestPool.pool()), + requestPool.getPool()), NULL); - return CreateJ::LockMap(locks, requestPool.pool()); + return CreateJ::LockMap(locks, requestPool.getPool()); } jobject @@ -101,7 +100,7 @@ SVNReposAccess::checkPath(const char *pa SVN_JNI_ERR(svn_ra_check_path(m_ra_session, path, revision.revision()-value.number, - kind, requestPool.pool()), + kind, requestPool.getPool()), NULL); return EnumMapper::mapNodeKind(kind); Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReposAccess.java URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReposAccess.java?rev=1342676r1=1342675r2=1342676view=diff == --- subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReposAccess.java (original) +++ subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReposAccess.java Fri May 25 15:12:56 2012 @@ -26,6 +26,12 @@ package org.apache.subversion.javahl; import java.util.Date; import java.util.Map; +import org.apache.subversion.javahl.types.Depth; +import org.apache.subversion.javahl.types.Lock; +import org.apache.subversion.javahl.types.NodeKind; +import org.apache.subversion.javahl.types.Revision; +import org.apache.subversion.javahl.types.Version; + /** * This interface is an interface to interact with a remote Subversion * repository via the repository access method. Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNReposAccess.java URL:
Re: svn commit: r1342682 - /subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp
Is this change specific to the branch, or is is beneficial for general JavaHL use? If the latter, it should be committed to trunk first, then backported to the branch. I realize you don't (yet) have commit privileges to trunk. The way this would usually work is that you'd post the patch, somebody would either apply it to trunk, or just ask you to apply it, and you'd reference that approval in the commit message. -Hyrum On Fri, May 25, 2012 at 10:19 AM, v...@apache.org wrote: Author: vmpn Date: Fri May 25 15:19:21 2012 New Revision: 1342682 URL: http://svn.apache.org/viewvc?rev=1342682view=rev Log: JavaHL: Changed return value from the java svn_stream_t read function to be compatible with the txdelta_next_window function [ in subversion/bindings/javahl/native ] * InputStream.cpp (read): Return 0 instead of -1 as expected by the txdelta_next_window function Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp?rev=1342682r1=1342681r2=1342682view=diff == --- subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp (original) +++ subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp Fri May 25 15:19:21 2012 @@ -99,6 +99,14 @@ svn_error_t *InputStream::read(void *bat if (JNIUtil::isJavaExceptionThrown()) return SVN_NO_ERROR; + /* + * Convert -1 from InputStream.read that means EOF, 0 which is subversion equivalent + */ + if(jread == -1) + { + jread = 0; + } + // Put the Java byte array into a helper object to retrieve the // data bytes. JNIByteArray outdata(data, true); @@ -107,7 +115,7 @@ svn_error_t *InputStream::read(void *bat // Catch when the Java method tells us it read too much data. if (jread (jint) *len) - jread = -1; + jread = 0; // In the case of success copy the data back to the Subversion // buffer. -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1342682 - /subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp
Thanks for begin willing to work within the guidelines of the project. I understand that sometimes they may seem somewhat arbitrary, but they've grown out of a decade of experience. While they may at first appear to increase friction, they generally work out to improve the efficiency of the project as a whole. As for this particular fix, I'll go ahead and cherrypick merge it back to trunk. Thanks again for the patches! -Hyrum On Fri, May 25, 2012 at 11:39 AM, Vladimir Berezniker v...@hitechman.com wrote: As this change plus another one are beneficial for general JavaHL use, I will send them as patches on separate threads. Thank you for the guidance, Vladimir On Fri, May 25, 2012 at 12:06 PM, Hyrum K Wright hyrum.wri...@wandisco.com wrote: Is this change specific to the branch, or is is beneficial for general JavaHL use? If the latter, it should be committed to trunk first, then backported to the branch. I realize you don't (yet) have commit privileges to trunk. The way this would usually work is that you'd post the patch, somebody would either apply it to trunk, or just ask you to apply it, and you'd reference that approval in the commit message. -Hyrum On Fri, May 25, 2012 at 10:19 AM, v...@apache.org wrote: Author: vmpn Date: Fri May 25 15:19:21 2012 New Revision: 1342682 URL: http://svn.apache.org/viewvc?rev=1342682view=rev Log: JavaHL: Changed return value from the java svn_stream_t read function to be compatible with the txdelta_next_window function [ in subversion/bindings/javahl/native ] * InputStream.cpp (read): Return 0 instead of -1 as expected by the txdelta_next_window function Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp?rev=1342682r1=1342681r2=1342682view=diff == --- subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp (original) +++ subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp Fri May 25 15:19:21 2012 @@ -99,6 +99,14 @@ svn_error_t *InputStream::read(void *bat if (JNIUtil::isJavaExceptionThrown()) return SVN_NO_ERROR; + /* + * Convert -1 from InputStream.read that means EOF, 0 which is subversion equivalent + */ + if(jread == -1) + { + jread = 0; + } + // Put the Java byte array into a helper object to retrieve the // data bytes. JNIByteArray outdata(data, true); @@ -107,7 +115,7 @@ svn_error_t *InputStream::read(void *bat // Catch when the Java method tells us it read too much data. if (jread (jint) *len) - jread = -1; + jread = 0; // In the case of success copy the data back to the Subversion // buffer. -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/ -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1341031 - /subversion/trunk/subversion/svn/props.c
On Mon, May 21, 2012 at 9:03 AM, s...@apache.org wrote: Author: stsp Date: Mon May 21 14:03:46 2012 New Revision: 1341031 URL: http://svn.apache.org/viewvc?rev=1341031view=rev Log: Make 'svn proplist' print property lists in sorted order. Avoids random output ordering with APR-1.4.6. If we do this on a regular basis, it might be useful to implement a wrapper which takes a baton and handler function and then calls the handler with the hash key/value in sorted order. It might add some overhead, but it also consolidates the sorting into one location, rather than sprinkled everywhere. It doesn't matter much to me; just a thought that arose upon review. :) -Hyrum * subversion/svn/props.c (svn_cl__print_prop_hash, svn_cl__print_xml_prop_hash): Iterate over a sorted hash key array rather than iterating over the property hash table itself. Modified: subversion/trunk/subversion/svn/props.c Modified: subversion/trunk/subversion/svn/props.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/props.c?rev=1341031r1=1341030r2=1341031view=diff == --- subversion/trunk/subversion/svn/props.c (original) +++ subversion/trunk/subversion/svn/props.c Mon May 21 14:03:46 2012 @@ -31,6 +31,7 @@ #include svn_cmdline.h #include svn_string.h #include svn_error.h +#include svn_sorts.h #include svn_subst.h #include svn_props.h #include svn_string.h @@ -87,12 +88,16 @@ svn_cl__print_prop_hash(svn_stream_t *ou svn_boolean_t names_only, apr_pool_t *pool) { - apr_hash_index_t *hi; + apr_array_header_t *sorted_props; + int i; - for (hi = apr_hash_first(pool, prop_hash); hi; hi = apr_hash_next(hi)) + sorted_props = svn_sort__hash(prop_hash, svn_sort_compare_items_lexically, + pool); + for (i = 0; i sorted_props-nelts; i++) { - const char *pname = svn__apr_hash_index_key(hi); - svn_string_t *propval = svn__apr_hash_index_val(hi); + svn_sort__item_t item = APR_ARRAY_IDX(sorted_props, i, svn_sort__item_t); + const char *pname = item.key; + svn_string_t *propval = item.value; const char *pname_stdout; if (svn_prop_needs_translation(pname)) @@ -150,15 +155,19 @@ svn_cl__print_xml_prop_hash(svn_stringbu svn_boolean_t names_only, apr_pool_t *pool) { - apr_hash_index_t *hi; + apr_array_header_t *sorted_props; + int i; if (*outstr == NULL) *outstr = svn_stringbuf_create_empty(pool); - for (hi = apr_hash_first(pool, prop_hash); hi; hi = apr_hash_next(hi)) + sorted_props = svn_sort__hash(prop_hash, svn_sort_compare_items_lexically, + pool); + for (i = 0; i sorted_props-nelts; i++) { - const char *pname = svn__apr_hash_index_key(hi); - svn_string_t *propval = svn__apr_hash_index_val(hi); + svn_sort__item_t item = APR_ARRAY_IDX(sorted_props, i, svn_sort__item_t); + const char *pname = item.key; + svn_string_t *propval = item.value; if (names_only) { -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1334244 - in /subversion/trunk/subversion: include/svn_editor.h libsvn_delta/compat.c libsvn_delta/editor.c libsvn_fs/editor.c libsvn_repos/commit.c
On Fri, May 4, 2012 at 5:49 PM, gst...@apache.org wrote: Author: gstein Date: Fri May 4 22:49:31 2012 New Revision: 1334244 URL: http://svn.apache.org/viewvc?rev=1334244view=rev Log: Add a set of target/resulting children to the alter_directory() call. For rataionel, see: http://s.apache.org/Icl * subversion/include/svn_editor.h: (...): update docco on driving restrictions (svn_editor_alter_directory): add CHILDREN and update docstring * subversion/libsvn_delta/editor.c: (svn_editor_alter_directory): add CHILDREN and pass to callback. adjust initial assertions. add a bit of currently-unused code for validating future adds/deletes. * subversion/libsvn_repos/commit.c: (alter_directory_cb): add CHILDREN param and pass to FS editor * subversion/libsvn_fs/editor.c: (alter_directory_cb): add CHILDREN param and ignore it. * subversion/libsvn_delta/compat.c: (process_actions): pass NULL for CHILDREN. leave todo marker. (alter_directory_cb): add CHILDREN param. leave todo question. Modified: subversion/trunk/subversion/include/svn_editor.h subversion/trunk/subversion/libsvn_delta/compat.c subversion/trunk/subversion/libsvn_delta/editor.c subversion/trunk/subversion/libsvn_fs/editor.c subversion/trunk/subversion/libsvn_repos/commit.c Modified: subversion/trunk/subversion/include/svn_editor.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_editor.h?rev=1334244r1=1334243r2=1334244view=diff == --- subversion/trunk/subversion/include/svn_editor.h (original) +++ subversion/trunk/subversion/include/svn_editor.h Fri May 4 22:49:31 2012 @@ -246,6 +246,10 @@ extern C { * In order to reduce complexity of callback receivers, the editor callbacks * must be driven in adherence to these rules: * + * - If any path is added (with add_*) or deleted/moved/rotated, then + * an svn_editor_alter_directory() call must be made for its parent + * directory with the target/eventual set of children. + * * - svn_editor_add_directory() -- Another svn_editor_add_*() call must * follow for each child mentioned in the @a children argument of any * svn_editor_add_directory() call. @@ -479,6 +483,7 @@ typedef svn_error_t *(*svn_editor_cb_alt void *baton, const char *relpath, svn_revnum_t revision, + const apr_array_header_t *children, apr_hash_t *props, apr_pool_t *scratch_pool); @@ -885,8 +890,16 @@ svn_editor_add_absent(svn_editor_t *edit * (e.g. it has not yet been committed), then @a revision should be * #SVN_INVALID_REVNUM. * - * For a description of @a props, see svn_editor_add_file(). @a props - * may not be NULL. + * If any changes to the set of children will be made in the future of + * the edit drive, then @a children MUST specify the resulting set of + * children. See svn_editor_add_directory() for the format of @a children. + * If not changes will be made, then NULL may be specified. In this context changes means additions, deletions or replacements, correct? It might be worth it to explicitly call out the fact that changes to contents of children (whether they be directories or files) do not constitute a need to supply this parameter. -Hyrum + * + * For a description of @a props, see svn_editor_add_file(). If no changes + * to the properties will be made (ie. only future changes to the set of + * children), then @a props may be NULL. + * + * It is an error to pass NULL for both @a children and @a props. * * For all restrictions on driving the editor, see #svn_editor_t. * @since New in 1.8. @@ -895,6 +908,7 @@ svn_error_t * svn_editor_alter_directory(svn_editor_t *editor, const char *relpath, svn_revnum_t revision, + const apr_array_header_t *children, apr_hash_t *props); /** Drive @a editor's #svn_editor_cb_alter_file_t callback. Modified: subversion/trunk/subversion/libsvn_delta/compat.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1334244r1=1334243r2=1334244view=diff == --- subversion/trunk/subversion/libsvn_delta/compat.c (original) +++ subversion/trunk/subversion/libsvn_delta/compat.c Fri May 4 22:49:31 2012 @@ -433,9 +433,11 @@ process_actions(struct ev2_edit_baton *e SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(change-changing)); #endif + /* ### we need to gather up the target set of children */ + if (kind == svn_kind_dir) SVN_ERR(svn_editor_alter_directory(eb-editor, repos_relpath, - change-changing, props)); + change-changing, NULL, props)); else SVN_ERR(svn_editor_alter_file(eb-editor, repos_relpath,
Re: svn commit: r1333326 - in /subversion/trunk/subversion: include/private/svn_hash_private.h libsvn_fs_fs/temp_serializer.c libsvn_subr/hash.c
On Thu, May 3, 2012 at 2:16 AM, stef...@apache.org wrote: Author: stefan2 Date: Thu May 3 07:16:11 2012 New Revision: 126 URL: http://svn.apache.org/viewvc?rev=126view=rev Log: Introduce private API functions that wrap apr_hash_make_custom and return hash tables that are 2 to 4 times faster than the APR default. Both yield repeatable results (each instance will store items in the same order if the keys are the same). The first, svn_hask__make will return a hash table that behaves like pre APR 1.4.6 default hashes. * subversion/include/private/svn_hash_private.h (svn_hash__make, svn_hash__make_fast): new private API * subversion/libsvn_subr/hash.c (svn_hash_from_cstring_keys): use new API (hashfunc_compatible, LOWER_7BITS_SET, BIT_7_SET, READ_CHUNK, hashfunc_fast): implement efficient hash functions (svn_hash__make, svn_hash__make_fast): implement new private API * subversion/libsvn_fs_fs/temp_serializer.c (deserialize_dir, svn_fs_fs__deserialize_properties): use new API Modified: subversion/trunk/subversion/include/private/svn_hash_private.h subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c subversion/trunk/subversion/libsvn_subr/hash.c Modified: subversion/trunk/subversion/include/private/svn_hash_private.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_hash_private.h?rev=126r1=125r2=126view=diff == --- subversion/trunk/subversion/include/private/svn_hash_private.h (original) +++ subversion/trunk/subversion/include/private/svn_hash_private.h Thu May 3 07:16:11 2012 @@ -102,6 +102,31 @@ svn_hash__get_bool(apr_hash_t *hash, /** @} */ +/** + * @defgroup svn_hash_create Create optimized APR hash tables + * @{ + */ + +/** Returns a hash table, allocated in @a pool, with the same ordering of + * elements as APR 1.4.5 or earlier (using apr_hashfunc_default) but uses + * a faster hash function implementation. + * + * @since New in 1.8. + */ +apr_hash_t * +svn_hash__make(apr_pool_t *pool); + +/** Returns a hash table, allocated in @a pool, that is faster to modify + * and access then the ones returned by @ref svn_hash__make. The element + * order does not match any APR default. + * + * @since New in 1.8. + */ +apr_hash_t * +svn_hash__make_fast(apr_pool_t *pool); + +/** @} */ + /** @} */ #ifdef __cplusplus Modified: subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c?rev=126r1=125r2=126view=diff == --- subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c (original) +++ subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c Thu May 3 07:16:11 2012 @@ -30,6 +30,7 @@ #include private/svn_fs_util.h #include private/svn_temp_serializer.h +#include private/svn_hash_private.h #include temp_serializer.h @@ -359,7 +360,7 @@ serialize_dir(apr_hash_t *entries, apr_p static apr_hash_t * deserialize_dir(void *buffer, hash_data_t *hash_data, apr_pool_t *pool) { - apr_hash_t *result = apr_hash_make(pool); + apr_hash_t *result = svn_hash__make(pool); apr_size_t i; apr_size_t count; svn_fs_dirent_t *entry; @@ -678,7 +679,7 @@ svn_fs_fs__deserialize_properties(void * apr_size_t data_len, apr_pool_t *pool) { - apr_hash_t *hash = apr_hash_make(pool); + apr_hash_t *hash = svn_hash__make(pool); properties_data_t *properties = (properties_data_t *)data; size_t i; Modified: subversion/trunk/subversion/libsvn_subr/hash.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/hash.c?rev=126r1=125r2=126view=diff == --- subversion/trunk/subversion/libsvn_subr/hash.c (original) +++ subversion/trunk/subversion/libsvn_subr/hash.c Thu May 3 07:16:11 2012 @@ -40,6 +40,7 @@ #include svn_pools.h #include private/svn_dep_compat.h +#include private/svn_string_private.h #include private/svn_hash_private.h #include svn_private_config.h @@ -496,7 +497,7 @@ svn_hash_from_cstring_keys(apr_hash_t ** apr_pool_t *pool) { int i; - apr_hash_t *hash = apr_hash_make(pool); + apr_hash_t *hash = svn_hash__make(pool); for (i = 0; i keys-nelts; i++) { const char *key = @@ -561,3 +562,127 @@ svn_hash__get_bool(apr_hash_t *hash, con return default_value; } + + +/*** Optimized hash functions ***/ + +/* Optimized version of apr_hashfunc_default. It assumes that the CPU has + * 32-bit multiplications with high throughput of at least 1 operation + * every 3 cycles. Latency is not an issue. Another optimization is a + * mildly unrolled
Re: svn commit: r1331652 - /subversion/trunk/subversion/libsvn_delta/compat.c
On Fri, Apr 27, 2012 at 8:50 PM, gst...@apache.org wrote: Author: gstein Date: Sat Apr 28 01:50:35 2012 New Revision: 1331652 URL: http://svn.apache.org/viewvc?rev=1331652view=rev Log: For the Ev2 shims: Revamp the Ev2/Ev1 shims by using struct change_node rather than the funky operation records and the build() function. Each Ev2 callback simply inserts a new change_node structure with some values in it. Later, we use the path_driver to apply these change_node structures to all modified paths. This obsoletes huge chunks of code; to be removed in a future revision. Test failures: log 38, merge 105. * subversion/libsvn_delta/compat.c: (process_actions): remove an incorrect assertion (struct editor_baton): add a CHANGES hash (insert_change): new helper function, similar to locate_change() (add_directory_cb, add_file_cb, add_absent_cb, delete_cb): add code blocks for setting up change records (add_symlink_cb): #if this whole thing out, and add SVN__NOT_IMPLEMENTED() (alter_directory_cb, alter_file_cb): set up change records, noting that the record could have been created by an earlier copy/move. (copy_cb): set up change records. use the FETCH_KIND_FUNC callback to fetch kind information about the source (so we know what Ev1 function to invoke for the destination) (move_cb): set up a change record for the source/deletion side, and the destination/copy side. use the FETCH_KIND_FUNC callback. (drive_ev1_props): helpful utility function to drive a series of single property changes (adds, modifies, deletes) to the Ev1 editor. this helper also manages the special unlock mechanism (apply_change): apply all changes described in a change_node structure to a specified node (drive_changes): if any changes have been made (eg. start_edit_func was called an the root baton opened), then prepare a list of paths for the path_driver, and then run the sucker to make all the necessary edits. we have some special sneakiness to ensure the path_driver doesn't call open_root() a second time. (complete_cb, abort_cb): use drive_changes() rather than drive_root() (start_edit_func): leave a note about early-open of the root (do_unlock): record UNLOCK in the change_node. this will be handled by drive_ev1_props() later. (svn_delta__editor_from_delta): create the new CHANGES hash Modified: subversion/trunk/subversion/libsvn_delta/compat.c Modified: subversion/trunk/subversion/libsvn_delta/compat.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1331652r1=1331651r2=1331652view=diff == --- subversion/trunk/subversion/libsvn_delta/compat.c (original) +++ subversion/trunk/subversion/libsvn_delta/compat.c Sat Apr 28 01:50:35 2012 @@ -434,8 +434,12 @@ process_actions(struct ev2_edit_baton *e if (props || contents) { /* Changes to properties or content should have indicated the revision - it was intending to change. */ + it was intending to change. + + Oop. Not true. The node may be locally-added. */ +#if 0 SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(change-changing)); +#endif if (kind == svn_kind_dir) SVN_ERR(svn_editor_alter_directory(eb-editor, repos_relpath, @@ -1042,10 +1046,38 @@ struct editor_baton const char *repos_root; const char *base_relpath; + /* REPOS_RELPATH - struct change_node * */ + apr_hash_t *changes; + apr_pool_t *edit_pool; }; +/* Insert a new change for RELPATH, or return an existing one. */ +static struct change_node * +insert_change(const char *relpath, + apr_hash_t *changes) +{ + apr_pool_t *result_pool; + struct change_node *change; + + change = apr_hash_get(changes, relpath, APR_HASH_KEY_STRING); + if (change != NULL) + return change; + + result_pool = apr_hash_pool_get(changes); + + /* Return an empty change. Callers will tweak as needed. */ + change = apr_pcalloc(result_pool, sizeof(*change)); + change-changing = SVN_INVALID_REVNUM; + change-deleting = SVN_INVALID_REVNUM; + + apr_hash_set(changes, relpath, APR_HASH_KEY_STRING, change); As the key of the hash, RELPATH should be duplicated into a pool with sufficient lifetime. ... -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1331652 - /subversion/trunk/subversion/libsvn_delta/compat.c
On Mon, Apr 30, 2012 at 10:02 PM, Greg Stein gst...@gmail.com wrote: On Apr 30, 2012 9:38 PM, Hyrum K Wright hyrum.wri...@wandisco.com wrote: ... +/* Insert a new change for RELPATH, or return an existing one. */ +static struct change_node * +insert_change(const char *relpath, + apr_hash_t *changes) +{ + apr_pool_t *result_pool; + struct change_node *change; + + change = apr_hash_get(changes, relpath, APR_HASH_KEY_STRING); + if (change != NULL) + return change; + + result_pool = apr_hash_pool_get(changes); + + /* Return an empty change. Callers will tweak as needed. */ + change = apr_pcalloc(result_pool, sizeof(*change)); + change-changing = SVN_INVALID_REVNUM; + change-deleting = SVN_INVALID_REVNUM; + + apr_hash_set(changes, relpath, APR_HASH_KEY_STRING, change); As the key of the hash, RELPATH should be duplicated into a pool with sufficient lifetime. Good catch! Fixed in r1332508. Thanks. For the same reason, you probably want to s/apr_hash_copy/svn_prop_hash_dup/ over compat.c. The former only duplicates the hash, not the keys or the contents, while the latter will ensure the prophash has the same lifetime as the change it belongs to. -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1331242 - in /subversion/trunk/subversion: include/svn_error.h libsvn_subr/error.c
On Fri, Apr 27, 2012 at 1:32 AM, gst...@apache.org wrote: Author: gstein Date: Fri Apr 27 06:32:40 2012 New Revision: 1331242 URL: http://svn.apache.org/viewvc?rev=1331242view=rev Log: Fix error tracing to record file/line properly. When code said: return svn_error_trace(foo()); It would set the file/line for that location, then call foo() and wrap any resulting error. However, foo() could potentially set its own file/line for an inner error. This revision uses a helper function to reorder execution to: call foo(), then set file/line, then wrap any resulting error with the trace information. Prior symptoms were duplicate file/line. They are resolved properly now. Yay! This has been one of the rather annoying bits of the error tracing system, that I've never quite been able to track down. Thanks for fixing it. -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1329897 - in /subversion/trunk/subversion: bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java include/svn_wc.h libsvn_wc/update_editor.c svn/notify.c tests/
On Tue, Apr 24, 2012 at 1:01 PM, rhuij...@apache.org wrote: Author: rhuijben Date: Tue Apr 24 18:01:23 2012 New Revision: 1329897 URL: http://svn.apache.org/viewvc?rev=1329897view=rev Log: Following up on r1329876, report updated files that had only their lock removed with a specific notify action. * subversion/include/svn_wc.h (svn_wc_notify_action_t): Add value. * subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java (ClientNotifyInformation): Add value. * subversion/tests/cmdline/svntest/wc.py (_re_parse_checkout): Handle B action. * subversion/tests/cmdline/lock_tests.py (update_locked_deleted): Update expected output. * svn/notify.c (notify): Add special action for just unlocking. * libsvn_wc/update_editor.c (close_file): Use special action. Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java subversion/trunk/subversion/include/svn_wc.h subversion/trunk/subversion/libsvn_wc/update_editor.c subversion/trunk/subversion/svn/notify.c subversion/trunk/subversion/tests/cmdline/lock_tests.py subversion/trunk/subversion/tests/cmdline/svntest/wc.py Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java?rev=1329897r1=1329896r2=1329897view=diff == --- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java (original) +++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java Tue Apr 24 18:01:23 2012 @@ -546,6 +546,10 @@ public class ClientNotifyInformation ext /** Operation skipped the path because it was conflicted */ skip_conflicted (skipped conflicted path); This line should end in a comma. + /** The lock on a file was removed during update */ + update_broken_lock (broken lock removed); + + /** * The description of the action. */ Modified: subversion/trunk/subversion/include/svn_wc.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1329897r1=1329896r2=1329897view=diff == --- subversion/trunk/subversion/include/svn_wc.h (original) +++ subversion/trunk/subversion/include/svn_wc.h Tue Apr 24 18:01:23 2012 @@ -1219,7 +1219,11 @@ typedef enum svn_wc_notify_action_t /** The operation skipped the path because it was conflicted. * @since New in 1.7. */ - svn_wc_notify_skip_conflicted + svn_wc_notify_skip_conflicted, + + /** Just the lock on a file was removed during update. + * @since New in 1.8. */ + svn_wc_notify_update_broken_lock } svn_wc_notify_action_t; Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1329897r1=1329896r2=1329897view=diff == --- subversion/trunk/subversion/libsvn_wc/update_editor.c (original) +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Tue Apr 24 18:01:23 2012 @@ -4582,6 +4582,11 @@ close_file(void *file_baton, action = svn_wc_notify_update_add; } } + else + { + SVN_ERR_ASSERT(lock_state == svn_wc_notify_lock_state_unlocked); + action = svn_wc_notify_update_broken_lock; + } /* If the file was moved-away, notify for the moved-away node. * The original location only had its BASE info changed and Modified: subversion/trunk/subversion/svn/notify.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/notify.c?rev=1329897r1=1329896r2=1329897view=diff == --- subversion/trunk/subversion/svn/notify.c (original) +++ subversion/trunk/subversion/svn/notify.c Tue Apr 24 18:01:23 2012 @@ -181,6 +181,10 @@ notify(void *baton, const svn_wc_notify_ if ((err = svn_cmdline_printf(pool, D %s\n, path_local))) goto print_error; break; + case svn_wc_notify_update_broken_lock: + if ((err = svn_cmdline_printf(pool, B %s\n, path_local))) + goto print_error; + break; case svn_wc_notify_update_external_removed: nb-received_some_change = TRUE; Modified: subversion/trunk/subversion/tests/cmdline/lock_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/lock_tests.py?rev=1329897r1=1329896r2=1329897view=diff
Re: svn commit: r1329897 - in /subversion/trunk/subversion: bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java include/svn_wc.h libsvn_wc/update_editor.c svn/notify.c tests/
On Tue, Apr 24, 2012 at 1:07 PM, Hyrum K Wright hyrum.wri...@wandisco.com wrote: On Tue, Apr 24, 2012 at 1:01 PM, rhuij...@apache.org wrote: Author: rhuijben Date: Tue Apr 24 18:01:23 2012 New Revision: 1329897 URL: http://svn.apache.org/viewvc?rev=1329897view=rev Log: Following up on r1329876, report updated files that had only their lock removed with a specific notify action. * subversion/include/svn_wc.h (svn_wc_notify_action_t): Add value. * subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java (ClientNotifyInformation): Add value. * subversion/tests/cmdline/svntest/wc.py (_re_parse_checkout): Handle B action. * subversion/tests/cmdline/lock_tests.py (update_locked_deleted): Update expected output. * svn/notify.c (notify): Add special action for just unlocking. * libsvn_wc/update_editor.c (close_file): Use special action. Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java subversion/trunk/subversion/include/svn_wc.h subversion/trunk/subversion/libsvn_wc/update_editor.c subversion/trunk/subversion/svn/notify.c subversion/trunk/subversion/tests/cmdline/lock_tests.py subversion/trunk/subversion/tests/cmdline/svntest/wc.py Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java?rev=1329897r1=1329896r2=1329897view=diff == --- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java (original) +++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java Tue Apr 24 18:01:23 2012 @@ -546,6 +546,10 @@ public class ClientNotifyInformation ext /** Operation skipped the path because it was conflicted */ skip_conflicted (skipped conflicted path); This line should end in a comma. This was breaking the bots, so I committed the fix in r1329911. -Hyrum + /** The lock on a file was removed during update */ + update_broken_lock (broken lock removed); + + /** * The description of the action. */ Modified: subversion/trunk/subversion/include/svn_wc.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1329897r1=1329896r2=1329897view=diff == --- subversion/trunk/subversion/include/svn_wc.h (original) +++ subversion/trunk/subversion/include/svn_wc.h Tue Apr 24 18:01:23 2012 @@ -1219,7 +1219,11 @@ typedef enum svn_wc_notify_action_t /** The operation skipped the path because it was conflicted. * @since New in 1.7. */ - svn_wc_notify_skip_conflicted + svn_wc_notify_skip_conflicted, + + /** Just the lock on a file was removed during update. + * @since New in 1.8. */ + svn_wc_notify_update_broken_lock } svn_wc_notify_action_t; Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1329897r1=1329896r2=1329897view=diff == --- subversion/trunk/subversion/libsvn_wc/update_editor.c (original) +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Tue Apr 24 18:01:23 2012 @@ -4582,6 +4582,11 @@ close_file(void *file_baton, action = svn_wc_notify_update_add; } } + else + { + SVN_ERR_ASSERT(lock_state == svn_wc_notify_lock_state_unlocked); + action = svn_wc_notify_update_broken_lock; + } /* If the file was moved-away, notify for the moved-away node. * The original location only had its BASE info changed and Modified: subversion/trunk/subversion/svn/notify.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/notify.c?rev=1329897r1=1329896r2=1329897view=diff == --- subversion/trunk/subversion/svn/notify.c (original) +++ subversion/trunk/subversion/svn/notify.c Tue Apr 24 18:01:23 2012 @@ -181,6 +181,10 @@ notify(void *baton, const svn_wc_notify_ if ((err = svn_cmdline_printf(pool, D %s\n, path_local))) goto print_error; break; + case svn_wc_notify_update_broken_lock: + if ((err = svn_cmdline_printf(pool, B %s\n, path_local))) + goto print_error; + break; case svn_wc_notify_update_external_removed: nb-received_some_change = TRUE; Modified: subversion/trunk/subversion/tests/cmdline/lock_tests.py URL: http://svn.apache.org/viewvc
Re: svn commit: r1326307 - in /subversion/trunk: ./ build/ac-macros/ subversion/include/ subversion/include/private/ subversion/libsvn_fs_fs/ subversion/libsvn_subr/ subversion/mod_dav_svn/ subversion
On Sun, Apr 15, 2012 at 6:20 AM, stef...@apache.org wrote: Author: stefan2 Date: Sun Apr 15 11:20:58 2012 New Revision: 1326307 URL: http://svn.apache.org/viewvc?rev=1326307view=rev Log: Merge all changes (-r1298521-1326293) from branches/revprop-cache to trunk and resolve minor conflicts. Added: subversion/trunk/subversion/include/private/svn_named_atomic.h - copied unchanged from r1326293, subversion/branches/revprop-cache/subversion/include/private/svn_named_atomic.h subversion/trunk/subversion/libsvn_subr/svn_named_atomic.c - copied unchanged from r1326293, subversion/branches/revprop-cache/subversion/libsvn_subr/svn_named_atomic.c Minor nit: The svn_ prefix in this filename is redundant. I know we have existing svn_foo.c files in libsvn_subr, but that doesn't mean we need another one. :) -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1325516 - /subversion/trunk/subversion/libsvn_delta/compat.c
On Thu, Apr 12, 2012 at 4:07 PM, hwri...@apache.org wrote: Author: hwright Date: Thu Apr 12 21:07:28 2012 New Revision: 1325516 URL: http://svn.apache.org/viewvc?rev=1325516view=rev Log: Ev2 shims: Make sure we rel-pathify the value provided in the copyfrom_url when fetching the props from the shim callbacks. This should fix the last of the relpath-related Ev2 test failures. That is not to say that the internals of the shims are not a complete relpath/url/abspath mess, but rather that the interfaces with the external world are now sane, and callback consumers know what to expect. I may look at the internals some more, but if anybody else wants to, it won't hurt my feelings. -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1311469 - in /subversion/trunk/subversion: include/svn_config.h libsvn_subr/config.c
On Mon, Apr 9, 2012 at 4:34 PM, stef...@apache.org wrote: Author: stefan2 Date: Mon Apr 9 21:34:21 2012 New Revision: 1311469 URL: http://svn.apache.org/viewvc?rev=1311469view=rev Log: Add special API for reading and writing integer settings (similar to what we already have for bools). * subversion/include/svn_config.h (svn_config_get_int64, svn_config_set_int64): declare new convenience API * subversion/libsvn_subr/config.c (svn_config_get_int64, svn_config_set_int64): implement new API Modified: subversion/trunk/subversion/include/svn_config.h subversion/trunk/subversion/libsvn_subr/config.c Modified: subversion/trunk/subversion/include/svn_config.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_config.h?rev=1311469r1=1311468r2=1311469view=diff == --- subversion/trunk/subversion/include/svn_config.h (original) +++ subversion/trunk/subversion/include/svn_config.h Mon Apr 9 21:34:21 2012 @@ -303,6 +303,32 @@ svn_config_set_bool(svn_config_t *cfg, const char *option, svn_boolean_t value); +/** Like svn_config_get(), but for 64 bit signed integers. + * + * Parses the option as an integer value. Returns an error if the option + * could not be converted to an integer. + * + * @since New in 1.8 + */ +svn_error_t * +svn_config_get_int64(svn_config_t *cfg, + apr_int64_t *valuep, + const char *section, + const char *option, + apr_int64_t default_value); + +/** Like svn_config_set(), but for 64 bit signed integers. + * + * Sets the option to the signed decimal @a value. + * + * @since New in 1.8 + */ +void +svn_config_set_int64(svn_config_t *cfg, + const char *section, + const char *option, + apr_int64_t value); + /** Like svn_config_get(), but only for yes/no/ask values. * * Parse @a option in @a section and set @a *valuep to one of Modified: subversion/trunk/subversion/libsvn_subr/config.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/config.c?rev=1311469r1=1311468r2=1311469view=diff == --- subversion/trunk/subversion/libsvn_subr/config.c (original) +++ subversion/trunk/subversion/libsvn_subr/config.c Mon Apr 9 21:34:21 2012 @@ -697,6 +697,33 @@ svn_config_set_bool(svn_config_t *cfg, } svn_error_t * +svn_config_get_int64(svn_config_t *cfg, + apr_int64_t *valuep, + const char *section, + const char *option, + apr_int64_t default_value) +{ + const char *tmp_value; + svn_config_get(cfg, tmp_value, section, option, NULL); + if (tmp_value) + return svn_cstring_strtoui64(valuep, tmp_value, + APR_INT64_MIN, APR_INT64_MAX, 10); I think you need to include private/svn_dep_compat.h to ensure these values are defined. -Hyrum + + *valuep = default_value; + return SVN_NO_ERROR; +} + +void +svn_config_set_int64(svn_config_t *cfg, + const char *section, + const char *option, + apr_int64_t value) +{ + svn_config_set(cfg, section, option, + apr_psprintf(cfg-pool, % APR_INT64_T_FMT, value)); +} + +svn_error_t * svn_config_get_yes_no_ask(svn_config_t *cfg, const char **valuep, const char *section, const char *option, const char* default_value) -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1298764 - in /subversion/site/publish: index.html news.html
Did you use the 'write-news' target of release.py to generate this template? I thought that it would Do The Right Things, but apparently not... -Hyrum On Fri, Mar 9, 2012 at 3:25 AM, s...@apache.org wrote: Author: stsp Date: Fri Mar 9 09:25:10 2012 New Revision: 1298764 URL: http://svn.apache.org/viewvc?rev=1298764view=rev Log: * publish/news.html, publish/index.html: Fix date of 1.7.4 release news entry. Found by: Walter Klust walter.kl...@elego.de Modified: subversion/site/publish/index.html subversion/site/publish/news.html Modified: subversion/site/publish/index.html URL: http://svn.apache.org/viewvc/subversion/site/publish/index.html?rev=1298764r1=1298763r2=1298764view=diff == --- subversion/site/publish/index.html (original) +++ subversion/site/publish/index.html Fri Mar 9 09:25:10 2012 @@ -65,7 +65,7 @@ !-- In general, we'll keep only the most recent 3 or 4 news items here. -- div class=h3 id=news-20120308 -h32012-02-13 mdash; Apache Subversion 1.7.4 Released +h32012-03-08 mdash; Apache Subversion 1.7.4 Released a class=sectionlink href=#news-20120308 title=Link to this sectionpara;/a /h3 Modified: subversion/site/publish/news.html URL: http://svn.apache.org/viewvc/subversion/site/publish/news.html?rev=1298764r1=1298763r2=1298764view=diff == --- subversion/site/publish/news.html (original) +++ subversion/site/publish/news.html Fri Mar 9 09:25:10 2012 @@ -23,7 +23,7 @@ !-- calendar year if we felt the need to do so. -- div class=h3 id=news-20120308 -h32012-02-13 mdash; Apache Subversion 1.7.4 Released +h32012-03-08 mdash; Apache Subversion 1.7.4 Released a class=sectionlink href=#news-20120308 title=Link to this sectionpara;/a /h3 -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1298548 - /subversion/site/publish/download/download.html
Since much of this content is autogenerated from tools/dist/templates/download.ezt, you should probably update it, too. -Hyrum On Thu, Mar 8, 2012 at 2:02 PM, gst...@apache.org wrote: Author: gstein Date: Thu Mar 8 20:02:24 2012 New Revision: 1298548 URL: http://svn.apache.org/viewvc?rev=1298548view=rev Log: Use an EZT variable to specify the version numbers throughout the file. That way, we only need to update one place. * site/publish/download/download.html: use [version] and [supported] Modified: subversion/site/publish/download/download.html Modified: subversion/site/publish/download/download.html URL: http://svn.apache.org/viewvc/subversion/site/publish/download/download.html?rev=1298548r1=1298547r2=1298548view=diff == --- subversion/site/publish/download/download.html (original) +++ subversion/site/publish/download/download.html Thu Mar 8 20:02:24 2012 @@ -1,8 +1,11 @@ h1Download Source Code/h1 +[define version]1.7.4[end] +[define supported]1.6.17[end] + div class=bigpoint pThe best available version of Apache Subversion - is:nbsp;a href=#recommended-release1.7.4/a/p + is:nbsp;a href=#recommended-release[version]/a/p /div !-- .bigpoint -- pUse the links below to download Apache Subversion from our of our mirrors. @@ -78,7 +81,7 @@ Other mirrors: title=Link to this sectionpara;/a /h3 -p style=font-size: 150%; text-align: center;Subversion 1.7.4/p +p style=font-size: 150%; text-align: center;Subversion [version]/p table class=centered tr thFile/th @@ -86,17 +89,17 @@ Other mirrors: thSignatures/th /tr tr - tda href=[preferred]subversion/subversion-1.7.4.tar.bz2subversion-1.7.4.tar.bz2/a/td + tda href=[preferred]subversion/subversion-[version].tar.bz2subversion-[version].tar.bz2/a/td td class=checksum57a3cd351c1dbe020e7a1952df6cd2674527/td - td[a href=http://www.apache.org/dist/subversion/subversion-1.7.4.tar.bz2.asc;PGP/a]/td + td[a href=http://www.apache.org/dist/subversion/subversion-[version].tar.bz2.asc;PGP/a]/td /trtr - tda href=[preferred]subversion/subversion-1.7.4.tar.gzsubversion-1.7.4.tar.gz/a/td + tda href=[preferred]subversion/subversion-[version].tar.gzsubversion-[version].tar.gz/a/td td class=checksume269ea7e91d8b5df62492d8a0ed69dbf20f430e3/td - td[a href=http://www.apache.org/dist/subversion/subversion-1.7.4.tar.gz.asc;PGP/a]/td + td[a href=http://www.apache.org/dist/subversion/subversion-[version].tar.gz.asc;PGP/a]/td /trtr - tda href=[preferred]subversion/subversion-1.7.4.zipsubversion-1.7.4.zip/a/td + tda href=[preferred]subversion/subversion-[version].zipsubversion-[version].zip/a/td td class=checksum27ebf5fcb3e5e1a4e2c93d6e1c6b4cbcd0741193/td - td[a href=http://www.apache.org/dist/subversion/subversion-1.7.4.zip.asc;PGP/a]/td + td[a href=http://www.apache.org/dist/subversion/subversion-[version].zip.asc;PGP/a]/td /tr /table Since much of this content is autogenerated from tools/dist/templates/download.ezt, you should probably update it, too. ... -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1296604 - in /subversion/trunk/subversion/libsvn_fs_fs: caching.c fs.h fs_fs.c
On Sat, Mar 3, 2012 at 5:31 AM, stef...@apache.org wrote: Author: stefan2 Date: Sat Mar 3 11:31:17 2012 New Revision: 1296604 URL: http://svn.apache.org/viewvc?rev=1296604view=rev Log: Certain operations, e.g. svn ls, will contain timestamp and author information from many different revisions. A list of all projects in the root of the wordpress repository will open, read and close 75.000 revision property files (3 reads for each list entry) This commit implements revprop caching. It will be activated as part of the full-text caching option. Since revprops may be written by other threads or processes, we need to track the revprop changes. A new special file contains a counter that will be increased each time revision properties get rewritten. This counter is internally called revprop generation and will be read upon the first revprop access for given fs_t. Later changes may remain invisible for that fs_t. This behavior is in line with our revprop handling in other parts of FS_FS. If a revprop gets rewritten, the fs_t doing the write will use the new generation from that point on and will thus see all caches up to and including its own. Since the revprop generation becomes part of the cache key, each fs_t will only see revprops from its generation. It may also create new cache entries tagged with that generation, i.e. those would appear to be outdated for newer fs_t. But that will simply cause a benign false negative upon lookup. No fs_t will see data that got replaced before that fs_t was created. How does this potentially interact with revprop packing? -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1295287 - /subversion/trunk/subversion/libsvn_delta/compat.c
On Wed, Feb 29, 2012 at 3:25 PM, hwri...@apache.org wrote: Author: hwright Date: Wed Feb 29 21:25:19 2012 New Revision: 1295287 URL: http://svn.apache.org/viewvc?rev=1295287view=rev Log: Ev2 shims: Improve the order we use to drive the shims by keeping track of the order actions were added, rather than sorting them manually. This improves both performance and correctness, particularly on case-insensitive filesystems. Current number of Ev2 test failures: 0 Yes, you read that correctly. For those keeping score at home, after almost 6 months of work, the the testsuite now completely passes over ra_local with the Ev2 shims enabled. (ra_svn and ra_dav are a separate story...) -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1242791 - /subversion/trunk/CHANGES
If somebody (anybody!) would proof and correct the 1.7.3 section before I roll the tarball, I'd be much obliged. Thanks, -Hyrum On Fri, Feb 10, 2012 at 8:31 AM, hwri...@apache.org wrote: Author: hwright Date: Fri Feb 10 14:31:20 2012 New Revision: 1242791 URL: http://svn.apache.org/viewvc?rev=1242791view=rev Log: * CHANGES (1.7.3): Update for release. Modified: subversion/trunk/CHANGES Modified: subversion/trunk/CHANGES URL: http://svn.apache.org/viewvc/subversion/trunk/CHANGES?rev=1242791r1=1242790r2=1242791view=diff == --- subversion/trunk/CHANGES (original) +++ subversion/trunk/CHANGES Fri Feb 10 14:31:20 2012 @@ -42,7 +42,7 @@ http://svn.apache.org/repos/asf/subversi Version 1.7.3 -(XX Feb 2012, from /branches/1.7.x) +(14 Feb 2012, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.3 General: @@ -77,12 +77,17 @@ http://svn.apache.org/repos/asf/subversi * log some mod_dav_svn errors, rather than ignoring them (r1237720, -9596) * relax requirements for canonicalization in mod_dav_svn (r1236173) * fix a rare source of FSFS corruption (r1240752) + * allow committing the result of some copy operations (issue #4059) + * prevent buffer overflow in base64 decoding (r1242337) Developer-visible changes: * JavaHL: Add missing notify action, fixing an exception (r1221793) * fix swig-py memory leak (r1235264, -296, -302, -736) * fix spurious test suite failure (r1220742, -50) * allow running tests on UNC shares (r1225491) + * allow bindings to see cached passwords in platform-specific providers + * skip 'svnrdump dump' tests over ra_serf (r1242537) + * convert a few ra_serf assertions to errors (r1242607) Version 1.7.2 -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: Ev2: providing checksums of files Re: svn commit: r1241733 - /subversion/trunk/subversion/libsvn_delta/compat.c
On Thu, Feb 9, 2012 at 12:24 PM, Daniel Shahaf danie...@elego.de wrote: hwri...@apache.org wrote on Wed, Feb 08, 2012 at 01:55:55 -: Author: hwright Date: Wed Feb 8 01:55:54 2012 New Revision: 1241733 URL: http://svn.apache.org/viewvc?rev=1241733view=rev Log: Ev2 shims: Make sure that if we are providing content to alter_file(), we are also providing a checksum. * subversion/libsvn_delta/compat.c (path_checksum_args): Remove checksum member. (process_actions): Checksum the content file. (ev2_apply_textdelta): Don't checksum the output stream. Modified: subversion/trunk/subversion/libsvn_delta/compat.c Modified: subversion/trunk/subversion/libsvn_delta/compat.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1241733r1=1241732r2=1241733view=diff == --- subversion/trunk/subversion/libsvn_delta/compat.c (original) +++ subversion/trunk/subversion/libsvn_delta/compat.c Wed Feb 8 01:55:54 2012 @@ -203,7 +203,6 @@ struct path_checksum_args { const char *path; svn_revnum_t base_revision; - svn_checksum_t *checksum; }; static svn_error_t * @@ -340,9 +339,10 @@ process_actions(void *edit_baton, /* We can only set text on files. */ kind = svn_node_file; + SVN_ERR(svn_io_file_checksum2(checksum, pca-path, + svn_checksum_sha1, scratch_pool)); SVN_ERR(svn_stream_open_readonly(contents, pca-path, scratch_pool, scratch_pool)); So, you first open the file and read it through to checksum it, and then open it again to read it through as a stream. That's because right now add_file()/alter_file() require the checksum to be provided up front. Would it make sense to relax that requirement? On the one hand, many receivers don't need to know the checksum until after they've received the whole file (eg, the fs txn process and the pristine store); on the other hand, having the checksum will allow in some cases not transmitting the file over the wire at all, and will allow for error-checking the transmission in other cases. Agreed that the current approach taken by the shim is wasteful, though other attempts were a bit dodgy, and this one Just Works. If there are better ways to get this checksum, let's use 'em. I'm not certain about relaxing the requirement just yet. I'll have to think about the design implications. (I'll also note that we actually *do* have a checksum by this point, only it is the md5 provided by close_file(), and Ev2 uses sha1s exclusively, so we have to recalculate. I suspect this will be a somewhat common issue while we use a mixed shim environment.) -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: Ev2: providing checksums of files Re: svn commit: r1241733 - /subversion/trunk/subversion/libsvn_delta/compat.c
On Thu, Feb 9, 2012 at 1:05 PM, Daniel Shahaf danie...@elego.de wrote: Hyrum K Wright wrote on Thu, Feb 09, 2012 at 12:54:50 -0600: (I'll also note that we actually *do* have a checksum by this point, only it is the md5 provided by close_file(), and Ev2 uses sha1s exclusively, so we have to recalculate. I suspect this will be a Only sha1? It allows neither md5 nor sha256? Why? Convention would be my initial response. It makes much more sense to standardize checksum kinds across the system than to have a mixed environment. Any checksum can help detect corruption, but being able to answer the question is this content the same as that content? is much more difficult in a mixed-checksum environment. sha1 felt like a reasonable choice[1]. I could be overestimating the negatives, though. What reasons do you suppose we *should* allow arbitrary checksum types? -Hyrum [1] Though, given the timeline of Ev2 and the proposed timeline for sha3, I'm really interested in the possibility of using sha3 when standardized, throughout *all* of Subversion. (But that's a completely separate discussion.) -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1241025 - in /subversion/trunk/subversion: include/svn_checksum.h libsvn_subr/checksum.c tests/libsvn_subr/checksum-test.c
On Mon, Feb 6, 2012 at 8:50 AM, Daniel Shahaf danie...@elego.de wrote: hwri...@apache.org wrote on Mon, Feb 06, 2012 at 14:42:45 -: + checksum = svn_checksum_empty_checksum(svn_checksum_md5, pool); + SVN_TEST_ASSERT(svn_checksum_is_empty_checksum(checksum)); + That doesn't test much -- both functions just call svn_md5__empty_string_digest() which returns a static constant. Perhaps actually construct an empty svn_string_t and checksum it? Makes sense: r1241033 -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1239553 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/diff.c svn/cl.h svn/diff-cmd.c svn/log-cmd.c svn/main.c
On Thu, Feb 2, 2012 at 5:35 AM, s...@apache.org wrote: Author: stsp Date: Thu Feb 2 11:35:09 2012 New Revision: 1239553 URL: http://svn.apache.org/viewvc?rev=1239553view=rev Log: Add --no-diff-properties and --patch options to 'svn diff'. The --patch option implies --no-diff-properties and --show-copies-as-adds. Bikeshed: since the fact that we are using diff is implied by the subcommand, would it be reasonable to use a more generic option name, such as '--ignore-props' instead of '--no-diff-properties'. It is shorter firstly, and second it could be reused for other options, such as log, or event commit. I agree about the utility of the feature in general. -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1239617 - in /subversion/trunk/subversion/svn: cl.h diff-cmd.c main.c
On Thu, Feb 2, 2012 at 7:46 AM, s...@apache.org wrote: Author: stsp Date: Thu Feb 2 13:46:11 2012 New Revision: 1239617 URL: http://svn.apache.org/viewvc?rev=1239617view=rev Log: Rename the new --no-diff-properties option to --ignore-properties. This allows the option to be re-used by other subcommands in the future. Looks good. Thanks! -Hyrum
Re: svn commit: r1233566 - in /subversion/trunk/subversion: include/svn_io.h libsvn_subr/stream.c
On Thu, Jan 19, 2012 at 8:40 PM, Daniel Shahaf danie...@elego.de wrote: hwri...@apache.org wrote on Thu, Jan 19, 2012 at 20:56:35 -: Author: hwright Date: Thu Jan 19 20:56:35 2012 New Revision: 1233566 URL: http://svn.apache.org/viewvc?rev=1233566view=rev Log: Add a public wrapper around our spillbuf-backed stream. * subversion/include/svn_io.h (svn_stream_buffered): New. * subversion/libsvn_subr/stream.c (svn_stream_buffered): New. So, with this change, exported files of up to 100kB in size will be processed in-memory, without being written to disk twice. Nice. :-) On the ev2-export branch, yes. I haven't yet made a corresponding change on trunk, and I don't know of we even can with the existing editor implementation there. On the other hand, repos-to-wc copy used a similar paradigm, and that's been improved on trunk, so it's not a complete loss. :) I do wonder if the to disk threshold should be in the public signature, but don't have offhand a use-case justifying that. We could, but I figured callers who needed finer-grain control over the size of the buffer would use the underlying private API which gives them that ability. And as I noted in the code, the choice of 100k was completely arbitrary, the result of a lot of squinting and hand waving. If somebody has better guestimates (Stefan F.?) as to what would be better, feel free to improve upon it. -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1232634 - /subversion/branches/ev2-export/subversion/libsvn_client/export.c
On Tue, Jan 17, 2012 at 11:10 PM, Daniel Shahaf danie...@elego.de wrote: hwri...@apache.org wrote on Tue, Jan 17, 2012 at 23:04:32 -: Author: hwright Date: Tue Jan 17 23:04:32 2012 New Revision: 1232634 URL: http://svn.apache.org/viewvc?rev=1232634view=rev Log: On the ev2-export branch: Replace one hack with another, which allows us to remove the vestigal delta editor from the export functionality. * subversion/libsvn_client/export.c (dir_baton, file_baton, change_file_prop, close_file): Remove. (svn_client_export5): Instead of manually driving the delta editor, manually drive an Ev2 editor. This has the happy consequence of only requiring one function call, instead of three. Modified: subversion/branches/ev2-export/subversion/libsvn_client/export.c Modified: subversion/branches/ev2-export/subversion/libsvn_client/export.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/export.c?rev=1232634r1=1232633r2=1232634view=diff == +++ subversion/branches/ev2-export/subversion/libsvn_client/export.c Tue Jan 17 23:04:32 2012 @@ -671,166 +671,6 @@ struct edit_baton }; static svn_error_t * fetch_props_func(apr_hash_t **props, void *baton, @@ -1138,8 +978,8 @@ svn_client_export5(svn_revnum_t *result_ if (kind == svn_node_file) { apr_hash_t *props; + svn_stream_t *tmp_stream; + const char *tmppath; svn_node_kind_t to_kind; if (svn_path_is_empty(to_path)) @@ -1171,41 +1011,21 @@ svn_client_export5(svn_revnum_t *result_ overwrite directory with non-directory), svn_dirent_local_style(to_path, pool)); + SVN_ERR(svn_stream_open_unique(tmp_stream, tmppath, + svn_dirent_dirname(eb-root_path, pool), + svn_io_file_del_on_pool_cleanup, + pool, pool)); SVN_ERR(svn_ra_get_file(ra_session, , revnum, + tmp_stream, NULL, props, pool)); + SVN_ERR(svn_stream_close(tmp_stream)); + SVN_ERR(svn_stream_open_readonly(tmp_stream, tmppath, pool, pool)); Same question as before. Why the tempfile? Can you avoid it? (Perhaps that requires an svn_stream_copy() call?) The tempfile here is due to the way the svn_ra_get_file() interface works. Note that instead of returning a stream, that API accepts and already open stream and then pushes content to it. In contrast, the Ev2 add_file handler, as well as svn_stream_copy3(), pulls content from the source stream. Given this mismatch, a temporary storage location is needed. It may be possible to utilize the new spillbuffer code to build a stream which can act as a buffer when needed and only spill to disk when the file grows beyond a certain threshold, though I've not explored it. -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1232059 - in /subversion/trunk/contrib/server-side/mod_setlocale: ./ README mod_setlocale.c
On Mon, Jan 16, 2012 at 10:37 AM, ne...@apache.org wrote: Author: neels Date: Mon Jan 16 16:37:17 2012 New Revision: 1232059 URL: http://svn.apache.org/viewvc?rev=1232059view=rev Log: Add mod_setlocale to contrib. * contrib/server-side/mod_setlocale/mod_setlocale.c, * contrib/server-side/mod_setlocale/README: New files. Patch by: danielsh (mod_setlocale.c), me (README file) I am concerned about this (and followup) commits. For the last several years, my understanding is that contrib/ has been deprecated. We don't ship it with the release tarballs. We've even been asking folks to move stuff out, where possible. The Subversion project should not be a hoster of {last,first} resort when it comes to Subversion-related code. While I don't doubt the utility or quality of this code, contrib/ is not the place for it to live. -Hyrum
Re: svn commit: r1232222 - /subversion/trunk/subversion/tests/cmdline/stat_tests.py
On Mon, Jan 16, 2012 at 5:14 PM, rhuij...@apache.org wrote: Author: rhuijben Date: Mon Jan 16 23:14:48 2012 New Revision: 123 URL: http://svn.apache.org/viewvc?rev=123view=rev Log: * subversion/tests/cmdline/stat_tests.py (status_not_present): Remove XFail marker and unrelated comment. I don't see a comment being changed in this commit. (But I like the revision number. :) ) -Hyrum Modified: subversion/trunk/subversion/tests/cmdline/stat_tests.py Modified: subversion/trunk/subversion/tests/cmdline/stat_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/stat_tests.py?rev=123r1=1232221r2=123view=diff == --- subversion/trunk/subversion/tests/cmdline/stat_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/stat_tests.py Mon Jan 16 23:14:48 2012 @@ -1993,7 +1993,6 @@ def modified_modulo_translation(sbox): sbox.simple_revert('iota') svntest.actions.run_and_verify_svn(None, [], [], 'status', wc_dir) -@XFail() def status_not_present(sbox): no status on not-present and excluded nodes -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1230969 - /subversion/trunk/subversion/libsvn_delta/compat.c
On Fri, Jan 13, 2012 at 3:44 AM, phi...@apache.org wrote: Author: philip Date: Fri Jan 13 09:44:41 2012 New Revision: 1230969 URL: http://svn.apache.org/viewvc?rev=1230969view=rev Log: Avoid a compiler warning about shadowing. * subversion/libsvn_delta/compat.c (ev2_add_directory, ev2_open_directory, ev2_open_file): Rename variable. Modified: subversion/trunk/subversion/libsvn_delta/compat.c Modified: subversion/trunk/subversion/libsvn_delta/compat.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1230969r1=1230968r2=1230969view=diff == --- subversion/trunk/subversion/libsvn_delta/compat.c (original) +++ subversion/trunk/subversion/libsvn_delta/compat.c Fri Jan 13 09:44:41 2012 @@ -498,9 +498,9 @@ ev2_add_directory(const char *path, if (pb-copyfrom_path) { - const char *basename = svn_relpath_basename(path, result_pool); + const char *name = svn_relpath_basename(path, result_pool); What is this shadowing? My compiler isn't picking it up... -Hyrum cb-copyfrom_path = apr_pstrcat(result_pool, pb-copyfrom_path, - /, basename, NULL); + /, name, NULL); cb-copyfrom_rev = pb-copyfrom_rev; } } @@ -537,10 +537,10 @@ ev2_open_directory(const char *path, if (pb-copyfrom_path) { /* We are inside a copy. */ - const char *basename = svn_relpath_basename(path, result_pool); + const char *name = svn_relpath_basename(path, result_pool); db-copyfrom_path = apr_pstrcat(result_pool, pb-copyfrom_path, - /, basename, NULL); + /, name, NULL); db-copyfrom_rev = pb-copyfrom_rev; } @@ -650,9 +650,9 @@ ev2_open_file(const char *path, { /* We're in a copied directory, so the delta base is going to be based up on the copy source. */ - const char *basename = svn_relpath_basename(path, result_pool); + const char *name = svn_relpath_basename(path, result_pool); const char *copyfrom_path = apr_pstrcat(result_pool, pb-copyfrom_path, - /, basename, NULL); + /, name, NULL); SVN_ERR(fb-eb-fetch_base_func(fb-delta_base, fb-eb-fetch_base_baton, -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1223035 - /subversion/trunk/subversion/libsvn_delta/xdelta.c
On Sat, Dec 24, 2011 at 6:26 PM, stef...@apache.org wrote: Author: stefan2 Date: Sun Dec 25 00:26:14 2011 New Revision: 1223035 URL: http://svn.apache.org/viewvc?rev=1223035view=rev Log: Store 32 bit offsets in our hash table even under 64 bits (our delta window size much much smaller then 4GB). That reduces the hash table size by 50% from 32to 16KB and makes it easier to fit into the CPU's L1 cache. Perhaps a comment to this effect should be in the code somewhere? I can envision the day where the delta window size changes (or becomes variable) and this could be a large gotcha when that happens. -Hyrum Also, use a proper define instead of casted -1 all over the place. * subversion/libsvn_delta/xdelta.c (NO_POSITION): new define (block, blocks, hash_func, add_block, find_block): replace apr_size_t with apr_uint32_t for offsets within delta windows (init_blocks_table, find_match): use NO_POSITION define instead of -1 Modified: subversion/trunk/subversion/libsvn_delta/xdelta.c Modified: subversion/trunk/subversion/libsvn_delta/xdelta.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/xdelta.c?rev=1223035r1=1223034r2=1223035view=diff == --- subversion/trunk/subversion/libsvn_delta/xdelta.c (original) +++ subversion/trunk/subversion/libsvn_delta/xdelta.c Sun Dec 25 00:26:14 2011 @@ -44,6 +44,10 @@ */ #define MATCH_BLOCKSIZE 64 +/* no / invalid / unused value for positions within the detla windows + */ +#define NO_POSITION ((apr_uint32_t)-1) + /* Feed C_IN into the adler32 checksum and remove C_OUT at the same time. * This function may (and will) only be called for characters that are * MATCH_BLOCKSIZE positions apart. @@ -96,17 +100,17 @@ init_adler32(const char *data) struct block { apr_uint32_t adlersum; - apr_size_t pos; + apr_uint32_t pos; /* NO_POSITION - block is not used */ }; /* A hash table, using open addressing, of the blocks of the source. */ struct blocks { /* The largest valid index of slots. */ - apr_size_t max; + apr_uint32_t max; /* Source buffer that the positions in SLOTS refer to. */ const char* data; - /* The vector of blocks. A pos value of (apr_size_t)-1 represents an unused + /* The vector of blocks. A pos value of NO_POSITION represents an unused slot. */ struct block *slots; }; @@ -114,7 +118,7 @@ struct blocks /* Return a hash value calculated from the adler32 SUM, suitable for use with our hash table. */ -static apr_size_t hash_func(apr_uint32_t sum) +static apr_uint32_t hash_func(apr_uint32_t sum) { /* Since the adl32 checksum have a bad distribution for the 11th to 16th bits when used for our small block size, we add some bits from the @@ -126,12 +130,12 @@ static apr_size_t hash_func(apr_uint32_t data into the table BLOCKS. Ignore true duplicates, i.e. blocks with actually the same content. */ static void -add_block(struct blocks *blocks, apr_uint32_t adlersum, apr_size_t pos) +add_block(struct blocks *blocks, apr_uint32_t adlersum, apr_uint32_t pos) { - apr_size_t h = hash_func(adlersum) blocks-max; + apr_uint32_t h = hash_func(adlersum) blocks-max; /* This will terminate, since we know that we will not fill the table. */ - for (; blocks-slots[h].pos != (apr_size_t)-1; h = (h + 1) blocks-max) + for (; blocks-slots[h].pos != NO_POSITION; h = (h + 1) blocks-max) if (blocks-slots[h].adlersum == adlersum) if (memcmp(blocks-data + blocks-slots[h].pos, blocks-data + pos, MATCH_BLOCKSIZE) == 0) @@ -143,21 +147,21 @@ add_block(struct blocks *blocks, apr_uin /* Find a block in BLOCKS with the checksum ADLERSUM and matching the content at DATA, returning its position in the source data. If there is no such - block, return (apr_size_t)-1. */ -static apr_size_t + block, return NO_POSITION. */ +static apr_uint32_t find_block(const struct blocks *blocks, apr_uint32_t adlersum, const char* data) { - apr_size_t h = hash_func(adlersum) blocks-max; + apr_uint32_t h = hash_func(adlersum) blocks-max; - for (; blocks-slots[h].pos != (apr_size_t)-1; h = (h + 1) blocks-max) + for (; blocks-slots[h].pos != NO_POSITION; h = (h + 1) blocks-max) if (blocks-slots[h].adlersum == adlersum) if (memcmp(blocks-data + blocks-slots[h].pos, data, MATCH_BLOCKSIZE) == 0) return blocks-slots[h].pos; - return (apr_size_t)-1; + return NO_POSITION; } /* Initialize the matches table from DATA of size DATALEN. This goes @@ -187,7 +191,7 @@ init_blocks_table(const char *data, { /* Avoid using an indeterminate value in the lookup. */ blocks-slots[i].adlersum = 0; - blocks-slots[i].pos = (apr_size_t)-1; + blocks-slots[i].pos = NO_POSITION; } /* If there is an odd block
Re: svn commit: r1222521 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
On Thu, Dec 22, 2011 at 6:31 PM, s...@apache.org wrote: Author: stsp Date: Fri Dec 23 00:31:51 2011 New Revision: 1222521 URL: http://svn.apache.org/viewvc?rev=1222521view=rev Log: Turn another wc-db assertion people are reporting into a normal error. * subversion/libsvn_wc/wc_db.c (read_children_info): If a node from an unexpected repository is found, don't assert but print an informative error message. Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1222521r1=1222520r2=1222521view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Dec 23 00:31:51 2011 @@ -7231,7 +7231,7 @@ read_children_info(void *baton, svn_boolean_t have_row; const char *repos_root_url = NULL; const char *repos_uuid = NULL; - apr_int64_t last_repos_id; + apr_int64_t last_repos_id = INVALID_REPOS_ID; apr_hash_t *nodes = rci-nodes; apr_hash_t *conflicts = rci-conflicts; apr_pool_t *result_pool = rci-result_pool; @@ -7299,20 +7299,54 @@ read_children_info(void *baton, } else { + const char *last_repos_root_url = NULL; + const char *last_repos_uuid = NULL; + apr_int64_t repos_id = svn_sqlite__column_int64(stmt, 1); - if (!repos_root_url) + if (!repos_root_url || + (last_repos_id != INVALID_REPOS_ID + repos_id != last_repos_id)) { + last_repos_root_url = repos_root_url; + last_repos_uuid = repos_uuid; err = fetch_repos_info(repos_root_url, repos_uuid, wcroot-sdb, repos_id, result_pool); if (err) SVN_ERR(svn_error_compose_create(err, - svn_sqlite__reset(stmt))); - last_repos_id = repos_id; + svn_sqlite__reset(stmt))); } + if (last_repos_id == INVALID_REPOS_ID) + last_repos_id = repos_id; + /* Assume working copy is all one repos_id so that a single cached value is sufficient. */ - SVN_ERR_ASSERT(repos_id == last_repos_id); + if (repos_id != last_repos_id) + return svn_error_createf( + SVN_ERR_WC_DB_ERROR, NULL, + _(The node '%s' comes from unexpected repository + (ID '% APR_INT64_T_FMT '%s%s, expected ID '% + APR_INT64_T_FMT'%s%s); this could be a + misconfigured file-external which points to a + foreign repository), + child_relpath, repos_id, + repos_root_url + ? apr_psprintf(scratch_pool, , URL '%s', + repos_root_url) + : , + repos_uuid + ? apr_psprintf(scratch_pool, , UUID '%s', + repos_uuid) + : , + last_repos_id, + last_repos_root_url + ? apr_psprintf(scratch_pool, , URL '%s', + last_repos_root_url) + : , + last_repos_uuid + ? apr_psprintf(scratch_pool, , UUID '%s', + last_repos_uuid) + : ); Yikes! I think this wins the prize for longest function call. Perhaps a helper function or at least some temporary variables would be in order? -Hyrum child-repos_root_url = repos_root_url; child-repos_uuid = repos_uuid; } -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1215311 - in /subversion/site/publish/docs/javahl/1.7: ./ org/ org/apache/ org/apache/subversion/ org/apache/subversion/javahl/ org/apache/subversion/javahl/callback/ org/apache/subve
Thanks! Sorry I didn't get the tuits before you. :( -Hyrum On Fri, Dec 16, 2011 at 4:00 PM, markp...@apache.org wrote: Author: markphip Date: Fri Dec 16 22:00:01 2011 New Revision: 1215311 URL: http://svn.apache.org/viewvc?rev=1215311view=rev Log: * site/publish/docs/javahl/1.7, * site/publish/docs/javahl/1.7/* Generated 1.7.2 JavaHL docs. [This commit notification would consist of 57 parts, which exceeds the limit of 50 ones, so it was shortened to the summary.] -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1215311 - in /subversion/site/publish/docs/javahl/1.7: ./ org/ org/apache/ org/apache/subversion/ org/apache/subversion/javahl/ org/apache/subversion/javahl/callback/ org/apache/subve
I can handle them, if you wish. For future reference, 'make doc-api' builds the C docs, 'make doc-javahl' builds the JavaHL docs, and 'make doc' builds them both. -Hyrum On Fri, Dec 16, 2011 at 4:05 PM, Mark Phippard markp...@gmail.com wrote: Would you mind handling the C docs? I do not know how to generate those. On Fri, Dec 16, 2011 at 5:03 PM, Hyrum K Wright hyrum.wri...@wandisco.com wrote: Thanks! Sorry I didn't get the tuits before you. :( -Hyrum On Fri, Dec 16, 2011 at 4:00 PM, markp...@apache.org wrote: Author: markphip Date: Fri Dec 16 22:00:01 2011 New Revision: 1215311 URL: http://svn.apache.org/viewvc?rev=1215311view=rev Log: * site/publish/docs/javahl/1.7, * site/publish/docs/javahl/1.7/* Generated 1.7.2 JavaHL docs. [This commit notification would consist of 57 parts, which exceeds the limit of 50 ones, so it was shortened to the summary.] -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/ -- Thanks Mark Phippard http://markphip.blogspot.com/ -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1211908 - /subversion/branches/1.7.x/STATUS
Did you mean to remove philip's votes? -Hyrum On Thu, Dec 8, 2011 at 8:26 AM, rhuij...@apache.org wrote: Author: rhuijben Date: Thu Dec 8 14:26:56 2011 New Revision: 1211908 URL: http://svn.apache.org/viewvc?rev=1211908view=rev Log: * STATUS: Fix text. Modified: subversion/branches/1.7.x/STATUS Modified: subversion/branches/1.7.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1211908r1=1211907r2=1211908view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Thu Dec 8 14:26:56 2011 @@ -86,7 +86,7 @@ Candidate changes: Justification: Server asserts after being upgraded. Votes: - +1: danielsh, philip + +1: danielsh * r1210147 Fix the 'svn log --diff' code so that it correctly shows a diff of a @@ -100,9 +100,9 @@ Candidate changes: * r1211483 Don't segfault on 'svn mkdir svn://localhost' Justification: - Though shall not segfault. + Thou shall not segfault. Votes: - +1: rhuijben, philip + +1: rhuijben * r1211859, r1211885 Fix issue 4074, SEGV on svn rm ROOT_URL -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1205287 - in /subversion/trunk/subversion/libsvn_wc: status.c update_editor.c util.c wc.h
On Wed, Nov 23, 2011 at 2:36 AM, Bert Huijben b...@qqmail.nl wrote: -Original Message- From: hwri...@apache.org [mailto:hwri...@apache.org] Sent: woensdag 23 november 2011 5:54 To: commits@subversion.apache.org Subject: svn commit: r1205287 - in /subversion/trunk/subversion/libsvn_wc: status.c update_editor.c util.c wc.h Author: hwright Date: Wed Nov 23 04:53:47 2011 New Revision: 1205287 URL: http://svn.apache.org/viewvc?rev=1205287view=rev Log: Generalize the prop fetching shim handler in libsvn_wc, and use it with the status editor. This doesn't fix any tests, but does handle a few segfaults. * subversion/libsvn_wc/util.c (svn_wc__fetch_kind_func, svn_wc__fetch_props_func): New. * subversion/libsvn_wc/wc.h (svn_wc__shim_fetch_baton_t, svn_wc__fetch_kind_func, svn_wc__fetch_props_func): New. * subversion/libsvn_wc/update_editor.c (fetch_baton, fetch_props_func, fetch_kind_func): Remove. (make_editor): Update references. * subversion/libsvn_wc/status.c (svn_wc_get_status_editor5): Create a baton, and use the proper handlers for the shims. Modified: subversion/trunk/subversion/libsvn_wc/status.c subversion/trunk/subversion/libsvn_wc/update_editor.c subversion/trunk/subversion/libsvn_wc/util.c subversion/trunk/subversion/libsvn_wc/wc.h Modified: subversion/trunk/subversion/libsvn_wc/status.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/stat us.c?rev=1205287r1=1205286r2=1205287view=diff == --- subversion/trunk/subversion/libsvn_wc/status.c (original) +++ subversion/trunk/subversion/libsvn_wc/status.c Wed Nov 23 04:53:47 2011 @@ -2455,6 +2455,7 @@ svn_wc_get_status_editor5(const svn_delt struct edit_baton *eb; svn_delta_editor_t *tree_editor = svn_delta_default_editor(result_pool); void *inner_baton; + struct svn_wc__shim_fetch_baton_t *sfb; const svn_delta_editor_t *inner_editor; svn_delta_shim_callbacks_t *shim_callbacks = svn_delta_shim_callbacks_default(result_pool); @@ -2545,6 +2546,15 @@ svn_wc_get_status_editor5(const svn_delt if (set_locks_baton) *set_locks_baton = eb; + sfb = apr_palloc(result_pool, sizeof(*sfb)); + sfb-db = wc_ctx-db; + sfb-base_abspath = eb-target_abspath; + + shim_callbacks-fetch_kind_func = svn_wc__fetch_kind_func; + shim_callbacks-fetch_kind_baton = sfb; + shim_callbacks-fetch_props_func = svn_wc__fetch_props_func; + shim_callbacks-fetch_props_baton = sfb; + SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton, shim_callbacks, result_pool, scratch_pool)); Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upd ate_editor.c?rev=1205287r1=1205286r2=1205287view=diff == --- subversion/trunk/subversion/libsvn_wc/update_editor.c (original) +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Wed Nov 23 04:53:47 2011 @@ -4719,55 +4719,6 @@ close_edit(void *edit_baton, /*** Returning editors. ***/ -struct fetch_baton -{ - svn_wc__db_t *db; - const char *target_abspath; -}; - -static svn_error_t * -fetch_props_func(apr_hash_t **props, - void *baton, - const char *path, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool) -{ - struct fetch_baton *fpb = baton; - const char *local_abspath = svn_dirent_join(fpb-target_abspath, path, - scratch_pool); - svn_error_t *err; - - err = svn_wc__db_read_props(props, fpb-db, local_abspath, - result_pool, scratch_pool); - - /* If the path doesn't exist, just return an empty set of props. */ - if (err err-apr_err == SVN_ERR_WC_PATH_NOT_FOUND) - { - svn_error_clear(err); - *props = apr_hash_make(result_pool); - } - else if (err) - return svn_error_trace(err); - - return SVN_NO_ERROR; -} - -static svn_error_t * -fetch_kind_func(svn_kind_t *kind, - void *baton, - const char *path, - apr_pool_t *scratch_pool) -{ - struct fetch_baton *fpb = baton; - const char *local_abspath = svn_dirent_join(fpb-target_abspath, path, - scratch_pool); - - SVN_ERR(svn_wc__db_read_kind(kind, fpb-db, local_abspath, FALSE, - scratch_pool)); - - return SVN_NO_ERROR; -} - /* Helper for the three public editor-supplying functions. */ static svn_error_t * make_editor(svn_revnum_t *target_revision, @@ -4805,7 +4756,7 @@ make_editor(svn_revnum_t *target_revisio svn_delta_editor_t
Re: svn commit: r1202338 - /subversion/trunk/subversion/libsvn_client/merge.c
On Tue, Nov 15, 2011 at 9:59 AM, julianf...@apache.org wrote: Author: julianfoad Date: Tue Nov 15 17:59:03 2011 New Revision: 1202338 URL: http://svn.apache.org/viewvc?rev=1202338view=rev Log: * subversion/libsvn_client/merge.c (merge_cousins_and_supplement_mergeinfo, merge_locked): Don't allocate a structure in the pool, as it's only needed locally. Modified: subversion/trunk/subversion/libsvn_client/merge.c Modified: subversion/trunk/subversion/libsvn_client/merge.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1202338r1=1202337r2=1202338view=diff == --- subversion/trunk/subversion/libsvn_client/merge.c (original) +++ subversion/trunk/subversion/libsvn_client/merge.c Tue Nov 15 17:59:03 2011 @@ -9075,16 +9075,11 @@ merge_cousins_and_supplement_mergeinfo(c point-to-point merge... */ if (! record_only) { - merge_source_t *faux_source; + merge_source_t faux_source = { URL1, rev1, URL2, rev2 }; apr_array_header_t *faux_sources = apr_array_make(scratch_pool, 1, sizeof(merge_source_t *)); modified_subtrees = apr_hash_make(scratch_pool); - faux_source = apr_pcalloc(scratch_pool, sizeof(*faux_source)); - faux_source-url1 = URL1; - faux_source-url2 = URL2; - faux_source-rev1 = rev1; - faux_source-rev2 = rev2; - APR_ARRAY_PUSH(faux_sources, merge_source_t *) = faux_source; + APR_ARRAY_PUSH(faux_sources, merge_source_t *) = faux_source; SVN_ERR(do_merge(modified_subtrees, NULL, faux_sources, target_abspath, FALSE, TRUE, same_repos, ignore_ancestry, force, dry_run, FALSE, NULL, TRUE, @@ -9292,7 +9287,6 @@ merge_locked(const char *source1, svn_revnum_t youngest_rev = SVN_INVALID_REVNUM; svn_ra_session_t *ra_session1, *ra_session2; apr_array_header_t *merge_sources; - merge_source_t *merge_source; svn_error_t *err; svn_boolean_t use_sleep = FALSE; const char *yc_path = NULL; @@ -9494,13 +9488,9 @@ merge_locked(const char *source1, else { /* Build a single-item merge_source_t array. */ + merge_source_t merge_source = { URL1, rev1, URL2, rev2 }; merge_sources = apr_array_make(scratch_pool, 1, sizeof(merge_source_t *)); - merge_source = apr_pcalloc(scratch_pool, sizeof(*merge_source)); - merge_source-url1 = URL1; - merge_source-url2 = URL2; - merge_source-rev1 = rev1; - merge_source-rev2 = rev2; - APR_ARRAY_PUSH(merge_sources, merge_source_t *) = merge_source; + APR_ARRAY_PUSH(merge_sources, merge_source_t *) = merge_source; } This makes me a little nervous. I don't know what the compiler guarantees are about something allocated on the stack in a sub-block within a function, but the above use just looks wrong. As soon as the variable goes out of scope, the compiler may choose to put something else on the stack in its place, which in this case would lead to memory problems. Perhaps the solution is to move the variable declaration back to the top of the file. I haven't checked the context to see if this is a problem in the other hunk in this change. -Hyrum /* Close our temporary RA sessions. */ -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1189725 - in /subversion/branches/1.7.x: ./ subversion/bindings/javahl/native/ subversion/include/private/ subversion/libsvn_fs_fs/ subversion/libsvn_subr/ subversion/tests/cmdline/
On Thu, Oct 27, 2011 at 7:51 AM, danie...@apache.org wrote: Author: danielsh Date: Thu Oct 27 12:51:08 2011 New Revision: 1189725 URL: http://svn.apache.org/viewvc?rev=1189725view=rev Log: Merge the r1189190 group from trunk: * r1189190, r1189395 Restore backwards compatibility of 'svn status -u' in the javahl api to allow detecting deletes and adds. Justification: Without this patch only the text status is visible and restructuring changes aren't available. Votes: +1: markphip, rhuijben Modified: subversion/branches/1.7.x/ (props changed) subversion/branches/1.7.x/CHANGES (props changed) subversion/branches/1.7.x/STATUS subversion/branches/1.7.x/subversion/bindings/javahl/native/CreateJ.cpp subversion/branches/1.7.x/subversion/include/private/svn_adler32.h (props changed) subversion/branches/1.7.x/subversion/include/private/svn_string_private.h (props changed) subversion/branches/1.7.x/subversion/include/private/svn_temp_serializer.h (props changed) subversion/branches/1.7.x/subversion/libsvn_fs_fs/temp_serializer.c (props changed) subversion/branches/1.7.x/subversion/libsvn_fs_fs/temp_serializer.h (props changed) subversion/branches/1.7.x/subversion/libsvn_subr/adler32.c (props changed) subversion/branches/1.7.x/subversion/libsvn_subr/hash.c (props changed) subversion/branches/1.7.x/subversion/libsvn_subr/svn_temp_serializer.c (props changed) subversion/branches/1.7.x/subversion/tests/cmdline/basic_tests.py (props changed) Why all the extraneous mergeinfo modifications? -Hyrum ... -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1189103 - /subversion/trunk/subversion/libsvn_subr/mergeinfo.c
On Wed, Oct 26, 2011 at 5:07 AM, julianf...@apache.org wrote: Author: julianfoad Date: Wed Oct 26 10:07:01 2011 New Revision: 1189103 URL: http://svn.apache.org/viewvc?rev=1189103view=rev Log: * subversion/libsvn_subr/mergeinfo.c (svn_mergeinfo_to_string): Simplify by eliminating special-casing of N=0. While I appreciate the need to have concise code, it wouldn't surprise me if the special case was in there for performance reasons. If the no-mergeinfo case is very common, avoiding superfluous calls to mergeinfo_to_string() and svn_stringbuf__morph_into_string() could have quite an impact. I haven't looked at the logs, but it feels like just the sort of thing that Stefan2 would do. :) -Hyrum Modified: subversion/trunk/subversion/libsvn_subr/mergeinfo.c Modified: subversion/trunk/subversion/libsvn_subr/mergeinfo.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/mergeinfo.c?rev=1189103r1=1189102r2=1189103view=diff == --- subversion/trunk/subversion/libsvn_subr/mergeinfo.c (original) +++ subversion/trunk/subversion/libsvn_subr/mergeinfo.c Wed Oct 26 10:07:01 2011 @@ -1923,16 +1923,10 @@ svn_error_t * svn_mergeinfo_to_string(svn_string_t **output, svn_mergeinfo_t input, apr_pool_t *pool) { - if (apr_hash_count(input) 0) -{ - svn_stringbuf_t *mergeinfo_buf; - SVN_ERR(mergeinfo_to_stringbuf(mergeinfo_buf, input, NULL, pool)); - *output = svn_stringbuf__morph_into_string(mergeinfo_buf); -} - else -{ - *output = svn_string_create(, pool); -} + svn_stringbuf_t *mergeinfo_buf; + + SVN_ERR(mergeinfo_to_stringbuf(mergeinfo_buf, input, NULL, pool)); + *output = svn_stringbuf__morph_into_string(mergeinfo_buf); return SVN_NO_ERROR; } -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1188256 - in /subversion/trunk/subversion: include/ libsvn_client/ libsvn_delta/ libsvn_ra_neon/ libsvn_ra_serf/ libsvn_ra_svn/ libsvn_repos/ libsvn_wc/ svnrdump/ svnsync/
On Mon, Oct 24, 2011 at 1:13 PM, Daniel Shahaf d...@daniel.shahaf.name wrote: hwri...@apache.org wrote on Mon, Oct 24, 2011 at 17:48:07 -: Author: hwright Date: Mon Oct 24 17:48:06 2011 New Revision: 1188256 URL: http://svn.apache.org/viewvc?rev=1188256view=rev Log: Create a struct to hold the ever-growing collection of Ev2 shim callbacks. * subversion/include/svn_delta.h (svn_delta_shim_callbacks_t, svn_delta_shim_callbacks_default): New. (svn_editor__insert_shims): Use the struct in place of individual params. svn_delta_shim_callbacks_dup()? I really hope this code never sees the light of a release. We can add that function if/when we need it. -Hyrum * subversion/libsvn_ra_svn/editorp.c, subversion/libsvn_ra_neon/commit.c, subversion/svnsync/main.c, subversion/svnrdump/dump_editor.c, subversion/libsvn_wc/diff_editor.c, subversion/libsvn_wc/update_editor.c, subversion/libsvn_wc/status.c, subversion/libsvn_client/repos_diff.c, subversion/libsvn_client/mergeinfo.c, subversion/libsvn_client/export.c, subversion/libsvn_ra_serf/commit.c, subversion/libsvn_repos/commit.c, subversion/libsvn_repos/dump.c: Use the new struct and update callers to the shim API. * subversion/libsvn_delta/compat.c (svn_delta_shim_callbacks_default): New. (svn_editor__insert_shims): Use the new datatype. -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1188256 - in /subversion/trunk/subversion: include/ libsvn_client/ libsvn_delta/ libsvn_ra_neon/ libsvn_ra_serf/ libsvn_ra_svn/ libsvn_repos/ libsvn_wc/ svnrdump/ svnsync/
On Mon, Oct 24, 2011 at 2:11 PM, Daniel Shahaf d...@daniel.shahaf.name wrote: Hyrum K Wright wrote on Mon, Oct 24, 2011 at 14:01:20 -0500: On Mon, Oct 24, 2011 at 1:13 PM, Daniel Shahaf d...@daniel.shahaf.name wrote: hwri...@apache.org wrote on Mon, Oct 24, 2011 at 17:48:07 -: Author: hwright Date: Mon Oct 24 17:48:06 2011 New Revision: 1188256 URL: http://svn.apache.org/viewvc?rev=1188256view=rev Log: Create a struct to hold the ever-growing collection of Ev2 shim callbacks. * subversion/include/svn_delta.h (svn_delta_shim_callbacks_t, svn_delta_shim_callbacks_default): New. (svn_editor__insert_shims): Use the struct in place of individual params. svn_delta_shim_callbacks_dup()? I really hope this code never sees the light of a release. We can add that function if/when we need it. Then put it in include/private/ ? gen-make.py complains loudly if a public header depends on a private one. -Hyrum * subversion/libsvn_ra_svn/editorp.c, subversion/libsvn_ra_neon/commit.c, subversion/svnsync/main.c, subversion/svnrdump/dump_editor.c, subversion/libsvn_wc/diff_editor.c, subversion/libsvn_wc/update_editor.c, subversion/libsvn_wc/status.c, subversion/libsvn_client/repos_diff.c, subversion/libsvn_client/mergeinfo.c, subversion/libsvn_client/export.c, subversion/libsvn_ra_serf/commit.c, subversion/libsvn_repos/commit.c, subversion/libsvn_repos/dump.c: Use the new struct and update callers to the shim API. * subversion/libsvn_delta/compat.c (svn_delta_shim_callbacks_default): New. (svn_editor__insert_shims): Use the new datatype. -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/ -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1188256 - in /subversion/trunk/subversion: include/ libsvn_client/ libsvn_delta/ libsvn_ra_neon/ libsvn_ra_serf/ libsvn_ra_svn/ libsvn_repos/ libsvn_wc/ svnrdump/ svnsync/
On Mon, Oct 24, 2011 at 3:13 PM, Daniel Shahaf d...@daniel.shahaf.name wrote: Hyrum K Wright wrote on Mon, Oct 24, 2011 at 15:09:52 -0500: On Mon, Oct 24, 2011 at 2:11 PM, Daniel Shahaf d...@daniel.shahaf.name wrote: Hyrum K Wright wrote on Mon, Oct 24, 2011 at 14:01:20 -0500: On Mon, Oct 24, 2011 at 1:13 PM, Daniel Shahaf d...@daniel.shahaf.name wrote: hwri...@apache.org wrote on Mon, Oct 24, 2011 at 17:48:07 -: Author: hwright Date: Mon Oct 24 17:48:06 2011 New Revision: 1188256 URL: http://svn.apache.org/viewvc?rev=1188256view=rev Log: Create a struct to hold the ever-growing collection of Ev2 shim callbacks. * subversion/include/svn_delta.h (svn_delta_shim_callbacks_t, svn_delta_shim_callbacks_default): New. (svn_editor__insert_shims): Use the struct in place of individual params. svn_delta_shim_callbacks_dup()? I really hope this code never sees the light of a release. We can add that function if/when we need it. Then put it in include/private/ ? gen-make.py complains loudly if a public header depends on a private one. Then move svn_editor__insert_shims() to a private header too...? Does it need to be public? Unknown. This is all still very much work-in-progress. (To which you are of course welcome to contribute!) -Hyrum -Hyrum * subversion/libsvn_ra_svn/editorp.c, subversion/libsvn_ra_neon/commit.c, subversion/svnsync/main.c, subversion/svnrdump/dump_editor.c, subversion/libsvn_wc/diff_editor.c, subversion/libsvn_wc/update_editor.c, subversion/libsvn_wc/status.c, subversion/libsvn_client/repos_diff.c, subversion/libsvn_client/mergeinfo.c, subversion/libsvn_client/export.c, subversion/libsvn_ra_serf/commit.c, subversion/libsvn_repos/commit.c, subversion/libsvn_repos/dump.c: Use the new struct and update callers to the shim API. * subversion/libsvn_delta/compat.c (svn_delta_shim_callbacks_default): New. (svn_editor__insert_shims): Use the new datatype. -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/ -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/ -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1188357 - /subversion/trunk/subversion/libsvn_delta/compat.c
On Mon, Oct 24, 2011 at 3:28 PM, C. Michael Pilato cmpil...@collab.net wrote: On 10/24/2011 04:24 PM, hwri...@apache.org wrote: Author: hwright Date: Mon Oct 24 20:24:32 2011 New Revision: 1188357 [...] Modified: subversion/trunk/subversion/libsvn_delta/compat.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1188357r1=1188356r2=1188357view=diff == --- subversion/trunk/subversion/libsvn_delta/compat.c (original) +++ subversion/trunk/subversion/libsvn_delta/compat.c Mon Oct 24 20:24:32 2011 [...] @@ -753,6 +754,13 @@ add_directory_cb(void *baton, { struct editor_baton *eb = baton; + if (!eb-root_opened) + { + SVN_ERR(eb-deditor-open_root(eb-dedit_baton, SVN_INVALID_REVNUM, + eb-edit_pool, eb-root.baton)); + eb-root_opened = TRUE; + } + The sheer amount of repeated blocks of code in this commit pains me. How about an ensure_opened_root() helper that does this work? I could never cause you...grief. Consider this commit replaced! (r1188375) -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1186791 - /subversion/branches/1.7.x/STATUS
On Thu, Oct 20, 2011 at 8:18 AM, i...@apache.org wrote: Author: ivan Date: Thu Oct 20 13:18:02 2011 New Revision: 1186791 URL: http://svn.apache.org/viewvc?rev=1186791view=rev Log: * STATUS: Cast a -0 vote for the r1185746 change. Modified: subversion/branches/1.7.x/STATUS Modified: subversion/branches/1.7.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1186791r1=1186790r2=1186791view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Thu Oct 20 13:18:02 2011 @@ -28,6 +28,8 @@ Candidate changes: Fix up some erroneous Could not frob some targets because... warnings. Votes: +1: stsp, rhuijben + -0: ivan (breaking ABI even for private function is not good thing for + patch release) I don't understand how this is breaking ABI. The only function signature that changes in r1185746 is this: [[[ Index: subversion/svn/cl.h === --- subversion/svn/cl.h (revision 1185745) +++ subversion/svn/cl.h (revision 1185746) @@ -294,15 +294,14 @@ * invoked on an unversioned, nonexistent, or otherwise innocuously * errorful resource. Meant to be wrapped with SVN_ERR(). * - * If ERR is null, return SVN_NO_ERROR, setting *SUCCESS to TRUE - * if SUCCESS is not NULL. + * If ERR is null, return SVN_NO_ERROR. * * Else if ERR-apr_err is one of the error codes supplied in varargs, * then handle ERR as a warning (unless QUIET is true), clear ERR, and - * return SVN_NO_ERROR, setting *SUCCESS to FALSE if SUCCESS is not - * NULL. + * return SVN_NO_ERROR, and push the value of ERR-apr_err into the + * ERRORS_SEEN array, if ERRORS_SEEN is not NULL. * - * Else return ERR, setting *SUCCESS to FALSE if SUCCESS is not NULL. + * Else return ERR. * * Typically, error codes like SVN_ERR_UNVERSIONED_RESOURCE, * SVN_ERR_ENTRY_NOT_FOUND, etc, are supplied in varargs. Don't @@ -310,7 +309,7 @@ */ svn_error_t * svn_cl__try(svn_error_t *err, -svn_boolean_t *success, +apr_array_header_t *errors_seen, svn_boolean_t quiet, ...); ]]] That's a binary-private function, completely within the command line client. It doesn't cross any library boundaries. We make these types of changes frequently in patch releases, which makes me a little confused as to the reasoning behind your -0. Full disclosure: although the code is a bit too verbose for my liking, I was going to +1 the change before your -0 came in. :) -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1186290 - /subversion/branches/moves-scan-log/
On Wed, Oct 19, 2011 at 11:03 AM, s...@apache.org wrote: Author: stsp Date: Wed Oct 19 16:03:11 2011 New Revision: 1186290 URL: http://svn.apache.org/viewvc?rev=1186290view=rev Log: Add a branch to experiment with heuristics for detecting server-side moves on the client side by scanning the revision log (i.e. svn log -v output). Not sure if this will get anywhere yet. BRANCH-README? -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1185894 - /subversion/branches/1.7.x/STATUS
On Tue, Oct 18, 2011 at 4:51 PM, rhuij...@apache.org wrote: Author: rhuijben Date: Tue Oct 18 21:51:42 2011 New Revision: 1185894 URL: http://svn.apache.org/viewvc?rev=1185894view=rev Log: * STATUS: Nominate r1185886 group for 1.7.1 Modified: subversion/branches/1.7.x/STATUS Modified: subversion/branches/1.7.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1185894r1=1185893r2=1185894view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Tue Oct 18 21:51:42 2011 @@ -155,6 +155,17 @@ Candidate changes: Votes: +1: stsp + * r1185738, r1185763, r1185768, r1185886 + Add support for upgrading absent nodes to the wonderfull wc-ng world. + Justification: + This should have been part of 1.7.0. Without this patch it is impossible + to upgrade working copies with server excluded/absent directories. + Notes: + r1185738, r1185763, r1185768: adds a test for this problem. + r1185886: fixes this issue and cleans up whitespace in the test. + Votes: + +1: rhuijben What's the failure mode without this patch? Upgrade fails? Working copy corruption? Upgrade succeeds then anything else fails? Dead kittens? -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1182904 - /subversion/trunk/subversion/libsvn_wc/entries.c
On Thu, Oct 13, 2011 at 10:25 AM, s...@apache.org wrote: Author: stsp Date: Thu Oct 13 15:25:16 2011 New Revision: 1182904 URL: http://svn.apache.org/viewvc?rev=1182904view=rev Log: * subversion/libsvn_wc/entries.c (write_entry): If a bad base MD5 checksum is found, return a proper error message instead of asserting. Since 1.7.0 was released an overwhelming amount of TortoiseSVN users keep reporting this assertion on users@. TortoiseSVN asks users to send reports about assertions, but doesn't do so for normal errors. So the implication here is that we're just trying to hide this error from ourselves? -Hyrum ... -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1182566 - /subversion/branches/tree-read-api/subversion/libsvn_client/tree.c
On Wed, Oct 12, 2011 at 3:11 PM, julianf...@apache.org wrote: Author: julianfoad Date: Wed Oct 12 20:11:28 2011 New Revision: 1182566 URL: http://svn.apache.org/viewvc?rev=1182566view=rev Log: On the 'tree-read-api' branch: I would very much appreciate a BRANCH-README on this branch. Thanks, -Hyrum * subversion/libsvn_client/tree.c (wc_tree_get_dir): Allocate results in the result pool not the scratch pool. Found by: gstein Modified: subversion/branches/tree-read-api/subversion/libsvn_client/tree.c Modified: subversion/branches/tree-read-api/subversion/libsvn_client/tree.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_client/tree.c?rev=1182566r1=1182565r2=1182566view=diff == --- subversion/branches/tree-read-api/subversion/libsvn_client/tree.c (original) +++ subversion/branches/tree-read-api/subversion/libsvn_client/tree.c Wed Oct 12 20:11:28 2011 @@ -332,7 +332,7 @@ wc_tree_get_dir(svn_client_tree_t *tree, for (i = 0; i children-nelts; i++) { const char *child_abspath = APR_ARRAY_IDX(children, i, const char *); - const char *name = svn_dirent_basename(child_abspath, scratch_pool); + const char *name = svn_dirent_basename(child_abspath, result_pool); apr_hash_set(*dirents, name, APR_HASH_KEY_STRING, name); } -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1181166 - in /subversion/branches/1.5.x: ./ STATUS subversion/mod_dav_svn/repos.c
On Mon, Oct 10, 2011 at 7:20 PM, Daniel Shahaf d...@daniel.shahaf.name wrote: hwri...@apache.org wrote on Mon, Oct 10, 2011 at 19:39:30 -: Author: hwright Date: Mon Oct 10 19:39:30 2011 New Revision: 1181166 URL: http://svn.apache.org/viewvc?rev=1181166view=rev Log: * STATUS: Note the deletion rev of a few old branches, in case folks wish to resurrect them some day. Modified: subversion/branches/1.5.x/ (props changed) subversion/branches/1.5.x/STATUS subversion/branches/1.5.x/subversion/mod_dav_svn/repos.c Propchange: subversion/branches/1.5.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Oct 10 19:39:30 2011 @@ -35,4 +35,4 @@ /subversion/branches/reintegrate-improvements:873853-874164 /subversion/branches/svn-mergeinfo-enhancements:870196 /subversion/branches/svnpatch-diff:871905 -/subversion/trunk:1041438 +/subversion/trunk:1041438,1098608 This mergeinfo change has not been reverted. Done in r1181768 (I think). If something else is amiss there, I'm out of my league attempting to fix it. -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1181862 - in /subversion/trunk/subversion/libsvn_subr: kitchensink.c svn_types.c
:'( I understand the desire to improve the organization of our code, but a little piece of me is sad that we no longer have kitchensink.c. -Hyrum On Tue, Oct 11, 2011 at 1:04 PM, julianf...@apache.org wrote: Author: julianfoad Date: Tue Oct 11 16:04:07 2011 New Revision: 1181862 URL: http://svn.apache.org/viewvc?rev=1181862view=rev Log: Rename 'kitchensink.c' to 'svn_types.c' to focus its purpose on holding implementations of functions defined in svn_types.h. * subversion/libsvn_subr/kitchensink.c Rename to ... * subversion/libsvn_subr/svn_types.c ... this. Added: subversion/trunk/subversion/libsvn_subr/svn_types.c - copied, changed from r1181800, subversion/trunk/subversion/libsvn_subr/kitchensink.c Removed: subversion/trunk/subversion/libsvn_subr/kitchensink.c Copied: subversion/trunk/subversion/libsvn_subr/svn_types.c (from r1181800, subversion/trunk/subversion/libsvn_subr/kitchensink.c) URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/svn_types.c?p2=subversion/trunk/subversion/libsvn_subr/svn_types.cp1=subversion/trunk/subversion/libsvn_subr/kitchensink.cr1=1181800r2=1181862rev=1181862view=diff == --- subversion/trunk/subversion/libsvn_subr/kitchensink.c (original) +++ subversion/trunk/subversion/libsvn_subr/svn_types.c Tue Oct 11 16:04:07 2011 @@ -1,5 +1,5 @@ /* - * kitchensink.c : When no place else seems to fit... + * svn_types.c : Implementation for Subversion's data types. * * * Licensed to the Apache Software Foundation (ASF) under one -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1182125 - /subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c
This should fix the recent build breakage which came as a result of merging the mutex branch back to trunk. However, there still remain lots of warnings and brokenness in this code that somebody more familiar with it than I should take a look at. -Hyrum On Tue, Oct 11, 2011 at 5:14 PM, hwri...@apache.org wrote: Author: hwright Date: Tue Oct 11 22:14:19 2011 New Revision: 1182125 URL: http://svn.apache.org/viewvc?rev=1182125view=rev Log: * subversion/libsvn_ra_svn/cyrus_auth.c (sasl_mutex_unlock_cb): Provide an error to base the chain upon when unlocking a mutex. Modified: subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c Modified: subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c?rev=1182125r1=1182124r2=1182125view=diff == --- subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c (original) +++ subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c Tue Oct 11 22:14:19 2011 @@ -134,7 +134,7 @@ static int sasl_mutex_unlock_cb(void *mu { if (!svn_ra_svn__sasl_status) return 0; - return check_result(svn_mutex__unlock(mutex)); + return check_result(svn_mutex__unlock(mutex, SVN_NO_ERROR)); } static svn_error_t * -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1182130 - in /subversion/trunk/subversion: libsvn_delta/compat.c libsvn_subr/svn_mutex.c
On Tue, Oct 11, 2011 at 5:37 PM, s...@apache.org wrote: Author: stsp Date: Tue Oct 11 22:37:28 2011 New Revision: 1182130 URL: http://svn.apache.org/viewvc?rev=1182130view=rev Log: Some compiler-warning-driven house-keeping. * subversion/libsvn_subr/svn_mutex.c (uninit): Rename to ... (destroy_mutex): ... this more obvious name. Also wrap inside APR_HAS_THREADS to avoid defined but not used warnings in non-threaded builds. (svn_mutex__init): Track above function rename. * subversion/libsvn_delta/compat.c (ev2_close_directory, ev2_absent_directory, ev2_apply_textdelta, ev2_close_file, ev2_absent_file, complete_cb): Remove a bunch of unused local variables. Could you please bring these back? If the warnings bother you, feel free to comment them out after resurrection. Thanks, -Hyrum Modified: subversion/trunk/subversion/libsvn_delta/compat.c subversion/trunk/subversion/libsvn_subr/svn_mutex.c Modified: subversion/trunk/subversion/libsvn_delta/compat.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1182130r1=1182129r2=1182130view=diff == --- subversion/trunk/subversion/libsvn_delta/compat.c (original) +++ subversion/trunk/subversion/libsvn_delta/compat.c Tue Oct 11 22:37:28 2011 @@ -338,8 +338,6 @@ static svn_error_t * ev2_close_directory(void *dir_baton, apr_pool_t *scratch_pool) { - struct ev2_dir_baton *db = dir_baton; - return SVN_NO_ERROR; } @@ -348,7 +346,6 @@ ev2_absent_directory(const char *path, void *parent_baton, apr_pool_t *scratch_pool) { - struct ev2_dir_baton *pb = parent_baton; return SVN_NO_ERROR; } @@ -400,8 +397,6 @@ ev2_apply_textdelta(void *file_baton, svn_txdelta_window_handler_t *handler, void **handler_baton) { - struct ev2_file_baton *fb = file_baton; - *handler_baton = NULL; *handler = svn_delta_noop_window_handler; return SVN_NO_ERROR; @@ -429,7 +424,6 @@ ev2_close_file(void *file_baton, const char *text_checksum, apr_pool_t *scratch_pool) { - struct ev2_file_baton *fb = file_baton; return SVN_NO_ERROR; } @@ -438,7 +432,6 @@ ev2_absent_file(const char *path, void *parent_baton, apr_pool_t *scratch_pool) { - struct ev2_dir_baton *pb = parent_baton; return SVN_NO_ERROR; } @@ -855,9 +848,6 @@ complete_cb(void *baton, for (i = 0; i sorted_hash-nelts; i++) { - svn_sort__item_t *item = APR_ARRAY_IDX(sorted_hash, i, svn_sort__item_t); - const char *path = item-key; - /* ### We should actually do something here, but for now... */ } Modified: subversion/trunk/subversion/libsvn_subr/svn_mutex.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/svn_mutex.c?rev=1182130r1=1182129r2=1182130view=diff == --- subversion/trunk/subversion/libsvn_subr/svn_mutex.c (original) +++ subversion/trunk/subversion/libsvn_subr/svn_mutex.c Tue Oct 11 22:37:28 2011 @@ -24,14 +24,17 @@ #include svn_private_config.h #include private/svn_mutex.h +#if APR_HAS_THREADS /* Destructor to be called as part of the pool cleanup procedure. */ -static apr_status_t uninit(void *data) +static apr_status_t +destroy_mutex(void *data) { svn_mutex__t **mutex_p = data; *mutex_p = NULL; return APR_SUCCESS; } +#endif svn_error_t * svn_mutex__init(svn_mutex__t **mutex_p, @@ -51,7 +54,8 @@ svn_mutex__init(svn_mutex__t **mutex_p, return svn_error_wrap_apr(status, _(Can't create mutex)); *mutex_p = apr_mutex; - apr_pool_cleanup_register(pool, mutex_p, uninit, apr_pool_cleanup_null); + apr_pool_cleanup_register(pool, mutex_p, destroy_mutex, + apr_pool_cleanup_null); } #else if (enable_mutex) -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1173935 - /subversion/trunk/subversion/include/private/svn_subr_private.h
On Thu, Sep 22, 2011 at 3:31 AM, danie...@apache.org wrote: Author: danielsh Date: Thu Sep 22 02:31:06 2011 New Revision: 1173935 URL: http://svn.apache.org/viewvc?rev=1173935view=rev Log: * subversion/include/private/svn_subr_private.h: Doxygen markup fixes. You probably already know this, but stuff in include/private doesn't get processed by doxygen (and this comment wouldn't anyway, since it doesn't lead with a '/**' ). -Hyrum Modified: subversion/trunk/subversion/include/private/svn_subr_private.h Modified: subversion/trunk/subversion/include/private/svn_subr_private.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_subr_private.h?rev=1173935r1=1173934r2=1173935view=diff == --- subversion/trunk/subversion/include/private/svn_subr_private.h (original) +++ subversion/trunk/subversion/include/private/svn_subr_private.h Thu Sep 22 02:31:06 2011 @@ -113,8 +113,8 @@ svn_spillbuf__write(svn_spillbuf_t *buf, apr_pool_t *scratch_pool); -/* Read a block of memory from the spill buffer. @a data will be set to - NULL if no content remains. Otherwise, @data and @len will point to +/* Read a block of memory from the spill buffer. @a *data will be set to + NULL if no content remains. Otherwise, @a data and @a len will point to data that must be fully-consumed by the caller. This data will remain valid until another call to svn_spillbuf_write(), svn_spillbuf_read(), or svn_spillbuf_process(), or if the spill buffer's pool is cleared. */ @@ -187,7 +187,7 @@ svn_spillbuf__reader_getc(char *c, apr_pool_t *scratch_pool); -/* Write @a len bytes from @a data into the spill-buffer in @reader. */ +/* Write @a len bytes from @a data into the spill-buffer in @a reader. */ svn_error_t * svn_spillbuf__reader_write(svn_spillbuf_reader_t *reader, const char *data, -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1172411 - /subversion/trunk/subversion/svn/status.c
Do you need to update the appropriate schema to reflect this change? -Hyrum On Sun, Sep 18, 2011 at 8:37 PM, ne...@apache.org wrote: Author: neels Date: Mon Sep 19 01:37:21 2011 New Revision: 1172411 URL: http://svn.apache.org/viewvc?rev=1172411view=rev Log: Add moved-to/-from to status --xml. (Follow-up to r1157292.) * subversion/svn/status.c (svn_cl__print_status_xml): Add two attributes 'wc-status moved-from=relpath moved-to=relpath/'. Modified: subversion/trunk/subversion/svn/status.c Modified: subversion/trunk/subversion/svn/status.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status.c?rev=1172411r1=1172410r2=1172411view=diff == --- subversion/trunk/subversion/svn/status.c (original) +++ subversion/trunk/subversion/svn/status.c Mon Sep 19 01:37:21 2011 @@ -462,6 +462,24 @@ svn_cl__print_status_xml(const char *pat if (tree_conflicted) apr_hash_set(att_hash, tree-conflicted, APR_HASH_KEY_STRING, true); + if (status-moved_from_abspath || status-moved_to_abspath) + { + const char *cwd; + const char *relpath; + SVN_ERR(svn_dirent_get_absolute(cwd, , pool)); + if (status-moved_from_abspath) + { + relpath = make_relpath(cwd, status-moved_from_abspath, pool, pool); + relpath = svn_dirent_local_style(relpath, pool); + apr_hash_set(att_hash, moved-from, APR_HASH_KEY_STRING, relpath); + } + if (status-moved_to_abspath) + { + relpath = make_relpath(cwd, status-moved_to_abspath, pool, pool); + relpath = svn_dirent_local_style(relpath, pool); + apr_hash_set(att_hash, moved-to, APR_HASH_KEY_STRING, relpath); + } + } svn_xml_make_open_tag_hash(sb, pool, svn_xml_normal, wc-status, att_hash); -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1170324 - /subversion/trunk/subversion/include/svn_editor.h
On Tue, Sep 13, 2011 at 5:38 PM, Daniel Shahaf d...@daniel.shahaf.name wrote: (about svn_editor_set_props()) hwri...@apache.org wrote on Tue, Sep 13, 2011 at 19:54:14 -: Author: hwright Date: Tue Sep 13 19:54:14 2011 New Revision: 1170324 URL: http://svn.apache.org/viewvc?rev=1170324view=rev Log: * subversion/include/svn_editor.h (svn_editor_set_props): Add a couple of notes. Modified: subversion/trunk/subversion/include/svn_editor.h ... * Set or change properties on the existing node at @a relpath. * ### TODO @todo Does this send *all* properties, always? I'd answer As written, yes since the props parameter is an apr_hash_t (and the docstring doesn't make special arrangements for representation of propdels within that). + * ### HKW: The purist in me says yes, but the pragmatist says no. + * ### Writing a backward compat shim is going to be next to impossible, + * ### since we've no way to know about existing props while receiving + * ### props from the delta editor. + * ### For example, 'svn propset pn pv URL' does not know the remaining properties of URL. That said: isn't this discussion similar to the discussion from last week about whether svn_editor_set_text() should be taking a full contents stream or a delta stream? Does the resolution of that discusion apply here? I think it does: provide a callback to the shim so it can get the existing properties on a node. I arrived at this conclusion when thinking about the problem last night, and then discovered your and Greg's suggestions this morning. Guess I'm on the right track! (Or, we're all wrong together...) -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1170836 - in /subversion/trunk/subversion: include/ libsvn_client/ libsvn_delta/ libsvn_ra_neon/ libsvn_ra_serf/ libsvn_ra_svn/ libsvn_repos/ libsvn_wc/ svnrdump/ svnsync/ tests/libsv
On Wed, Sep 14, 2011 at 5:06 PM, Daniel Shahaf d...@daniel.shahaf.name wrote: hwri...@apache.org wrote on Wed, Sep 14, 2011 at 20:28:39 -: @@ -240,12 +243,19 @@ ev2_change_dir_prop(void *dir_baton, apr_pool_t *scratch_pool) { struct ev2_dir_baton *db = dir_baton; - struct prop_args *p_args = apr_palloc(db-eb-edit_pool, sizeof(*p_args)); - p_args-name = apr_pstrdup(db-eb-edit_pool, name); - p_args-value = value ? svn_string_dup(value, db-eb-edit_pool) : NULL; + if (value) + { + struct prop_args *p_args = apr_palloc(db-eb-edit_pool, sizeof(*p_args)); + + p_args-name = apr_pstrdup(db-eb-edit_pool, name); + p_args-value = value ? svn_string_dup(value, db-eb-edit_pool) : NULL; The NULL will never be evaluated. (also in ev2_change_file_prop()) Good catch, fixed in r1170915. The rest looks good. Thanks. In spite of my prickly attitude a couple of days ago, I do appreciate the review. :) -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1170205 - /subversion/trunk/subversion/libsvn_client/diff.c
On Tue, Sep 13, 2011 at 10:17 AM, Bert Huijben b...@qqmail.nl wrote: -Original Message- From: hwri...@apache.org [mailto:hwri...@apache.org] Sent: dinsdag 13 september 2011 17:08 To: commits@subversion.apache.org Subject: svn commit: r1170205 - /subversion/trunk/subversion/libsvn_client/diff.c Author: hwright Date: Tue Sep 13 15:08:29 2011 New Revision: 1170205 URL: http://svn.apache.org/viewvc?rev=1170205view=rev Log: Add an iterpool to a loop. * subversion/libsvn_client/diff.c (display_prop_diffs): Use an iterpool for the internal display loop. Modified: subversion/trunk/subversion/libsvn_client/diff.c Modified: subversion/trunk/subversion/libsvn_client/diff.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/di ff.c?rev=1170205r1=1170204r2=1170205view=diff == --- subversion/trunk/subversion/libsvn_client/diff.c (original) +++ subversion/trunk/subversion/libsvn_client/diff.c Tue Sep 13 15:08:29 2011 @@ -680,7 +684,7 @@ display_prop_diffs(const apr_array_heade } { - svn_stream_t *os = svn_stream_from_aprfile2(file, TRUE, pool); + svn_stream_t *os = svn_stream_from_aprfile2(file, TRUE, iterpool); Unrelated from this patch, but why do we create a disowned stream here... svn_diff_t *diff; svn_diff_file_options_t options = { 0 }; const svn_string_t *tmp; @@ -691,14 +695,16 @@ display_prop_diffs(const apr_array_heade Since the diff is not useful anyway for patching properties an eol character is appended when needed to remove those pescious ' \ No newline at end of file' lines. */ - tmp = original_value ? original_value : svn_string_create(, pool); - orig = maybe_append_eol(tmp, pool); + tmp = original_value ? original_value : svn_string_create(, + iterpool); + orig = maybe_append_eol(tmp, iterpool); tmp = propchange-value ? propchange-value : - svn_string_create(, pool); - val = maybe_append_eol(tmp, pool); + svn_string_create(, iterpool); + val = maybe_append_eol(tmp, iterpool); - SVN_ERR(svn_diff_mem_string_diff(diff, orig, val, options, pool)); + SVN_ERR(svn_diff_mem_string_diff(diff, orig, val, options, + iterpool)); /* UNIX patch will try to apply a diff even if the diff header * is missing. It tries to be helpful by asking the user for a @@ -708,13 +714,16 @@ display_prop_diffs(const apr_array_heade * instead of @@ as the default hunk delimiter for property diffs. * We also supress the diff header. */ SVN_ERR(svn_diff_mem_string_output_unified2(os, diff, FALSE, ##, - svn_dirent_local_style(path, pool), - svn_dirent_local_style(path, pool), - encoding, orig, val, pool)); + svn_dirent_local_style(path, + iterpool), + svn_dirent_local_style(path, + iterpool), + encoding, orig, val, iterpool)); SVN_ERR(svn_stream_close(os)); ... and then explicitly close it here. This makes this close a no-op Yeah, the stream handling in the diff code is kinda...interesting. What prompted this particular change was my poking around in the diff code to see if we could use output streams instead of output files. In my current patch, the above stream handling is gone. -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1166332 - in /subversion/trunk/subversion: libsvn_delta/compat.c tests/libsvn_delta/editor-test.c
On Wed, Sep 7, 2011 at 10:52 PM, Daniel Shahaf d...@daniel.shahaf.name wrote: hwri...@apache.org wrote on Wed, Sep 07, 2011 at 19:36:01 -: @@ -276,6 +345,60 @@ ev2_close_edit(void *edit_baton, apr_pool_t *scratch_pool) { struct ev2_edit_baton *eb = edit_baton; + apr_array_header_t *sorted_hash; + apr_pool_t *iterpool; + int i; + + /* Sort the paths touched by this edit. + * Ev2 doesn't really have any particular need for depth-first-ness, but + * we want to ensure all parent directories are handled before children in + * the case of adds (which does introduce an element of depth-first-ness). */ + sorted_hash = svn_sort__hash(eb-paths, svn_sort_compare_items_as_paths, + scratch_pool); + + iterpool = svn_pool_create(scratch_pool); + for (i = 0; i sorted_hash-nelts; i++) + { + svn_sort__item_t *item = APR_ARRAY_IDX(sorted_hash, i, svn_sort__item_t); + apr_array_header_t *actions = item-value; + const char *path = item-key; + apr_hash_t *props; + int j; + + svn_pool_clear(iterpool); + + props = apr_hash_make(iterpool); + + /* Go through all of our actions, populating various datastructures + * dependent on them. */ + for (j = 0; j actions-nelts; j++) + { + struct path_action *action = APR_ARRAY_IDX(actions, j, + struct path_action *); + + switch (action-action) + { + case set_prop: + { + struct prop_args *p_args = action-args; + + apr_hash_set(props, p_args-name, APR_HASH_KEY_STRING, + p_args-value); + break; + } + + default: + break; + } + } + + /* We've now got a wholistic view of what has happened to this node, + * so we can call our own editor APIs on it. */ + if (apr_hash_count(props) 0) What if ACTIONS contains only property deletions? I *think* I addressed this in subsequent commits, but it did raise a question which I added to svn_editor.h. -Hyrum + SVN_ERR(svn_editor_set_props(eb-editor, path, SVN_INVALID_REVNUM, + props, TRUE)); + } + svn_pool_destroy(iterpool); return svn_error_trace(svn_editor_complete(eb-editor)); } -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1169837 - /subversion/trunk/subversion/libsvn_delta/compat.c
On Mon, Sep 12, 2011 at 12:35 PM, Daniel Shahaf d...@daniel.shahaf.name wrote: hwri...@apache.org wrote on Mon, Sep 12, 2011 at 17:27:29 -: Author: hwright Date: Mon Sep 12 17:27:28 2011 New Revision: 1169837 URL: http://svn.apache.org/viewvc?rev=1169837view=rev Log: A couple of minor improvements to the Ev2-delta editor shim. * subversion/libsvn_delta/compat.c (complete_cb): Use svn_error_trace(). Unnecessary change. SVN_ERR() implies svn_error_trace(). Only in the case of SVN_ERR_TRACING being defined. In any case, SVN_ERR() introduces an additional branch, which in this case is superfluous. (abort_cb): Pass through to the delta editor. Modified: subversion/trunk/subversion/libsvn_delta/compat.c Modified: subversion/trunk/subversion/libsvn_delta/compat.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1169837r1=1169836r2=1169837view=diff == --- subversion/trunk/subversion/libsvn_delta/compat.c (original) +++ subversion/trunk/subversion/libsvn_delta/compat.c Mon Sep 12 17:27:28 2011 @@ -581,10 +581,8 @@ complete_cb(void *baton, apr_pool_t *scratch_pool) { struct editor_baton *eb = baton; - - SVN_ERR(eb-deditor-close_edit(eb-dedit_baton, scratch_pool)); - - return SVN_NO_ERROR; + return svn_error_trace(eb-deditor-close_edit(eb-dedit_baton, + scratch_pool)); } /* This implements svn_editor_cb_abort_t */ @@ -592,7 +590,9 @@ static svn_error_t * abort_cb(void *baton, apr_pool_t *scratch_pool) { - return SVN_NO_ERROR; + struct editor_baton *eb = baton; + return svn_error_trace(eb-deditor-abort_edit(eb-dedit_baton, + scratch_pool)); } svn_error_t * -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1160330 - /subversion/branches/1.7.x/CHANGES
Thank you for introducing subtree mergeinfo onto CHANGES. :( -Hyrum On Mon, Aug 22, 2011 at 11:50 AM, s...@apache.org wrote: Author: stsp Date: Mon Aug 22 16:50:42 2011 New Revision: 1160330 URL: http://svn.apache.org/viewvc?rev=1160330view=rev Log: * CHANGES (1.7.x branch): Merge from trunk. Modified: subversion/branches/1.7.x/CHANGES (contents, props changed) Modified: subversion/branches/1.7.x/CHANGES URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/CHANGES?rev=1160330r1=1160329r2=1160330view=diff == --- subversion/branches/1.7.x/CHANGES (original) +++ subversion/branches/1.7.x/CHANGES Mon Aug 22 16:50:42 2011 @@ -17,7 +17,6 @@ the 1.6 release: http://subversion.apac - Minor new features and improvements: * Better handling of HTTP redirects (issue #2779) - * make Serf the default DAV access method, if available (r875974) * Improved and much more consistent path handling (issue #2028, and others) * 'svnadmin load' rewrites changed revnums in mergeinfo (issue #3020) * Error message and help text improvements Propchange: subversion/branches/1.7.x/CHANGES -- --- svn:mergeinfo (added) +++ svn:mergeinfo Mon Aug 22 16:50:42 2011 @@ -0,0 +1,62 @@ +/subversion/branches/1.5.x-r30215/CHANGES:870312 +/subversion/branches/1.7.x-JavaHL-pools/CHANGES:1158684-1158722 +/subversion/branches/1.7.x-issue3888/CHANGES:1148937-1149162 +/subversion/branches/1.7.x-neon-default/CHANGES:1148803-1158680 +/subversion/branches/1.7.x-r1152189/CHANGES:1152759-1154249 +/subversion/branches/1.7.x-r1155160/CHANGES:1158704-1159223 +/subversion/branches/1.7.x-r1159093/CHANGES:1159097-1159230 +/subversion/branches/atomic-revprop/CHANGES:965046-1000689 +/subversion/branches/bdb-reverse-deltas/CHANGES:872050-872529 +/subversion/branches/diff-callbacks3/CHANGES:870059-870761 +/subversion/branches/diff-optimizations/CHANGES:1031270-1037352 +/subversion/branches/diff-optimizations-bytes/CHANGES:1037353-1067789 +/subversion/branches/dont-save-plaintext-passwords-by-default/CHANGES:870728-871118 +/subversion/branches/double-delete/CHANGES:870511-872970 +/subversion/branches/explore-wc/CHANGES:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997 +/subversion/branches/file-externals/CHANGES:871779-873302 +/subversion/branches/fs-rep-sharing/CHANGES:869036-873803 +/subversion/branches/fsfs-pack/CHANGES:873717-874575 +/subversion/branches/gnome-keyring/CHANGES:870558-871410 +/subversion/branches/http-protocol-v2/CHANGES:874395-876041 +/subversion/branches/in-memory-cache/CHANGES:869829-871452 +/subversion/branches/integrate-cache-item-serialization/CHANGES:1068724-1068739 +/subversion/branches/integrate-cache-membuffer/CHANGES:998649-998852 +/subversion/branches/integrate-compression-level/CHANGES:1068651-1072287 +/subversion/branches/integrate-io-improvements/CHANGES:1068684-1072297 +/subversion/branches/integrate-is-cachable/CHANGES:1072568-1074082 +/subversion/branches/integrate-partial-getter/CHANGES:1072558-1076552 +/subversion/branches/integrate-readline-speedup/CHANGES:1072553-1072555 +/subversion/branches/integrate-stream-api-extensions/CHANGES:1068695-1072516 +/subversion/branches/integrate-txdelta-caching/CHANGES:1072541-1078213 +/subversion/branches/issue-2779-dev/CHANGES:965496-984198 +/subversion/branches/issue-2843-dev/CHANGES:871432-874179 +/subversion/branches/issue-3000/CHANGES:871713,871716-871719,871721-871726,871728,871734 +/subversion/branches/issue-3067-deleted-subtrees/CHANGES:873375-874084 +/subversion/branches/issue-3148-dev/CHANGES:875193-875204 +/subversion/branches/issue-3220-dev/CHANGES:872210-872226 +/subversion/branches/issue-3242-dev/CHANGES:879653-896436 +/subversion/branches/issue-3334-dirs/CHANGES:875156-875867 +/subversion/branches/issue-3668-3669/CHANGES:1031000-1035744 +/subversion/branches/kwallet/CHANGES:870785-871314 +/subversion/branches/log-g-performance/CHANGES:870941-871032 +/subversion/branches/merge-skips-obstructions/CHANGES:874525-874615 +/subversion/branches/nfc-nfd-aware-client/CHANGES:870276,870376
Re: svn commit: r1157682 - /subversion/trunk/subversion/svn/status.c
Do we do this other places in our code, or does this introduce a new pattern? It *does* introduce new format not a string literal, argument types not checked warnings at compile-time. -Hyrum On Sun, Aug 14, 2011 at 6:06 PM, arfre...@apache.org wrote: Author: arfrever Date: Sun Aug 14 23:06:09 2011 New Revision: 1157682 URL: http://svn.apache.org/viewvc?rev=1157682view=rev Log: Follow-up to r1157537: * subversion/svn/status.c (print_status): Include %s in translated messages to support languages, in which from / to are postpositions. Modified: subversion/trunk/subversion/svn/status.c Modified: subversion/trunk/subversion/svn/status.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status.c?rev=1157682r1=1157681r2=1157682view=diff == --- subversion/trunk/subversion/svn/status.c (original) +++ subversion/trunk/subversion/svn/status.c Sun Aug 14 23:06:09 2011 @@ -268,8 +268,11 @@ print_status(const char *path, SVN_ERR(svn_dirent_get_absolute(cwd, , pool)); relpath = make_relpath(cwd, status-moved_from_abspath, pool, pool); relpath = svn_dirent_local_style(relpath, pool); - moved_from_line = apr_psprintf(pool, \n %s %s, - _(moved from), relpath); + moved_from_line = apr_psprintf(pool, + apr_psprintf(pool, + \n %s, + _(moved from %s)), + relpath); } /* Only print an extra moved-to line for the op-root of a move-away. @@ -285,8 +288,11 @@ print_status(const char *path, SVN_ERR(svn_dirent_get_absolute(cwd, , pool)); relpath = make_relpath(cwd, status-moved_to_abspath, pool, pool); relpath = svn_dirent_local_style(relpath, pool); - moved_to_line = apr_psprintf(pool, \n %s %s, - _(moved to), relpath); + moved_to_line = apr_psprintf(pool, + apr_psprintf(pool, + \n %s, + _(moved to %s)), + relpath); } if (detailed) -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1157416 - in /subversion/trunk/subversion/bindings/javahl: src/org/apache/subversion/javahl/JNIError.java src/org/tigris/subversion/javahl/JNIError.java tests/org/apache/subversion/ja
Are there backward compat concerns here? IOW, if this is a public class in the tigris package and folks could conceivably be catching it, such catches would now fail, yes? (I'm not familiar enough with the code or its use cases to know if this is a valid concern or not.) -Hyrum On Sat, Aug 13, 2011 at 3:03 PM, markp...@apache.org wrote: Author: markphip Date: Sat Aug 13 20:03:25 2011 New Revision: 1157416 URL: http://svn.apache.org/viewvc?rev=1157416view=rev Log: Move JNIError class from org.tigris to org.apache package. This resolves NoClassDefFoundException at runtime when native code tries to throw this error. [ subversion/bindings/javahl/ ] * tests/org/apache/subversion/javahl/BasicTests.java (testJNIError): New test to verify this error is thrown. * src/org/tigris/subversion/javahl/JNIError.java * src/org/apache/subversion/javahl/JNIError.java Moved class from tigris to apache package. Added: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java - copied, changed from r1157410, subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/JNIError.java Removed: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/JNIError.java Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Copied: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java (from r1157410, subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/JNIError.java) URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java?p2=subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.javap1=subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/JNIError.javar1=1157410r2=1157416rev=1157416view=diff == --- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/JNIError.java (original) +++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java Sat Aug 13 20:03:25 2011 @@ -21,7 +21,7 @@ * @endcopyright */ -package org.tigris.subversion.javahl; +package org.apache.subversion.javahl; /** * This error is thrown by error in the native library. Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1157416r1=1157415r2=1157416view=diff == --- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original) +++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Sat Aug 13 20:03:25 2011 @@ -130,6 +130,35 @@ public class BasicTests extends SVNTests } /** + * Test the JNIError class functionality + * @throws Throwable + */ + public void testJNIError() throws Throwable + { + // build the test setup. + OneTest thisTest = new OneTest(); + + // Create a client, dispose it, then try to use it later + ISVNClient tempclient = new SVNClient(); + tempclient.dispose(); + + // create Y and Y/Z directories in the repository + addExpectedCommitItem(null, thisTest.getUrl().toString(), Y, NodeKind.none, + CommitItemStateFlags.Add); + SetString urls = new HashSetString(1); + urls.add(thisTest.getUrl() + /Y); + try + { + tempclient.mkdir(urls, false, null, new ConstMsg(log_msg), null); + } + catch(JNIError e) + { + return; // Test passes! + } + fail(A JNIError should have been thrown here.); + } + + /** * Tests Mergeinfo and RevisionRange classes. * @since 1.5 */ -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1152026 - /subversion/trunk/subversion/libsvn_client/commit.c
On Thu, Jul 28, 2011 at 3:35 PM, s...@apache.org wrote: Author: stsp Date: Thu Jul 28 22:35:57 2011 New Revision: 1152026 URL: http://svn.apache.org/viewvc?rev=1152026view=rev Log: Make commit refuse to commit the copied-half of a move independently of the delete-half. It is still possible to commit the delete-half independently of the copied-half. That will be fixed soon. This is the first visible behaviour change for moves. None of our existing tests trigger the new error condition so writing new tests wouldn't be a bad idea. I'll add some if nobody beats me to it. See r1152115. -Hyrum * subversion/libsvn_client/commit.c (svn_client_commit5): Raise an error if the delete-half corresponding to the copied-half of a moved commit target does not appear in the commit target list. Modified: subversion/trunk/subversion/libsvn_client/commit.c Modified: subversion/trunk/subversion/libsvn_client/commit.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=1152026r1=1152025r2=1152026view=diff == --- subversion/trunk/subversion/libsvn_client/commit.c (original) +++ subversion/trunk/subversion/libsvn_client/commit.c Thu Jul 28 22:35:57 2011 @@ -1356,6 +1356,47 @@ svn_client_commit5(const apr_array_heade goto cleanup; } + /* For every target that was moved verify that both halves of the + * move are part of the commit. */ + for (i = 0; i commit_items-nelts; i++) + { + svn_client_commit_item3_t *item = + APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *); + + svn_pool_clear(iterpool); + + if (item-state_flags SVN_CLIENT_COMMIT_ITEM_IS_COPY) + { + const char *moved_from_abspath; + const char *delete_op_root_abspath; + + cmt_err = svn_error_trace(svn_wc__node_was_moved_here( + moved_from_abspath, + delete_op_root_abspath, + ctx-wc_ctx, item-path, + iterpool, iterpool)); + if (cmt_err) + goto cleanup; + + if (moved_from_abspath delete_op_root_abspath + strcmp(moved_from_abspath, delete_op_root_abspath) == 0 + apr_hash_get(committables-by_path, delete_op_root_abspath, + APR_HASH_KEY_STRING) == NULL) + { + cmt_err = svn_error_createf( + SVN_ERR_ILLEGAL_TARGET, NULL, + _(Cannot commit '%s' because it was moved from + '%s' which is not part of the commit; both + sides of the move must be committed together), + svn_dirent_local_style(item-path, iterpool), + svn_dirent_local_style(delete_op_root_abspath, + iterpool)); + goto cleanup; + } + } + /* ### TODO: check the delete-half, too */ + } + /* Go get a log message. If an error occurs, or no log message is specified, abort the operation. */ if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx)) -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/
Re: svn commit: r1146910 - /subversion/branches/1.7.x/STATUS
On Thu, Jul 14, 2011 at 4:58 PM, arfre...@apache.org wrote: Author: arfrever Date: Thu Jul 14 21:58:56 2011 New Revision: 1146910 URL: http://svn.apache.org/viewvc?rev=1146910view=rev Log: * STATUS: Nominate r1146899 and r1146904. Modified: subversion/branches/1.7.x/STATUS Modified: subversion/branches/1.7.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1146910r1=1146909r2=1146910view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Thu Jul 14 21:58:56 2011 @@ -48,7 +48,12 @@ Candidate changes: +0: rhuijben (I think it should be backported, but I can't test this) +0: gstein (likewise) - + * r1146899, r1146904 + Minor improvements in build system. What improvements? How do they affect the build system? What is the Justification? -Hyrum + Votes: + +1: arfrever + + Approved changes: = @@ -70,7 +75,7 @@ Approved changes: This change also marks the doc string for Doxygen, an 'obvious fix'. Votes: +1: julianfoad, rhuijben, gstein - + * r1146684 Report the right wcroot in an 'svn upgrade' error message. Justification:
Re: svn propchange: r1145773 - svn:log
On Tue, Jul 12, 2011 at 4:16 PM, bl...@apache.org wrote: Author: blair Revision: 1145773 Modified property: svn:log Modified: svn:log at Tue Jul 12 21:16:32 2011 -- --- svn:log (original) +++ svn:log Tue Jul 12 21:16:32 2011 @@ -1,5 +1,7 @@ Revert part of r1145716 that has one spelling fix mistake. No telling why my emacs doesn't like afterwords. It's the plural of afterword as in the epilogue to a book. :) +Found by: jcorvel at gmail dot com + * subversion/include/svn_repos.h: s/afterwords/afterwords/.
Re: svn commit: r1144869 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_client/status.c libsvn_wc/deprecated.c libsvn_wc/status.c
Does this have any impact on issue #3954? http://subversion.tigris.org/issues/show_bug.cgi?id=3954 -Hyrum On Sun, Jul 10, 2011 at 9:45 AM, rhuij...@apache.org wrote: Author: rhuijben Date: Sun Jul 10 14:45:14 2011 New Revision: 1144869 URL: http://svn.apache.org/viewvc?rev=1144869view=rev Log: Make depth_as_sticky an argument of the status editor to match the code of the other editors in libsvn_wc. * subversion/include/svn_wc.h (svn_wc_get_status_editor5): Add argument. * subversion/libsvn_client/status.c (svn_client_status5): Update caller. * subversion/libsvn_wc/deprecated.c (svn_wc_get_status_editor4): Update caller. * subversion/libsvn_wc/status.c (svn_wc_get_status_editor5): Use the new argument for disabling the ambient depth filter. Modified: subversion/trunk/subversion/include/svn_wc.h subversion/trunk/subversion/libsvn_client/status.c subversion/trunk/subversion/libsvn_wc/deprecated.c subversion/trunk/subversion/libsvn_wc/status.c Modified: subversion/trunk/subversion/include/svn_wc.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1144869r1=1144868r2=1144869view=diff == --- subversion/trunk/subversion/include/svn_wc.h (original) +++ subversion/trunk/subversion/include/svn_wc.h Sun Jul 10 14:45:14 2011 @@ -4018,6 +4018,10 @@ svn_wc_walk_status(svn_wc_context_t *wc_ * If @a cancel_func is non-NULL, call it with @a cancel_baton while building * the @a statushash to determine if the client has canceled the operation. * + * If @a depth_as_sticky is set handle @a depth like when depth_is_sticky is + * passed for updating. This will show excluded nodes show up as added in the + * repository. + * * If @a server_performs_filtering is TRUE, assume that the server handles * the ambient depth filtering, so this doesn't have to be handled in the * editor. @@ -4039,6 +4043,7 @@ svn_wc_get_status_editor5(const svn_delt svn_depth_t depth, svn_boolean_t get_all, svn_boolean_t no_ignore, + svn_boolean_t depth_as_sticky, svn_boolean_t server_performs_filtering, const apr_array_header_t *ignore_patterns, svn_wc_status_func4_t status_func, Modified: subversion/trunk/subversion/libsvn_client/status.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/status.c?rev=1144869r1=1144868r2=1144869view=diff == --- subversion/trunk/subversion/libsvn_client/status.c (original) +++ subversion/trunk/subversion/libsvn_client/status.c Sun Jul 10 14:45:14 2011 @@ -377,7 +377,8 @@ svn_client_status5(svn_revnum_t *result_ edit_revision, ctx-wc_ctx, dir_abspath, target_basename, depth, get_all, - no_ignore, server_supports_depth, + no_ignore, depth_as_sticky, + server_supports_depth, ignores, tweak_status, sb, ctx-cancel_func, ctx-cancel_baton, pool, pool)); Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1144869r1=1144868r2=1144869view=diff == --- subversion/trunk/subversion/libsvn_wc/deprecated.c (original) +++ subversion/trunk/subversion/libsvn_wc/deprecated.c Sun Jul 10 14:45:14 2011 @@ -2631,10 +2631,15 @@ svn_wc_get_status_editor4(const svn_delt swb-anchor_relpath = NULL; } + /* Before subversion 1.7 status always handled depth as sticky. 1.7 made + the output of svn status by default match the result of what would be + updated by a similar svn update. (Following the documentation) */ + SVN_ERR(svn_wc_get_status_editor5(editor, edit_baton, set_locks_baton, edit_revision, wc_ctx, anchor_abspath, target, depth, get_all, no_ignore, + (depth != svn_depth_unknown) /*as_sticky*/, FALSE /* server_performs_filtering */, ignore_patterns, status4_wrapper_func, swb, Modified: subversion/trunk/subversion/libsvn_wc/status.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=1144869r1=1144868r2=1144869view=diff
Re: svn commit: r1144572 - in /subversion/trunk: ./ subversion/include/private/ subversion/libsvn_fs_fs/ subversion/libsvn_subr/ subversion/tests/cmdline/
Was this a merge from somewhere? If so, would it be useful to note that in the log message? -Hyrum On Fri, Jul 8, 2011 at 8:54 PM, danie...@apache.org wrote: Author: danielsh Date: Sat Jul 9 01:54:29 2011 New Revision: 1144572 URL: http://svn.apache.org/viewvc?rev=1144572view=rev Log: Improve error reporting for parsing serialized hashes. * subversion/tests/cmdline/svnadmin_tests.py (verify_with_invalid_revprops): Adjust expected text. * subversion/libsvn_subr/hash.c (svn_private_config.h): Include (hash_read): Improve error messages. Modified: subversion/trunk/ (props changed) subversion/trunk/subversion/include/private/svn_adler32.h (props changed) subversion/trunk/subversion/include/private/svn_string_private.h (props changed) subversion/trunk/subversion/include/private/svn_temp_serializer.h (props changed) subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c (props changed) subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h (props changed) subversion/trunk/subversion/libsvn_subr/adler32.c (props changed) subversion/trunk/subversion/libsvn_subr/hash.c (contents, props changed) subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c (props changed) subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py Propchange: subversion/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Jul 9 01:54:29 2011 @@ -39,7 +39,7 @@ /subversion/branches/py-tests-as-modules:956579-1033052 /subversion/branches/ra_serf-digest-authn:875693-876404 /subversion/branches/reintegrate-improvements:873853-874164 -/subversion/branches/revprop-packing:1143907,1143971,1143997,1144017,1144499 +/subversion/branches/revprop-packing:1143907,1143971,1143997,1144017,1144499,1144568 /subversion/branches/subtree-mergeinfo:876734-878766 /subversion/branches/svn-mergeinfo-enhancements:870119-870195,870197-870288 /subversion/branches/svn-patch-improvements:918519-934609 Propchange: subversion/trunk/subversion/include/private/svn_adler32.h -- --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Jul 9 01:54:29 2011 @@ -31,7 +31,7 @@ /subversion/branches/py-tests-as-modules/subversion/libsvn_diff/diff.h:956579-1033052 /subversion/branches/ra_serf-digest-authn/subversion/libsvn_diff/diff.h:875693-876404 /subversion/branches/reintegrate-improvements/subversion/libsvn_diff/diff.h:873853-874164 -/subversion/branches/revprop-packing/subversion/include/private/svn_adler32.h:1143907,1143971,1144017 +/subversion/branches/revprop-packing/subversion/include/private/svn_adler32.h:1143907,1143971,1144017,1144568 /subversion/branches/subtree-mergeinfo/subversion/libsvn_diff/diff.h:876734-878766 /subversion/branches/svn-mergeinfo-enhancements/subversion/libsvn_diff/diff.h:870119-870195,870197-870288 /subversion/branches/svn-patch-improvements/subversion/libsvn_diff/diff.h:918519-934609 Propchange: subversion/trunk/subversion/include/private/svn_string_private.h -- --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Jul 9 01:54:29 2011 @@ -39,7 +39,7 @@ /subversion/branches/py-tests-as-modules/subversion/include/svn_string.h:956579-1033052 /subversion/branches/ra_serf-digest-authn/subversion/include/svn_string.h:875693-876404 /subversion/branches/reintegrate-improvements/subversion/include/svn_string.h:873853-874164 -/subversion/branches/revprop-packing/subversion/include/private/svn_string_private.h:1143907,1143971,1144017 +/subversion/branches/revprop-packing/subversion/include/private/svn_string_private.h:1143907,1143971,1144017,1144568 /subversion/branches/subtree-mergeinfo/subversion/include/svn_string.h:876734-878766 /subversion/branches/svn-mergeinfo-enhancements/subversion/include/svn_string.h:870119-870195,870197-870288 /subversion/branches/svn-patch-improvements/subversion/include/svn_string.h:918519-934609 Propchange: subversion/trunk/subversion/include/private/svn_temp_serializer.h -- --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Jul 9 01:54:29 2011 @@ -1,2 +1,2 @@ -/subversion/branches/revprop-packing/subversion/include/private/svn_temp_serializer.h:1143907,1143971,1144017 +/subversion/branches/revprop-packing/subversion/include/private/svn_temp_serializer.h:1143907,1143971,1144017,1144568 /subversion/trunk/subversion/include/private/svn_temp_serializer.h:1067687-1072301 Propchange: subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c -- --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Jul 9 01:54:29 2011 @@ -1,2 +1,2 @@
Re: svn commit: r1141683 - /subversion/branches/svn_mutex/
With such a tantalizing name, I look forward to seeing the BRANCH-README more fully explaining this branches purpose. -Hyrum On Thu, Jun 30, 2011 at 2:43 PM, stef...@apache.org wrote: Author: stefan2 Date: Thu Jun 30 19:43:31 2011 New Revision: 1141683 URL: http://svn.apache.org/viewvc?rev=1141683view=rev Log: Open development branch for the introduction of svn_mutex_t. This is intended to be merged into /trunk as soon as 1.8 dev starts. * ^/subversion/branches/svn_mutex: new branch Added: subversion/branches/svn_mutex/ (props changed) - copied from r1141681, subversion/trunk/ Propchange: subversion/branches/svn_mutex/ -- --- bugtraq:logregex (added) +++ bugtraq:logregex Thu Jun 30 19:43:31 2011 @@ -0,0 +1,2 @@ +[Ii]ssues?:?(\s*(,|and)?\s*#\d+)+ +(\d+) Propchange: subversion/branches/svn_mutex/ -- bugtraq:url = http://subversion.tigris.org/issues/show_bug.cgi?id=%BUGID% Propchange: subversion/branches/svn_mutex/ -- --- svn:ignore (added) +++ svn:ignore Thu Jun 30 19:43:31 2011 @@ -0,0 +1,50 @@ +ChangeLog* +Makefile +config.cache +config.log +config.nice +config.status +configure +libtool +.gdb_history +.swig_checked +*.orig +*.rej +TAGS +tags +neon +build-outputs.mk +autogen-standalone.mk +autom4te.cache +gen-make.opts +tests.log* +fails.log +db4-win32 +db +*.o +*~ +.*~ +apr +apr-util +apr-iconv +Release +Debug +ipch +subversion_msvc.dsw +subversion_msvc.ncb +subversion_msvc.opt +subversion_msvc.plg +subversion_vcnet.sln +subversion_vcnet.ncb +subversion_vcnet.suo +subversion_vcnet.sdf +subversion_vcnet.opensdf +mkmf.log +.project +.classpath +.cdtproject +.settings +.cproject +zlib +sqlite-amalgamation +serf Propchange: subversion/branches/svn_mutex/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Thu Jun 30 19:43:31 2011 @@ -0,0 +1,54 @@ +/subversion/branches/1.5.x-r30215:870312 +/subversion/branches/atomic-revprop:965046-1000689 +/subversion/branches/bdb-reverse-deltas:872050-872529 +/subversion/branches/diff-callbacks3:870059-870761 +/subversion/branches/diff-optimizations:1031270-1037352 +/subversion/branches/diff-optimizations-bytes:1037353-1067789 +/subversion/branches/dont-save-plaintext-passwords-by-default:870728-871118 +/subversion/branches/double-delete:870511-872970 +/subversion/branches/explore-wc:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997 +/subversion/branches/file-externals:871779-873302 +/subversion/branches/fs-rep-sharing:869036-873803 +/subversion/branches/fsfs-pack:873717-874575 +/subversion/branches/gnome-keyring:870558-871410 +/subversion/branches/http-protocol-v2:874395-876041 +/subversion/branches/in-memory-cache:869829-871452 +/subversion/branches/integrate-cache-item-serialization:1068724-1068739 +/subversion/branches/integrate-cache-membuffer:998649-998852 +/subversion/branches/integrate-compression-level:1068651-1072287 +/subversion/branches/integrate-io-improvements:1068684-1072297 +/subversion/branches/integrate-is-cachable:1072568-1074082 +/subversion/branches/integrate-partial-getter:1072558-1076552 +/subversion/branches/integrate-readline-speedup:1072553-1072555 +/subversion/branches/integrate-stream-api-extensions:1068695-1072516 +/subversion/branches/integrate-txdelta-caching:1072541-1078213 +/subversion/branches/issue-2779-dev:965496-984198 +/subversion/branches/issue-2843-dev:871432-874179 +/subversion/branches/issue-3000:871713,871716-871719,871721-871726,871728,871734 +/subversion/branches/issue-3067-deleted-subtrees:873375-874084 +/subversion/branches/issue-3148-dev:875193-875204 +/subversion/branches/issue-3220-dev:872210-872226 +/subversion/branches/issue-3242-dev:879653-896436 +/subversion/branches/issue-3334-dirs:875156-875867 +/subversion/branches/issue-3668-3669:1031000-1035744 +/subversion/branches/kwallet:870785-871314 +/subversion/branches/log-g-performance:870941-871032 +/subversion/branches/merge-skips-obstructions:874525-874615 +/subversion/branches/nfc-nfd-aware-client:870276,870376
Re: svn commit: r1140861 - /subversion/trunk/subversion/svnadmin/main.c
On Wed, Jun 29, 2011 at 3:26 AM, Julian Foad julian.f...@wandisco.com wrote: On Wed, 2011-06-29 at 02:16 +0300, Daniel Shahaf wrote: hwri...@apache.org wrote on Tue, Jun 28, 2011 at 21:47:06 -: Author: hwright Date: Tue Jun 28 21:47:06 2011 New Revision: 1140861 URL: http://svn.apache.org/viewvc?rev=1140861view=rev Log: * subversion/svnadmin/main.c (parse_args): Fix a theoretical bug by ensure we only attempt to parse args if we think we have them. Modified: subversion/trunk/subversion/svnadmin/main.c Modified: subversion/trunk/subversion/svnadmin/main.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/main.c?rev=1140861r1=1140860r2=1140861view=diff == --- subversion/trunk/subversion/svnadmin/main.c (original) +++ subversion/trunk/subversion/svnadmin/main.c Tue Jun 28 21:47:06 2011 @@ -559,9 +559,11 @@ parse_args(apr_array_header_t **args, if (args) { *args = apr_array_make(pool, num_args, sizeof(const char *)); - while (os-ind os-argc) - APR_ARRAY_PUSH(*args, const char *) = - apr_pstrdup(pool, os-argv[os-ind++]); + + if (num_args) + while (os-ind os-argc) + APR_ARRAY_PUSH(*args, const char *) = + apr_pstrdup(pool, os-argv[os-ind++]); } I don't understand this change. The loop would execute zero times when os-ind == os-argc, so what are you guarding against? I think you forgot to either: * check 'os != NULL' * move the apr_array_make() inside the check that NUM_ARGS 0 Actually, Hyrum's code looks correct to me. It guards against 'os' because 'num_args' is zero if 'os' is null: int num_args = os ? (os-argc - os-ind) : 0; And the array needs to be allocated if the caller requested it, even if it is going to have no elements. Correct, that was my logic (and you explained it better than I would have). -Hyrum
Re: svn commit: r1132966 - in /subversion/trunk: subversion/include/ subversion/libsvn_ra_svn/ subversion/svn/ subversion/svnlook/ subversion/svnsync/ subversion/svnversion/ tools/dev/svnraisetreeconf
How does this impact backward compat? If somebody was including just 'svn_wc.h' and expecting to get the contents of svn_version.h, their code will now not compile, yes? This is demonstrated by our own build breakage after r1132965. (You mention a similar cleanup happened early in 1.7 development. I apologize if I'm digging up old laundry.) -Hyrum On Tue, Jun 7, 2011 at 7:09 AM, rhuij...@apache.org wrote: Author: rhuijben Date: Tue Jun 7 12:09:37 2011 New Revision: 1132966 URL: http://svn.apache.org/viewvc?rev=1132966view=rev Log: Remove #include svn_version.h from a number of public header files, to reduce build time in third party build environments and when switching between branches. This file modifies in some build scenarios because it contains the version number and version description texts. This change is similar to another recursive header include cleanup performed early in Subversion 1.7 development. * subversion/include/svn_auth.h * subversion/include/svn_client.h * subversion/include/svn_delta.h * subversion/include/svn_diff.h * subversion/include/svn_repos.h * subversion/include/svn_wc.h (includes): Remove svn_version.h * subversion/libsvn_ra_svn/client.c * subversion/svn/main.c * subversion/svnlook/main.c * subversion/svnsync/main.c * subversion/svnversion/main.c * tools/dev/svnraisetreeconflict/main.c (includes): Add svn_version.h Modified: subversion/trunk/subversion/include/svn_auth.h subversion/trunk/subversion/include/svn_client.h subversion/trunk/subversion/include/svn_delta.h subversion/trunk/subversion/include/svn_diff.h subversion/trunk/subversion/include/svn_repos.h subversion/trunk/subversion/include/svn_wc.h subversion/trunk/subversion/libsvn_ra_svn/client.c subversion/trunk/subversion/svn/main.c subversion/trunk/subversion/svnlook/main.c subversion/trunk/subversion/svnsync/main.c subversion/trunk/subversion/svnversion/main.c subversion/trunk/tools/dev/svnraisetreeconflict/main.c Modified: subversion/trunk/subversion/include/svn_auth.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_auth.h?rev=1132966r1=1132965r2=1132966view=diff == --- subversion/trunk/subversion/include/svn_auth.h (original) +++ subversion/trunk/subversion/include/svn_auth.h Tue Jun 7 12:09:37 2011 @@ -34,7 +34,6 @@ #include svn_types.h #include svn_config.h -#include svn_version.h #ifdef __cplusplus extern C { Modified: subversion/trunk/subversion/include/svn_client.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1132966r1=1132965r2=1132966view=diff == --- subversion/trunk/subversion/include/svn_client.h (original) +++ subversion/trunk/subversion/include/svn_client.h Tue Jun 7 12:09:37 2011 @@ -43,7 +43,6 @@ #include svn_string.h #include svn_wc.h #include svn_opt.h -#include svn_version.h #include svn_ra.h #include svn_diff.h #include svn_auth.h Modified: subversion/trunk/subversion/include/svn_delta.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_delta.h?rev=1132966r1=1132965r2=1132966view=diff == --- subversion/trunk/subversion/include/svn_delta.h (original) +++ subversion/trunk/subversion/include/svn_delta.h Tue Jun 7 12:09:37 2011 @@ -40,7 +40,6 @@ #include svn_types.h #include svn_string.h #include svn_io.h -#include svn_version.h #include svn_checksum.h #ifdef __cplusplus Modified: subversion/trunk/subversion/include/svn_diff.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_diff.h?rev=1132966r1=1132965r2=1132966view=diff == --- subversion/trunk/subversion/include/svn_diff.h (original) +++ subversion/trunk/subversion/include/svn_diff.h Tue Jun 7 12:09:37 2011 @@ -54,7 +54,6 @@ #include svn_types.h #include svn_io.h /* for svn_stream_t */ -#include svn_version.h #include svn_string.h #ifdef __cplusplus Modified: subversion/trunk/subversion/include/svn_repos.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_repos.h?rev=1132966r1=1132965r2=1132966view=diff == --- subversion/trunk/subversion/include/svn_repos.h (original) +++ subversion/trunk/subversion/include/svn_repos.h Tue Jun 7 12:09:37 2011 @@ -37,7 +37,6 @@ #include svn_delta.h #include svn_fs.h #include svn_io.h -#include svn_version.h #include svn_mergeinfo.h Modified: subversion/trunk/subversion/include/svn_wc.h URL:
Re: svn commit: r1130556 - in /subversion/tags/1.6.17: ./ subversion/include/svn_version.h
Mike, Thanks for picking up the pieces here. A couple of thoughts: * Since the magic rev for the release is r1128011, the tag should be based on that revision, per HACKING (see [1]) * From that point, we should then merge to the tag the relavant revisions from 1.6.x to make the tag match the release. I feel that we should do the above, but would like to ensure I'm not alone in that feeling. -Hyrum [1] http://subversion.apache.org/docs/community-guide/releasing.html#rolling-release (the paragraph headed Subversion Operations) On Thu, Jun 2, 2011 at 8:59 AM, cmpil...@apache.org wrote: Author: cmpilato Date: Thu Jun 2 13:58:59 2011 New Revision: 1130556 URL: http://svn.apache.org/viewvc?rev=1130556view=rev Log: Tagging 1.6.17 release with svn_version.h matching tarball. Added: subversion/tags/1.6.17/ (props changed) - copied from r1130555, subversion/branches/1.6.x/ Modified: subversion/tags/1.6.17/subversion/include/svn_version.h Propchange: subversion/tags/1.6.17/ -- --- bugtraq:logregex (added) +++ bugtraq:logregex Thu Jun 2 13:58:59 2011 @@ -0,0 +1,2 @@ +[Ii]ssues?:?(\s*(,|and)?\s*#\d+)+ +(\d+) Propchange: subversion/tags/1.6.17/ -- bugtraq:url = http://subversion.tigris.org/issues/show_bug.cgi?id=%BUGID% Propchange: subversion/tags/1.6.17/ -- bzr:file-ids = Propchange: subversion/tags/1.6.17/ -- --- bzr:revision-id-v3:trunk0 (added) +++ bzr:revision-id-v3:trunk0 Thu Jun 2 13:58:59 2011 @@ -0,0 +1 @@ +18228 jel...@samba.org-20070720143618-d1n3ric4vua52zpm Propchange: subversion/tags/1.6.17/ -- --- bzr:revision-id:v3-trunk0 (added) +++ bzr:revision-id:v3-trunk0 Thu Jun 2 13:58:59 2011 @@ -0,0 +1,5 @@ +20214 jel...@samba.org-20071206202757-xopl18j270rt83ve +20235 jel...@samba.org-20071209150938-eavv3u65qqwjjkzy +20236 jel...@samba.org-20071209172359-x679msv2p5e5a4px +20244 jel...@samba.org-20071209215808-36ku3dm56r11230a +20248 jel...@samba.org-20071210031219-74vd608op3jvp2qe Propchange: subversion/tags/1.6.17/ -- --- bzr:revision-info (added) +++ bzr:revision-info Thu Jun 2 13:58:59 2011 @@ -0,0 +1,5 @@ +timestamp: 2007-12-10 04:12:19.17452 +0100 +committer: Jelmer Vernooij jel...@samba.org +properties: + branch-nick: trunk + rebase-of: jel...@samba.org-20071210031219-kupghow41xajbh2k Propchange: subversion/tags/1.6.17/ -- subclipse:tags = 32486,trunk,/trunk,branch Propchange: subversion/tags/1.6.17/ -- --- svk:merge (added) +++ svk:merge Thu Jun 2 13:58:59 2011 @@ -0,0 +1,21 @@ +40bec6f9-eef0-0310-8400-9b45a50af7ca:/local/trunk:90 +422c9f7f-73e9-0310-916f-f579f4d99a6a:/local/pool-cleanup:1951 +5fb2e21a-203d-0410-8290-957dc927bc9b:/local/trunk:31028 +834019e9-2104-4f97-81ba-933cb999031a:/svn/BOS-NJ:153289 +834019e9-2104-4f97-81ba-933cb999031a:/svn/BOS-NJ-tmp:153288 +834019e9-2104-4f97-81ba-933cb999031a:/svn/BOS-PHL:108970 +834019e9-2104-4f97-81ba-933cb999031a:/svn/SEA-BOS:108721 +834019e9-2104-4f97-81ba-933cb999031a:/svn/dav-to-neon:151584 +834019e9-2104-4f97-81ba-933cb999031a:/svn/propedit-urls:103714 +834019e9-2104-4f97-81ba-933cb999031a:/svn/props-in-subr:102459 +834019e9-2104-4f97-81ba-933cb999031a:/svn/repos-replay-bug:111919 +834019e9-2104-4f97-81ba-933cb999031a:/svn/repos-replay-textdelta:108713 +834019e9-2104-4f97-81ba-933cb999031a:/svn/rev-lock-real:113336 +834019e9-2104-4f97-81ba-933cb999031a:/svn/rev-lock-scratch:113335 +834019e9-2104-4f97-81ba-933cb999031a:/svn/test-chdir:148259 +834019e9-2104-4f97-81ba-933cb999031a:/svn/trunk:108720 +a3a164fe-643b-4d12-8ca0-1e5124d1c943:/svn/JFK-SFO:28628 +a3a164fe-643b-4d12-8ca0-1e5124d1c943:/svn/NBR-PHL:28509 +a3a164fe-643b-4d12-8ca0-1e5124d1c943:/svn/node-origins-bus:28431 +ae6c956b-9dc6-0310-97b2-e73af4192982:/svn/local:8265 +c9b7866f-f5e4-0310-b3ee-a2e1643c603f:/svn/local/new-auto-merge:10428 Propchange: subversion/tags/1.6.17/ -- --- svn:ignore (added) +++ svn:ignore Thu Jun 2 13:58:59 2011 @@ -0,0 +1,44 @@ +ChangeLog* +Makefile +config.cache +config.log +config.nice +config.status +configure +libtool +.gdb_history +*.orig +*.rej +TAGS +tags +neon +build-outputs.mk +autogen-standalone.mk +autom4te.cache +gen-make.opts +tests.log +db4-win32 +db +*.o +*~ +.*~ +apr +apr-util +apr-iconv +Release +Debug
Re: svn commit: r1130688 - in /subversion/trunk/subversion: libsvn_fs_base/tree.c libsvn_fs_fs/tree.c
On Thu, Jun 2, 2011 at 12:49 PM, pbu...@apache.org wrote: Author: pburba Date: Thu Jun 2 17:49:36 2011 New Revision: 1130688 URL: http://svn.apache.org/viewvc?rev=1130688view=rev Log: A partial fix for issue #3896 'mergeinfo syntax errors should be treated gracefully': Tolerate invalid mergeinfo in the repository. This allows 'svn mergeinfo' to function in the presence of of invalid mergeinfo in the repository. It also allows 'svn merge' to function if invalid mergeinfo is inherited by a merge target and the repository must be contacted to find this inherited mergeinfo. * subversion/libsvn_fs_base/tree.c (txn_body_get_mergeinfo_data_and_entries, txn_body_get_mergeinfo_for_path): If invalid mergeinfo is present on a node or inherited from a parent node, then ignore it rather than raising a parse error. * subversion/libsvn_fs_fs/tree.c (crawl_directory_dag_for_mergeinfo, get_mergeinfo_for_path): Same as above. Modified: subversion/trunk/subversion/libsvn_fs_base/tree.c subversion/trunk/subversion/libsvn_fs_fs/tree.c Modified: subversion/trunk/subversion/libsvn_fs_base/tree.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/tree.c?rev=1130688r1=1130687r2=1130688view=diff == --- subversion/trunk/subversion/libsvn_fs_base/tree.c (original) +++ subversion/trunk/subversion/libsvn_fs_base/tree.c Thu Jun 2 17:49:36 2011 @@ -5144,6 +5144,7 @@ txn_body_get_mergeinfo_data_and_entries( apr_hash_t *plist; svn_mergeinfo_t child_mergeinfo; svn_string_t *pval; + svn_error_t *err; SVN_ERR(svn_fs_base__dag_get_proplist(plist, child_node, trail, iterpool)); @@ -5157,13 +5158,26 @@ txn_body_get_mergeinfo_data_and_entries( mergeinfo but doesn't), id_str-data); } - SVN_ERR(svn_mergeinfo_parse(child_mergeinfo, pval-data, - result_pool)); - apr_hash_set(args-result_catalog, - svn_fspath__join(args-node_path, dirent-name, - result_pool), - APR_HASH_KEY_STRING, - child_mergeinfo); + /* Issue #3896: If syntactically invalid mergeinfo is present on + CHILD_NODE then treat it as if no mergeinfo is present rather + than raising a parse error. */ + err = svn_mergeinfo_parse(child_mergeinfo, pval-data, + result_pool); + if (err) + { + if (err-apr_err == SVN_ERR_MERGEINFO_PARSE_ERROR) + svn_error_clear(err); + else + svn_error_return(err); This should be 'return svn_error_return(err);' As it is, this error is just falling on the floor, and causing the current buildbot failures. ... -Hyrum
Re: svn commit: r1129802 - /subversion/trunk/subversion/libsvn_wc/wc-checks.sql
On Tue, May 31, 2011 at 7:03 AM, julianf...@apache.org wrote: Author: julianfoad Date: Tue May 31 17:03:44 2011 New Revision: 1129802 URL: http://svn.apache.org/viewvc?rev=1129802view=rev Log: * subversion/libsvn_wc/wc-checks.sql (validation_03, validation_04): Use more efficient SQL expressions. I am in favor of the EXISTS statement, as I think it communicates our intent better to the database, thus allowing it potentially better optimize statements. It's also useful in communicating intent to other developers. Are there other places we could use it? -Hyrum Modified: subversion/trunk/subversion/libsvn_wc/wc-checks.sql Modified: subversion/trunk/subversion/libsvn_wc/wc-checks.sql URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-checks.sql?rev=1129802r1=1129801r2=1129802view=diff == --- subversion/trunk/subversion/libsvn_wc/wc-checks.sql (original) +++ subversion/trunk/subversion/libsvn_wc/wc-checks.sql Tue May 31 17:03:44 2011 @@ -56,7 +56,8 @@ WHEN NOT ( OR ((SELECT COUNT(*) FROM nodes WHERE wc_id = new.wc_id AND op_depth = new.op_depth - AND local_relpath = new.parent_relpath) == 1) + AND local_relpath = new.parent_relpath + LIMIT 2) == 1) ) BEGIN SELECT RAISE(FAIL, 'WC DB validity check 03 failed'); @@ -66,9 +67,9 @@ END; * parent path. */ CREATE TEMP TRIGGER validation_04 BEFORE INSERT ON actual_node WHEN NOT (new.local_relpath = '' - OR (SELECT COUNT(*) FROM nodes - WHERE wc_id = new.wc_id - AND local_relpath = new.parent_relpath) = 1) + OR EXISTS (SELECT 1 FROM nodes + WHERE wc_id = new.wc_id + AND local_relpath = new.parent_relpath)) BEGIN SELECT RAISE(FAIL, 'WC DB validity check 04 failed'); END;
Re: svn commit: r1125292 - in /subversion/trunk: configure.ac notes/knobs subversion/libsvn_ra/ra_loader.c subversion/svn_private_config.hw
On Fri, May 20, 2011 at 2:28 AM, i...@apache.org wrote: Author: ivan Date: Fri May 20 09:28:57 2011 New Revision: 1125292 URL: http://svn.apache.org/viewvc?rev=1125292view=rev Log: Add DEFAULT_HTTP_LIBRARY define for configuring default HTTP library to use. If this is meant to be at least quasi-public, it should live in the SVN_ namespace. ... -Hyrum
Re: svn commit: r1125708 - /subversion/trunk/tools/dist/backport.pl
On Sat, May 21, 2011 at 7:12 AM, danie...@apache.org wrote: Author: danielsh Date: Sat May 21 14:12:27 2011 New Revision: 1125708 URL: http://svn.apache.org/viewvc?rev=1125708view=rev Log: * tools/dist/backport.pl: New tool to automate merging STATUS entries. I've not reviewed the script, nor do I have a comment on its purpose. Rather, I'm interested in the language choice. This is probably something of a bikeshed, but: $ find tools -name '*.py' | wc -l 70 $ find tools -name '*.pl' | wc -l 7 Most of our build and tools infrastructure is written in Python, and that seems to be the language more of our devs are familiar with. While that doesn't mean we can't have Perl scripts, it just means that the target user and maintainer audience is likely to be smaller than if the tool were written in Python. Just an observation, use it as you will. -Hyrum
Re: svn commit: r1125327 - /subversion/trunk/subversion/svndumpfilter/main.c
This may be picking nits, but is the format for size_t and apr_size_t guaranteed to be the same on all platforms? -Hyrum On Fri, May 20, 2011 at 4:17 AM, phi...@apache.org wrote: Author: philip Date: Fri May 20 11:17:58 2011 New Revision: 1125327 URL: http://svn.apache.org/viewvc?rev=1125327view=rev Log: * subversion/svndumpfilter/main.c (write_prop_to_stringbuf): Followup to r1125288, make format match type. Modified: subversion/trunk/subversion/svndumpfilter/main.c Modified: subversion/trunk/subversion/svndumpfilter/main.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svndumpfilter/main.c?rev=1125327r1=1125326r2=1125327view=diff == --- subversion/trunk/subversion/svndumpfilter/main.c (original) +++ subversion/trunk/subversion/svndumpfilter/main.c Fri May 20 11:17:58 2011 @@ -90,7 +90,7 @@ write_prop_to_stringbuf(svn_stringbuf_t namelen = strlen(name); svn_stringbuf_appendbytes(*strbuf, K , 2); - bytes_used = apr_snprintf(buf, sizeof(buf), %d, namelen); + bytes_used = apr_snprintf(buf, sizeof(buf), % APR_SIZE_T_FMT, namelen); svn_stringbuf_appendbytes(*strbuf, buf, bytes_used); svn_stringbuf_appendbyte(*strbuf, '\n');
Re: svn commit: r1104610 - in /subversion/trunk/subversion/libsvn_wc: props.c wc_db.c wc_db.h
On Wed, May 18, 2011 at 11:13 AM, Bert Huijben b...@qqmail.nl wrote: -Original Message- From: Hyrum K Wright [mailto:hy...@hyrumwright.org] Sent: woensdag 18 mei 2011 11:11 To: Bert Huijben Cc: d...@subversion.apache.org; commits@subversion.apache.org Subject: Re: svn commit: r1104610 - in /subversion/trunk/subversion/libsvn_wc: props.c wc_db.c wc_db.h On Wed, May 18, 2011 at 1:48 AM, Bert Huijben b...@qqmail.nl wrote: -Original Message- From: Hyrum K Wright [mailto:hy...@hyrumwright.org] Sent: woensdag 18 mei 2011 1:11 To: d...@subversion.apache.org Cc: commits@subversion.apache.org Subject: Re: svn commit: r1104610 - in /subversion/trunk/subversion/libsvn_wc: props.c wc_db.c wc_db.h I understand the desire to get the buildbots green again, and I'm sorry these revisions which I committed broke the bots, but a little patience might have been useful here. We have a long tradition of allowing folks to attempt to fix problems, rather than reverting their commits without consultation. I kinda wish you'd have given me another 12 hours to attempt to fix it, rather than reverting. We also have the generic rule that any committer (full or partial) may revert something that makes it impossible for them to do further development. (See hacking) No, we have a policy that people can revert changes to the *build system* which prevent productivity: To prevent loss of productivity, any committer (full or partial) can immediately revert any build system change that breaks their ability to effectively do development on their platform of choice, as a matter of ordinary routing, without fear of accusations of an over-reaction. (From: http://subversion.apache.org/docs/community- guide/building.html#configury ) I'm not trying to play process obstructionist, just noting that a mail mentioning the breakage and indicating your intent to revert would have been a nice consideration. And tomorrow morning the asf repository will be readonly for quite some time, so waiting till after that will probably cause more delays. Besides, you just mailed that you weren't going to fix this issue... :-) I guess I should have been more clear: I'm happy to fix my own breakage to the buildbots. When indicating I was moving on to other things, I didn't know I'd broken the test world. Somehow the test that should have picked up the original failure is broken. It thinks that no output at all for a recursive proplist is ok. So two different bugs (the local changes one; and the base-deleted one) together kept the prop_tests.py 15 test succeeding. Has this bug in the test suite been fixed? If not, I suppose that's a place to start... r1104641 fixes the test suite Great. Thanks for doing this. And r1104631, probably fixes most of the other problems of the patch. (Except for the performance regression of single node property reads, such as used by the merge code) Alrighty, I'll reapply it and see what happens. Is the performance regression theoretical or practical? -Hyrum
Re: svn commit: r1104160 - /subversion/trunk/subversion/libsvn_subr/utf.c
2011/5/18 Branko Čibej br...@e-reka.si: On 17.05.2011 14:16, Hyrum K Wright wrote: apr_atomic_xchgptr() and friends are not available on APR 0.9. (This is causing a buildbot build failure.) Maybe we should just drop support for APR-0.9 finally? I know that we sort of promise to support it, but really, it's been obsolete for years. Yah know, I've been wondering the same thing for a while too. While there might be a theoretical problem in changing our guarantee, I don't think there will be a practical one. (Certainly far less that what may happen with other 1.7 changes.) -Hyrum
Re: svn commit: r1103771 - in /subversion/trunk/subversion: libsvn_client/prop_commands.c svn/propedit-cmd.c svn/propget-cmd.c
On Tue, May 17, 2011 at 7:51 AM, Daniel Shahaf d...@daniel.shahaf.name wrote: hwri...@apache.org wrote on Mon, May 16, 2011 at 15:36:24 -: Author: hwright Date: Mon May 16 15:36:24 2011 New Revision: 1103771 URL: http://svn.apache.org/viewvc?rev=1103771view=rev Log: Convert a bit of the recursive propget to use absolute paths, by doing path relativifcation in the command line program, where it belongs. Note: I *think* this is backwards compatible, since we promise paths, but don't specify absolute or relative in the docs. If somebody has an alternative interpretation, we can do the API-rev dance. * subversion/svn/propget-cmd.c (print_properties): Make a relative path from an absolute one, if possible. * subversion/svn/propedit-cmd.c (svn_cl__propedit): Fetch the property from the hash via absolute path. How can it be a backwards compatible API change if you had to change the API consumer (the cmdline client)? If the consumer depends upon an (undocumented) implementation detail, you can bet it'll need to change when those details change. (Example: anybody relying upon the entries-file implementation detail is going to have a hard time with 1.7.) I maintain that if we didn't document the behavior, existing clients are depending on an implementation detail (which they shouldn't be doing). This doesn't mean we can't rev the API to make things easier for them, but it does mean we are well within our rights to change the implementation and have things break for the consumer. -Hyrum
Re: svn commit: r1104056 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c
On Tue, May 17, 2011 at 8:47 AM, rhuij...@apache.org wrote: Author: rhuijben Date: Tue May 17 08:47:00 2011 New Revision: 1104056 ... Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1104056r1=1104055r2=1104056view=diff == ... @@ -6244,38 +6244,48 @@ op_delete_txn(void *baton, if (op_root) { - svn_boolean_t below_base; - svn_boolean_t below_work; + svn_boolean_t have_base; + svn_boolean_t have_work; svn_wc__db_status_t below_status; - + SVN_DBG((Deleting %s\n, local_relpath)); Rogue debug statement. ... -Hyrum
Re: svn commit: r1104124 - in /subversion/trunk/subversion: include/svn_io.h libsvn_subr/deprecated.c libsvn_subr/io.c
Are there still valid use cases for the normal cstring case? If so, we shouldn't be deprecating the old API, but rather adding a distinct API. -Hyrum On Tue, May 17, 2011 at 10:55 AM, danie...@apache.org wrote: Author: danielsh Date: Tue May 17 10:55:51 2011 New Revision: 1104124 URL: http://svn.apache.org/viewvc?rev=1104124view=rev Log: Revv the svn_io_file_create() API to take non-NUL-terminated strings. * subversion/include/svn_io.h (svn_io_file_create2): New. (svn_io_file_create): Deprecate. * subversion/libsvn_subr/io.c (svn_io_file_create2): Renamed from svn_io_file_create(). * subversion/libsvn_subr/deprecated.c (svn_io_file_create): New wrapper. Modified: subversion/trunk/subversion/include/svn_io.h subversion/trunk/subversion/libsvn_subr/deprecated.c subversion/trunk/subversion/libsvn_subr/io.c Modified: subversion/trunk/subversion/include/svn_io.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_io.h?rev=1104124r1=1104123r2=1104124view=diff == --- subversion/trunk/subversion/include/svn_io.h (original) +++ subversion/trunk/subversion/include/svn_io.h Tue May 17 10:55:51 2011 @@ -645,7 +645,20 @@ svn_io_files_contents_same_p(svn_boolean /** Create file at utf8-encoded @a file with contents @a contents. * @a file must not already exist. * Use @a pool for memory allocations. + * + * @since New in 1.7. + */ +svn_error_t * +svn_io_file_create2(const char *file, + const svn_string_t *contents, + apr_pool_t *scratch_pool); + +/** Like svn_io_file_create2(), but with a C string instead + * of an #svn_string_t. + * + * @deprecated Provided for backward compatibility with the 1.6 API. */ +SVN_DEPRECATED svn_error_t * svn_io_file_create(const char *file, const char *contents, Modified: subversion/trunk/subversion/libsvn_subr/deprecated.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/deprecated.c?rev=1104124r1=1104123r2=1104124view=diff == --- subversion/trunk/subversion/libsvn_subr/deprecated.c (original) +++ subversion/trunk/subversion/libsvn_subr/deprecated.c Tue May 17 10:55:51 2011 @@ -630,6 +630,17 @@ svn_opt_print_generic_help(const char *h /*** From io.c ***/ svn_error_t * +svn_io_file_create(const char *file, + const char *contents, + apr_pool_t *pool) +{ + const svn_string_t *contents_string; + + contents_string = (contents ? svn_string_create(contents, pool) : NULL); + return svn_io_file_create2(file, contents_string, pool); +} + +svn_error_t * svn_io_open_unique_file2(apr_file_t **file, const char **temp_path, const char *path, Modified: subversion/trunk/subversion/libsvn_subr/io.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1104124r1=1104123r2=1104124view=diff == --- subversion/trunk/subversion/libsvn_subr/io.c (original) +++ subversion/trunk/subversion/libsvn_subr/io.c Tue May 17 10:55:51 2011 @@ -1092,9 +1092,9 @@ svn_io_make_dir_recursively(const char * return SVN_NO_ERROR; } -svn_error_t *svn_io_file_create(const char *file, - const char *contents, - apr_pool_t *pool) +svn_error_t *svn_io_file_create2(const char *file, + const svn_string_t *contents, + apr_pool_t *pool) { apr_file_t *f; apr_size_t written; @@ -1104,8 +1104,8 @@ svn_error_t *svn_io_file_create(const ch (APR_WRITE | APR_CREATE | APR_EXCL), APR_OS_DEFAULT, pool)); - if (contents *contents) - err = svn_io_file_write_full(f, contents, strlen(contents), + if (contents contents-len) + err = svn_io_file_write_full(f, contents-data, contents-len, written, pool);
Re: svn commit: r1104160 - /subversion/trunk/subversion/libsvn_subr/utf.c
On Tue, May 17, 2011 at 11:27 AM, stef...@apache.org wrote: Author: stefan2 Date: Tue May 17 11:27:25 2011 New Revision: 1104160 URL: http://svn.apache.org/viewvc?rev=1104160view=rev Log: Speed up UTF8 conversion, especially if APR_HAS_THREADS. Provide global global ... ? ... -Hyrum
Re: svn commit: r1104160 - /subversion/trunk/subversion/libsvn_subr/utf.c
apr_atomic_xchgptr() and friends are not available on APR 0.9. (This is causing a buildbot build failure.) -Hyrum On Tue, May 17, 2011 at 11:27 AM, stef...@apache.org wrote: Author: stefan2 Date: Tue May 17 11:27:25 2011 New Revision: 1104160 URL: http://svn.apache.org/viewvc?rev=1104160view=rev Log: Speed up UTF8 conversion, especially if APR_HAS_THREADS. Provide global * subversion/libsvn_subr/utf.c (SVN_UTF_NTOU_XLATE_HANDLE, SVN_UTF_UTON_XLATE_HANDLE): make them identifiable by address (xlat_ntou_static_handle, xlat_uton_static_handle): introduce global translation map pointers as 1st level cache (get_xlate_handle_node): match standard xlat types by address; try global map pointers first before falling back to the hash (put_xlate_handle_node): match standard xlat types by address; push old global maps to hash Modified: subversion/trunk/subversion/libsvn_subr/utf.c Modified: subversion/trunk/subversion/libsvn_subr/utf.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf.c?rev=1104160r1=1104159r2=1104160view=diff == --- subversion/trunk/subversion/libsvn_subr/utf.c (original) +++ subversion/trunk/subversion/libsvn_subr/utf.c Tue May 17 11:27:25 2011 @@ -29,6 +29,7 @@ #include apr_strings.h #include apr_lib.h #include apr_xlate.h +#include apr_atomic.h #include svn_string.h #include svn_error.h @@ -42,9 +43,13 @@ -#define SVN_UTF_NTOU_XLATE_HANDLE svn-utf-ntou-xlate-handle -#define SVN_UTF_UTON_XLATE_HANDLE svn-utf-uton-xlate-handle -#define SVN_APR_UTF8_CHARSET UTF-8 +/* Use these static strings to maximize performance on standard conversions. + * Any strings on other locations are still valid, however. + */ +static const char *SVN_UTF_NTOU_XLATE_HANDLE = svn-utf-ntou-xlate-handle; +static const char *SVN_UTF_UTON_XLATE_HANDLE = svn-utf-uton-xlate-handle; + +static const char *SVN_APR_UTF8_CHARSET = UTF-8; #if APR_HAS_THREADS static apr_thread_mutex_t *xlate_handle_mutex = NULL; @@ -79,6 +84,13 @@ typedef struct xlate_handle_node_t { memory leak. */ static apr_hash_t *xlate_handle_hash = NULL; +/* 1st level cache to standard conversion maps. We may access these + * using atomic xchange ops, i.e. without further thread synchronization. + * If the respective item is NULL, fallback to hash lookup. + */ +static volatile void *xlat_ntou_static_handle = NULL; +static volatile void *xlat_uton_static_handle = NULL; + /* Clean up the xlate handle cache. */ static apr_status_t xlate_cleanup(void *arg) @@ -91,6 +103,10 @@ xlate_cleanup(void *arg) #endif xlate_handle_hash = NULL; + /* ensure no stale objects get accessed */ + xlat_ntou_static_handle = NULL; + xlat_uton_static_handle = NULL; + return APR_SUCCESS; } @@ -183,6 +199,19 @@ get_xlate_handle_node(xlate_handle_node_ { if (xlate_handle_hash) { + /* 1st level: global, static items */ + if (userdata_key == SVN_UTF_NTOU_XLATE_HANDLE) + old_node = apr_atomic_xchgptr(xlat_ntou_static_handle, NULL); + else if (userdata_key == SVN_UTF_UTON_XLATE_HANDLE) + old_node = apr_atomic_xchgptr(xlat_uton_static_handle, NULL); + + if (old_node old_node-valid) + { + *ret = old_node; + return SVN_NO_ERROR; + } + + /* 2nd level: hash lookup */ #if APR_HAS_THREADS apr_err = apr_thread_mutex_lock(xlate_handle_mutex); if (apr_err != APR_SUCCESS) @@ -321,9 +350,20 @@ put_xlate_handle_node(xlate_handle_node_ assert(node-next == NULL); if (!userdata_key) return; + + /* push previous global node to the hash */ if (xlate_handle_hash) { xlate_handle_node_t **node_p; + + /* 1st level: global, static items */ + if (userdata_key == SVN_UTF_NTOU_XLATE_HANDLE) + node = apr_atomic_xchgptr(xlat_ntou_static_handle, node); + else if (userdata_key == SVN_UTF_UTON_XLATE_HANDLE) + node = apr_atomic_xchgptr(xlat_uton_static_handle, node); + if (node == NULL) + return; + #if APR_HAS_THREADS if (apr_thread_mutex_lock(xlate_handle_mutex) != APR_SUCCESS) SVN_ERR_MALFUNCTION_NO_RETURN();
Re: svn commit: r1104408 - /subversion/trunk/subversion/tests/cmdline/prop_tests.py
For the record, proplist has been broken for a while. :) This test verifies that we fetch the right thing for a given node. My recent changes only changed which nodes the information is fetched on. In other words, I'm not really looking at this right now. -Hyrum On Tue, May 17, 2011 at 5:02 PM, rhuij...@apache.org wrote: Author: rhuijben Date: Tue May 17 17:02:08 2011 New Revision: 1104408 URL: http://svn.apache.org/viewvc?rev=1104408view=rev Log: Add a simple property test to show that proplist is completely broken now. Adding an ACTUAL record makes it impossible to proplist the base values. * subversion/tests/cmdline/prop_tests.py (pristine_props_listed): Add new XFail test. (test_list): Ass pristine_props_listed. Modified: subversion/trunk/subversion/tests/cmdline/prop_tests.py Modified: subversion/trunk/subversion/tests/cmdline/prop_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/prop_tests.py?rev=1104408r1=1104407r2=1104408view=diff == --- subversion/trunk/subversion/tests/cmdline/prop_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/prop_tests.py Tue May 17 17:02:08 2011 @@ -2431,6 +2431,28 @@ def file_matching_dir_prop_reject(sbox): expected_status, None, None, None, None, None, True) +@XFail() +def pristine_props_listed(sbox): + check if pristine properties are visible + + sbox.build() + wc_dir = sbox.wc_dir + + sbox.simple_propset('prop', 'val', 'A') + sbox.simple_commit() + + expected_output = [Properties on ' + sbox.ospath('A') + ':\n, prop\n] + + # Now we see the pristine properties + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'proplist', '-R', wc_dir, '-r', 'BASE') + + sbox.simple_propset('prop', 'needs-fix', 'A') + + # And now we see no property at all + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'proplist', '-R', wc_dir, '-r', 'BASE') + # Run the tests @@ -2472,6 +2494,7 @@ test_list = [ None, atomic_over_ra, propget_redirection, file_matching_dir_prop_reject, + pristine_props_listed, ] if __name__ == '__main__':
Re: svn commit: r1104610 - in /subversion/trunk/subversion/libsvn_wc: props.c wc_db.c wc_db.h
I understand the desire to get the buildbots green again, and I'm sorry these revisions which I committed broke the bots, but a little patience might have been useful here. We have a long tradition of allowing folks to attempt to fix problems, rather than reverting their commits without consultation. I kinda wish you'd have given me another 12 hours to attempt to fix it, rather than reverting. -Hyrum On Tue, May 17, 2011 at 10:40 PM, rhuij...@apache.org wrote: Author: rhuijben Date: Tue May 17 22:40:07 2011 New Revision: 1104610 URL: http://svn.apache.org/viewvc?rev=1104610view=rev Log: Temporarily revert r1104383 (and to resolve conflicts also r1104400) as these revisions cause some very hard to diagnose problems in the property handling, which breaks on all buildbots. * libsvn_wc/props.c * libsvn_wc/wc_db.c * libsvn_wc/wc_db.h svn merge -c -1104400,-1104383 ^/subversion/trunk Modified: subversion/trunk/subversion/libsvn_wc/props.c subversion/trunk/subversion/libsvn_wc/wc_db.c subversion/trunk/subversion/libsvn_wc/wc_db.h Modified: subversion/trunk/subversion/libsvn_wc/props.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1104610r1=1104609r2=1104610view=diff == --- subversion/trunk/subversion/libsvn_wc/props.c (original) +++ subversion/trunk/subversion/libsvn_wc/props.c Tue May 17 22:40:07 2011 @@ -1665,34 +1665,6 @@ svn_wc_prop_list2(apr_hash_t **props, scratch_pool)); } -struct propname_filter_baton_t { - svn_wc__proplist_receiver_t receiver_func; - void *receiver_baton; - const char *propname; -}; - -static svn_error_t * -propname_filter_receiver(void *baton, - const char *local_abspath, - apr_hash_t *props, - apr_pool_t *scratch_pool) -{ - struct propname_filter_baton_t *pfb = baton; - const svn_string_t *propval = apr_hash_get(props, pfb-propname, - APR_HASH_KEY_STRING); - - if (propval) - { - props = apr_hash_make(scratch_pool); - apr_hash_set(props, pfb-propname, APR_HASH_KEY_STRING, propval); - - SVN_ERR(pfb-receiver_func(pfb-receiver_baton, local_abspath, props, - scratch_pool)); - } - - return SVN_NO_ERROR; -} - svn_error_t * svn_wc__prop_list_recursive(svn_wc_context_t *wc_ctx, const char *local_abspath, @@ -1706,23 +1678,40 @@ svn_wc__prop_list_recursive(svn_wc_conte void *cancel_baton, apr_pool_t *scratch_pool) { - svn_wc__proplist_receiver_t receiver = receiver_func; - void *baton = receiver_baton; - - struct propname_filter_baton_t pfb = { receiver_func, receiver_baton, - propname }; - - if (propname) + switch (depth) { - baton = pfb; - receiver = propname_filter_receiver; + case svn_depth_empty: + { + apr_hash_t *props; + + if (pristine) + SVN_ERR(svn_wc__db_read_pristine_props(props, wc_ctx-db, + local_abspath, + scratch_pool, scratch_pool)); + else + SVN_ERR(svn_wc__db_read_props(props, wc_ctx-db, local_abspath, + scratch_pool, scratch_pool)); + + if (receiver_func props apr_hash_count(props) 0) + SVN_ERR((*receiver_func)(receiver_baton, local_abspath, props, + scratch_pool)); + } + break; + case svn_depth_files: + case svn_depth_immediates: + case svn_depth_infinity: + SVN_ERR(svn_wc__db_read_props_streamily(wc_ctx-db, local_abspath, + propname, depth, + base_props, pristine, + receiver_func, receiver_baton, + cancel_func, cancel_baton, + scratch_pool)); + break; + default: + SVN_ERR_MALFUNCTION(); } - return svn_wc__db_read_props_streamily(wc_ctx-db, local_abspath, depth, - base_props, pristine, - receiver, baton, - cancel_func, cancel_baton, - scratch_pool); + return SVN_NO_ERROR; } svn_error_t * Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1104610r1=1104609r2=1104610view=diff
Re: svn commit: r1103765 - in /subversion/trunk/subversion: libsvn_wc/update_editor.c libsvn_wc/wc_db.c libsvn_wc/wc_db.h tests/libsvn_wc/db-test.c tests/libsvn_wc/op-depth-test.c
On Mon, May 16, 2011 at 3:24 PM, stef...@apache.org wrote: Author: stefan2 Date: Mon May 16 15:24:59 2011 New Revision: 1103765 URL: http://svn.apache.org/viewvc?rev=1103765view=rev Log: Finding the w/c base folder using svn_wc__db_wcroot_parse_local_abspath can be expensive if being called for many different paths (e.g. files instead of their parents whose w/c root information already got cached). Please note that this may not reduce the total number of stat calls, yet, as later invocations won't provide an suitable wri_abspath. However, Bert sees that as the basis to future improvements. Let me see if I understand this (at a high level). Instead of needing to fetch the wcroot every time, we provide an already-fetched value to avoid having to stat the local_abspath. I'm not quite sure how I feel about this, personally. I understand the need to continue to improve performance, but the additional conditionals and baggage resulting in carrying around another value and optionally using it feel like it will just muddle the code. Rather than require callers to caching and provide this value, it seems that a more sensible option would be to implement the cache internally. I don't really know what to do about it right now, other than observe that one of the major goals in wc-ng was to make it easier to develop with. If we're just going to start making spaghetti anew, that effort is for not. -Hyrum
Re: svn commit: r1100704 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
On Sun, May 8, 2011 at 3:34 AM, rhuij...@apache.org wrote: Author: rhuijben Date: Sun May 8 08:34:56 2011 New Revision: 1100704 URL: http://svn.apache.org/viewvc?rev=1100704view=rev Log: * subversion/libsvn_wc/wc_db.c (scan_addition_txn, wclock_obtain_cb, svn_wc__db_wclock_obtain, svn_wc__db_wclock_release): Following up on r1100353, resolve a few warnings. Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1100704r1=1100703r2=1100704view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Sun May 8 08:34:56 2011 @@ -8167,7 +8167,7 @@ scan_addition_txn(void *baton, op_depth = svn_sqlite__column_int64(stmt, 0); current_relpath = local_relpath; - for (i = relpath_depth(local_relpath); i op_depth; --i) + for (i = (int)relpath_depth(local_relpath); i op_depth; --i) { /* Calculate the path of the operation root */ repos_prefix_path = @@ -8265,7 +8265,7 @@ scan_addition_txn(void *baton, op_depth = svn_sqlite__column_int64(stmt, 0); /* Skip to op_depth */ - for (i = relpath_depth(current_relpath); i op_depth; i--) + for (i = (int)relpath_depth(current_relpath); i op_depth; i--) { /* Calculate the path of the operation root */ repos_prefix_path = @@ -9570,7 +9570,7 @@ wclock_obtain_cb(void *baton, SVN_ERR(svn_sqlite__get_statement(stmt, wcroot-sdb, STMT_FIND_WC_LOCK)); SVN_ERR(svn_sqlite__bindf(stmt, is, wcroot-wc_id, filter)); - lock_depth = relpath_depth(local_relpath); + lock_depth = (int)relpath_depth(local_relpath); max_depth = lock_depth + bt-levels_to_lock; SVN_ERR(svn_sqlite__step(got_row, stmt)); @@ -9641,7 +9641,7 @@ wclock_obtain_cb(void *baton, { int levels = svn_sqlite__column_int(stmt, 0); if (levels = 0) - levels += relpath_depth(lock_relpath); + levels += (int)relpath_depth(lock_relpath); SVN_ERR(svn_sqlite__reset(stmt)); @@ -9717,7 +9717,7 @@ svn_wc__db_wclock_obtain(svn_wc__db_t *d if (!steal_lock) { int i; - int depth = relpath_depth(local_relpath); + int depth = (int)relpath_depth(local_relpath); for (i = 0; i wcroot-owned_locks-nelts; i++) { @@ -9880,7 +9880,7 @@ wclock_owns_lock(svn_boolean_t *own_lock *own_lock = FALSE; owned_locks = wcroot-owned_locks; - lock_level = relpath_depth(local_relpath); + lock_level = (int)relpath_depth(local_relpath); if (exact) { Instead of all the casting, why don't we just change the types of the various local variables? -Hyrum
Re: svn commit: r1100756 - in /subversion/trunk/subversion/libsvn_wc: update_editor.c wc.h
On Sun, May 8, 2011 at 10:22 AM, rhuij...@apache.org wrote: Author: rhuijben Date: Sun May 8 15:22:01 2011 New Revision: 1100756 URL: http://svn.apache.org/viewvc?rev=1100756view=rev Log: Extract some logic from the update_editor's merge_file code to its own function to allow reusing it from the file external editor. This in preparation for moving file externals from the NODES table to their own EXTERNALS table in wc.db. Wow, that's a pretty big planned change. Could you write up a high-level view of what's happening here, both for those of us attempting to follow along, as well as those who may come along in the future. It isn't readily apparent what is going on here. For instance, I just don't know what problem you're trying to solve that requires the addition of another table (and a corresponding set of queries and joins). ... -Hyrum
Re: svn commit: r1100553 - in /subversion/trunk/tools/dev/benchmarks/large_dirs: ./ create_bigdir.sh
On Sat, May 7, 2011 at 9:41 AM, stef...@apache.org wrote: Author: stefan2 Date: Sat May 7 14:41:28 2011 New Revision: 1100553 URL: http://svn.apache.org/viewvc?rev=1100553view=rev Log: Add a simple test shell script that will execute and gauge basic operations on increasingly large directories in working copies. It supports ra_local and svn protocols as well as valgrind usage. Users may need to adapt the paths at the beginning of the script. * tools/dev/benchmarks/large_dirs/* new benchmark Added: subversion/trunk/tools/dev/benchmarks/large_dirs/ subversion/trunk/tools/dev/benchmarks/large_dirs/create_bigdir.sh (with props) Added: subversion/trunk/tools/dev/benchmarks/large_dirs/create_bigdir.sh URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/benchmarks/large_dirs/create_bigdir.sh?rev=1100553view=auto == --- subversion/trunk/tools/dev/benchmarks/large_dirs/create_bigdir.sh (added) +++ subversion/trunk/tools/dev/benchmarks/large_dirs/create_bigdir.sh Sat May 7 14:41:28 2011 @@ -0,0 +1,180 @@ +#!/bin/bash License block? -Hyrum + +# set SVNPATH to the root of your SVN code working copy + +SVNPATH=$('pwd')/subversion + +# if using the installed svn, you may need to adapt the following. +# Uncomment the VALGRIND line to use that tool instead of time. +# Comment the SVNSERVE line to use file:// instead of svn://. + +SVN=${SVNPATH}/svn/svn +SVNADMIN=${SVNPATH}/svnadmin/svnadmin +SVNSERVE=${SVNPATH}/svnserve/svnserve +# VALGRIND=valgrind --tool=callgrind + +# set your data paths here + +WC=/dev/shm/wc +REPOROOT=/dev/shm + +# number of items per folder on the first run. It will be doubled +# after every iteration. The test will stop if MAXCOUNT has been +# reached or exceeded (and will not be executed for MAXCOUNT). + +FILECOUNT=1 +MAXCOUNT=2 + +# only 1.7 supports server-side caching and uncompressed data transfer + +SERVEROPTS=-c 0 -M 400 + +# from here on, we should be good + +TIMEFORMAT=$'%3R %3U %3S' +REPONAME=dirs +PORT=54321 +if [ ${SVNSERVE} != ] ; then + URL=svn://localhost:$PORT/$REPONAME +else + URL=file://${REPOROOT}/$REPONAME +fi + +# create repository + +rm -rf $WC $REPOROOT/$REPONAME +mkdir $REPOROOT/$REPONAME +${SVNADMIN} create $REPOROOT/$REPONAME +echo -e [general]\nanon-access = write\n $REPOROOT/$REPONAME/conf/svnserve.conf + +# fire up svnserve + +if [ ${SVNSERVE} != ] ; then + VERSION=$( ${SVN} --version | grep version | sed 's/.*\ 1\.\([0-9]\).*/\1/' ) + if [ $VERSION -lt 7 ]; then + SERVEROPTS= + fi + + ${SVNSERVE} -Tdr ${REPOROOT} ${SERVEROPTS} --listen-port ${PORT} --foreground + PID=$! + sleep 1 +fi + +# construct valgrind parameters + +if [ ${VALGRIND} != ] ; then + VG_TOOL=$( echo ${VALGRIND} | sed 's/.*\ --tool=\([a-z]*\).*/\1/' ) + VG_OUTFILE=--${VG_TOOL}-out-file +fi + +# print header + +echo -n using +${SVN} --version | grep version +echo + +# init working copy + +rm -rf $WC +${SVN} co $URL $WC /dev/null + +# functions that execute an SVN command + +run_svn() { + if [ ${VALGRIND} == ] ; then + time ${SVN} $1 $WC/$2 $3 /dev/null + else + ${VALGRIND} ${VG_OUTFILE}=${VG_TOOL}.out.$1.$2 ${SVN} $1 $WC/$2 $3 /dev/null + fi +} + +run_svn_ci() { + if [ ${VALGRIND} == ] ; then + time ${SVN} ci $WC/$1 -m -q /dev/null + else + ${VALGRIND} ${VG_OUTFILE}=${VG_TOOL}.out.ci_$2.$1 ${SVN} ci $WC/$1 -m -q /dev/null + fi +} + +run_svn_cp() { + if [ ${VALGRIND} == ] ; then + time ${SVN} cp $WC/$1 $WC/$2 /dev/null + else + ${VALGRIND} ${VG_OUTFILE}=${VG_TOOL}.out.cp.$1 ${SVN} cp $WC/$1 $WC/$2 /dev/null + fi +} + +run_svn_get() { + if [ ${VALGRIND} == ] ; then + time ${SVN} $1 $URL $WC -q /dev/null + else + ${VALGRIND} ${VG_OUTFILE}=${VG_TOOL}.out.$1.$2 ${SVN} $1 $URL $WC -q /dev/null + fi +} + +# main loop + +while [ $FILECOUNT -lt $MAXCOUNT ]; do + echo Processing $FILECOUNT files in the same folder + + echo -ne \tCreating files ... \t real user sys\n + mkdir $WC/$FILECOUNT + for i in `seq 1 ${FILECOUNT}`; do + echo File number $i $WC/$FILECOUNT/$i + done + + echo -ne \tAdding files ... \t + run_svn add $FILECOUNT -q + + echo -ne \tRunning status ... \t + run_svn st $FILECOUNT -q + + echo -ne \tCommit files ... \t + run_svn_ci $FILECOUNT add + + echo -ne \tListing files ... \t + run_svn ls $FILECOUNT + + echo -ne \tUpdating files ... \t + run_svn up $FILECOUNT -q + + echo -ne \tLocal copy ... \t + run_svn_cp $FILECOUNT ${FILECOUNT}_c + + echo -ne \tCommit copy ... \t + run_svn_ci ${FILECOUNT}_c copy + + echo -ne \tDelete 1 file ... \t + run_svn del ${FILECOUNT}_c -q + + echo -ne \tDeleting files ... \t + time ( + for i in `seq 2 ${FILECOUNT}`; do + ${SVN} del
Re: svn commit: r1100460 - /subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
On Sat, May 7, 2011 at 1:26 AM, gst...@apache.org wrote: Author: gstein Date: Sat May 7 06:26:54 2011 New Revision: 1100460 URL: http://svn.apache.org/viewvc?rev=1100460view=rev Log: Simplify some tree conflict code by removing an (unused) error return. ...and add a bunch of vertical whitespace. :) (I thought you were the guy who advocated separating whitespace and functional changes into separate commits. :P ) ... -Hyrum
Re: svn commit: r1099657 - in /subversion/trunk/subversion/libsvn_wc: adm_ops.c wc_db.c wc_db.h
On Wed, May 4, 2011 at 8:46 PM, gst...@apache.org wrote: Author: gstein Date: Thu May 5 01:46:31 2011 New Revision: 1099657 URL: http://svn.apache.org/viewvc?rev=1099657view=rev Log: Combine the changelist modification notification into the operation itself, so that (in the future) we can make guarantees about dropping the temporary table. Add cancellation support, too. Add a missing clear of the iterpool in db_op_delete. Leave markers for future unification. * subversion/libsvn_wc/wc_db.h: (svn_wc__db_op_set_chnagelist): rename a couple parameters (that differed by a single character) for clarity. add notification and cancellation parameters. (svn_wc__db_changelist_list_notify): remove * subversion/libsvn_wc/wc_db.c: (svn_wc__db_op_set_changelist): combine with ... (svn_wc__db_changelist_list_notify): ... this. leave some comments. adjust a bit of pool usage since we have an iterpool that can be used as a better scratch_pool in the early part of the function. early-exit if there is no NOTIFY_FUNC. fix an implicit 64-bit to 32-bit conversion for the ACTION localvar. add cancellation. (svn_wc__db_op_delete): clear the iterpool, and adjust some localvar initialization to after that call. * subversion/libsvn_wc/adm_ops.c: (add_from_disk, changelist_walker): shift the notification directly into the call to db_op_set_changelist. Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c subversion/trunk/subversion/libsvn_wc/wc_db.c subversion/trunk/subversion/libsvn_wc/wc_db.h What does it mean to cancel during notification? Historically, notifications were interleaved with the operations, and if a user cancelled during the notification, they cancelled the remaining bits of the operation as well (leaving the wc in some possibly funky state). To the user, notification *was* the operation. You've now changed those semantics. Even though a user may cancel in the middle of a set of notifications, they haven't really interrupted the operation. As a result, they may never get a notification for those operations, even thought they were successful, and committed to the DB. (The notification items are still pending in the DB, but we've got no way to retrieve them.) We ought to think carefully about introducing this change of behavior. And part of me wonders why notifications would be long running enough to require cancellation, particularly since we are no longer interleaving them with Real Work. -Hyrum