[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-10-25 21:55:22 CEST

Hi All,

This patch has been kicking around for a while so I'm reposting it.

Even if no one has time to give it a detailed look, please let me know if
you have any concerns with the core purpose of the patch - see the log.

Paul B.

"If you ever drop your keys into a river of molten lava, let 'em go,
because man, they're gone." - Jack Handy

[[[
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 Wed Oct 25 21:55:59 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.