subversion

Checkout Tools
  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 874258 is being indexed.

One small step towards mergeinfo sanity; no more explicit mergeinfo

on a WC-to-WC move/copy destination unless the source had some.

Discussed here:

http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=145213.

* subversion/libsvn_client/copy.c

(propagate_mergeinfo_within_wc): Remove.

(do_wc_to_wc_copies, do_wc_to_wc_moves): Don't set explicit mergeinfo on

a cp/mv destination beyond what the source had.

* subversion/tests/cmdline/copy_tests.py

* subversion/tests/cmdline/merge_tests.py

* subversion/tests/cmdline/revert_tests.py

* subversion/tests/cmdline/update_tests.py

Update test expectations to no longer expect WC-to-WC copy/move

destinations to always have explicit (usually empty) mergeinfo. In a

few cases where this mergeinfo was essential to the purpose of the test,

the WC-to-WC cp/mv was replaced with a REPOS-to-REPOS cp/mv or empty

mergeinfo was manually set on the destination.

Sigh. Switching to del_on_pool_cleanup. As Garrett notes, another thread

might fork a process at *just* the wrong time, and delete the file.

Found by: rooneg

* subversion/libsvn_subr/io.c:

(get_default_file_perms): use del_on_pool_cleanup after all.

ra_serf: Don't assume that the specified proxy is always an IPv4 address.

* subversion/libsvn_ra_serf/serf.c

(load_config): Switch to APR_UNSPEC for processing proxy addresses.

Yay. Fixed throughout svn.

Leave this one del_on_close with a comment.

* subversion/libsvn_subr/io.c:

(get_default_file_perms): switch to svn_io_open_unique_file3() and leave

a comment about why del_on_close is acceptable.

ra_serf: Do not overwrite/munge the cert storage when OpenSSL/Serf asks to

validate the entire certificate chain.

* subversion/libsvn_ra_serf/util.c

(ssl_server_cert): If present, use the certificate name as the key to the

storage rather than the realm string.

Remove uses of svn_io_file_del_on_close, since it is problematic with

(unpatched) versions of APR.

* subversion/svnsync/main.c:

(open_tmp_file): simplify using svn_io_open_unique_file3 and switch to

svn_io_file_del_on_pool_cleanup

* subversion/libsvn_repos/reporter.c:

(svn_repos_begin_report2): switch to svn_io_file_del_on_pool_cleanup

* subversion/libsvn_repos/dump.c:

(store_delta): switch to svn_io_file_del_on_pool_cleanup

(dump_node): when wrapping a stream around the delta file, make sure the

stream owns the file and will close it.

* subversion/libsvn_repos/repos.h:

(svn_repos__hooks_start_commit, svn_repos__hooks_post_revprop_change,

svn_repos__hooks_post_lock, svn_repos__hooks_post_unlock): add const

to parameters, as appropriate

* subversion/libsvn_repos/hooks.c:

(create_temp_file): switch to svn_io_file_del_on_pool_cleanup

(svn_repos__hooks_start_commit, svn_repos__hooks_post_revprop_change,

svn_repos__hooks_post_lock, svn_repos__hooks_post_unlock): add const

to parameters, as appropriate

* TODO-1.6: Add some tree conflict todo items.
Make the tree-conflict WC APIs private to Subversion (but shared across

libraries). Previously, two were public and the third was private to

libsvn_wc. This is issue #3321.

* subversion/include/private/svn_wc_private.h

(svn_wc__get_tree_conflict, svn_wc__add_tree_conflict): New, moved from

svn_wc_get_tree_conflict and svn_wc_add_tree_conflict respectively in

svn_wc.h.

(svn_wc__del_tree_conflict): Moved from tree_conflicts.h.

* subversion/include/svn_wc.h

(svn_wc_get_tree_conflict, svn_wc_add_tree_conflict): Rename and move

to svn_wc_private.h.

* subversion/libsvn_client/info.c

(info_found_entry_callback, info_error_handler): Adjust calls.

