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

Tree-conflicts branch - log message / review

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 20 Aug 2008 10:58:21 +0100

Here is a log message for the changes currently sitting on the
tree-conflicts branch.

If you are interested in this branch, please take a look and perhaps
pick one part of it to review, comment on and/or help with. I added some
notes with '###' in the log message about things that look wrong, but
they are by no means a review.

I'll do the same.

Thanks!

VIEWING THE DIFFS

I recommend you view the diffs in a graphical viewer, e.g. by checking
out (or exporting) copies of the two trees:
[[[
svn export $SVN_REPOS/trunk_at_32485 svn-trunk-32485.export
svn export $SVN_REPOS/branches/tree-conflicts_at_32555 \
           svn-tree-conflicts-32555.export
kdiff3 svn-trunk-32485.export svn-tree-conflicts-32555.export
]]]

Alternatively, the log message and diff in a file together (300 KB) is
at <http://filebin.ca/duxdf/tree-conflicts-r32555-1.patch> for a while.
(If it's gone when you want it, let me know.)

- Julian

This patch is /branches/tree-conflicts_at_32555 relative to its last catch-up
point, /trunk_at_32485. 31 changed files + 8 added files.

# PUBLIC API

* subversion/include/svn_client.h
  (svn_info_t): Add a field to hold the tree conflicts info for this node.

* subversion/include/svn_wc.h
  (svn_wc_notify_t): Mention a 'tree_state' field.
  ### Wrong: no such field.
  (svn_wc_conflict_reason_t): Add a value representing 'added'.
  (svn_wc_conflict_kind_t): Add a value representing 'tree conflict'.
  (svn_wc_operation_t): New enumeration.
  (svn_wc_conflict_description_t): Add fields representing the operation
    resulting in a conflict, and the victim of a tree conflict.
  (svn_wc_entry_t): Add a 'tree_conflict_data' field.
  (svn_wc_conflicted_p2): New function to support tree conflicts,
    superseding svn_wc_conflicted_p() which becomes deprecated.
  ### Has '###' comments.
  (svn_wc_status2_t): Add a flag indicating 'tree-conflicted'.
  (svn_wc_resolved_conflict4): New function to support tree conflicts,
    superseding svn_wc_resolved_conflict3() which becomes deprecated.
  (svn_wc_read_tree_conflicts_from_entry): New function.
  (svn_wc_add_tree_conflict_data): New function.

# LIBSVN_CLIENT

* subversion/libsvn_client/commit_util.c
  (harvest_committables): When checking if there are any conflicts, also
    check for tree conflicts.

* subversion/libsvn_client/diff.c
  (diff_dir_deleted): Don't set the notification state.
  ### Why?

* subversion/libsvn_client/info.c
  (build_info_from_dirent): Initialise the 'tree_conflicts' field to NULL.
  (build_info_from_entry): If processing 'THIS_DIR', fill in the tree
    conflicts info.

* subversion/libsvn_client/merge.c
  (merge_cmd_baton_t): Add a 'tree_conflicted_dirs' field to hold a list of
    directories containing tree conflicts.
  (dry_run_deleted_p): Improve the doc-string.
  ### Unrelated change.
  (add_parent_to_tree_conflicted_dirs, tree_conflict,
   is_tree_conflicted_dir_p): New functions.
  (merge_file_changed): If the file isn't versioned in the WC, or isn't a
    file on disk, then in addition to reporting it as missing, raise a tree
    conflict.
  (merge_file_added): If the file is obstructed, raise a tree conflict.
  (merge_file_deleted): If the file to be deleted doesn't match what is
    present, raise a tree conflict.
  (merge_dir_added): If the dir is obstructed, raise a tree conflict.
  ### Includes unrelated bug fixes.
  (merge_dir_deleted): If obstructed, raise a tree conflict.
  ### Only does so in some cases.
  (merge_dir_opened): If obstructed, raise a tree conflict.
  (merge_dir_closed): If we encountered any tree conflicts within this
    directory tree, notify that fact.
  (do_merge): Initialise the merge_cmd_baton's new 'tree_conflicted_dirs'
    field.

* subversion/libsvn_client/repos_diff.c
  (close_directory): Fill in the 'content_state' field of the notification.
  ### Dormant bug fix that should be on trunk anyway?

* subversion/libsvn_client/resolved.c
  (svn_client_resolve): Use svn_wc_resolved_conflict4() to resolve tree
    conflicts as well as other conflicts, by using svn_wc_resolved_conflict4()
    instead of svn_wc_resolved_conflict3().

# LIBSVN_WC

* subversion/libsvn_wc/adm_ops.c
  (revert_admin_things): Extend to support the 'tree_conflict_data' field.
  (resolve_conflict_on_entry, resolve_callback_baton,
   resolve_found_entry_callback): Extend to support tree conflicts as well
    as other conflicts.
  (svn_wc_resolved_conflict3): Re-implement as a wrapper around ...
  (svn_wc_resolved_conflict4): New function.

* subversion/libsvn_wc/entries.c
  (read_entry, svn_wc__atts_to_entry, write_entry, fold_entry,
   svn_wc_entry_dup): Extend to support the 'tree_conflict_data' field.

* subversion/libsvn_wc/entries.h
  (SVN_WC__ENTRY_ATTR_TREE_CONFLICT_DATA): New constant.
  (SVN_WC__ENTRY_MODIFY_TREE_CONFLICT_DATA): New constant.

* subversion/libsvn_wc/log.c
  (log_do_committed, svn_wc__loggy_entry_modify): Extend to support the
    'tree_conflict_data' field.

* subversion/libsvn_wc/questions.c
  (svn_wc_conflicted_p): Re-implement as a wrapper around...
  (svn_wc_conflicted_p2): New function.

* subversion/libsvn_wc/status.c
  (dir_baton): Add a 'tree_conflicted' flag.
  (assemble_status, is_sendable_status): Support tree conflict indications.
  (close_directory): Support tree conflict indications.

* subversion/libsvn_wc/tree_conflicts.c,
  subversion/libsvn_wc/tree_conflicts.h
  New files.

* subversion/libsvn_wc/update_editor.c
  ### Includes unrelated changes such as ading one-line doc-strings to editor functions.
  (bump_dir_info): Update a doc-string to allow for a directory to have tree
    conflicts.
  (entry_has_local_mods, check_tree_conflict): New functions.
  (do_entry_deletion): Have the parent's admin access baton passed in by the
    caller. Check for tree conflicts.
  ### Broken when parent_adm_access is NULL.
  (delete_entry): Pass the parent's admin access baton to do_entry_deletion().
  (add_directory): If obstructed, raise a tree conflict.
  ### Lots of uncertainty/unfinished.
  (open_directory): Check for existing tree conflicts as well as property
    conflicts. If obstructed, raise a tree conflict.
  (close_directory): Set the notification's 'content_state' field according
    to whether there were any tree conflicts in this directory.
  (add_file): If obstructed, raise a tree conflict.
  ### Questions/unfinished.
  (open_file): If scheduled for delete, raise a tree conflict.
  (add_file_with_history): Check for a tree conflict.
  ### Error: discards the log_accum that it creates.
  (close_edit): Adjust for the new interface to do_entry_deletion(): pass
    NULL for its new 'parent_adm_access' argument.

* subversion/libsvn_wc/util.c
  (svn_wc_create_notify):
  ### A white-space change only.

# USER INTERFACE

* subversion/svn/schema/info.rnc
  (entry): Add tree-conflict and non-tree conflict info.
  ### Non-tree-conflict info is an independent bug fix.
  (wc-info): Add non-tree-conflict info.
  ### Error: shouldn't be added both in 'entry' and inside 'wc-info'.
  (tree-conflicts, tree-conflict, attlist.tree-conflict): New definitions.

* subversion/svn/schema/status.rnc
  (attlist.wc-status): Add a flag for the whether a directory has tree
    conflicts.
  ### Want to change this to per-victim flags.

* subversion/svn/info-cmd.c
  (print_info_xml, print_info): Add tree-conflict info.

* subversion/svn/notify.c
  (notify): Make the 'C'onflict notification available on directories as
    well as files.

* subversion/svn/status.c
  (print_status): Show 'C' for a tree-conflicted directory.
  (svn_cl__print_status_xml): Add 'tree-conflicted=true' to indicate a tree
    conflict.

* subversion/svn/tree-conflicts.c,
  subversion/svn/tree-conflicts.h
  New files.

# TESTS

* subversion/tests/cmdline/checkout_tests.py
  (forced_checkout_with_versioned_obstruction): Adjust...
  ### Not clear how/why.

* subversion/tests/cmdline/commit_tests.py
  (###):
  (test_list): Add the new tests.

* subversion/tests/cmdline/info_tests.py
  New file of tests.

* subversion/tests/cmdline/log_tests.py
  (merge_history_repos): Add an extra "resolve" to match the current code
    that raises a conflict on the parent. Add some comments.

* subversion/tests/cmdline/merge_tests.py
  (###):
  (test_list): Add the new tests.

* subversion/tests/cmdline/revert_tests.py
  (###):
  (test_list): Add the new tests.

* subversion/tests/cmdline/stat_tests.py
  (###):
  (test_list): Add the new tests.

* subversion/tests/cmdline/switch_tests.py
  (###):
  (test_list): Add the new tests.

* subversion/tests/cmdline/tree_conflict_tests.py
  New file of tests.

* subversion/tests/cmdline/tree_conflict_tests.txt
  New file documenting tree_conflict_tests.py.

* subversion/tests/cmdline/update_tests.py
  (###):
  (test_list): Add the new tests.

* subversion/tests/cmdline/svntest/actions.py
  (set_up_tree_conflicts, set_up_tree_conflicts_for_merge, make_tc_test_trees,
   tc_leaf_del, tc_tree_del, tc_text_append, set_up_deep_tree_conflicts_up,
   set_up_deep_tree_conflicts_sw): New functions.

* subversion/tests/libsvn_wc/tree-conflict-data-test.c
  New file of tests.

# BUILD SYSTEM

* build.conf
  (options): Add 'tree_conflicts_tests.py' to 'test-scripts'.
  (tree-conflict-data-test): New section.
  (__ALL_TESTS__): Add 'tree-conflict-data-test' and
    'tree-conflict-human-readable-test' to 'libs'.
  ### The test 'tree-conflict-human-readable-test' was deleted!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-08-20 11:58:43 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.