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

Re: Help on 1.6-blocker #3334 - tree conflicts in update

From: Paul Burba <ptburba_at_gmail.com>
Date: Mon, 9 Feb 2009 22:31:24 -0500

On Wed, Feb 4, 2009 at 3:47 PM, Stephen Butler <sbutler_at_elego.de> wrote:
> Hi Paul,
>
> I just committed to the 3334 branch a new test in update_tests.py,
> in the style of the UC2 schedule-re-add test, but for UC1. It may
> shed some light on the problem.
>
> Basically we have to fiddle with all the open_*, add_* and close_*
> callbacks in the update editor, to get rid of the skipping for UC1.
>
> I've hacked at them for some hours, but now I've lowered my sights
> to simply making add_file() use the same logic as add_directory(),
> because add_file() raises tree conflicts too often. But once I
> have that down, I'll return to the bigger problem.
>
> cheers,
> Steve

Gents,

Attached is patch against the issue-3334-dirs branch that fixes all
the outstanding test failures on that branch. I suspect there are a
couple more 'merry-go-round' cases to be dealt with, incoming changes
to locally replaced directories comes to mind, I'll think on those
tomorrow. In the meantime, any review and/or testing of this patch is
appreciated.

Also, if any of you have a chance, please look at the test expectation
changes I've made the last few days on the issue-3334-dirs branch.
Obviously passing tests don't mean much if the test expectations are
wrong :-)

Paul

[[[
On the issue-3334-dirs branch: Fix remaining issue #3334 problems.

The remaining problem on the issue #3334 branch can basically be summed up as
follows: If we have a locally deleted tree and an update or switch brings down
edits or deletions on, or within, the deleted tree, then we raise a tree
conflict on the deleted tree but don't update the text bases or entries for
paths within the locally deleted tree. So the WC is at mixed revisions post-
update. This means if the tree conflicts are resolved that the WC cannot be
committed because the mixed revisions cause out of date errors. Attempts to
update the WC again result in the same tree conflicts.

This patch solves this problem by allowing the new text bases within the
deleted tree to be installed and the working revision of the entries to be
updated, but it still leaves the tree as scheduled for deletion.

* subversion/libsvn_wc/update_editor.c
  (edit_baton): New member 'deleted_trees' to keep track of locally deleted
  subtrees.
  (remember_deleted_tree, in_deleted_tree): Accessors for 'deleted_trees'.
  (complete_directory): Don't exit early if inside a tree conflict caused
  by a locally deleted tree.
  (file_baton): New member 'deleted' to keep track of locally deleted files,
  including newly added files within a locally deleted tree.
  (make_file_baton): Initialize new member.
  (check_tree_conflict): Don't consider incoming edits or deletes of paths
  that are *proper* subtrees of a locally deleted tree to be tree conflicts.
  (do_entry_deletion): Don't exit early if inside a tree conflict caused
  by a locally deleted tree. Suppress notifications if within a tree conflict
  caused by a locally deleted tree.
  (open_directory): Don't exit early if inside a tree conflict caused
  by a locally deleted tree. Populate 'deleted_trees' member of edit_baton.
  Don't set bump_dir_info->skipped, suppress nested tree conflict
  notifications, and update the target revision of the directory if inside
  a tree conflict caused by a local deletion.
  (close_directory): Don't exit early if inside a tree conflict caused
  by a locally deleted tree but do suppress notifications.
  (add_file): Don't exit early if inside a tree conflict caused
  by a locally deleted tree. Set the new 'deleted' member of file_baton.
  (open_file): Don't exit early if inside a tree conflict caused
  by a locally deleted tree and suppress nested tree conflict notifications.
  (merge_file): If a file is locally deleted or replaced install the new text
  base but don't copy the new text base to the working location. Keep locally
  deleted, but not replaced, files marked as deleted. Don't adjust entries
  file to match working file for locally deleted files.
  (close_file): Suppress notifications for files that are locally deleted.
  (close_edit): Update the working revision of all locally deleted trees.
  (make_editor): Initialize new 'deleted_trees' hash.

* subversion/tests/cmdline/commit_tests.py
  (test_list): Remove XFail from tree_conflicts_resolved.

* subversion/tests/cmdline/depth_tests.py
  (test_list): Remove XFail from tree_conflicts_resolved_depth_empty,
  tree_conflicts_resolved_depth_files,
  tree_conflicts_resolved_depth_immediates,
  and tree_conflicts_resolved_depth_infinity.

* subversion/tests/cmdline/revert_tests.py
  (test_list): Remove XFail from revert_tree_conflicts_in_updated_files.

* subversion/tests/cmdline/stat_tests.py
  (test_list): Remove XFail from status_with_tree_conflicts.

* subversion/tests/cmdline/switch_tests.py
  (tree_conflicts_on_switch_1_2): Remove XFail comment.
  (test_list): Remove XFail from tree_conflicts_on_switch_1_1 and
  tree_conflicts_on_switch_1_2.

* subversion/tests/cmdline/update_tests.py
  (tree_conflicts_on_update_1_2):
  (test_list): Remove XFail from prop_update_on_scheduled_delete,
  update_wc_with_replaced_file, tree_conflicts_on_update_1_1,
  tree_conflicts_on_update_1_2, and tree_conflict_uc1_update_deleted_tree.
]]]

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1131958

Received on 2009-02-10 04:31:42 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.