* subversion/libsvn_client/merge.c

(tree_conflict): Adjust calls.

* subversion/libsvn_wc/adm_ops.c

(revert_internal, resolve_found_entry_callback): Adjust calls.

* subversion/libsvn_wc/entries.c

(visit_tc_too_error_handler, svn_wc__walk_entries_and_tc): Adjust calls.

* subversion/libsvn_wc/questions.c

(svn_wc_conflicted_p2): Adjust calls.

* subversion/libsvn_wc/status.c

(get_dir_status): Adjust calls.

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc_add_tree_conflict, svn_wc_get_tree_conflict): Rename to

svn_wc__add_tree_conflict and svn_wc__get_tree_conflict respectively.

* subversion/libsvn_wc/tree_conflicts.h

(svn_wc__del_tree_conflict): Rename and move to svn_wc_private.h.

* TODO-1.6: Add an item re WC-to-WC copy/moves.

Fix a test failure.

* subversion/tests/cmdline/switch_tests.py

(failed_anchor_is_target): Adjust now that "svn resolved" acts on a tree

conflict victim not the parent.

A few followup improvements to r34160.

Suggested by: glasser

gstein

* subversion/libsvn_fs_fs/fs_fs.c

(commit_body_rep_cache): Renamed from commit_body_wrapper(), and don't

allow sqlite rollback errors to override any commit errors. Also, always

use the sqlite transaction mechanism.

(svn_fs_fs__commit): Conditionalize the retry function based upon rep caching.

* TODO-1.6: Revert my removal of an item in r34170 as I didn't

check that Greg has finished it, although I checked that the original

problem is fixed.

Fix the character encoding of the default diff header that is currently used

by the "diff-full (df)" option of interactive resolving (but not by "svn

diff"). This previously errored out in locales such as zh_CN.GBK.

Patch by: Rock Sun <daijun@gmail.com>

* subversion/libsvn_diff/diff_file.c

(output_unified_default_hdr): UTF-8-encode the date string from APR before

using it as UTF-8.

* TODO-1.6: Remove a done item.
* TODO-1.6: Remove a done item.
* subversion/libsvn_wc/update_editor.c

(check_tree_conflict): Tweak a comment for clarity.

Suggested by: stsp

(but written in my own words)

Remove the tc-resolve branch, as it was merged to trunk in r34166.
Merge the "tc-resolve" branch to trunk. This makes "resolved" handle tree

conflicts per victim rather than per parent.

Below are all the pertinent parts of log messages on the branch, partially

edited for grouping and to remove some irrelevant details of intermediate

steps.

-------------------------------------------------------------------

* subversion/libsvn_wc/adm_ops.c

(resolve_conflict_on_entry): Do not clear tree conflicts that are recorded

in this entry. Do not send a notification, but instead report (through a

new boolean output parameter) whether something was resolved.

(resolve_found_entry_callback): Resolve any tree conflict for this victim.

Send a notification if any conflict was resolved.

(svn_wc_resolved_conflict4): Use an entries-walker function that visits

unversioned tree conflict victims as well as ordinary entries.

-------------------------------------------------------------------

Allow sched-deleted nodes to be resolved (fixes update_tests.py 15).

* subversion/libsvn_wc/adm_ops.c

(resolve_found_entry_callback):

Allow sched-deleted nodes to be resolved.

* subversion/libsvn_wc/entries.c

(visit_tc_too_found_entry):

Only try to retrieve the ADM_ACCESS in presence of tree-conflicts.

(visit_tc_too_error_handler):

Get the ADM_ACCESS on the parent instead of on the node itself, thus

avoid an error upon an unversioned tree-conflict victim.

### TODO: check for greater subdir depths.

Fix a crash in del_tree_conflict().

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__del_tree_conflict):

Only write and run the log if LOG_ACCUM is not NULL.

-------------------------------------------------------------------

Fix per-victim "resolved" on directory tree-conflict victims.

* subversion/libsvn_client/resolved.c

(svn_client_resolve):

