svn commit: r1152115 - /subversion/trunk/subversion/tests/cmdline/copy_tests.py
Author: hwright Date: Fri Jul 29 06:05:52 2011 New Revision: 1152115 URL: http://svn.apache.org/viewvc?rev=1152115view=rev Log: Add a couple of tests in followup to r1152026. (There's probably an issue this is associated with, but I'm not sure which one it is. If you know, please update the tests and this log message!) * subversion/tests/cmdline/copy_tests.py (commit_copied_half_of_move, commit_deleted_half_of_move): New. (test_list): Run the new tests. Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1152115r1=1152114r2=1152115view=diff == --- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Fri Jul 29 06:05:52 2011 @@ -5442,6 +5442,36 @@ def copy_and_move_conflicts(sbox): svntest.actions.verify_disk(wc('move-dest'), expected_disk, True) +def commit_copied_half_of_move(sbox): + attempt to commit the copied part of move + sbox.build() + wc_dir = sbox.wc_dir + + iota_path = os.path.join(wc_dir, 'iota') + D_path = os.path.join(wc_dir, 'A', 'D') + + svntest.actions.run_and_verify_svn(None, None, [], 'mv', iota_path, D_path) + + expected_error = svn: E29: Cannot commit + svntest.actions.run_and_verify_svn(None, None, expected_error, + 'commit', '-m', 'foo', D_path) + + +@XFail() +def commit_deleted_half_of_move(sbox): + attempt to commit the deleted part of move + sbox.build() + wc_dir = sbox.wc_dir + + iota_path = os.path.join(wc_dir, 'iota') + D_path = os.path.join(wc_dir, 'A', 'D') + + svntest.actions.run_and_verify_svn(None, None, [], 'mv', iota_path, D_path) + + expected_error = svn: E29: Cannot commit + svntest.actions.run_and_verify_svn(None, None, expected_error, + 'commit', '-m', 'foo', iota_path) + # Run the tests @@ -5551,6 +5581,8 @@ test_list = [ None, copy_base_of_deleted, case_only_rename, copy_and_move_conflicts, + commit_copied_half_of_move, + commit_deleted_half_of_move, ] if __name__ == '__main__':
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/
svn commit: r1152117 - /subversion/trunk/subversion/tests/cmdline/copy_tests.py
Author: danielsh Date: Fri Jul 29 06:26:08 2011 New Revision: 1152117 URL: http://svn.apache.org/viewvc?rev=1152117view=rev Log: * subversion/tests/cmdline/copy_tests.py (commit_copied_half_of_move, commit_deleted_half_of_move): Don't create a repository for these tests. Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1152117r1=1152116r2=1152117view=diff == --- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Fri Jul 29 06:26:08 2011 @@ -5444,7 +5444,7 @@ def copy_and_move_conflicts(sbox): def commit_copied_half_of_move(sbox): attempt to commit the copied part of move - sbox.build() + sbox.build(read_only = True) wc_dir = sbox.wc_dir iota_path = os.path.join(wc_dir, 'iota') @@ -5460,7 +5460,7 @@ def commit_copied_half_of_move(sbox): @XFail() def commit_deleted_half_of_move(sbox): attempt to commit the deleted part of move - sbox.build() + sbox.build(read_only = True) wc_dir = sbox.wc_dir iota_path = os.path.join(wc_dir, 'iota')
svn commit: r1152129 - /subversion/trunk/subversion/libsvn_subr/svn_cache_config.c
Author: danielsh Date: Fri Jul 29 07:36:34 2011 New Revision: 1152129 URL: http://svn.apache.org/viewvc?rev=1152129view=rev Log: Plug a memory leak. * subversion/libsvn_subr/svn_cache_config.c (svn_cache__get_global_membuffer_cache): Set the allocator's owner so that it is freed. Review by: rhuijben Modified: subversion/trunk/subversion/libsvn_subr/svn_cache_config.c Modified: subversion/trunk/subversion/libsvn_subr/svn_cache_config.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/svn_cache_config.c?rev=1152129r1=1152128r2=1152129view=diff == --- subversion/trunk/subversion/libsvn_subr/svn_cache_config.c (original) +++ subversion/trunk/subversion/libsvn_subr/svn_cache_config.c Fri Jul 29 07:36:34 2011 @@ -113,6 +113,7 @@ svn_cache__get_global_membuffer_cache(vo apr_pool_create_ex(pool, NULL, NULL, allocator); if (pool == NULL) return NULL; + apr_allocator_owner_set(allocator, pool); err = svn_cache__membuffer_cache_create( new_cache,
svn commit: r1152131 - /subversion/branches/1.7.x/STATUS
Author: danielsh Date: Fri Jul 29 07:38:22 2011 New Revision: 1152131 URL: http://svn.apache.org/viewvc?rev=1152131view=rev Log: Nominate r1152129. 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=1152131r1=1152130r2=1152131view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Fri Jul 29 07:38:22 2011 @@ -183,6 +183,13 @@ Candidate changes: Votes: +1: cmpilato + * r1152129 + Plug a memory leak. + Justification: + Use the APR API properly. Resolves a valgrind warning. + Votes: + +1: danielsh + Veto-blocked changes: =
svn commit: r1152140 - /subversion/trunk/subversion/libsvn_client/merge.c
Author: rhuijben Date: Fri Jul 29 08:13:49 2011 New Revision: 1152140 URL: http://svn.apache.org/viewvc?rev=1152140view=rev Log: * subversion/libsvn_client/merge.c (merge_reintegrate_locked): Open the source ra session with the function that can translate revisions instead of trying to convert a revision based on the possibly unrelated current directory after opening the ra session. 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=1152140r1=1152139r2=1152140view=diff == --- subversion/trunk/subversion/libsvn_client/merge.c (original) +++ subversion/trunk/subversion/libsvn_client/merge.c Fri Jul 29 08:13:49 2011 @@ -10572,6 +10572,7 @@ merge_reintegrate_locked(const char *sou const char *target_url; svn_revnum_t target_base_rev; svn_node_kind_t kind; + svn_opt_revision_t no_rev; /* Make sure the target is really there. */ SVN_ERR(svn_io_check_path(target_abspath, kind, scratch_pool)); @@ -10643,20 +10644,16 @@ merge_reintegrate_locked(const char *sou NULL, ctx, scratch_pool, scratch_pool)); /* Open two RA sessions, one to our source and one to our target. */ + no_rev.kind = svn_opt_revision_unspecified; + SVN_ERR(svn_client__ra_session_from_path(source_ra_session, rev2, url2, + url2, NULL, peg_revision, no_rev, + ctx, scratch_pool)); SVN_ERR(svn_wc__node_get_url(target_url, ctx-wc_ctx, target_abspath, scratch_pool, scratch_pool)); SVN_ERR(svn_client__open_ra_session_internal(target_ra_session, NULL, target_url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool)); - SVN_ERR(svn_client__open_ra_session_internal(source_ra_session, NULL, - url2, NULL, NULL, FALSE, FALSE, - ctx, scratch_pool)); - - SVN_ERR(svn_client__get_revision_number(rev2, NULL, ctx-wc_ctx, - , - source_ra_session, peg_revision, - scratch_pool)); SVN_ERR(calculate_left_hand_side(url1, rev1, merged_to_source_mergeinfo_catalog,
svn commit: r1152142 - /subversion/trunk/subversion/tests/libsvn_wc/create_wc_for_upgrade.sh
Author: danielsh Date: Fri Jul 29 08:33:00 2011 New Revision: 1152142 URL: http://svn.apache.org/viewvc?rev=1152142view=rev Log: Resolve an old TODO. * subversion/tests/libsvn_wc/create_wc_for_upgrade.sh: Teach the code a little Greek. Modified: subversion/trunk/subversion/tests/libsvn_wc/create_wc_for_upgrade.sh Modified: subversion/trunk/subversion/tests/libsvn_wc/create_wc_for_upgrade.sh URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/create_wc_for_upgrade.sh?rev=1152142r1=1152141r2=1152142view=diff == --- subversion/trunk/subversion/tests/libsvn_wc/create_wc_for_upgrade.sh (original) +++ subversion/trunk/subversion/tests/libsvn_wc/create_wc_for_upgrade.sh Fri Jul 29 08:33:00 2011 @@ -83,10 +83,10 @@ echo epsilon epsilon ### row is created). # a file with just .working -### what comes after epsilon?? -echo lambda lambda -${SVN} add lambda -${SVN} propset l-prop l-value lambda +# zeta = epsilon+1 +echo zeta zeta +${SVN} add zeta +${SVN} propset z-prop z-value zeta # a file with .base and .working ${SVN} propset b-more b-value2 beta
svn propchange: r1152115 - svn:log
Author: stsp Revision: 1152115 Modified property: svn:log Modified: svn:log at Fri Jul 29 09:42:46 2011 -- --- svn:log (original) +++ svn:log Fri Jul 29 09:42:46 2011 @@ -1,7 +1,6 @@ Add a couple of tests in followup to r1152026. -(There's probably an issue this is associated with, but I'm not sure which one -it is. If you know, please update the tests and this log message!) +These tests belong to issue #3631. * subversion/tests/cmdline/copy_tests.py (commit_copied_half_of_move, commit_deleted_half_of_move): New.
svn commit: r1152153 - /subversion/trunk/subversion/tests/cmdline/copy_tests.py
Author: stsp Date: Fri Jul 29 09:55:26 2011 New Revision: 1152153 URL: http://svn.apache.org/viewvc?rev=1152153view=rev Log: * subversion/tests/cmdline/copy_tests.py (commit_copied_half_of_move, commit_deleted_half_of_move): Add issue number. Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1152153r1=1152152r2=1152153view=diff == --- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Fri Jul 29 09:55:26 2011 @@ -5442,6 +5442,7 @@ def copy_and_move_conflicts(sbox): svntest.actions.verify_disk(wc('move-dest'), expected_disk, True) +@Issue(3631) def commit_copied_half_of_move(sbox): attempt to commit the copied part of move sbox.build(read_only = True) @@ -5457,6 +5458,7 @@ def commit_copied_half_of_move(sbox): 'commit', '-m', 'foo', D_path) +@Issue(3631) @XFail() def commit_deleted_half_of_move(sbox): attempt to commit the deleted part of move
svn commit: r1152154 - /subversion/branches/1.7.x/STATUS
Author: stsp Date: Fri Jul 29 10:07:20 2011 New Revision: 1152154 URL: http://svn.apache.org/viewvc?rev=1152154view=rev Log: * STATUS: Vote for r1152129. 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=1152154r1=1152153r2=1152154view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Fri Jul 29 10:07:20 2011 @@ -188,7 +188,7 @@ Candidate changes: Justification: Use the APR API properly. Resolves a valgrind warning. Votes: - +1: danielsh + +1: danielsh, stsp Veto-blocked changes: =
svn commit: r1152172 - /subversion/branches/1.7.x/STATUS
Author: rhuijben Date: Fri Jul 29 11:33:16 2011 New Revision: 1152172 URL: http://svn.apache.org/viewvc?rev=1152172view=rev Log: * STATUS: Cast vote. 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=1152172r1=1152171r2=1152172view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Fri Jul 29 11:33:16 2011 @@ -183,13 +183,6 @@ Candidate changes: Votes: +1: cmpilato - * r1152129 - Plug a memory leak. - Justification: - Use the APR API properly. Resolves a valgrind warning. - Votes: - +1: danielsh, stsp - Veto-blocked changes: = @@ -227,3 +220,9 @@ Approved changes: Votes: +1: philip, stsp, danielsh + * r1152129 + Plug a memory leak. + Justification: + Use the APR API properly. Resolves a valgrind warning. + Votes: + +1: danielsh, stsp, rhuijben
svn propchange: r1151270 - svn:log
Author: arfrever Revision: 1151270 Modified property: svn:log Modified: svn:log at Fri Jul 29 12:04:20 2011 -- --- svn:log (original) +++ svn:log Fri Jul 29 12:04:20 2011 @@ -1,6 +1,6 @@ -Use gnugp.py module to interact with gpg in verifying signatures. +Use gnupg.py module to interact with gpg in verifying signatures. -The gpupg.py module is available under the New BSD license from the Google +The gnupg.py module is available under the New BSD license from the Google Code page: http://code.google.com/p/python-gnupg/
svn commit: r1152189 - /subversion/trunk/subversion/tests/cmdline/copy_tests.py
Author: rhuijben Date: Fri Jul 29 12:46:38 2011 New Revision: 1152189 URL: http://svn.apache.org/viewvc?rev=1152189view=rev Log: Add a test on copying a deleted node which happens to exist on disk. Currently this tests raises an assertion on 1.7.x and trunk. * subversion/tests/cmdline/copy_tests.py (copy_deleted_dir): New test. Inserted before new in 1.8 tests, as I assume it will be backported to 1.7. (test_list): Add copy_deleted_dir. Found by: stsp Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1152189r1=1152188r2=1152189view=diff == --- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Fri Jul 29 12:46:38 2011 @@ -5441,6 +5441,36 @@ def copy_and_move_conflicts(sbox): }) svntest.actions.verify_disk(wc('move-dest'), expected_disk, True) +@XFail() +def copy_deleted_dir(sbox): + try to copy a deleted directory that exists + sbox.build(read_only = True) + + sbox.simple_rm('iota') + sbox.simple_rm('A') + + svntest.actions.run_and_verify_svn(None, None, + 'svn: E145000: Path.* does not exist', + 'cp', sbox.ospath('iota'), + sbox.ospath('new_iota')) + svntest.actions.run_and_verify_svn(None, None, + 'svn: E145000: Path.* does not exist', + 'cp', sbox.ospath('A/D'), + sbox.ospath('new_D')) + + svntest.main.file_write(sbox.ospath('iota'), 'Not iota!') + os.mkdir(sbox.ospath('A')) + os.mkdir(sbox.ospath('A/D')) + + # These two invocations raise an assertion. + svntest.actions.run_and_verify_svn(None, None, + 'svn: E155035: Deleted node.* can\'t be.*', + 'cp', sbox.ospath('iota'), + sbox.ospath('new_iota')) + svntest.actions.run_and_verify_svn(None, None, + 'svn: E155035: Deleted node.* can\'t be.*', + 'cp', sbox.ospath('A/D'), + sbox.ospath('new_D')) @Issue(3631) def commit_copied_half_of_move(sbox): @@ -5583,6 +5613,7 @@ test_list = [ None, copy_base_of_deleted, case_only_rename, copy_and_move_conflicts, + copy_deleted_dir, commit_copied_half_of_move, commit_deleted_half_of_move, ]
svn commit: r1152190 - in /subversion/trunk/subversion: libsvn_wc/copy.c tests/cmdline/copy_tests.py
Author: rhuijben Date: Fri Jul 29 12:47:52 2011 New Revision: 1152190 URL: http://svn.apache.org/viewvc?rev=1152190view=rev Log: * subversion/libsvn_wc/copy.c (copy_or_move): Deny deleting nodes that don't exist in the working copy. * subversion/tests/cmdline/copy_tests.py (copy_deleted_dir): Remove XFail marker. Modified: subversion/trunk/subversion/libsvn_wc/copy.c subversion/trunk/subversion/tests/cmdline/copy_tests.py Modified: subversion/trunk/subversion/libsvn_wc/copy.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/copy.c?rev=1152190r1=1152189r2=1152190view=diff == --- subversion/trunk/subversion/libsvn_wc/copy.c (original) +++ subversion/trunk/subversion/libsvn_wc/copy.c Fri Jul 29 12:47:52 2011 @@ -627,6 +627,23 @@ copy_or_move(svn_wc_context_t *wc_ctx, else SVN_ERR(err); +switch (src_status) + { +case svn_wc__db_status_deleted: + return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL, + _(Deleted node '%s' can't be copied.), + svn_dirent_local_style(src_abspath, + scratch_pool)); + +case svn_wc__db_status_excluded: +case svn_wc__db_status_server_excluded: +case svn_wc__db_status_not_present: + return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL, + _(The node '%s' was not found.), + svn_dirent_local_style(src_abspath, + scratch_pool)); + } + SVN_ERR(svn_wc__db_read_info(dstdir_status, NULL, NULL, NULL, dst_repos_root_url, dst_repos_uuid, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1152190r1=1152189r2=1152190view=diff == --- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Fri Jul 29 12:47:52 2011 @@ -5441,7 +5441,6 @@ def copy_and_move_conflicts(sbox): }) svntest.actions.verify_disk(wc('move-dest'), expected_disk, True) -@XFail() def copy_deleted_dir(sbox): try to copy a deleted directory that exists sbox.build(read_only = True)
svn propchange: r1152193 - svn:log
Author: rhuijben Revision: 1152193 Modified property: svn:log Modified: svn:log at Fri Jul 29 12:55:57 2011 -- --- svn:log (original) +++ svn:log Fri Jul 29 12:55:57 2011 @@ -1 +1 @@ -* STATUS: Nominate rr1152189, r1152190 +* STATUS: Nominate r1152189, r1152190.
svn commit: r1152204 - in /subversion/trunk/subversion: include/private/svn_wc_private.h libsvn_wc/node.c
Author: stsp Date: Fri Jul 29 13:12:39 2011 New Revision: 1152204 URL: http://svn.apache.org/viewvc?rev=1152204view=rev Log: Add a new internal API function: svn_wc__node_get_deleted_ancestor(). This will be needed for handling moves during commit processing. * subversion/include/private/svn_wc_private.h (svn_wc__node_get_deleted_ancestor): Declare. * subversion/libsvn_wc/node.c (svn_wc__node_get_deleted_ancestor): Implement. This function returns the absolute path of the deletion op-root of a given deleted LOCAL_ABSPATH. Modified: subversion/trunk/subversion/include/private/svn_wc_private.h subversion/trunk/subversion/libsvn_wc/node.c Modified: subversion/trunk/subversion/include/private/svn_wc_private.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1152204r1=1152203r2=1152204view=diff == --- subversion/trunk/subversion/include/private/svn_wc_private.h (original) +++ subversion/trunk/subversion/include/private/svn_wc_private.h Fri Jul 29 13:12:39 2011 @@ -466,6 +466,22 @@ svn_wc__node_is_status_deleted(svn_boole apr_pool_t *scratch_pool); /** + * Set @a *deleted_ancestor_abspath to the root of the delete operation + * that deleted @a local_abspath. If @a local_abspath itself was deleted + * and has no deleted ancestor, @a *deleted_ancestor_abspath will equal + * @a local_abspath. If @a local_abspath was not deleted, + * set @a *deleted_ancestor_abspath to @c NULL. + * @a *deleted_ancestor_abspath is allocated in @a result_pool. + * Use @a scratch_pool for all temporary allocations. + */ +svn_error_t * +svn_wc__node_get_deleted_ancestor(const char **deleted_ancestor_abspath, + svn_wc_context_t *wc_ctx, + const char *local_abspath, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/** * Set @a *is_server_excluded to whether @a local_abspath has been * excluded by the server, using @a wc_ctx. If @a local_abspath is not * in the working copy, return @c SVN_ERR_WC_PATH_NOT_FOUND. Modified: subversion/trunk/subversion/libsvn_wc/node.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1152204r1=1152203r2=1152204view=diff == --- subversion/trunk/subversion/libsvn_wc/node.c (original) +++ subversion/trunk/subversion/libsvn_wc/node.c Fri Jul 29 13:12:39 2011 @@ -748,6 +748,33 @@ svn_wc__node_is_status_deleted(svn_boole } svn_error_t * +svn_wc__node_get_deleted_ancestor(const char **deleted_ancestor_abspath, + svn_wc_context_t *wc_ctx, + const char *local_abspath, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool) +{ + svn_wc__db_status_t status; + + *deleted_ancestor_abspath = NULL; + + SVN_ERR(svn_wc__db_read_info(status, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, + wc_ctx-db, local_abspath, + scratch_pool, scratch_pool)); + + if (status == svn_wc__db_status_deleted) +SVN_ERR(svn_wc__db_scan_deletion(deleted_ancestor_abspath, NULL, NULL, + wc_ctx-db, local_abspath, + result_pool, scratch_pool)); + + return SVN_NO_ERROR; +} + +svn_error_t * svn_wc__node_is_status_server_excluded(svn_boolean_t *is_server_excluded, svn_wc_context_t *wc_ctx, const char *local_abspath,
svn commit: r1152245 - in /subversion/trunk/subversion: libsvn_client/commit.c libsvn_wc/wc_db.c
Author: stsp Date: Fri Jul 29 14:48:18 2011 New Revision: 1152245 URL: http://svn.apache.org/viewvc?rev=1152245view=rev Log: Update moved-to information on the BASE path of a node which is being moved out of, or within, an existing moved subtree. Also, make 'svn commit' deal with the add-half of such moves correctly. * subversion/libsvn_wc/wc_db.c (op_delete_txn): If the node was moved-here and we are moving it away, we always want to update moved-to in BASE, regardless of whether the node itself was the op-root of the move that moved it here. Prior to this commit, we only updated moved-to if the node itself was the op-root. * subversion/libsvn_client/commit.c (svn_client_commit5): If the delete-half of a move is not in the commit target list, look up the op-root of the delete and check if the op-root is among the commit targets. If it is, the delete-half of the move will be committed along with it, and we can allow the commit. Modified: subversion/trunk/subversion/libsvn_client/commit.c subversion/trunk/subversion/libsvn_wc/wc_db.c Modified: subversion/trunk/subversion/libsvn_client/commit.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=1152245r1=1152244r2=1152245view=diff == --- subversion/trunk/subversion/libsvn_client/commit.c (original) +++ subversion/trunk/subversion/libsvn_client/commit.c Fri Jul 29 14:48:18 2011 @@ -1379,19 +1379,72 @@ svn_client_commit5(const apr_array_heade 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) + strcmp(moved_from_abspath, delete_op_root_abspath) == 0) + { - 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; + svn_boolean_t found_delete_half = +(apr_hash_get(committables-by_path, delete_op_root_abspath, + APR_HASH_KEY_STRING) != NULL); + + if (!found_delete_half) +{ + const char *delete_half_parent_abspath; + + /* The delete-half isn't in the commit target list. + * However, it might itself be the child of a deleted node, + * either because of another move or a deletion. + * + * For example, consider: mv A/B B; mv B/C C; commit; + * C's moved-from A/B/C is a child of the deleted A/B. + * A/B/C does not appear in the commit target list, but + * A/B does appear. + * (Note that moved-from information is always stored + * relative to the BASE tree, so we have 'C moved-from + * A/B/C', not 'C moved-from B/C'.) + * + * An example involving a move and a delete would be: + * mv A/B C; rm A; commit; + * Now C is moved-from A/B which does not appear in the + * commit target list, but A does appear. + */ + + /* Scan upwards for a deletion op-root from the + * delete-half's parent directory. */ + delete_half_parent_abspath = +svn_dirent_dirname(delete_op_root_abspath, iterpool); + if (strcmp(delete_op_root_abspath, + delete_half_parent_abspath) != 0) +{ + const char *parent_delete_op_root_abspath; + + cmt_err = svn_error_trace( + svn_wc__node_get_deleted_ancestor( +parent_delete_op_root_abspath, +ctx-wc_ctx, delete_half_parent_abspath, +iterpool, iterpool)); + if (cmt_err) +goto cleanup; + + if (parent_delete_op_root_abspath) +found_delete_half = + (apr_hash_get(committables-by_path, +parent_delete_op_root_abspath, +APR_HASH_KEY_STRING) !=
svn commit: r1152246 - /subversion/trunk/subversion/tests/cmdline/copy_tests.py
Author: stsp Date: Fri Jul 29 14:50:25 2011 New Revision: 1152246 URL: http://svn.apache.org/viewvc?rev=1152246view=rev Log: * subversion/tests/cmdline/copy_tests.py (commit_deleted_half_of_nested_move, test_list): New XFail test which shows a case where recording of moved-to information doesn't work yet. Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1152246r1=1152245r2=1152246view=diff == --- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Fri Jul 29 14:50:25 2011 @@ -5486,6 +5486,46 @@ def commit_copied_half_of_move(sbox): svntest.actions.run_and_verify_svn(None, None, expected_error, 'commit', '-m', 'foo', D_path) +@Issue(3631) +@XFail() +def commit_copied_half_of_nested_move(sbox): + attempt to commit the copied part of a nested move + sbox.build(read_only = True) + wc_dir = sbox.wc_dir + + iota_path = sbox.ospath('iota') + D_path = sbox.ospath('A/D') + + # iota - A/D/iota; verify we cannot commit just A/D + svntest.actions.run_and_verify_svn(None, None, [], 'mv', iota_path, D_path) + expected_error = svn: E29: Cannot commit '.*%s' because it was \ +moved from '.*%s' % (os.path.join(D_path, iota), + iota_path) + svntest.actions.run_and_verify_svn(None, None, expected_error, + 'commit', '-m', 'foo', D_path) + + # A/D - A/C/D; verify we cannot commit just A/C + C_path = sbox.ospath('A/C') + + svntest.actions.run_and_verify_svn(None, None, [], 'mv', D_path, C_path) + expected_error = svn: E29: Cannot commit '.*%s' because it was \ +moved from '.*%s' % (os.path.join(C_path, D), + D_path) + svntest.actions.run_and_verify_svn(None, None, expected_error, + 'commit', '-m', 'foo', C_path) + + # A/C/D/iota - A/iota; verify that iota's moved-from hasn't changed + ### This currently fails because iota's moved-from info isn't updated + ### during the A/D-A/C/D move. + D_iota_path = sbox.ospath('A/C/D/iota') + A_iota_path = sbox.ospath('A/iota') + svntest.actions.run_and_verify_svn(None, None, [], 'mv', D_iota_path, + A_iota_path) + expected_error = svn: E29: Cannot commit '.*%s' because it was \ +moved from '.*%s' % (A_iota_path, iota_path) + svntest.actions.run_and_verify_svn(None, None, expected_error, + 'commit', '-m', 'foo', A_iota_path) + @Issue(3631) @XFail() @@ -5614,6 +5654,7 @@ test_list = [ None, copy_and_move_conflicts, copy_deleted_dir, commit_copied_half_of_move, + commit_copied_half_of_nested_move, commit_deleted_half_of_move, ]
svn commit: r1152260 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_subr/svn_cache_config.c
Author: hwright Date: Fri Jul 29 15:19:21 2011 New Revision: 1152260 URL: http://svn.apache.org/viewvc?rev=1152260view=rev Log: Merge r1152129 from trunk: * r1152129 Plug a memory leak. Justification: Use the APR API properly. Resolves a valgrind warning. Votes: +1: danielsh, stsp, rhuijben Modified: subversion/branches/1.7.x/ (props changed) subversion/branches/1.7.x/STATUS subversion/branches/1.7.x/subversion/libsvn_subr/svn_cache_config.c Propchange: subversion/branches/1.7.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jul 29 15:19:21 2011 @@ -54,4 +54,4 @@ /subversion/branches/tree-conflicts:868291-873154 /subversion/branches/tree-conflicts-notify:873926-874008 /subversion/branches/uris-as-urls:1060426-1064427 -/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150372,1151036 +/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150372,1151036,1152129 Modified: subversion/branches/1.7.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1152260r1=1152259r2=1152260view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Fri Jul 29 15:19:21 2011 @@ -226,10 +226,3 @@ Approved changes: A regression from 1.6. Votes: +1: philip, stsp, danielsh - - * r1152129 - Plug a memory leak. - Justification: - Use the APR API properly. Resolves a valgrind warning. - Votes: - +1: danielsh, stsp, rhuijben Modified: subversion/branches/1.7.x/subversion/libsvn_subr/svn_cache_config.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_subr/svn_cache_config.c?rev=1152260r1=1152259r2=1152260view=diff == --- subversion/branches/1.7.x/subversion/libsvn_subr/svn_cache_config.c (original) +++ subversion/branches/1.7.x/subversion/libsvn_subr/svn_cache_config.c Fri Jul 29 15:19:21 2011 @@ -113,6 +113,7 @@ svn_cache__get_global_membuffer_cache(vo apr_pool_create_ex(pool, NULL, NULL, allocator); if (pool == NULL) return NULL; + apr_allocator_owner_set(allocator, pool); err = svn_cache__membuffer_cache_create( new_cache,
svn commit: r1152261 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_wc/adm_ops.c subversion/tests/cmdline/special_tests.py
Author: hwright Date: Fri Jul 29 15:20:55 2011 New Revision: 1152261 URL: http://svn.apache.org/viewvc?rev=1152261view=rev Log: Merge r1150812 from trunk: * r1150812 Issue 3972, spurious revert notification on symlinks Justification: A regression from 1.6. Votes: +1: philip, stsp, danielsh Modified: subversion/branches/1.7.x/ (props changed) subversion/branches/1.7.x/STATUS subversion/branches/1.7.x/subversion/libsvn_wc/adm_ops.c subversion/branches/1.7.x/subversion/tests/cmdline/special_tests.py Propchange: subversion/branches/1.7.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jul 29 15:20:55 2011 @@ -54,4 +54,4 @@ /subversion/branches/tree-conflicts:868291-873154 /subversion/branches/tree-conflicts-notify:873926-874008 /subversion/branches/uris-as-urls:1060426-1064427 -/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150372,1151036,1152129 +/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150372,1150812,1151036,1152129 Modified: subversion/branches/1.7.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1152261r1=1152260r2=1152261view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Fri Jul 29 15:20:55 2011 @@ -219,10 +219,3 @@ Approved changes: this revision depends for a clean merge). Votes: +1: rhuijben, danielsh, cmpilato - - * r1150812 - Issue 3972, spurious revert notification on symlinks - Justification: - A regression from 1.6. - Votes: - +1: philip, stsp, danielsh Modified: subversion/branches/1.7.x/subversion/libsvn_wc/adm_ops.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/adm_ops.c?rev=1152261r1=1152260r2=1152261view=diff == --- subversion/branches/1.7.x/subversion/libsvn_wc/adm_ops.c (original) +++ subversion/branches/1.7.x/subversion/libsvn_wc/adm_ops.c Fri Jul 29 15:20:55 2011 @@ -1389,8 +1389,6 @@ revert_restore(svn_wc__db_t *db, else if (on_disk == svn_node_file) { svn_boolean_t modified; - svn_boolean_t executable; - svn_boolean_t read_only; apr_hash_t *props; #ifdef HAVE_SYMLINK svn_string_t *special_prop; @@ -1438,11 +1436,6 @@ revert_restore(svn_wc__db_t *db, db, local_abspath, TRUE, scratch_pool)); - SVN_ERR(svn_io__is_finfo_executable(executable, finfo, - scratch_pool)); - SVN_ERR(svn_io__is_finfo_read_only(read_only, finfo, - scratch_pool)); - if (modified) { SVN_ERR(svn_io_remove_file2(local_abspath, FALSE, @@ -1451,10 +1444,12 @@ revert_restore(svn_wc__db_t *db, } else { + svn_boolean_t read_only; svn_string_t *needs_lock_prop; -#if !defined(WIN32) !defined(__OS2__) - svn_string_t *executable_prop; -#endif + + SVN_ERR(svn_io__is_finfo_read_only(read_only, finfo, + scratch_pool)); + needs_lock_prop = apr_hash_get(props, SVN_PROP_NEEDS_LOCK, APR_HASH_KEY_STRING); if (needs_lock_prop !read_only) @@ -1471,19 +1466,31 @@ revert_restore(svn_wc__db_t *db, } #if !defined(WIN32) !defined(__OS2__) - executable_prop = apr_hash_get(props, SVN_PROP_EXECUTABLE, - APR_HASH_KEY_STRING); - if (executable_prop !executable) -{ - SVN_ERR(svn_io_set_file_executable(local_abspath, TRUE, - FALSE, scratch_pool)); - notify_required = TRUE; -} - else if (!executable_prop executable) +#ifdef HAVE_SYMLINK
svn commit: r1152267 - /subversion/trunk/subversion/tests/cmdline/merge_tests.py
Author: pburba Date: Fri Jul 29 15:35:14 2011 New Revision: 1152267 URL: http://svn.apache.org/viewvc?rev=1152267view=rev Log: Add a test for issue #3975 'adds with explicit mergeinfo don't get mergeinfo describing merge which added them'. * subversion/tests/cmdline/merge_tests.py (merge_adds_subtree_with_mergeinfo): New. (teset_list): Add merge_adds_subtree_with_mergeinfo. Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_tests.py?rev=1152267r1=1152266r2=1152267view=diff == --- subversion/trunk/subversion/tests/cmdline/merge_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/merge_tests.py Fri Jul 29 15:35:14 2011 @@ -16709,6 +16709,134 @@ def foreign_repos_prop_conflict(sbox): sbox.repo_url, other_wc_dir) +#-- +# Test for issue #3975 'adds with explicit mergeinfo don't get mergeinfo +# describing merge which added them' +@Issue(3975) +@SkipUnless(server_has_mergeinfo) +def merge_adds_subtree_with_mergeinfo(sbox): + merge adds subtree with mergeinfo + + sbox.build() + wc_dir = sbox.wc_dir + wc_disk, wc_status = set_up_branch(sbox, False, 2) + + A_path = os.path.join(wc_dir, 'A') + nu_path = os.path.join(wc_dir, 'A', 'C', 'nu') + nu_COPY_path = os.path.join(wc_dir, 'A_COPY', 'C', 'nu') + A_COPY2_path = os.path.join(wc_dir, 'A_COPY_2') + + # r8 - Add the file A_COPY/C/nu. + svntest.main.file_write(nu_COPY_path, This is the file 'nu'.\n) + svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_COPY_path) + svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + 'Add a file on the A_COPY branch', + wc_dir) + + # r9 - Cherry pick r8 from A_COPY to A. + svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, None, [], 'merge', + sbox.repo_url + '/A_COPY', + A_path, '-c8') + svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + 'Merge r8 from A_COPY to A', wc_dir) + + # r10 - Make a modification to A_COPY/C/nu + svntest.main.file_append(nu_COPY_path, + More work on the A_COPY branch.\n) + svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + 'Some work on the A_COPY branch', wc_dir) + + # r9 - Cherry pick r10 from A_COPY/C/nu to A/C/nu. Make some + # changes to A/C/nu before committing the merge. + svntest.actions.run_and_verify_svn(None, None, [], 'merge', + sbox.repo_url + '/A_COPY/C/nu', + nu_path, '-c10') + svntest.main.file_append(nu_path, A faux conflict resolution.\n) + svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + 'Merge r8 from A_COPY to A', wc_dir) + + # Sync merge A to A_COPY_2 + svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + expected_output = wc.State(A_COPY2_path, { +'B/E/beta' : Item(status='U '), +'C/nu' : Item(status='A '), +'D/G/rho' : Item(status='U '), +'D/H/omega' : Item(status='U '), +'D/H/psi' : Item(status='U '), +'' : Item(status=' U'), +}) + expected_mergeinfo_output = wc.State(A_COPY2_path, { +'' : Item(status=' G'), +}) + expected_elision_output = wc.State(A_COPY2_path, { +}) + expected_status = wc.State(A_COPY2_path, { +'' : Item(status=' M'), +'B' : Item(status=' '), +'mu': Item(status=' '), +'B/E' : Item(status=' '), +'B/E/alpha' : Item(status=' '), +'B/E/beta' : Item(status='M '), +'B/lambda' : Item(status=' '), +'B/F' : Item(status=' '), +'C' : Item(status=' '), +'C/nu' : Item(status='A ', copied='+'), +'D' : Item(status=' '), +'D/G' : Item(status=' '), +'D/G/pi': Item(status=' '), +'D/G/rho' : Item(status='M '), +'D/G/tau' : Item(status=' '), +'D/gamma' : Item(status=' '), +'D/H' : Item(status=' '), +'D/H/chi' : Item(status=' '), +'D/H/psi' : Item(status='M '), +'D/H/omega' : Item(status='M '), +}) + expected_status.tweak(wc_rev=11) + expected_status.tweak('C/nu', wc_rev='-') + expected_disk = wc.State('', { +'' : Item(props={SVN_PROP_MERGEINFO : '/A:3-11\n/A_COPY:8'}), +'B' : Item(), +'mu': Item(This is the file 'mu'.\n), +'B/E' : Item(), +'B/E/alpha' : Item(This
svn commit: r1152282 - /subversion/trunk/subversion/libsvn_repos/log.c
Author: philip Date: Fri Jul 29 15:50:09 2011 New Revision: 1152282 URL: http://svn.apache.org/viewvc?rev=1152282view=rev Log: Improve the performance of log -g by avoiding scanning the same set of paths/ranges more than once. * subversion/libsvn_repos/log.c (get_combined_mergeinfo_changes): Don't bother combining two NULL mergeinfos. (reduce_search, store_search): New. (handle_merged_revisions): Add processed parameter. (do_logs): Add processed parameter, allocate hash, store processed paths/revisions and use to avoid duplicate history scans. (svn_repos_get_logs4): Pass NULL. Modified: subversion/trunk/subversion/libsvn_repos/log.c Modified: subversion/trunk/subversion/libsvn_repos/log.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/log.c?rev=1152282r1=1152281r2=1152282view=diff == --- subversion/trunk/subversion/libsvn_repos/log.c (original) +++ subversion/trunk/subversion/libsvn_repos/log.c Fri Jul 29 15:50:09 2011 @@ -857,6 +857,9 @@ get_combined_mergeinfo_changes(svn_merge iterpool)); mergeinfo = apr_hash_get(catalog, path, APR_HASH_KEY_STRING); + if (!prev_mergeinfo !mergeinfo) +continue; + /* Compare, constrast, and combine the results. */ SVN_ERR(svn_mergeinfo_diff(deleted, added, prev_mergeinfo, mergeinfo, FALSE, iterpool)); @@ -1514,6 +1517,7 @@ static svn_error_t * do_logs(svn_fs_t *fs, const apr_array_header_t *paths, svn_mergeinfo_t log_target_history_as_mergeinfo, +svn_mergeinfo_t processed, apr_hash_t *nested_merges, svn_revnum_t hist_start, svn_revnum_t hist_end, @@ -1568,6 +1572,7 @@ handle_merged_revisions(svn_revnum_t rev svn_fs_t *fs, svn_mergeinfo_t log_target_history_as_mergeinfo, apr_hash_t *nested_merges, +svn_mergeinfo_t processed, svn_mergeinfo_t added_mergeinfo, svn_mergeinfo_t deleted_mergeinfo, svn_boolean_t discover_changed_paths, @@ -1610,7 +1615,7 @@ handle_merged_revisions(svn_revnum_t rev svn_pool_clear(iterpool); SVN_ERR(do_logs(fs, pl_range-paths, log_target_history_as_mergeinfo, - nested_merges, + processed, nested_merges, pl_range-range.start, pl_range-range.end, 0, discover_changed_paths, strict_node_history, TRUE, pl_range-reverse_merge, TRUE, TRUE, @@ -1633,6 +1638,115 @@ struct added_deleted_mergeinfo svn_mergeinfo_t deleted_mergeinfo; }; +/* Reduce the search range PATHS, HIST_START, HIST_END by removing + parts already covered by PROCESSED. If reduction is possible + elements may be removed from PATHS and *START_REDUCED and + *END_REDUCED may be set to a narrower range. */ +static svn_error_t * +reduce_search(apr_array_header_t *paths, + svn_revnum_t *hist_start, + svn_revnum_t *hist_end, + svn_mergeinfo_t processed, + apr_pool_t *scratch_pool) +{ + /* We add 1 to end to compensate for store_search */ + svn_revnum_t start = *hist_start = *hist_end ? *hist_start : *hist_end; + svn_revnum_t end = *hist_start = *hist_end ? *hist_end + 1 : *hist_start + 1; + int i; + + for (i = 0; i paths-nelts; ++i) +{ + const char *path = APR_ARRAY_IDX(paths, i, const char *); + apr_array_header_t *ranges = apr_hash_get(processed, path, +APR_HASH_KEY_STRING); + int j; + + if (!ranges) +continue; + + /* ranges is ordered, could we use some sort of binay search + rather than iterating? */ + for (j = 0; j ranges-nelts; ++j) +{ + svn_merge_range_t *range = APR_ARRAY_IDX(ranges, j, + svn_merge_range_t *); + if (range-start = start range-end = end) +{ + for (j = i; j paths-nelts - 1; ++j) +APR_ARRAY_IDX(paths, j, const char *) + = APR_ARRAY_IDX(paths, j + 1, const char *); + + --paths-nelts; + --i; + break; +} + + /* If there is only one path then we also check for a + partial overlap rather than the full overlap above, and + reduce the [hist_start, hist_end] range rather than + dropping the path. */ + if (paths-nelts == 1) +{ + if (range-start = start range-end start) +{ + if (start == *hist_start) +*hist_start = range-end - 1; + else +*hist_end = range-end - 1; +
svn commit: r1152286 - /subversion/trunk/subversion/tests/cmdline/merge_tests.py
Author: pburba Date: Fri Jul 29 15:59:14 2011 New Revision: 1152286 URL: http://svn.apache.org/viewvc?rev=1152286view=rev Log: * subversion/tests/cmdline/merge_tests.py (merge_adds_subtree_with_mergeinfo): Follow-up to r1152267, set to XFail, issue #3975 is still open. Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_tests.py?rev=1152286r1=1152285r2=1152286view=diff == --- subversion/trunk/subversion/tests/cmdline/merge_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/merge_tests.py Fri Jul 29 15:59:14 2011 @@ -16712,6 +16712,7 @@ def foreign_repos_prop_conflict(sbox): #-- # Test for issue #3975 'adds with explicit mergeinfo don't get mergeinfo # describing merge which added them' +@XFail() @Issue(3975) @SkipUnless(server_has_mergeinfo) def merge_adds_subtree_with_mergeinfo(sbox):
svn commit: r1152293 - in /subversion/trunk/subversion: libsvn_wc/wc-queries.sql libsvn_wc/wc_db.c tests/cmdline/copy_tests.py
Author: stsp Date: Fri Jul 29 16:25:06 2011 New Revision: 1152293 URL: http://svn.apache.org/viewvc?rev=1152293view=rev Log: Fix the problem that prevented copy_test 106 (nested moves) from passing. * subversion/libsvn_wc/wc_db.c (op_delete_txn): If a subtree is being moved-away, update moved-to information in BASE for all children that were moved into the subtree. * subversion/libsvn_wc/wc-queries.sql (STMT_SELECT_MOVED_HERE_CHILDREN): New query. * subversion/tests/cmdline/copy_tests.py (commit_copied_half_of_nested_move): Remove XFail marker. Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql subversion/trunk/subversion/libsvn_wc/wc_db.c subversion/trunk/subversion/tests/cmdline/copy_tests.py Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1152293r1=1152292r2=1152293view=diff == --- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original) +++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Fri Jul 29 16:25:06 2011 @@ -1342,6 +1342,10 @@ WHERE wc_id = ?1 AND local_relpath = ?2 (SELECT MAX(op_depth) FROM nodes WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth 0) +-- STMT_SELECT_MOVED_HERE_CHILDREN +SELECT moved_to, local_relpath FROM nodes_current +WHERE wc_id = ?1 AND moved_to ?2 || '/' + /* - */ /* Queries for verification. */ Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1152293r1=1152292r2=1152293view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 29 16:25:06 2011 @@ -6033,11 +6033,12 @@ op_delete_txn(void *baton, svn_sqlite__stmt_t *stmt; apr_int64_t select_depth; /* Depth of what is to be deleted */ svn_boolean_t refetch_depth = FALSE; + svn_wc__db_kind_t kind; SVN_ERR(svn_sqlite__exec_statements(wcroot-sdb, STMT_CREATE_DELETE_LIST)); SVN_ERR(read_info(status, -NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +kind, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, op_root, NULL, NULL, NULL, NULL, NULL, @@ -6094,6 +6095,76 @@ op_delete_txn(void *baton, SVN_ERR(svn_sqlite__step_done(stmt)); SVN_ERR(svn_sqlite__reset(stmt)); } + + /* If a subtree is being moved-away, we need to update moved-to + * information in BASE for all children that were moved into this + * subtree. */ + if (kind == svn_wc__db_kind_dir) +{ + apr_pool_t *iterpool; + + SVN_ERR(svn_sqlite__get_statement(stmt, wcroot-sdb, +STMT_SELECT_MOVED_HERE_CHILDREN)); + SVN_ERR(svn_sqlite__bindf(stmt, is, wcroot-wc_id, local_relpath)); + + SVN_ERR(svn_sqlite__step(have_row, stmt)); + + iterpool = svn_pool_create(scratch_pool); + while (have_row) +{ + svn_wc__db_status_t child_status; + const char *child_moved_from_relpath; + const char *moved_here_child_relpath = +svn_sqlite__column_text(stmt, 0, scratch_pool); + + svn_pool_clear(iterpool); + + /* The moved-here-children query returns info based on the + * delete-half of the move. Check if that the copied-half of + * the move matches this information. */ + SVN_ERR(read_info(child_status, NULL, NULL, NULL, NULL, +NULL, NULL, NULL, NULL, NULL, NULL, NULL, +NULL, NULL, NULL, NULL, NULL, NULL, NULL, +NULL, NULL, NULL, NULL, NULL, NULL, +wcroot, moved_here_child_relpath, +iterpool, iterpool)); + if (child_status == svn_wc__db_status_added) +SVN_ERR(scan_addition(child_status, NULL, NULL, NULL, + NULL, NULL, NULL, + child_moved_from_relpath, NULL, + wcroot, moved_here_child_relpath, + iterpool, iterpool)); + if (child_status == svn_wc__db_status_moved_here) +{ + const char *child_subtree_relpath; + const char *new_moved_to_relpath; + svn_sqlite__stmt_t *moved_to_stmt; + + /* Compute the new moved-to path for this child... */ +
svn commit: r1152294 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: stsp Date: Fri Jul 29 16:28:11 2011 New Revision: 1152294 URL: http://svn.apache.org/viewvc?rev=1152294view=rev Log: * subversion/libsvn_wc/wc_db.c (op_delete_txn): Add a debug assertion that fails if a move has been recorded incorrectly. 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=1152294r1=1152293r2=1152294view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 29 16:28:11 2011 @@ -6134,6 +6134,15 @@ op_delete_txn(void *baton, child_moved_from_relpath, NULL, wcroot, moved_here_child_relpath, iterpool, iterpool)); +#if SVN_DEBUG + /* This catches incorrectly recorded moves. + * It is possible to hit this during normal operation + * if a move was interrupted mid-way so only perform + * this check in debug mode. */ + SVN_ERR_ASSERT(moved_from_relpath + !strcmp(child_moved_from_relpath, + svn_sqlite__column_text(stmt, 1, NULL))); +#endif if (child_status == svn_wc__db_status_moved_here) { const char *child_subtree_relpath;
svn commit: r1152297 - /subversion/trunk/subversion/tests/cmdline/copy_tests.py
Author: philip Date: Fri Jul 29 16:32:59 2011 New Revision: 1152297 URL: http://svn.apache.org/viewvc?rev=1152297view=rev Log: * subversion/tests/cmdline/copy_tests.py (copy_deleted_dir): Tweak comment. Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1152297r1=1152296r2=1152297view=diff == --- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Fri Jul 29 16:32:59 2011 @@ -5461,7 +5461,7 @@ def copy_deleted_dir(sbox): os.mkdir(sbox.ospath('A')) os.mkdir(sbox.ospath('A/D')) - # These two invocations raise an assertion. + # At one time these two invocations raised an assertion. svntest.actions.run_and_verify_svn(None, None, 'svn: E155035: Deleted node.* can\'t be.*', 'cp', sbox.ospath('iota'),
svn commit: r1152299 - /subversion/branches/1.7.x/STATUS
Author: philip Date: Fri Jul 29 16:48:43 2011 New Revision: 1152299 URL: http://svn.apache.org/viewvc?rev=1152299view=rev Log: * STATUS: note merge conflict 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=1152299r1=1152298r2=1152299view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Fri Jul 29 16:48:43 2011 @@ -189,6 +189,7 @@ Candidate changes: Easy to trigger problem in tree conflict situations. Votes: +1: rhuijben + +0: philip (looks OK, but merge conflicts) Veto-blocked changes: =
svn commit: r1152300 - in /subversion/trunk/subversion: libsvn_wc/wc-queries.sql libsvn_wc/wc_db.c tests/cmdline/copy_tests.py
Author: stsp Date: Fri Jul 29 16:53:01 2011 New Revision: 1152300 URL: http://svn.apache.org/viewvc?rev=1152300view=rev Log: Temporarily revert r1152293 and r1152294. r1152293 is causing test failures. Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql subversion/trunk/subversion/libsvn_wc/wc_db.c subversion/trunk/subversion/tests/cmdline/copy_tests.py Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1152300r1=1152299r2=1152300view=diff == --- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original) +++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Fri Jul 29 16:53:01 2011 @@ -1342,10 +1342,6 @@ WHERE wc_id = ?1 AND local_relpath = ?2 (SELECT MAX(op_depth) FROM nodes WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth 0) --- STMT_SELECT_MOVED_HERE_CHILDREN -SELECT moved_to, local_relpath FROM nodes_current -WHERE wc_id = ?1 AND moved_to ?2 || '/' - /* - */ /* Queries for verification. */ Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1152300r1=1152299r2=1152300view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 29 16:53:01 2011 @@ -6033,12 +6033,11 @@ op_delete_txn(void *baton, svn_sqlite__stmt_t *stmt; apr_int64_t select_depth; /* Depth of what is to be deleted */ svn_boolean_t refetch_depth = FALSE; - svn_wc__db_kind_t kind; SVN_ERR(svn_sqlite__exec_statements(wcroot-sdb, STMT_CREATE_DELETE_LIST)); SVN_ERR(read_info(status, -kind, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, op_root, NULL, NULL, NULL, NULL, NULL, @@ -6095,85 +6094,6 @@ op_delete_txn(void *baton, SVN_ERR(svn_sqlite__step_done(stmt)); SVN_ERR(svn_sqlite__reset(stmt)); } - - /* If a subtree is being moved-away, we need to update moved-to - * information in BASE for all children that were moved into this - * subtree. */ - if (kind == svn_wc__db_kind_dir) -{ - apr_pool_t *iterpool; - - SVN_ERR(svn_sqlite__get_statement(stmt, wcroot-sdb, -STMT_SELECT_MOVED_HERE_CHILDREN)); - SVN_ERR(svn_sqlite__bindf(stmt, is, wcroot-wc_id, local_relpath)); - - SVN_ERR(svn_sqlite__step(have_row, stmt)); - - iterpool = svn_pool_create(scratch_pool); - while (have_row) -{ - svn_wc__db_status_t child_status; - const char *child_moved_from_relpath; - const char *moved_here_child_relpath = -svn_sqlite__column_text(stmt, 0, scratch_pool); - - svn_pool_clear(iterpool); - - /* The moved-here-children query returns info based on the - * delete-half of the move. Check if that the copied-half of - * the move matches this information. */ - SVN_ERR(read_info(child_status, NULL, NULL, NULL, NULL, -NULL, NULL, NULL, NULL, NULL, NULL, NULL, -NULL, NULL, NULL, NULL, NULL, NULL, NULL, -NULL, NULL, NULL, NULL, NULL, NULL, -wcroot, moved_here_child_relpath, -iterpool, iterpool)); - if (child_status == svn_wc__db_status_added) -SVN_ERR(scan_addition(child_status, NULL, NULL, NULL, - NULL, NULL, NULL, - child_moved_from_relpath, NULL, - wcroot, moved_here_child_relpath, - iterpool, iterpool)); -#if SVN_DEBUG - /* This catches incorrectly recorded moves. - * It is possible to hit this during normal operation - * if a move was interrupted mid-way so only perform - * this check in debug mode. */ - SVN_ERR_ASSERT(moved_from_relpath - !strcmp(child_moved_from_relpath, - svn_sqlite__column_text(stmt, 1, NULL))); -#endif - if (child_status == svn_wc__db_status_moved_here) -{ - const char *child_subtree_relpath; - const char *new_moved_to_relpath; - svn_sqlite__stmt_t
svn commit: r1152305 - /subversion/branches/1.7.x/STATUS
Author: hwright Date: Fri Jul 29 17:16:19 2011 New Revision: 1152305 URL: http://svn.apache.org/viewvc?rev=1152305view=rev Log: * STATUS: Votey votey, artichokey. 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=1152305r1=1152304r2=1152305view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Fri Jul 29 17:16:19 2011 @@ -89,7 +89,7 @@ Candidate changes: GUI clients can't rely on EINTR being returned when a user tries to cancel an operation, as no signal is raised. Votes: - +1: rhuijben + +1: rhuijben, hwright * r1149627 Adjust library order in build.conf for kwallet/gnome-keyring. @@ -98,13 +98,6 @@ Candidate changes: this is not a regression. Votes: +1: philip, danielsh - - * r1150242 - Make blame close its temporary files before deleting them. - Justification: - Hitting the io retry loop on windows is very painfull. - Votes: - +1: rhuijben, philip * r1150327 Report not finding txn roots produce a 404 error in mod_dav_svn. @@ -144,15 +137,6 @@ Candidate changes: +0: danielsh (we shouldn't depend on libsvn_client fixes to avoid accumulating tempfiles on the server) - * r1150441 - Closing a translated stream should close the inner stream. - Justification: - Resolves an open file handle problem on inconsistent newlines. - (And may cause different problems when behavior is attachted to stream - close, like with checksum streams) - Votes: - +1: rhuijben, danielsh - * r1151177 Fix two bugs in ra_serf when connecting to HTTPS repository hosted on non-standard port. @@ -171,7 +155,7 @@ Candidate changes: Justification: This is occasionally asked about; clarification will be useful. Votes: - +1: danielsh + +1: danielsh, hwright * r1151055 Allow building with serf trunk on windows. @@ -181,7 +165,7 @@ Candidate changes: * r1151911 Fix description of svndumpfilter's --targets option. Votes: - +1: cmpilato + +1: cmpilato, hwright * r1152189, r1152190 Fix an assertion on copying nodes that are not presence normal. @@ -220,3 +204,19 @@ Approved changes: this revision depends for a clean merge). Votes: +1: rhuijben, danielsh, cmpilato + + * r1150441 + Closing a translated stream should close the inner stream. + Justification: + Resolves an open file handle problem on inconsistent newlines. + (And may cause different problems when behavior is attachted to stream + close, like with checksum streams) + Votes: + +1: rhuijben, danielsh, hwright + + * r1150242 + Make blame close its temporary files before deleting them. + Justification: + Hitting the io retry loop on windows is very painfull. + Votes: + +1: rhuijben, philip, hwright
svn commit: r1152307 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_client/blame.c
Author: hwright Date: Fri Jul 29 17:22:33 2011 New Revision: 1152307 URL: http://svn.apache.org/viewvc?rev=1152307view=rev Log: Merge r1150242 from trunk: * r1150242 Make blame close its temporary files before deleting them. Justification: Hitting the io retry loop on windows is very painfull. Votes: +1: rhuijben, philip, hwright Modified: subversion/branches/1.7.x/ (props changed) subversion/branches/1.7.x/STATUS subversion/branches/1.7.x/subversion/libsvn_client/blame.c Propchange: subversion/branches/1.7.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jul 29 17:22:33 2011 @@ -54,4 +54,4 @@ /subversion/branches/tree-conflicts:868291-873154 /subversion/branches/tree-conflicts-notify:873926-874008 /subversion/branches/uris-as-urls:1060426-1064427 -/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150372,1150812,1151036,1152129 +/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150242,1150372,1150812,1151036,1152129 Modified: subversion/branches/1.7.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1152307r1=1152306r2=1152307view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Fri Jul 29 17:22:33 2011 @@ -213,10 +213,3 @@ Approved changes: close, like with checksum streams) Votes: +1: rhuijben, danielsh, hwright - - * r1150242 - Make blame close its temporary files before deleting them. - Justification: - Hitting the io retry loop on windows is very painfull. - Votes: - +1: rhuijben, philip, hwright Modified: subversion/branches/1.7.x/subversion/libsvn_client/blame.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_client/blame.c?rev=1152307r1=1152306r2=1152307view=diff == --- subversion/branches/1.7.x/subversion/libsvn_client/blame.c (original) +++ subversion/branches/1.7.x/subversion/libsvn_client/blame.c Fri Jul 29 17:22:33 2011 @@ -107,6 +107,7 @@ struct delta_baton { svn_txdelta_window_handler_t wrapped_handler; void *wrapped_baton; struct file_rev_baton *file_rev_baton; + svn_stream_t *source_stream; /* the delta source */ const char *filename; }; @@ -319,6 +320,13 @@ window_handler(svn_txdelta_window_t *win if (window) return SVN_NO_ERROR; + /* Close the source file used for the delta. + It is important to do this early, since otherwise, they will be deleted + before all handles are closed, which leads to failures on some platforms + when new tempfiles are to be created. */ + if (dbaton-source_stream) +SVN_ERR(svn_stream_close(dbaton-source_stream)); + /* If we are including merged revisions, we need to add each rev to the merged chain. */ if (frb-include_merged_revisions) @@ -445,11 +453,12 @@ file_rev_handler(void *baton, const char /* Prepare the text delta window handler. */ if (frb-last_filename) -SVN_ERR(svn_stream_open_readonly(last_stream, frb-last_filename, +SVN_ERR(svn_stream_open_readonly(delta_baton-source_stream, frb-last_filename, frb-currpool, pool)); else /* Means empty stream below. */ -last_stream = NULL; +delta_baton-source_stream = NULL; + last_stream = svn_stream_disown(delta_baton-source_stream, pool); if (frb-include_merged_revisions !frb-merged_revision) filepool = frb-filepool;
svn commit: r1152308 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_subr/subst.c
Author: hwright Date: Fri Jul 29 17:28:11 2011 New Revision: 1152308 URL: http://svn.apache.org/viewvc?rev=1152308view=rev Log: Merge r1150441 from trunk: * r1150441 Closing a translated stream should close the inner stream. Justification: Resolves an open file handle problem on inconsistent newlines. (And may cause different problems when behavior is attachted to stream close, like with checksum streams) Votes: +1: rhuijben, danielsh, hwright Modified: subversion/branches/1.7.x/ (props changed) subversion/branches/1.7.x/STATUS subversion/branches/1.7.x/subversion/libsvn_subr/subst.c Propchange: subversion/branches/1.7.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jul 29 17:28:11 2011 @@ -54,4 +54,4 @@ /subversion/branches/tree-conflicts:868291-873154 /subversion/branches/tree-conflicts-notify:873926-874008 /subversion/branches/uris-as-urls:1060426-1064427 -/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150242,1150372,1150812,1151036,1152129 +/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150242,1150372,1150441,1150812,1151036,1152129 Modified: subversion/branches/1.7.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1152308r1=1152307r2=1152308view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Fri Jul 29 17:28:11 2011 @@ -204,12 +204,3 @@ Approved changes: this revision depends for a clean merge). Votes: +1: rhuijben, danielsh, cmpilato - - * r1150441 - Closing a translated stream should close the inner stream. - Justification: - Resolves an open file handle problem on inconsistent newlines. - (And may cause different problems when behavior is attachted to stream - close, like with checksum streams) - Votes: - +1: rhuijben, danielsh, hwright Modified: subversion/branches/1.7.x/subversion/libsvn_subr/subst.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_subr/subst.c?rev=1152308r1=1152307r2=1152308view=diff == --- subversion/branches/1.7.x/subversion/libsvn_subr/subst.c (original) +++ subversion/branches/1.7.x/subversion/libsvn_subr/subst.c Fri Jul 29 17:28:11 2011 @@ -1267,15 +1267,16 @@ static svn_error_t * translated_stream_close(void *baton) { struct translated_stream_baton *b = baton; + svn_error_t *err = NULL; if (b-written) -SVN_ERR(translate_chunk(b-stream, b-out_baton, NULL, 0, b-iterpool)); +err = translate_chunk(b-stream, b-out_baton, NULL, 0, b-iterpool); - SVN_ERR(svn_stream_close(b-stream)); + err = svn_error_compose_create(err, svn_stream_close(b-stream)); svn_pool_destroy(b-iterpool); - return SVN_NO_ERROR; + return svn_error_trace(err); }
svn commit: r1152324 - in /subversion/trunk/subversion: libsvn_wc/wc-queries.sql libsvn_wc/wc_db.c tests/cmdline/copy_tests.py
Author: stsp Date: Fri Jul 29 17:46:16 2011 New Revision: 1152324 URL: http://svn.apache.org/viewvc?rev=1152324view=rev Log: Restore the changes from r1152293 (which see for log full message), including the following fix: * subversion/libsvn_wc/wc-queries.sql (STMT_SELECT_MOVED_HERE_CHILDREN): Do not select nodes with moved_to relpaths that are not children of the ?2 parameter. Fixed by changing the condition (moved_to ?2 || '/') into this: (moved_to ?2 || '/' AND moved_to ?2 || '0') Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql subversion/trunk/subversion/libsvn_wc/wc_db.c subversion/trunk/subversion/tests/cmdline/copy_tests.py Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1152324r1=1152323r2=1152324view=diff == --- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original) +++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Fri Jul 29 17:46:16 2011 @@ -1342,6 +1342,10 @@ WHERE wc_id = ?1 AND local_relpath = ?2 (SELECT MAX(op_depth) FROM nodes WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth 0) +-- STMT_SELECT_MOVED_HERE_CHILDREN +SELECT moved_to, local_relpath FROM nodes_current +WHERE wc_id = ?1 AND (moved_to ?2 || '/' AND moved_to ?2 || '0') + /* - */ /* Queries for verification. */ Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1152324r1=1152323r2=1152324view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 29 17:46:16 2011 @@ -6033,11 +6033,12 @@ op_delete_txn(void *baton, svn_sqlite__stmt_t *stmt; apr_int64_t select_depth; /* Depth of what is to be deleted */ svn_boolean_t refetch_depth = FALSE; + svn_wc__db_kind_t kind; SVN_ERR(svn_sqlite__exec_statements(wcroot-sdb, STMT_CREATE_DELETE_LIST)); SVN_ERR(read_info(status, -NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +kind, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, op_root, NULL, NULL, NULL, NULL, NULL, @@ -6094,6 +6095,80 @@ op_delete_txn(void *baton, SVN_ERR(svn_sqlite__step_done(stmt)); SVN_ERR(svn_sqlite__reset(stmt)); } + + /* If a subtree is being moved-away, we need to update moved-to + * information in BASE for all children that were moved into this + * subtree. */ + if (kind == svn_wc__db_kind_dir) +{ + apr_pool_t *iterpool; + + SVN_ERR(svn_sqlite__get_statement(stmt, wcroot-sdb, +STMT_SELECT_MOVED_HERE_CHILDREN)); + SVN_ERR(svn_sqlite__bindf(stmt, is, wcroot-wc_id, local_relpath)); + + SVN_ERR(svn_sqlite__step(have_row, stmt)); + + iterpool = svn_pool_create(scratch_pool); + while (have_row) +{ + svn_wc__db_status_t child_status; + const char *child_moved_from_relpath; + const char *child_delete_op_root_relpath; + const char *moved_here_child_relpath = +svn_sqlite__column_text(stmt, 0, scratch_pool); + + svn_pool_clear(iterpool); + + /* The moved-here-children query returns info based on the + * delete-half of the move. Check if that the copied-half of + * the move matches this information. */ + SVN_ERR(read_info(child_status, NULL, NULL, NULL, NULL, +NULL, NULL, NULL, NULL, NULL, NULL, NULL, +NULL, NULL, NULL, NULL, NULL, NULL, NULL, +NULL, NULL, NULL, NULL, NULL, NULL, +wcroot, moved_here_child_relpath, +iterpool, iterpool)); + if (child_status == svn_wc__db_status_added) +SVN_ERR(scan_addition(child_status, NULL, NULL, NULL, + NULL, NULL, NULL, + child_moved_from_relpath, + child_delete_op_root_relpath, + wcroot, moved_here_child_relpath, + iterpool, iterpool)); + if (child_status == svn_wc__db_status_moved_here) +{ + const char *child_subtree_relpath; + const char *new_moved_to_relpath; + svn_sqlite__stmt_t *moved_to_stmt; + +
svn commit: r1152326 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: stsp Date: Fri Jul 29 17:48:18 2011 New Revision: 1152326 URL: http://svn.apache.org/viewvc?rev=1152326view=rev Log: Restore r1152294 (which see for full log message) unchanged. 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=1152326r1=1152325r2=1152326view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 29 17:48:18 2011 @@ -6136,6 +6136,15 @@ op_delete_txn(void *baton, child_delete_op_root_relpath, wcroot, moved_here_child_relpath, iterpool, iterpool)); +#if SVN_DEBUG + /* This catches incorrectly recorded moves. + * It is possible to hit this during normal operation + * if a move was interrupted mid-way so only perform + * this check in debug mode. */ + SVN_ERR_ASSERT(moved_from_relpath + !strcmp(child_moved_from_relpath, + svn_sqlite__column_text(stmt, 1, NULL))); +#endif if (child_status == svn_wc__db_status_moved_here) { const char *child_subtree_relpath;
svn propchange: r1152324 - svn:log
Author: stsp Revision: 1152324 Modified property: svn:log Modified: svn:log at Fri Jul 29 17:48:58 2011 -- --- svn:log (original) +++ svn:log Fri Jul 29 17:48:58 2011 @@ -1,4 +1,4 @@ -Restore the changes from r1152293 (which see for log full message), +Restore the changes from r1152293 (which see for full log message), including the following fix: * subversion/libsvn_wc/wc-queries.sql
svn commit: r1152332 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: stsp Date: Fri Jul 29 18:19:24 2011 New Revision: 1152332 URL: http://svn.apache.org/viewvc?rev=1152332view=rev Log: Follow-up to r1152294: * subversion/libsvn_wc/wc_db.c: Use #ifdef SVN_DEBUG, not #if SVN_DEBUG. Found by: danielsh 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=1152332r1=1152331r2=1152332view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 29 18:19:24 2011 @@ -6136,7 +6136,7 @@ op_delete_txn(void *baton, child_delete_op_root_relpath, wcroot, moved_here_child_relpath, iterpool, iterpool)); -#if SVN_DEBUG +#ifdef SVN_DEBUG /* This catches incorrectly recorded moves. * It is possible to hit this during normal operation * if a move was interrupted mid-way so only perform
svn propchange: r1152326 - svn:log
Author: stsp Revision: 1152326 Modified property: svn:log Modified: svn:log at Fri Jul 29 18:58:06 2011 -- --- svn:log (original) +++ svn:log Fri Jul 29 18:58:06 2011 @@ -1 +1,2 @@ -Restore r1152294 (which see for full log message) unchanged. +Restore r1152294 (which see for full log message) unchanged, +after it was temporarily reverted in r1152300.
svn commit: r1152341 - /subversion/trunk/subversion/tests/cmdline/copy_tests.py
Author: rhuijben Date: Fri Jul 29 19:17:26 2011 New Revision: 1152341 URL: http://svn.apache.org/viewvc?rev=1152341view=rev Log: * subversion/tests/cmdline/copy_tests.py (commit_copied_half_of_nested_move): Escape paths to fix test on Windows. Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1152341r1=1152340r2=1152341view=diff == --- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Fri Jul 29 19:17:26 2011 @@ -5498,8 +5498,8 @@ def commit_copied_half_of_nested_move(sb # iota - A/D/iota; verify we cannot commit just A/D svntest.actions.run_and_verify_svn(None, None, [], 'mv', iota_path, D_path) expected_error = svn: E29: Cannot commit '.*%s' because it was \ -moved from '.*%s' % (os.path.join(D_path, iota), - iota_path) +moved from '.*%s' % (re.escape(sbox.ospath('A/D/iota')), + re.escape(iota_path)) svntest.actions.run_and_verify_svn(None, None, expected_error, 'commit', '-m', 'foo', D_path) @@ -5507,9 +5507,9 @@ def commit_copied_half_of_nested_move(sb C_path = sbox.ospath('A/C') svntest.actions.run_and_verify_svn(None, None, [], 'mv', D_path, C_path) - expected_error = svn: E29: Cannot commit '.*%s' because it was \ -moved from '.*%s' % (os.path.join(C_path, D), - D_path) + expected_error = svn: E29: Cannot commit '.*%s' because it was moved \ +from '.*%s' % (re.escape(os.path.join(C_path, D)), + re.escape(D_path)) svntest.actions.run_and_verify_svn(None, None, expected_error, 'commit', '-m', 'foo', C_path) @@ -5519,7 +5519,8 @@ def commit_copied_half_of_nested_move(sb svntest.actions.run_and_verify_svn(None, None, [], 'mv', D_iota_path, A_iota_path) expected_error = svn: E29: Cannot commit '.*%s' because it was \ -moved from '.*%s' % (A_iota_path, iota_path) +moved from '.*%s' % (re.escape(A_iota_path), + re.escape(iota_path)) svntest.actions.run_and_verify_svn(None, None, expected_error, 'commit', '-m', 'foo', A_iota_path)
svn commit: r1152345 - in /subversion/trunk/subversion: libsvn_wc/entries.c libsvn_wc/info.c libsvn_wc/node.c libsvn_wc/wc_db.c libsvn_wc/wc_db.h tests/libsvn_wc/db-test.c
Author: stsp Date: Fri Jul 29 19:33:13 2011 New Revision: 1152345 URL: http://svn.apache.org/viewvc?rev=1152345view=rev Log: Extend svn_wc__db_scan_deletion() to return the moved-to path of of a moved node, if requested, in MOVED_TO_ABSPATH. This function already returned the op-root of the copied-half of the move as MOVED_TO_ABSPATH, but (luckily) none of the callers requested it. Return this op-root in a new output parameter COPY_OP_ROOT_ABSPATH instead. Nothing uses the moved-to output parameters yet, so this is no functional change. * subversion/libsvn_wc/wc_db.c (scan_deletion_baton_t): Add COPY_OP_ROOT_RELPATH. (scan_deletion_txn): If the node has been moved-away, compute and return the moved-to relpath as well as the the op-root of the copied-half of the move. Also, do not assert that every node being moved has a BASE. This isn't true for sequences like: mv A B; mv B/f B/e; In the second move, B/f has no BASE because it is part of the copied-half B of the first move. (scan_deletion): Add new output parameter COPY_OP_ROOT_RELPATH and pass it into the scan_deletion baton. (get_info_for_copy, read_url_txn, svn_wc__db_global_relocate): Update scan_deletion() callers, passing NULL for COPY_OP_ROOT_RELPATH. (svn_wc__db_scan_deletion): Add new output parameter COPY_OP_ROOT_ABSPATH. Convert relative paths in moved-to information provided by scan_deletion() into absolute paths, and return them. * subversion/libsvn_wc/wc_db.h (svn_wc__db_scan_deletion): Add COPY_OP_ROOT_ABSPATH parameter and update the docstring. * subversion/libsvn_wc/node.c (svn_wc__internal_get_repos_info, svn_wc__node_get_deleted_ancestor, svn_wc__internal_get_commit_base_rev, svn_wc__internal_node_get_schedule): Update callers, passing NULL for COPY_OP_ROOT_ABSPATH. * subversion/libsvn_wc/entries.c (get_info_for_deleted, read_one_entry): Update callers, passing NULL for COPY_OP_ROOT_ABSPATH. * subversion/libsvn_wc/info.c (build_info_for_node): Update caller, passing NULL for COPY_OP_ROOT_ABSPATH. * subversion/tests/libsvn_wc/db-test.c (test_scan_deletion): Update callers, passing NULL for COPY_OP_ROOT_ABSPATH. Modified: subversion/trunk/subversion/libsvn_wc/entries.c subversion/trunk/subversion/libsvn_wc/info.c subversion/trunk/subversion/libsvn_wc/node.c subversion/trunk/subversion/libsvn_wc/wc_db.c subversion/trunk/subversion/libsvn_wc/wc_db.h subversion/trunk/subversion/tests/libsvn_wc/db-test.c Modified: subversion/trunk/subversion/libsvn_wc/entries.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=1152345r1=1152344r2=1152345view=diff == --- subversion/trunk/subversion/libsvn_wc/entries.c (original) +++ subversion/trunk/subversion/libsvn_wc/entries.c Fri Jul 29 19:33:13 2011 @@ -272,7 +272,7 @@ get_info_for_deleted(svn_wc_entry_t *ent SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, - work_del_abspath, + work_del_abspath, NULL, db, entry_abspath, scratch_pool, scratch_pool)); @@ -525,7 +525,7 @@ read_one_entry(const svn_wc_entry_t **ne { const char *work_del_abspath; SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, - work_del_abspath, + work_del_abspath, NULL, db, entry_abspath, scratch_pool, scratch_pool)); Modified: subversion/trunk/subversion/libsvn_wc/info.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/info.c?rev=1152345r1=1152344r2=1152345view=diff == --- subversion/trunk/subversion/libsvn_wc/info.c (original) +++ subversion/trunk/subversion/libsvn_wc/info.c Fri Jul 29 19:33:13 2011 @@ -200,7 +200,7 @@ build_info_for_node(svn_wc__info2_t **in /* And now fetch the url and revision of what will be deleted */ SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, - work_del_abspath, + work_del_abspath, NULL, db, local_abspath, scratch_pool, scratch_pool)); if (work_del_abspath != NULL) Modified: subversion/trunk/subversion/libsvn_wc/node.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1152345r1=1152344r2=1152345view=diff == --- subversion/trunk/subversion/libsvn_wc/node.c (original) +++ subversion/trunk/subversion/libsvn_wc/node.c Fri Jul 29 19:33:13
svn commit: r1152347 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_ra_serf/replay.c
Author: lgo Date: Fri Jul 29 19:35:39 2011 New Revision: 1152347 URL: http://svn.apache.org/viewvc?rev=1152347view=rev Log: * STATUS: propose r1150506, r1150853 for backport. Modified: subversion/branches/1.7.x/ (props changed) subversion/branches/1.7.x/STATUS subversion/branches/1.7.x/subversion/libsvn_ra_serf/replay.c Propchange: subversion/branches/1.7.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jul 29 19:35:39 2011 @@ -54,4 +54,4 @@ /subversion/branches/tree-conflicts:868291-873154 /subversion/branches/tree-conflicts-notify:873926-874008 /subversion/branches/uris-as-urls:1060426-1064427 -/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150242,1150372,1150441,1150812,1151036,1152129 +/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150242,1150372,1150441,1150506,1150812,1150853,1151036,1152129 Modified: subversion/branches/1.7.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1152347r1=1152346r2=1152347view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Fri Jul 29 19:35:39 2011 @@ -137,6 +137,14 @@ Candidate changes: +0: danielsh (we shouldn't depend on libsvn_client fixes to avoid accumulating tempfiles on the server) + * r1150506, r1150853 + Fix issue #3967, file descriptor and memory leak in svnsync and svnrdump + with ra_serf. + Justification: + Both tools are basically not useable with these leaks. + Votes: + +1: lgo + * r1151177 Fix two bugs in ra_serf when connecting to HTTPS repository hosted on non-standard port. Modified: subversion/branches/1.7.x/subversion/libsvn_ra_serf/replay.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_ra_serf/replay.c?rev=1152347r1=1152346r2=1152347view=diff == --- subversion/branches/1.7.x/subversion/libsvn_ra_serf/replay.c (original) +++ subversion/branches/1.7.x/subversion/libsvn_ra_serf/replay.c Fri Jul 29 19:35:39 2011 @@ -194,6 +194,7 @@ start_replay(svn_ra_serf__xml_parser_t * /* Create a pool for the commit editor. */ ctx-dst_rev_pool = svn_pool_create(ctx-src_rev_pool); + ctx-file_pool = svn_pool_create(ctx-dst_rev_pool); /* ### it would be nice to have a proper scratch_pool. */ SVN_ERR(svn_ra_serf__select_revprops(ctx-props, @@ -650,7 +651,6 @@ svn_ra_serf__replay(svn_ra_session_t *ra replay_ctx = apr_pcalloc(pool, sizeof(*replay_ctx)); replay_ctx-src_rev_pool = pool; - replay_ctx-file_pool = svn_pool_create(pool); replay_ctx-editor = editor; replay_ctx-editor_baton = edit_baton; replay_ctx-done = FALSE; @@ -766,7 +766,6 @@ svn_ra_serf__replay_range(svn_ra_session replay_ctx = apr_pcalloc(ctx_pool, sizeof(*replay_ctx)); replay_ctx-src_rev_pool = ctx_pool; - replay_ctx-file_pool = svn_pool_create(pool); replay_ctx-revstart_func = revstart_func; replay_ctx-revfinish_func = revfinish_func; replay_ctx-replay_baton = replay_baton;
svn commit: r1152348 - in /subversion/trunk/subversion: libsvn_wc/entries.c libsvn_wc/info.c libsvn_wc/node.c libsvn_wc/wc_db.c libsvn_wc/wc_db.h tests/libsvn_wc/db-test.c
Author: stsp Date: Fri Jul 29 19:35:45 2011 New Revision: 1152348 URL: http://svn.apache.org/viewvc?rev=1152348view=rev Log: Whoops, revert the just-committed r1152345, it wasn't quite ready yet. Modified: subversion/trunk/subversion/libsvn_wc/entries.c subversion/trunk/subversion/libsvn_wc/info.c subversion/trunk/subversion/libsvn_wc/node.c subversion/trunk/subversion/libsvn_wc/wc_db.c subversion/trunk/subversion/libsvn_wc/wc_db.h subversion/trunk/subversion/tests/libsvn_wc/db-test.c Modified: subversion/trunk/subversion/libsvn_wc/entries.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=1152348r1=1152347r2=1152348view=diff == --- subversion/trunk/subversion/libsvn_wc/entries.c (original) +++ subversion/trunk/subversion/libsvn_wc/entries.c Fri Jul 29 19:35:45 2011 @@ -272,7 +272,7 @@ get_info_for_deleted(svn_wc_entry_t *ent SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, - work_del_abspath, NULL, + work_del_abspath, db, entry_abspath, scratch_pool, scratch_pool)); @@ -525,7 +525,7 @@ read_one_entry(const svn_wc_entry_t **ne { const char *work_del_abspath; SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, - work_del_abspath, NULL, + work_del_abspath, db, entry_abspath, scratch_pool, scratch_pool)); Modified: subversion/trunk/subversion/libsvn_wc/info.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/info.c?rev=1152348r1=1152347r2=1152348view=diff == --- subversion/trunk/subversion/libsvn_wc/info.c (original) +++ subversion/trunk/subversion/libsvn_wc/info.c Fri Jul 29 19:35:45 2011 @@ -200,7 +200,7 @@ build_info_for_node(svn_wc__info2_t **in /* And now fetch the url and revision of what will be deleted */ SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, - work_del_abspath, NULL, + work_del_abspath, db, local_abspath, scratch_pool, scratch_pool)); if (work_del_abspath != NULL) Modified: subversion/trunk/subversion/libsvn_wc/node.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1152348r1=1152347r2=1152348view=diff == --- subversion/trunk/subversion/libsvn_wc/node.c (original) +++ subversion/trunk/subversion/libsvn_wc/node.c Fri Jul 29 19:35:45 2011 @@ -182,7 +182,7 @@ svn_wc__internal_get_repos_info(const ch const char *base_del_abspath, *wrk_del_abspath; SVN_ERR(svn_wc__db_scan_deletion(base_del_abspath, NULL, - wrk_del_abspath, NULL, + wrk_del_abspath, db, local_abspath, scratch_pool, scratch_pool)); @@ -768,7 +768,7 @@ svn_wc__node_get_deleted_ancestor(const if (status == svn_wc__db_status_deleted) SVN_ERR(svn_wc__db_scan_deletion(deleted_ancestor_abspath, NULL, NULL, - NULL, wc_ctx-db, local_abspath, + wc_ctx-db, local_abspath, result_pool, scratch_pool)); return SVN_NO_ERROR; @@ -1017,7 +1017,7 @@ svn_wc__internal_get_commit_base_rev(svn const char *work_del_abspath; SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, - work_del_abspath, NULL, + work_del_abspath, db, local_abspath, scratch_pool, scratch_pool)); if (work_del_abspath != NULL) @@ -1160,7 +1160,7 @@ svn_wc__internal_node_get_schedule(svn_w /* Find out details of our deletion. */ SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, - work_del_abspath, NULL, + work_del_abspath, db, local_abspath, scratch_pool, scratch_pool)); Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1152348r1=1152347r2=1152348view=diff
svn commit: r1152353 - /subversion/branches/1.7.x/subversion/libsvn_ra_serf/replay.c
Author: lgo Date: Fri Jul 29 19:50:12 2011 New Revision: 1152353 URL: http://svn.apache.org/viewvc?rev=1152353view=rev Log: * subversion/libsvn_ra_serf/replay.c: revert part of r1152347 that wasn't supposed to be committed (yet). Modified: subversion/branches/1.7.x/subversion/libsvn_ra_serf/replay.c Modified: subversion/branches/1.7.x/subversion/libsvn_ra_serf/replay.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_ra_serf/replay.c?rev=1152353r1=1152352r2=1152353view=diff == --- subversion/branches/1.7.x/subversion/libsvn_ra_serf/replay.c (original) +++ subversion/branches/1.7.x/subversion/libsvn_ra_serf/replay.c Fri Jul 29 19:50:12 2011 @@ -194,7 +194,6 @@ start_replay(svn_ra_serf__xml_parser_t * /* Create a pool for the commit editor. */ ctx-dst_rev_pool = svn_pool_create(ctx-src_rev_pool); - ctx-file_pool = svn_pool_create(ctx-dst_rev_pool); /* ### it would be nice to have a proper scratch_pool. */ SVN_ERR(svn_ra_serf__select_revprops(ctx-props, @@ -651,6 +650,7 @@ svn_ra_serf__replay(svn_ra_session_t *ra replay_ctx = apr_pcalloc(pool, sizeof(*replay_ctx)); replay_ctx-src_rev_pool = pool; + replay_ctx-file_pool = svn_pool_create(pool); replay_ctx-editor = editor; replay_ctx-editor_baton = edit_baton; replay_ctx-done = FALSE; @@ -766,6 +766,7 @@ svn_ra_serf__replay_range(svn_ra_session replay_ctx = apr_pcalloc(ctx_pool, sizeof(*replay_ctx)); replay_ctx-src_rev_pool = ctx_pool; + replay_ctx-file_pool = svn_pool_create(pool); replay_ctx-revstart_func = revstart_func; replay_ctx-revfinish_func = revfinish_func; replay_ctx-replay_baton = replay_baton;
svn commit: r1152354 - /subversion/branches/1.7.x/STATUS
Author: rhuijben Date: Fri Jul 29 19:53:30 2011 New Revision: 1152354 URL: http://svn.apache.org/viewvc?rev=1152354view=rev Log: * STATUS: Cast 2 votes. 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=1152354r1=1152353r2=1152354view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Fri Jul 29 19:53:30 2011 @@ -143,7 +143,7 @@ Candidate changes: Justification: Both tools are basically not useable with these leaks. Votes: - +1: lgo + +1: lgo, rhuijben * r1151177 Fix two bugs in ra_serf when connecting to HTTPS repository hosted on @@ -170,11 +170,6 @@ Candidate changes: Votes: +0: danielsh - * r1151911 - Fix description of svndumpfilter's --targets option. - Votes: - +1: cmpilato, hwright - * r1152189, r1152190 Fix an assertion on copying nodes that are not presence normal. Justification: @@ -212,3 +207,9 @@ Approved changes: this revision depends for a clean merge). Votes: +1: rhuijben, danielsh, cmpilato + + * r1151911 + Fix description of svndumpfilter's --targets option. + Votes: + +1: cmpilato, hwright +
svn commit: r1152356 - /subversion/branches/1.7.x/STATUS
Author: rhuijben Date: Fri Jul 29 19:54:52 2011 New Revision: 1152356 URL: http://svn.apache.org/viewvc?rev=1152356view=rev Log: * STATUS: Following up on r1152354, really cast 2nd vote. 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=1152356r1=1152355r2=1152356view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Fri Jul 29 19:54:52 2011 @@ -211,5 +211,4 @@ Approved changes: * r1151911 Fix description of svndumpfilter's --targets option. Votes: - +1: cmpilato, hwright - + +1: cmpilato, hwright, rhuijben
svn commit: r1152358 - /subversion/trunk/tools/dist/backport.pl
Author: danielsh Date: Fri Jul 29 19:57:35 2011 New Revision: 1152358 URL: http://svn.apache.org/viewvc?rev=1152358view=rev Log: Plug an infinite loop. * tools/dist/backport.pl (parse_entry): Use more liberal regexes. Modified: subversion/trunk/tools/dist/backport.pl Modified: subversion/trunk/tools/dist/backport.pl URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/backport.pl?rev=1152358r1=1152357r2=1152358view=diff == --- subversion/trunk/tools/dist/backport.pl (original) +++ subversion/trunk/tools/dist/backport.pl Fri Jul 29 19:57:35 2011 @@ -152,15 +152,15 @@ sub parse_entry { } # summary - push @logsummary, shift until $_[0] =~ /^\w+:/; + push @logsummary, shift until $_[0] =~ /^\s*\w+:/; # votes - unshift @votes, pop until $_[-1] =~ /^Votes:/; + unshift @votes, pop until $_[-1] =~ /^\s*Votes:/; pop; # branch while (@_) { -shift and next unless $_[0] =~ s/^Branch:\s*//; +shift and next unless $_[0] =~ s/^\s*Branch:\s*//; $branch = sanitize_branch (shift || shift || die Branch header found without value); }
svn commit: r1152360 - /subversion/trunk/tools/dist/backport.pl
Author: danielsh Date: Fri Jul 29 20:00:04 2011 New Revision: 1152360 URL: http://svn.apache.org/viewvc?rev=1152360view=rev Log: Fix an infinite loop. * tools/dist/backport.pl (parse_entry): Guard the loop condition. Tested by: none Modified: subversion/trunk/tools/dist/backport.pl Modified: subversion/trunk/tools/dist/backport.pl URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/backport.pl?rev=1152360r1=1152359r2=1152360view=diff == --- subversion/trunk/tools/dist/backport.pl (original) +++ subversion/trunk/tools/dist/backport.pl Fri Jul 29 20:00:04 2011 @@ -152,10 +152,10 @@ sub parse_entry { } # summary - push @logsummary, shift until $_[0] =~ /^\s*\w+:/; + push @logsummary, shift until $_[0] =~ /^\s*\w+:/ or not defined $_[0]; # votes - unshift @votes, pop until $_[-1] =~ /^\s*Votes:/; + unshift @votes, pop until $_[-1] =~ /^\s*Votes:/ or not defined $_[-1]; pop; # branch
svn commit: r1152361 - /subversion/branches/1.7.x/
Author: danielsh Date: Fri Jul 29 20:04:39 2011 New Revision: 1152361 URL: http://svn.apache.org/viewvc?rev=1152361view=rev Log: Record the reverse merging of r1150506 r1150853 done in r1152353. Client: 1.7.0-beta1 Modified: subversion/branches/1.7.x/ (props changed) Propchange: subversion/branches/1.7.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jul 29 20:04:39 2011 @@ -54,4 +54,4 @@ /subversion/branches/tree-conflicts:868291-873154 /subversion/branches/tree-conflicts-notify:873926-874008 /subversion/branches/uris-as-urls:1060426-1064427 -/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150242,1150372,1150441,1150506,1150812,1150853,1151036,1152129 +/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150242,1150372,1150441,1150812,1151036,1152129
svn commit: r1152364 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: stsp Date: Fri Jul 29 20:15:00 2011 New Revision: 1152364 URL: http://svn.apache.org/viewvc?rev=1152364view=rev Log: * subversion/libsvn_wc/wc_db.c (op_delete_txn): Always initialise local variables MOVED_FROM_RELPATH, CHILED_MOVED_FROM_RELPATH, and CHILD_DELETE_OP_ROOT_RELPATH. Also test the right variable for non-NULLness in debug assertion. 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=1152364r1=1152363r2=1152364view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 29 20:15:00 2011 @@ -6070,7 +6070,7 @@ op_delete_txn(void *baton, if (b-moved_to_relpath) { - const char *moved_from_relpath; + const char *moved_from_relpath = NULL; /* ### call scan_addition_txn() directly? */ if (status == svn_wc__db_status_added) @@ -6113,8 +6113,8 @@ op_delete_txn(void *baton, while (have_row) { svn_wc__db_status_t child_status; - const char *child_moved_from_relpath; - const char *child_delete_op_root_relpath; + const char *child_moved_from_relpath = NULL; + const char *child_delete_op_root_relpath = NULL; const char *moved_here_child_relpath = svn_sqlite__column_text(stmt, 0, scratch_pool); @@ -6141,7 +6141,7 @@ op_delete_txn(void *baton, * It is possible to hit this during normal operation * if a move was interrupted mid-way so only perform * this check in debug mode. */ - SVN_ERR_ASSERT(moved_from_relpath + SVN_ERR_ASSERT(child_moved_from_relpath !strcmp(child_moved_from_relpath, svn_sqlite__column_text(stmt, 1, NULL))); #endif
svn commit: r1152368 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: stsp Date: Fri Jul 29 20:36:13 2011 New Revision: 1152368 URL: http://svn.apache.org/viewvc?rev=1152368view=rev Log: * subversion/libsvn_wc/wc_db.c (op_delete_txn): Reset open SQLite statements when returning errors that aren't coming from the svn_sqlite__ API. Found by: rhuijben 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=1152368r1=1152367r2=1152368view=diff == --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 29 20:36:13 2011 @@ -6117,25 +6117,34 @@ op_delete_txn(void *baton, const char *child_delete_op_root_relpath = NULL; const char *moved_here_child_relpath = svn_sqlite__column_text(stmt, 0, scratch_pool); + svn_error_t *err; svn_pool_clear(iterpool); /* The moved-here-children query returns info based on the * delete-half of the move. Check if that the copied-half of * the move matches this information. */ - SVN_ERR(read_info(child_status, NULL, NULL, NULL, NULL, -NULL, NULL, NULL, NULL, NULL, NULL, NULL, -NULL, NULL, NULL, NULL, NULL, NULL, NULL, -NULL, NULL, NULL, NULL, NULL, NULL, -wcroot, moved_here_child_relpath, -iterpool, iterpool)); + err = read_info(child_status, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, + wcroot, moved_here_child_relpath, + iterpool, iterpool); + if (err) +return svn_error_compose_create(err, svn_sqlite__reset(stmt)); + if (child_status == svn_wc__db_status_added) -SVN_ERR(scan_addition(child_status, NULL, NULL, NULL, +{ + err = scan_addition(child_status, NULL, NULL, NULL, NULL, NULL, NULL, child_moved_from_relpath, child_delete_op_root_relpath, wcroot, moved_here_child_relpath, - iterpool, iterpool)); + iterpool, iterpool); + if (err) +return svn_error_compose_create(err, +svn_sqlite__reset(stmt)); +} #ifdef SVN_DEBUG /* This catches incorrectly recorded moves. * It is possible to hit this during normal operation
svn commit: r1152409 - in /subversion/branches/1.7.x: ./ STATUS subversion/svndumpfilter/main.c
Author: hwright Date: Sat Jul 30 01:00:50 2011 New Revision: 1152409 URL: http://svn.apache.org/viewvc?rev=1152409view=rev Log: Merge r1151911 from trunk: * r1151911 Fix description of svndumpfilter's --targets option. Votes: +1: cmpilato, hwright, rhuijben Modified: subversion/branches/1.7.x/ (props changed) subversion/branches/1.7.x/STATUS subversion/branches/1.7.x/subversion/svndumpfilter/main.c Propchange: subversion/branches/1.7.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Jul 30 01:00:50 2011 @@ -54,4 +54,4 @@ /subversion/branches/tree-conflicts:868291-873154 /subversion/branches/tree-conflicts-notify:873926-874008 /subversion/branches/uris-as-urls:1060426-1064427 -/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150242,1150372,1150441,1150812,1151036,1152129 +/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150242,1150372,1150441,1150812,1151036,1151911,1152129 Modified: subversion/branches/1.7.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1152409r1=1152408r2=1152409view=diff == --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Sat Jul 30 01:00:50 2011 @@ -207,8 +207,3 @@ Approved changes: this revision depends for a clean merge). Votes: +1: rhuijben, danielsh, cmpilato - - * r1151911 - Fix description of svndumpfilter's --targets option. - Votes: - +1: cmpilato, hwright, rhuijben Modified: subversion/branches/1.7.x/subversion/svndumpfilter/main.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/svndumpfilter/main.c?rev=1152409r1=1152408r2=1152409view=diff == --- subversion/branches/1.7.x/subversion/svndumpfilter/main.c (original) +++ subversion/branches/1.7.x/subversion/svndumpfilter/main.c Sat Jul 30 01:00:50 2011 @@ -938,7 +938,8 @@ static const apr_getopt_option_t options {preserve-revprops, svndumpfilter__preserve_revprops, 0, N_(Don't filter revision properties.) }, {targets, svndumpfilter__targets, 1, - N_(Pass contents of file ARG as additional args)}, + N_(Read additional prefixes, one per line, from\n + file ARG.)}, {NULL} };