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

Re: [PATCH]: Was [PROPOSAL] Takeover Take 2

From: Paul Burba <paulb_at_softlanding.com>
Date: 2006-07-26 19:55:20 CEST

Hi All,

Discussion of this patch fell by the wayside when I went on vacation. I
believe this is ready to commit, but I wanted to check if anyone has any
outstanding concerns regarding it. I'm in no major rush, but I'd like to
get it into trunk.

Julian - I know you wanted to see a new option used rather than --force,
but looking back in the takeover threads I don't see a firm consensus on
this. If a new option is eventually what we decide on, I'll galdly change
it later.


Paul B.

Support --force option with svn checkout, update, and switch.

With the force option, co, sw, and up now tolerate unversioned
obstructing paths when adding new paths of the same type, rather than
generating a SVN_ERR_WC_OBSTRUCTED_UPDATE error.

If the obstructing path is the same type (file or directory) as the
corresponding path in the repository it will be left 'as-is' in the
working copy. For directories this simply means the obstruction is
tolerated. For files, any content differences between the obstruction
and the repository are treated like a local modification to the
working copy.

This patch is an expansion of one originally posted by Jonathan Gilbert
<o2w9gs702@sneakemail.com> against the 1.2.0 tag. See the various
"Takeover" threads on the dev mailing list.

* build.conf
  (test-scripts): Add checkout_tests.py.

* subversion/include/svn_client.h
  (svn_client_checkout3, svn_client_update3,
  svn_client_switch2): New.
  (svn_client_checkout2, svn_client_update2,
  svn_client_switch): Deprecate.

* subversion/include/svn_wc.h
  (svn_wc_notify_action_t): New 'Exists' action.
  (svn_wc_get_update_editor3, svn_wc_text_modified_p2,
  svn_wc_get_switch_editor3): New.
  (svn_wc_get_update_editor2, svn_wc_text_modified_p,
  svn_wc_get_switch_editor2): Deprecate.

* subversion/libsvn_client/checkout.c
  (svn_client__checkout_internal): New argument. Update calls to
  (svn_client_checkout3): New.
  (svn_client_checkout2, svn_client_checkout): Update calls to

* subversion/libsvn_client/client.h
  (svn_client__update_internal, svn_client__checkout_internal,
  svn_client__switch_internal): New bool argument to identify updates,
  checkouts, and switches, respectively, made with --force option.

* subversion/libsvn_client/copy.c
  (repos_to_wc_copy): Update call to svn_client__checkout_internal.
* subversion/libsvn_client/externals.c
  (switch_external): Update calls to svn_client__checkout_internal,
  svn_client__update_internal, and svn_client__switch_internal.
  (handle_external_item_change): Update call to

* subversion/libsvn_client/switch.c
  (svn_client__switch_internal): New argument. Replace call to
  svn_wc_get_switch_editor2 with svn_wc_get_switch_editor3.
  (svn_client_switch2): New.
  (svn_client_switch): Update call to svn_client__switch_internal.

* subversion/libsvn_client/update.c
  (svn_client__update_internal): New argument. Replace call to
  svn_wc_get_update_editor2 with svn_wc_get_update_editor3.
  (svn_client_update3): New.
  (svn_client_update2): Reimplement as wrapper around
  (svn_client_update): Update call to svn_client__update_internal.

* subversion/libsvn_wc/adm_ops.c
  (revert_admin_things): Update call to

* subversion/libsvn_client/commit_util.c (harvest_committables):
* subversion/libsvn_wc/diff.c (file_diff, close_file):
* subversion/libsvn_wc/log.c (svn_wc_cleanup2):
* subversion/libsvn_wc/status.c (assemble_status):
  Replace calls to svn_wc_text_modified_p with svn_wc_text_modified_p2.

* subversion/libsvn_wc/props.c
  (svn_wc_prop_set2): Update comment.

* subversion/libsvn_wc/questions.c
  (svn_wc__text_modified_internal_p): New arg. Update call to
  (svn_wc_text_modified_p2): New. Update comment.
  (svn_wc_text_modified_p): Reimplement as wrapper around

* subversion/libsvn_wc/update_editor.c
  (struct edit_baton): New member allow_unver_obstructions.
  (struct file_baton): New member existed.
  (make_file_baton): Initialize new file_baton member.
  (add_directory): Allow obstructing directories if edit baton
  permits them. Support notification for adding directories which
  already 'E'xist.
  (add_or_open_file): Allow obstructing files if edit baton
  permits them.
  (change_file_prop): Cache the last-changed-date propval for
  obstructing files.
  (merge_file): New argument to identify when obstructions are
  allowed. Handle the various obstruction scenarios.
  (close_file): Update call to merge_file. Support notification for
  adding files which already 'E'xist.
  (make_editor): New argument to identify when obstructions are
  allowed. Initialize new edit baton member.
  (svn_wc_get_update_editor3) New.
  (svn_wc_get_update_editor, svn_wc_get_update_editor2): Reimplement
  as wrappers around svn_wc_get_update_editor3.
  (svn_wc_get_switch_editor3): New.
  (svn_wc_get_switch_editor, svn_wc_get_switch_editor2): Reimplement
  as wrappers around svn_wc_get_switch_editor3.

* subversion/libsvn_wc/wc.h
  (svn_wc__text_modified_internal_p): New arg to select comparison
  against normal text base or temporary text base.

* subversion/svn/checkout-cmd.c
  (svn_cl__checkout): Replace call to svn_wc_get_update_editor2 with

* subversion/svn/main.c
  (svn_cl__cmd_table): Enable --force option with svn co, up, and sw.
  Add new help text for each.

* subversion/svn/notify.c
  (notify): Handle new 'Existed' action.

* subversion/svn/switch-cmd.c
  (svn_cl__switch): Replace call to svn_client_switch with

* subversion/svn/update-cmd.c
  (svn_cl__update): Replace call to svn_client_update2 with

* subversion/tests/cmdline/checkout_tests.py: New.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
  Update to reflect new svn switch help text.

* subversion/tests/cmdline/svntest/actions.py
  (run_and_verify_checkout): Support optional arguments. Don't delete
  WC target during forced checkouts.

* subversion/tests/cmdline/svntest/main.py
  (run_and_verify_switch): Support optional arguments and regular
  expression error checking.

* subversion/tests/cmdline/svntest/tree.py
  (build_tree_from_checkout): Enable parsing of 'E' notification.

* subversion/tests/cmdline/switch_tests.py
  (forced_switch, forced_switch_failures): New test definitions.
  (test_list): Run new tests.

* subversion/tests/cmdline/update_tests.py
  (forced_update, forced_update_failures): New test definitions.
  (test_list): Run new tests.

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

Received on Wed Jul 26 19:56:41 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.