Get the ADM_ACCESS on the target's parent directory to be able to resolve

tree-conflicted directories. Extend the ADM_LOCK_LEVEL to still be able

to lock the target node for text/prop conflicts.

* subversion/include/svn_client.h

(svn_client_resolve): Comment.

* subversion/libsvn_wc/adm_ops.c

(resolve_found_entry_callback):

Completely split tree-conflict resolution from text and prop conflicts,

because tree-conflicts need a different ADM_ACCESS when handling

directories. Change use of RESOLVED to already reflect the sanity-check,

and sanity-check separately for tree-conflicts. Clarify some conditions.

Also remove the debugging conditions that exited prematurely.

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__loggy_del_tree_conflict):

Extend an assertion by a NULL check. Add another assertion to make sure

the VICTIM_PATH is a child node of the ADM_ACCESS' path.

* subversion/libsvn_wc/tree_conflicts.h

(svn_wc__loggy_add_tree_conflict,

svn_wc__loggy_del_tree_conflict,

svn_wc__del_tree_conflict,

svn_wc__write_tree_conflicts_to_entry,

svn_wc__tree_conflict_exists):

Comments, add "@since New in 1.6.".

-------------------------------------------------------------------

Make the tree-conflict-enabled WC walker cope with an unversioned target.

* subversion/libsvn_wc/entries.c,

subversion/libsvn_wc/wc.h

(svn_wc__walk_entries_and_tc): Allow the target to be unversioned, and

allow adm_access to be null.

-------------------------------------------------------------------

Fix the behaviour of "resolved" that descends into unversioned

tree-conflicts even if the depth doesn't allow that.

* subversion/libsvn_wc/entries.c

(visit_tc_too_baton_t): Add TARGET and DEPTH fields.

(visit_tc_too_found_entry):

Use new TARGET and DEPTH fields in the baton to determine whether to

descend into unversioned tree-conflicted children of a directory.

(svn_wc__walk_entries_and_tc): Supply TARGET and DEPTH to the baton.

-------------------------------------------------------------------

Tests.

* subversion/tests/cmdline/commit_tests.py

(tree_conflicts_resolved): Adjust for resolving per victim.

* subversion/tests/cmdline/depth_tests.py

(tree_conflicts_resolved_depth_empty, tree_conflicts_resolved_depth_files,

tree_conflicts_resolved_depth_immediates,

tree_conflicts_resolved_depth_infinity, make_depth_tree_conflicts):

Four new tests and a helper. The tests are XFAIL because the helper

make_depth_tree_conflicts() exposes an error in update code that

is not related to "resolved". Separate trials suggest that these

tests will pass as soon as the update issue is resolved. See

inline comment in make_depth_tree_conflicts() marked "##".

(test_list): Add the new tests.

* subversion/tests/cmdline/log_tests.py

(merge_history_repos): Resolve the victim, not the parent.

* subversion/tests/cmdline/tree_conflict_tests.py

(ensure_tree_conflict): Resolve the victim, not the parent.

Make a "resolved" test also try run "resolved" on the victim's

parent first, to make sure it doesn't resolve its children.

Remove comment about not supporting "resolved" per victim.

* subversion/tests/cmdline/update_tests.py

(another_hudson_problem): Resolve the victim, not the parent.

  1. … 13 more files in changeset.

* subversion/libsvn_wc/update_editor.c

(check_tree_conflict): Add an assertion with comment.

On branch tc-resolve:

Tweak the tree_conflicts_resolved_depth* tests to use separate directories

in one case. Not separating the case where the update currently fails to

report a tree-conflict properly, because it's nice to have a test for it.

* subversion/tests/cmdline/depth_tests.py

(make_depth_tree_conflicts, tree_conflicts_resolved_depth_empty,

tree_conflicts_resolved_depth_files,

tree_conflicts_resolved_depth_immediates,

tree_conflicts_resolved_depth_infinity):

Instead of 'A/B/lambda', 'A/B/E' and 'A/B/E/alpha',

