Checkout
rhuijben
committed
on 23 Feb 13
In Subversion 1.7 we added an --ignore-ancestry flag to switch, but even
without that flag we don't use the ancestry to properly identify tr… Show more
In Subversion 1.7 we added an --ignore-ancestry flag to switch, but even

without that flag we don't use the ancestry to properly identify tree

conflicts caused by switching. To do that we must ask the repos layer

(via the ra layer) to notice ancestry.

This patch updates all ra layers to allow noticing ancestry during switching.

For ra_local and ra_serf this works for all existing server versions, but for

ra_svn this requires a new svnserve. (Our dav protocol already supported

ignore_ancestry and send copyfrom args as separate flags)

If necessary we could rev the client switch api to use separate ignore and

notice ancestry flags, but I don't think this is necessary in this case.

This patch also resolves an Subversion 1.5 'sussman TODO', by also adding a

send_copyfrom_args option.

* subversion/include/svn_ra.h

 (svn_ra_do_switch3): New function, adding two booleans and using dual pools.

 (svn_ra_do_switch2): Deprecate function.

* subversion/libsvn_client/deprecated.c

 (svn_client_switch2): Add comment.

* subversion/libsvn_client/switch.c

 (switch_internal): Pass ignore_ancestry flag to svn_ra_do_switch3().

* subversion/libsvn_ra/deprecated.c

 (svn_ra_do_switch2): New function around svn_ra_do_switch3.

 (svn_ra_do_switch): Update caller.

* subversion/libsvn_ra/ra_loader.c

 (svn_ra_do_switch2): Rename to...

 (svn_ra_do_switch3): ... this. Forward 2 more booleans and dual pools.

* subversion/libsvn_ra/ra_loader.h

 (svn_ra__vtable_t): Extend do_switch function.

* subversion/libsvn_ra/wrapper_template.h

 (compat_do_switch): Update caller.

* subversion/libsvn_ra_local/ra_plugin.c

 (svn_ra_local__do_switch): Update arguments. Forward arguments to

   make_reporter.

* subversion/libsvn_ra_serf/ra_serf.h

 (svn_ra_serf__do_switch): Update arguments.

* subversion/libsvn_ra_serf/update.c

 (svn_ra_serf__do_switch): Update arguments. Forward arguments to

   make_update_reporter.

* subversion/libsvn_ra_svn/client.c

 (ra_svn_switch): Update arguments. Pass booleans.

* subversion/libsvn_ra_svn/marshal.c

 (vwrite_cmd_switch): Send two more arguments.

* subversion/svnserve/serve.c

 (switch_cmd): Accept two optional booleans and pass these to accept_report.

* subversion/tests/cmdline/switch_tests.py

 (switch_across_replacement): Remove XFail, move and update comment.

Found by: julianfoad

Show less