Neels Hofmeyr <neels@elego.de>


Patch Suggested
r873006, r872983, r872920, r872880, r872797, r872739, r872691, r872687, r872685, r872679, r872629, r871688, r871623, r869664 r871679

r869664 | stsp | 2008-02-25 21:10:19 +0000 (Mon, 25 Feb 2008)

On the tree-conflicts branch, apply a few fixes by Stephen Butler
and Neels Janosch Hofmeyr.

* subversion/libsvn_wc/tree_conflicts.c
  (read_victim_path): Correct boolean expression in if statement.
   Chaining checks for inequality with boolean OR does not make much sense.
   Found by Neels.
  (read_reason, svn_wc__write_tree_conflicts_to_entry): Add missing
   case to switch statement. Found by Stephen.

* subversion/libsvn_client/info.c
  (build_info_from_entry): Fix potential reference to uninitialized data.
   Fix comment to explicitly mention that only this-dir entries
   carry tree conflict data. Both found by Neels.

* subversion/libsvn_wc/questions.c: Same comment fix as in info.c

Patch by: Neels Janosch Hofmeyr <neels@elego.de>
          Stephen Butler <sbutler@elego.de>


r871623 | lgo | 2008-06-01 07:05:28 +0000 (Sun, 01 Jun 2008)

Add a very clear comment about what the file target-tests.c, which may 
look like a C test, really is.

Patch by: Neels Janosch Hofmeyr <neels@elego.de>

* subversion/tests/libsvn_subr/target-test.c: Add comment describing
  the function of this file.


r871679 | kfogel | 2008-06-05 21:49:04 +0000 (Thu, 05 Jun 2008)

Improve an API by allowing a callback to be null.

Suggested by: Neels Janosch Hofmeyr <neels@elego.de>

* subversion/include/svn_repos.h
  (svn_repos_get_commit_editor5): Document that callback can be null.
    Also, fix up some obsolete documentation: the modern callback type
    takes a struct instead of separate parameters.

* subversion/libsvn_repos/commit.c
  (close_edit): Test callback before calling.


r871688 | kfogel | 2008-06-06 18:28:03 +0000 (Fri, 06 Jun 2008)

Fix issue #1796: prevent invalid log messages from entering the repository.
Although our client does not send invalid messages, a defective or
malicious client could, thus corrupting the repository metadata.

Patch by: Neels Janosch Hofmeyr <neels@elego.de>
(Tweaked by me; previous iterations reviewed by danielsh.)

* subversion/include/private/svn_utf_private.h: New file.
  (svn_utf__is_valid): Moved here from libsvn_subr/utf_impl.h,
    because needed in libsvn_repos. 

* subversion/libsvn_subr/utf_impl.h: Include private/svn_utf_private.h.
  (svn_utf__is_valid): Moved to svn_utf_private.h.
  (svn_utf__last_valid): Add comment mentioning svn_utf__is_valid.

* subversion/libsvn_repos/fs-wrap.c
  (validate_prop): Validate log messages.

* subversion/include/svn_repos.h
  (svn_repos_fs_change_node_prop): Document validation behavior.

* subversion/tests/libsvn_repos/repos-test.c
  (prop_validation_commit_with_revprop): New helper function.
  (prop_validation): New test.
  (test_funcs): Run it.


r872629 | julianfoad | 2008-08-19 16:07:14 +0000 (Tue, 19 Aug 2008)

Fix a segmentation fault in tree-conflicts detection.

Patch by: Neels Janosch Hofmeyr <neels@elego.de>

* subversion/libsvn_client/merge.c
  (merge_dir_opened): Disable the superfluous tree-conflicts detection for
    the case adm_access == NULL, thereby avoiding a segmentation fault
    when part of the incoming change is in a subdirectory of one that is not
    present in the target. Add a detailed comment.


r872679 | julianfoad | 2008-08-20 21:20:07 +0000 (Wed, 20 Aug 2008)

Replace file-based tree-conflicts cmdline tests with new tests that are
concerned with directory *and* file victims, in different tree depths.
Contains new tests for update, switch and merge operations.