rather use 'A/mu', 'A/B' and 'A/D/gamma'.

On branch tc-resolve:

Merge in changes from trunk up to r34162.

    • ?
    /branches/tc-resolve/subversion/svn/log-cmd.c
    • ?
    /branches/tc-resolve/subversion/libsvn_wc/update_editor.c
  1. … 48 more files in changeset.
Deprecate the RA->open_tmp_file callback. It was from a long time ago,

when we did have not temp file capabilities. Today, RA layers should just

use the available function for generating unique files (from svn_io.h)

* subversion/include/svn_ra.h:

(svn_ra_callbacks2_t.open_tmp_file): deprecated

* subversion/libsvn_client/ra.c:

(open_admin_tmp_file): removed

(open_tmp_file): use svn_io_open_unique_file3 to always generate a temp

file in the system temp area.

(svn_client__open_ra_session_internal): always use open_tmp_file,

ignoring the USE_ADMIN parameter.

* subversion/libsvn_ra_neon/commit.c:

(commit_apply_txdelta): ...

* subversion/libsvn_ra_neon/fetch.c:

(make_reporter): ...

* subversion/libsvn_ra_serf/commit.c:

(apply_textdelta): ... use svn_io_open_unique_file3 rather than the

open_tmp_file callback.

Consistently log an error when copy targets exist and

add some expected failure tests. This is a workaround

for mod_dav_svn issue number 3314.

* contrib/client-side/svnmucc/svnmucc.c

(build): If copy target path exists log an error

* contrib/client-side/svnmucc/svnmucc-test.py

(xrun_svnmucc): Added expected failure test function

(main): Added cp failure tests

Patch by: me

Review by: philip

Followup to r34147 by rolling back the FSFS sqlite transaction on a failed

commit.

If at any point we decide that we have more places to use wrapped sqlite

transactions, this could probably be generalized in the sqlite APIs.

* subversion/libsvn_fs_fs/fs_fs.c

(commit_body): Remove transaction handling.

(commit_body_wrapper): New.

(svn_fs_fs__commit): Call the new wrapper.

When exporting, make sure the temp files go into the target directory,

rather than the system tempdir, since we plan to rename them into place.

Note: this was a regression that I introduced in r34155. On my system,

TMPDIR and the WC were on the same device, so it did not show up. I now

have a recipe for diff-device testing in order to watch out for this.

* subversion/libsvn_client/export.c:

(apply_textdelta, svn_client_export4): create the temp file in the same

directory as the target file since we plan to do renaming.

Fix update/switch to skip all tree conflict victims and their

descendants. Skip both newly-discovered and existing tree conflicts.

Create only one tree conflict at the root of each conflicted tree, not

a tree conflict in every directory.

Notify the user just once about any given tree conflict if the target

contains a tree conflict, is itself tree-conflicted, or is inside a

tree conflict.

Tweak test expectations to reflect these new features. Add tests that

run update/switch in trees that already contain tree conflict victims.

Add tests that chdir into conflicted trees and attempt to update/switch.

* subversion/libsvn_wc/update_editor.c

(edit_baton): Add field current_tree_conflict.

(make_editor): Initialize new field.

(dir_baton): Remove unused field tree_conflicted.

(make_dir_baton): Track field removal.

(open_root): TODO comment, for now.

(check_tree_conflict): Thin out the comments a bit. Remove useless

checks for entry validity. Remove the redundant (delete:obstructed)

and (delete:missing) conflicts.

(already_in_a_tree_conflict): New function.

(do_entry_deletion

add_directory,

open_directory,

add_file,

open_file): Skip the operation if there is an existing or new tree

conflict. Notify the user once per tree conflict.

(close_directory): Unset current_tree_conflict when returning to

the victim dir. Don't notify about tree conflicts.

(complete_directory): Do nothing if inside a tree conflict.

* subversion/tests/cmdline/update_tests.py

(update_deleted_missing_dir,

another_hudson_problem): Don't treat a missing item as a tree

conflict.

