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

Re: [PATCH] really skip tree conflict victims (2)

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 11 Nov 2008 18:00:45 +0000

On Tue, 2008-11-11 at 18:14 +0100, Stephen Butler wrote:
> Hi tree conflict fans,
>
> This patch is almost ready to commit. I just need to fix up about ten
> tests (for switch et al.).
>
> If anyone would like to review it, the changes to check_tree_conflict()
> and the new function already_in_a_tree_conflict() are probably the most
> interesting part. Along with the usage of eb->current_tree_conflict.

Hi Steve. That's fantastic. I struggled with trying to implement
"skipping", and didn't get this far.

+1 on the reduction to four essential cases, that you mentioned earlier.

I'll try to check this over in an hour or two.

n.b. I've also updated the 'tc-resolve' branch so I think it's ready to
merge back. I guess you'll want me to wait for this?

- Julian

> [[[
>
> Fix update/switch to skip all tree conflict victims and their
> descendants.
>
> Create only one tree conflict at the root of each conflicted tree, not a
> tree conflict in every directory.
>
> Notify the user once about any given 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.
>
>
> TODO:
>
> More tests! As always....
>
> The tree conflict 2_1 and 3 tests show that an incoming tree delete
> bumps the revision number inside a victim tree. I don't know how to
> solve this without leaving the parent dirs incomplete. Maybe I need to
> hack something in complete_directory().
>
> If an update targets a single file or dir that has been deleted from the
> repo, there's an error (see test 2_1). Should be a tree conflict.
> Fixing it requires moving some functions, so I'll do it in a separate
> commit for clarity.
>
>
> * 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.
>
> * 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_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/svntest/tree.py
> (build_tree_from_checkout): Correct a comment.
>
> * subversion/tests/cmdline/svntest/actions.py
> (deep_trees_run_tests_scheme for update): Allow status check to be
> optional.
> (deep_trees_skipping_on_update): New function.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-11 19:01:05 CET

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.