Patch by: Neels Janosch Hofmeyr <neels@elego.de>

* subversion/tests/cmdline/svntest/actions.py
  (set_up_tree_conflicts): Remove old helper for update, switch.
  (set_up_tree_conflicts_for_merge): Remove old helper for merge.
  (make_tc_test_trees): Rename and split new helper into make_deep_trees()
    and add_deep_trees().
  (tc_leaf_del): Rename new helper to deep_trees_leaf_del().
  (tc_tree_del): Rename new helper to deep_trees_tree_del().
  (tc_tree_del): Rename new helper to deep_trees_tree_del().
  (tc_text_append): Rename new helper to deep_trees_leaf_edit().
  (set_up_deep_tree_conflicts_up): Remove function, its purpose replaced by
    deep_trees_run_tests_scheme_for_update().
  (set_up_deep_tree_conflicts_sw): Remove function, its purpose replaced by
    deep_trees_run_tests_scheme_for_switch().
  (add_deep_trees): New function, replacing make_tc_test_trees().
  (make_deep_trees): New function, used by add_deep_trees().
  (deep_trees_virginal_state): New wc.State structure.
  (deep_trees_leaf_edit): New function.
  (deep_trees_after_leaf_edit): New wc.State structure.
  (deep_trees_leaf_del): New function.
  (deep_trees_after_leaf_del): New wc.State structure.
  (deep_trees_tree_del): New function.
  (deep_trees_after_tree_del): New wc.State structure.
  (DeepTreesTestCase): New class.
  (deep_trees_run_tests_scheme_for_update): New function.
  (deep_trees_run_tests_scheme_for_switch): New function.
  (deep_trees_run_tests_scheme_for_merge): New function.

* subversion/tests/cmdline/update_tests.py
  (tree_conflicts_in_updated_files): Remove old test, replaced by
    tree_conflicts_on_update().
  (tree_conflicts_on_update): New test, replacing
    tree_conflicts_in_updated_files(). Adds directory victims, and
    conflicts in different tree depths.

* subversion/tests/cmdline/switch_tests.py
  (tree_conflicts_in_switched_files): Remove old test, replaced by
    tree_conflicts_on_switch().
  (tree_conflicts_on_switch): New test, replacing
    tree_conflicts_in_switched_files(). Adds directory victims, and
    conflicts in different tree depths.

* subversion/tests/cmdline/merge_tests.py
  (tree_conflicts_in_merged_files): Remove old test, replaced by
    tree_conflicts_on_merge().
  (tree_conflicts_on_merge): New test, replacing
    tree_conflicts_in_merged_files(). Adds directory victims, and conflicts
    in different tree depths. Adds another case to the old merge test,
    namely omitting a local commit.


r872685 | kfogel | 2008-08-21 05:52:07 +0000 (Thu, 21 Aug 2008)

* subversion/tests/cmdline/merge_tests.py
  (commit_to_subtree_added_by_merge): Add missing separator line comment
    before this test.

Patch by: Neels Janosch Hofmeyr <neels@elego.de>


r872687 | julianfoad | 2008-08-21 11:17:49 +0000 (Thu, 21 Aug 2008)

Split up big tree-conflicts tests into smaller tests, because tree-
conflicts-with-directory-victims are still under development. They may
be joined back together when they merely serve as regression tests.

Patch by: Neels Janosch Hofmeyr <neels@elego.de>

* subversion/tests/cmdline/update_tests.py
  (leaf_edit, tree_del, leaf_del, state_after_leaf_edit, state_after_leaf_del,
    state_after_tree_del, DeepTreesTestCase): Abbreviations moved to file
    scope.
  (tree_conflicts_on_update): Split into smaller functions.
  (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): New functions, as a result of
    splitting up tree_conflicts_on_update().
  (test_list): Update accordingly.