(update_delete_modified_files,

tree_conflicts_on_update_1_1,

tree_conflicts_on_update_1_2,

tree_conflicts_on_update_2_1,

tree_conflicts_on_update_2_2,

tree_conflicts_on_update_3): Tweak expected output and disk to

reflect the consistent skipping.

(tree_conflicts_on_update_2_3): New test function.

(test_list): Add the new test function, make it XFail().

* subversion/tests/cmdline/switch_tests.py

(failed_anchor_is_target,

switch_with_obstructing_local_adds,

tree_conflicts_on_switch_1_1,

tree_conflicts_on_switch_1_2,

tree_conflicts_on_switch_2_1,

tree_conflicts_on_switch_2_2,

tree_conflicts_on_switch_3): Tweak expected output and disk to

reflect the consistent skipping.

(test_list): XFail 3 tests due to problems with 'svn status':

forced_switch_failures

tree_conflicts_on_switch_2_1

tree_conflicts_on_switch_3

* subversion/tests/cmdline/svntest/actions.py

(deep_trees_conflict_output): Tweak expected output.

(deep_trees_conflict_output_skipped, deep_trees_status_local_tree_del,

deep_trees_status_local_leaf_edit): New.

(deep_trees_run_tests_scheme_for_update): Allow status check to be

optional.

(deep_trees_skipping_on_update): New function.

* subversion/tests/cmdline/revert_tests.py

(revert_tree_conflicts_in_updated_files): Tweak expected output and

disk to reflect the consistent skipping.

* subversion/tests/cmdline/stat_tests.py

(status_with_tree_conflicts): Tweak expected output and disk to

reflect the consistent skipping.

* subversion/tests/cmdline/commit_tests.py

(tree_conflicts_resolved): Tweak expected output and disk to

reflect the consistent skipping.

* subversion/tests/cmdline/info_tests.py

(test_list): Remove XFail from info_with_tree_conflicts.

* subversion/tests/cmdline/tree_conflict_tests.py

(test_list): Remove XFail from up_sw_file_add_onto_add.

* subversion/tests/cmdline/svntest/tree.py

(build_tree_from_checkout): Correct a comment.

* TODO-1.6: Update.
Update the 600 line svn_wc__merge_internal. SIX HUNDRED LINES. It used

the old svn_io_open_unique_file2 seven times; these have been replaced by

calls to the new svn_io_open_uniquely_named(). We want the merge (unique)

files to have particular names.

* subversion/libsvn_wc/merge.c:

(svn_wc__merge_internal): switch to uniquely_named

Switch some uses of svn_io_open_unique_file2 over to open_unique_file3.

One case of switching to svn_stream_open_unique.

* subversion/libsvn_wc/adm_files.c:

(svn_wc_create_tmp_file2): ...

* subversion/libsvn_wc/translate.c:

(svn_wc_translated_file2): ...

* subversion/libsvn_wc/diff.c:

(get_empty_file): ...

* subversion/libsvn_client/repos_diff.c:

(create_empty_file): ...

* subversion/libsvn_client/blame.c:

(file_rev_handler): ...

* subversion/libsvn_client/commit.c:

(send_file_contents): ...

* subversion/libsvn_ra_neon/util.c:

(parsed_request): ...

* subversion/libsvn_repos/reporter.c:

(svn_repos_begin_report2): ...

* subversion/libsvn_repos/dump.c:

(store_delta): ...

* subversion/libsvn_repos/hooks.c:

(create_temp_file): ... switch to use svn_io_open_unique_file3() and

simplify surrounding code, as appropriate.

* subversion/libsvn_client/export.c:

(struct file_baton): store a stream rather than a file

(window_handler): switch to svn_io_remove_file() since our path is in

the internal style, and not appropriate for passing to APR.

(apply_textdelta): open a unique stream rather than a file, and make

sure to disown it before passing it along to svn_txdelta_apply().

(close_file): close the stream, rather than the file.

(svn_client_export4): open a unique stream instead of a file.