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

Re: [PATCH] Was: Extending new update --force switch to handle local additions

From: Paul Burba <paulb_at_softlanding.com>
Date: 2006-09-15 16:05:07 CEST

Paul Burba <paulb@softlanding.com> wrote on 09/13/2006 04:24:59 PM:

> There is one thing left undone: prop merges, I'm
> working on that now, but I want to get some thoughts on my approach so
> far.

Attached is an updated patch and log. The patch now handles property
merges on added paths from the repos which are obstructed by paths
scheduled for addition without history. The changes ended up being quite
simple (they just took a while due to some Python test suite wackiness -
but that's for another post). Key differences between this new patch and
the previous one:

* updated_editor.c's dir_baton now has existed and add_existed members
analogous to the members of the same name in file_baton. Needed this info
in the baton because I now use the notification callback in
close_directory() rather than add_directory(), since the former knows
about the prop merge status.

* Tweaked notify() to report prop merge status.

* Expanded update_tests.py's update_with_obstructing_additions() to test
property merges.

[[[
Enable up/sw/co to tolerate obstructions scheduled for addition without
history.

It's no longer an error when an update, switch, or checkout attempts to
add a path that is already scheduled for addition *without* history in
the WC.

In the case of dirs, the directory is tolerated and reported as
'E'xisting.

For files, if the obstruction is identical textually to the addition
from the repos it is reported as 'E'xisting, if it differs it's treated
as a conflict.

Property merges for both files and dirs are reported normally,
i.e. ' ', 'C', 'G'.

Obstructions scheduled for addition *with* history still result in
an error.

* subversion/libsvn_wc/update_editor.c
  (dir_baton): New members existed and add_existed.
  (make_dir_baton): Initialize new dir_baton members.
  (file_baton): New member add_existed.
  (make_file_baton): Initialize new file_baton member.
  (prep_directory): Retrieve *svn_wc_adm_access_t if attempt to open it
  fails due to locked WC.
  (add_directory): Revamp tests of valid obstructions to add coming from
  repos to allow obstructions scheduled for addition without history.
  If dir is scheduled for addition without history, change the schedule in
  its parent and its own "this dir" entry to normal. Also change the
  "this dir" rev from 0 to the target revision. And lastly, use the
  'E'xists notification for obstructing adds without history.
  (add_or_open_file): Revamp tests of valid obstructions to add coming
  from repos to allow obstructions scheduled for addition without
  history. Set new file_baton member to true if appropriate.
  (merge_file): New argument 'add_existed'. If file is scheduled for
  addition without history, change its entry schedule to normal and create
  an empty text-base for it. Update the "matrix" and change it's
  implementation so obstructions scheduled for addition w/o history are
  merged.
  (close_file): Pass new file_baton member to merge_file() so it knows
  when obstruction is added w/o history. Report the file as 'E'xisting
  if the merge didn't conflict.

* subversion/svn/notify.c
  (notify): Expand svn_wc_notify_exists case to handle notification for
  obstructions scheduled for addition without history in addition to
  unvserioned obstructions.

* subversion/tests/cmdline/checkout_tests.py
  (forced_checkout_with_versioned_obstruction): Tweak expected error
  message to reflect changes in add_or_open_file.
  (co_with_obstructing_local_adds): New test.
  (test_list): Run new test.

* subversion/tests/cmdline/switch_tests.py
  (forced_switch_failures): Tweak expected error to reflect new error
  message.
  (switch_with_obstructing_local_adds): New test.
  (test_list): Run new test.

* subversion/tests/cmdline/update_tests.py
  (update_receive_illegal_name, forced_update_failures): Tweak expected
  errors to reflect new error messages.
  (update_with_obstructing_additions): New test.
  (test_list): Run new test.
]]]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Fri Sep 15 16:05:33 2006

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.