* subversion/tests/cmdline/switch_tests.py
  (leaf_edit, tree_del, leaf_del, state_after_leaf_edit, state_after_leaf_del,
    state_after_tree_del, j, DeepTreesTestCase): Abbreviations moved to file
    scope.
  (tree_conflicts_on_switch): Split into smaller functions.
  (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): New functions, as a result of
    splitting up tree_conflicts_on_switch().
  (test_list): Update accordingly.

* subversion/tests/cmdline/merge_tests.py
  (leaf_edit, tree_del, leaf_del, state_after_leaf_edit, state_after_leaf_del,
    state_after_tree_del, j, DeepTreesTestCase): Abbreviations moved to file
    scope.
  (tree_conflicts_on_merge_local_ci,
   tree_conflicts_on_merge_no_local_ci): Fix use case numbering in
    comments from 1..3 to 4..6. Split into smaller functions.
  (tree_conflicts_on_merge_local_ci_4_1,
   tree_conflicts_on_merge_local_ci_4_2,
   tree_conflicts_on_merge_local_ci_5_1,
   tree_conflicts_on_merge_local_ci_5_2,
   tree_conflicts_on_merge_local_ci_6): New functions, as a result of
    splitting up tree_conflicts_on_merge_local_ci().
  (tree_conflicts_on_merge_no_local_ci_4_1,
   tree_conflicts_on_merge_no_local_ci_4_2,
   tree_conflicts_on_merge_no_local_ci_5_1,
   tree_conflicts_on_merge_no_local_ci_5_2,
   tree_conflicts_on_merge_no_local_ci_6): New functions, as a result
    of splitting up tree_conflicts_on_merge_no_local_ci().
  (test_list): Update accordingly.


r872691 | julianfoad | 2008-08-21 14:22:57 +0000 (Thu, 21 Aug 2008)

Make the cmdline tests print out the complete actual tree and meta-
data, as python script, in case of a node mismatch in output, disk,
status or skip tree.

Patch by: Neels Janosch Hofmeyr <neels@elego.de>
(tweaked by me)

* subversion/tests/cmdline/svntest/tree.py
  (print_script): New function in SVNTreeNode class, prints out the node
    metadata as python script line.
  (dump_tree_script__crawler): New function.
  (dump_tree_script): New function, prints a whole tree as py script,
    using SVNTreeNode.print_script().

* subversion/tests/cmdline/svntest/actions.py
  (run_and_verify_checkout, run_and_verify_export, verify_update,
   run_and_verify_merge2, run_and_verify_commit, run_and_verify_status,
   run_and_verify_unquiet_status, run_and_verify_diff_summarize):
    Print the output / disk / status / skip tree as py script, if tree
    comparison throws an exception, using dump_tree_script() from tree.py.


r872739 | kfogel | 2008-08-23 19:17:50 +0000 (Sat, 23 Aug 2008)

* subversion/include/svn_wc.h
  (svn_wc_conflicted_p): Documentation fixes only.

Patch by: Neels Janosch Hofmeyr <neels@elego.de>
(Tweaked by me.)


r872797 | julianfoad | 2008-08-26 14:10:12 +0000 (Tue, 26 Aug 2008)

In the cmdline tests, fix the PATH string in "ACTUAL DISK" tree nodes. Also
fix update_tests.py 1, which relied on the erratic PATH. The only visible
effect of this fix is that the Python-script form of the tree is printed
correctly in the error output of a failing test.

(Previously, an "ACTUAL DISK" tree node only got a PATH string of two
elements, its parent and itself, breaking PATHs at a depth of more than 2.
In a side-effect, the svntest.tree.root_node_name was missing from each
PATH.)

Patch by: Neels Hofmeyr <neels@elego.de>

* subversion/tests/cmdline/svntest/tree.py
  (handle_dir): Reverse the order in which nodes are added to the tree,
    thus fixing PATH strings.

* subversion/tests/cmdline/update_tests.py
  (detect_extra_files): Strip the svntest.tree.root_node_name from nodes'
    PATH before using it as a real file system path.


r872880 | julianfoad | 2008-08-29 12:53:35 +0000 (Fri, 29 Aug 2008)

On the 'tree-conflicts' branch:

Fix some tree-conflicts tests by resurrecting the function
set_up_tree_conflicts() that was deleted in r32605 but still needed.
Rename and streamline that function, and adapt callers accordingly.
Also make minor unrelated fixes in 'info_tests.py'.

Found by: julianfoad
Patch by: Neels Hofmeyr <neels@elego.de>

* subversion/tests/cmdline/svntest/actions.py
  (build_greek_tree_conflicts): New function, copied from the function
    set_up_tree_conflicts() that was deleted in r32605. Simplify,
    sufficiently serving all current callers. Now creates a working copy
    with conflicts already in it, as opposed to just preparing for
    conflicts. Remove obsolete parameter DO_COPY. Use only one working
    copy and "time-warp". Tweak run_svn() calls to run_and_verify_*()
    calls. Change to not return anything.

* subversion/tests/cmdline/tree_conflict_tests.py
  (set_up_repos): Fix comment according to above rename, also mention
    deep_trees tests.

* subversion/tests/cmdline/revert_tests.py
  (revert_tree_conflicts_in_updated_files):
    Use new function build_greek_tree_conflicts(). Fixes this test.

* subversion/tests/cmdline/stat_tests.py
  (status_with_tree_conflicts):
    Use new function build_greek_tree_conflicts(). Fixes this test.

* subversion/tests/cmdline/commit_tests.py
  (tree_conflicts_block_commit, tree_conflicts_resolved):
    Use new function build_greek_tree_conflicts(). Fixes these tests.

* subversion/tests/cmdline/info_tests.py
  (info_with_tree_conflicts):
    Use new function build_greek_tree_conflicts(). Fix the expected
    type of return value from run_and_verify_svn(), and the expected
    output lines as now printed in tree-conflicts info, as these were
    out of date. Fixes this test.


r872920 | julianfoad | 2008-09-02 08:20:57 +0000 (Tue, 02 Sep 2008)

On the 'tree-conflicts' branch:

Change tree-conflicts tests in update_tests.py so that they pass the
behaviour agreed upon on the dev mailing list, and XFail() them. Also apply
minor fixes.

Patch by: julianfoad
          Neels Hofmeyr <neels@elego.de>

* subversion/tests/cmdline/update_tests.py
  (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): Adjust the expected behaviour for these tests.
  (test_list): Change the above tests to XFail.

* subversion/tests/cmdline/svntest/actions.py
  (deep_trees_virginal_state, deep_trees_after_leaf_edit,
   deep_trees_after_leaf_del): Expand these structures to contain a separate
    node item for each parent directory, because this is needed for tweak() to
    work.


r872983 | julianfoad | 2008-09-04 20:37:57 +0000 (Thu, 04 Sep 2008)

On the 'tree-conflicts' branch:

Further fix two tree-conflicts tests.

Patch by: Neels Hofmeyr <neels@elego.de>

* subversion/tests/cmdline/update_tests.py
  (tree_conflicts_on_update_2_1, tree_conflicts_on_update_2_2): Adjust
    the expected status to reflect the local changes.


r873006 | julianfoad | 2008-09-05 14:53:55 +0000 (Fri, 05 Sep 2008)

On the 'tree-conflicts' branch:

Fix segfault when the update editor calls do_entry_deletion() on an explicit
target of an update, and enable tree conflict detection in that case.

Patch by: Neels Hofmeyr <neels@elego.de>

* subversion/libsvn_wc/update_editor.c
  (do_entry_deletion, delete_entry, close_edit): Remove parameter
    PARENT_ADM_ACCESS from do_entry_deletion(), reverting to trunk
    and allowing tree-conflicts detection for update targets.
  (check_tree_conflict): Properly handle a missing directory, reporting
    it as 'svn_wc_conflict_reason_missing'.

* subversion/tests/cmdline/update_tests.py
  (update_deleted_missing_dir, another_hudson_problem): Tweak these tests
    to expect and handle the tree conflicts that inherently arise.