subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1449413 - in /subversion/trunk/subversion: include/ libsvn_client/ libsvn_ra/ libsvn_ra_local/ libsvn_ra_serf/ libsvn_ra_svn/ svnserve/ tests/cmdline/
Date Sat, 23 Feb 2013 21:41:10 GMT
Author: rhuijben
Date: Sat Feb 23 21:41:10 2013
New Revision: 1449413

URL: http://svn.apache.org/r1449413
Log:
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_copfrom_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

Modified:
    subversion/trunk/subversion/include/svn_ra.h
    subversion/trunk/subversion/libsvn_client/deprecated.c
    subversion/trunk/subversion/libsvn_client/switch.c
    subversion/trunk/subversion/libsvn_ra/deprecated.c
    subversion/trunk/subversion/libsvn_ra/ra_loader.c
    subversion/trunk/subversion/libsvn_ra/ra_loader.h
    subversion/trunk/subversion/libsvn_ra/wrapper_template.h
    subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
    subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h
    subversion/trunk/subversion/libsvn_ra_serf/update.c
    subversion/trunk/subversion/libsvn_ra_svn/client.c
    subversion/trunk/subversion/libsvn_ra_svn/marshal.c
    subversion/trunk/subversion/svnserve/serve.c
    subversion/trunk/subversion/tests/cmdline/switch_tests.py

Modified: subversion/trunk/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_ra.h?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_ra.h (original)
+++ subversion/trunk/subversion/include/svn_ra.h Sat Feb 23 21:41:10 2013
@@ -1181,12 +1181,24 @@ svn_ra_do_update(svn_ra_session_t *sessi
  * The working copy will be switched to @a revision_to_switch_to, or the
  * "latest" revision if this arg is invalid.
  *
+ * If @a send_copyfrom_args is TRUE, then ask the server to send
+ * copyfrom arguments to add_file() and add_directory() when possible.
+ * (Note: this means that any subsequent txdeltas coming from the
+ * server are presumed to apply against the copied file!)
+ *
+ * Use @a ignore_ancestry to control whether or not items being
+ * switched will be checked for relatedness first.  Unrelated items
+ * are typically transmitted to the editor as a deletion of one thing
+ * and the addition of another, but if this flag is @c TRUE,
+ * unrelated items will be diffed as if they were related.
+ *
  * The caller may not perform any RA operations using
  * @a session before finishing the report, and may not perform
  * any RA operations using @a session from within the editing
  * operations of @a switch_editor.
  *
- * Use @a pool for memory allocation.
+ * Use @a result_pool for memory allocation and @a scratch_pool for
+ * temporary work.
  *
  * @note The reporter provided by this function does NOT supply copy-
  * from information to the diff editor callbacks.
@@ -1195,8 +1207,34 @@ svn_ra_do_update(svn_ra_session_t *sessi
  * needed, and sending too much data back, a pre-1.5 'recurse'
  * directive may be sent to the server, based on @a depth.
  *
+ * @note Pre Subversion 1.8 svnserve based servers always ignore ancestry
+ * and never send copyfrom data.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_ra_do_switch3(svn_ra_session_t *session,
+                  const svn_ra_reporter3_t **reporter,
+                  void **report_baton,
+                  svn_revnum_t revision_to_switch_to,
+                  const char *switch_target,
+                  svn_depth_t depth,
+                  const char *switch_url,
+                  svn_boolean_t send_copyfrom_args,
+                  svn_boolean_t ignore_ancestry,
+                  const svn_delta_editor_t *switch_editor,
+                  void *switch_baton,
+                  apr_pool_t *result_pool,
+                  apr_pool_t *scratch_pool);
+
+/**
+ * Similar to svn_ra_do_switch3(), but always ignoring ancestry and
+ * never sending copyfrom_args.
+ *
  * @since New in 1.5.
+ * @deprecated Provided for compatibility with the 1.7 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_ra_do_switch2(svn_ra_session_t *session,
                   const svn_ra_reporter3_t **reporter,

Modified: subversion/trunk/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/deprecated.c?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_client/deprecated.c Sat Feb 23 21:41:10 2013
@@ -2414,7 +2414,9 @@ svn_client_switch2(svn_revnum_t *result_
 {
   return svn_client_switch3(result_rev, path, switch_url, peg_revision,
                             revision, depth, depth_is_sticky, ignore_externals,
-                            allow_unver_obstructions, TRUE, ctx, pool);
+                            allow_unver_obstructions,
+                            TRUE /* ignore_ancestry */,
+                            ctx, pool);
 }
 
 svn_error_t *

Modified: subversion/trunk/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/switch.c?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/switch.c (original)
+++ subversion/trunk/subversion/libsvn_client/switch.c Sat Feb 23 21:41:10 2013
@@ -301,12 +301,15 @@ switch_internal(svn_revnum_t *result_rev
 
   /* Tell RA to do an update of URL+TARGET to REVISION; if we pass an
      invalid revnum, that means RA will use the latest revision. */
-  SVN_ERR(svn_ra_do_switch2(ra_session, &reporter, &report_baton,
+  SVN_ERR(svn_ra_do_switch3(ra_session, &reporter, &report_baton,
                             switch_loc->rev,
                             target,
                             depth_is_sticky ? depth : svn_depth_unknown,
                             switch_loc->url,
-                            switch_editor, switch_edit_baton, pool));
+                            FALSE /* send_copyfrom_args */,
+                            ignore_ancestry,
+                            switch_editor, switch_edit_baton,
+                            pool, pool));
 
   /* Drive the reporter structure, describing the revisions within
      PATH.  When we call reporter->finish_report, the update_editor

Modified: subversion/trunk/subversion/libsvn_ra/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/deprecated.c?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_ra/deprecated.c Sat Feb 23 21:41:10 2013
@@ -373,6 +373,31 @@ svn_error_t *svn_ra_do_update(svn_ra_ses
                                     pool);
 }
 
+
+svn_error_t *
+svn_ra_do_switch2(svn_ra_session_t *session,
+                  const svn_ra_reporter3_t **reporter,
+                  void **report_baton,
+                  svn_revnum_t revision_to_switch_to,
+                  const char *switch_target,
+                  svn_depth_t depth,
+                  const char *switch_url,
+                  const svn_delta_editor_t *switch_editor,
+                  void *switch_baton,
+                  apr_pool_t *pool)
+{
+  return svn_error_trace(
+            svn_ra_do_switch3(session,
+                              reporter, report_baton,
+                              revision_to_switch_to, switch_target,
+                              depth,
+                              switch_url,
+                              FALSE /* send_copyfrom_args */,
+                              TRUE /* ignore_ancestry */,
+                              switch_editor, switch_baton,
+                              pool, pool));
+}
+
 svn_error_t *svn_ra_do_switch(svn_ra_session_t *session,
                               const svn_ra_reporter2_t **reporter,
                               void **report_baton,
@@ -393,8 +418,11 @@ svn_error_t *svn_ra_do_switch(svn_ra_ses
                                     &(b->reporter3), &(b->reporter3_baton),
                                     revision_to_switch_to, switch_target,
                                     SVN_DEPTH_INFINITY_OR_FILES(recurse),
-                                    switch_url, switch_editor, switch_baton,
-                                    pool);
+                                    switch_url,
+                                    FALSE /* send_copyfrom_args */,
+                                    TRUE /* ignore_ancestry */,
+                                    switch_editor, switch_baton,
+                                    pool, pool);
 }
 
 svn_error_t *svn_ra_do_status(svn_ra_session_t *session,

Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/ra_loader.c?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/trunk/subversion/libsvn_ra/ra_loader.c Sat Feb 23 21:41:10 2013
@@ -804,24 +804,32 @@ svn_error_t *svn_ra_do_update2(svn_ra_se
                                     pool);
 }
 
-svn_error_t *svn_ra_do_switch2(svn_ra_session_t *session,
-                               const svn_ra_reporter3_t **reporter,
-                               void **report_baton,
-                               svn_revnum_t revision_to_switch_to,
-                               const char *switch_target,
-                               svn_depth_t depth,
-                               const char *switch_url,
-                               const svn_delta_editor_t *switch_editor,
-                               void *switch_baton,
-                               apr_pool_t *pool)
+svn_error_t *
+svn_ra_do_switch3(svn_ra_session_t *session,
+                  const svn_ra_reporter3_t **reporter,
+                  void **report_baton,
+                  svn_revnum_t revision_to_switch_to,
+                  const char *switch_target,
+                  svn_depth_t depth,
+                  const char *switch_url,
+                  svn_boolean_t send_copyfrom_args,
+                  svn_boolean_t ignore_ancestry,
+                  const svn_delta_editor_t *switch_editor,
+                  void *switch_baton,
+                  apr_pool_t *result_pool,
+                  apr_pool_t *scratch_pool)
 {
   SVN_ERR_ASSERT(svn_path_is_empty(switch_target)
                  || svn_path_is_single_path_component(switch_target));
   return session->vtable->do_switch(session,
                                     reporter, report_baton,
                                     revision_to_switch_to, switch_target,
-                                    depth, switch_url, switch_editor,
-                                    switch_baton, pool);
+                                    depth, switch_url,
+                                    send_copyfrom_args,
+                                    ignore_ancestry,
+                                    switch_editor,
+                                    switch_baton,
+                                    result_pool, scratch_pool);
 }
 
 svn_error_t *svn_ra_do_status2(svn_ra_session_t *session,

Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/ra_loader.h?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra/ra_loader.h (original)
+++ subversion/trunk/subversion/libsvn_ra/ra_loader.h Sat Feb 23 21:41:10 2013
@@ -154,9 +154,12 @@ typedef struct svn_ra__vtable_t {
                             const char *switch_target,
                             svn_depth_t depth,
                             const char *switch_url,
+                            svn_boolean_t send_copyfrom_args,
+                            svn_boolean_t ignore_ancestry,
                             const svn_delta_editor_t *switch_editor,
                             void *switch_baton,
-                            apr_pool_t *pool);
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
   /* See svn_ra_do_status2(). */
   svn_error_t *(*do_status)(svn_ra_session_t *session,
                             const svn_ra_reporter3_t **reporter,

Modified: subversion/trunk/subversion/libsvn_ra/wrapper_template.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/wrapper_template.h?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra/wrapper_template.h (original)
+++ subversion/trunk/subversion/libsvn_ra/wrapper_template.h Sat Feb 23 21:41:10 2013
@@ -315,7 +315,11 @@ static svn_error_t *compat_do_switch(voi
 
   SVN_ERR(VTBL.do_switch(session_baton, &reporter3, &baton3,
                          revision_to_switch_to, switch_target, depth,
-                         switch_url, editor, switch_baton, pool));
+                         switch_url,
+                         FALSE /* send_copyfrom_args */,
+                         TRUE /* ignore_ancestry */,
+                         editor, switch_baton,
+                         pool /* result_pool */, pool /* scratch_pool */));
 
   compat_wrap_reporter(reporter, report_baton, reporter3, baton3, pool);
 

Modified: subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c Sat Feb 23 21:41:10 2013
@@ -838,9 +838,12 @@ svn_ra_local__do_switch(svn_ra_session_t
                         const char *update_target,
                         svn_depth_t depth,
                         const char *switch_url,
+                        svn_boolean_t send_copyfrom_args,
+                        svn_boolean_t ignore_ancestry,
                         const svn_delta_editor_t *update_editor,
                         void *update_baton,
-                        apr_pool_t *pool)
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
 {
   return make_reporter(session,
                        reporter,
@@ -850,11 +853,11 @@ svn_ra_local__do_switch(svn_ra_session_t
                        switch_url,
                        TRUE /* text_deltas */,
                        depth,
-                       FALSE /* send_copyfrom_args */,
-                       TRUE /* ignore_ancestry */,
+                       send_copyfrom_args,
+                       ignore_ancestry,
                        update_editor,
                        update_baton,
-                       pool);
+                       result_pool);
 }
 
 

Modified: subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h Sat Feb 23 21:41:10 2013
@@ -1537,9 +1537,12 @@ svn_ra_serf__do_switch(svn_ra_session_t 
                        const char *switch_target,
                        svn_depth_t depth,
                        const char *switch_url,
+                       svn_boolean_t send_copyfrom_args,
+                       svn_boolean_t ignore_ancestry,
                        const svn_delta_editor_t *switch_editor,
                        void *switch_baton,
-                       apr_pool_t *pool);
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool);
 
 /* Implements svn_ra__vtable_t.get_file_revs(). */
 svn_error_t *

Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/update.c?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Sat Feb 23 21:41:10 2013
@@ -3409,9 +3409,12 @@ svn_ra_serf__do_switch(svn_ra_session_t 
                        const char *switch_target,
                        svn_depth_t depth,
                        const char *switch_url,
+                       svn_boolean_t send_copyfrom_args,
+                       svn_boolean_t ignore_ancestry,
                        const svn_delta_editor_t *switch_editor,
                        void *switch_baton,
-                       apr_pool_t *pool)
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool)
 {
   svn_ra_serf__session_t *session = ra_session->priv;
 
@@ -3419,8 +3422,12 @@ svn_ra_serf__do_switch(svn_ra_session_t 
                               revision_to_switch_to,
                               session->session_url.path,
                               switch_url, switch_target,
-                              depth, TRUE, TRUE, FALSE /* TODO(sussman) */,
-                              switch_editor, switch_baton, pool);
+                              depth,
+                              ignore_ancestry,
+                              TRUE /* text_deltas */,
+                              send_copyfrom_args,
+                              switch_editor, switch_baton,
+                              result_pool);
 }
 
 /* Helper svn_ra_serf__get_file(). Attempts to fetch file contents

Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Sat Feb 23 21:41:10 2013
@@ -1394,14 +1394,20 @@ static svn_error_t *ra_svn_update(svn_ra
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *ra_svn_switch(svn_ra_session_t *session,
-                                  const svn_ra_reporter3_t **reporter,
-                                  void **report_baton, svn_revnum_t rev,
-                                  const char *target, svn_depth_t depth,
-                                  const char *switch_url,
-                                  const svn_delta_editor_t *update_editor,
-                                  void *update_baton, apr_pool_t *pool)
+static svn_error_t *
+ra_svn_switch(svn_ra_session_t *session,
+              const svn_ra_reporter3_t **reporter,
+              void **report_baton, svn_revnum_t rev,
+              const char *target, svn_depth_t depth,
+              const char *switch_url,
+              svn_boolean_t send_copyfrom_args,
+              svn_boolean_t ignore_ancestry,
+              const svn_delta_editor_t *update_editor,
+              void *update_baton,
+              apr_pool_t *result_pool,
+              apr_pool_t *scratch_pool)
 {
+  apr_pool_t *pool = result_pool;
   svn_ra_svn__session_baton_t *sess_baton = session->priv;
   svn_ra_svn_conn_t *conn = sess_baton->conn;
   svn_boolean_t recurse = DEPTH_TO_RECURSE(depth);
@@ -1409,7 +1415,8 @@ static svn_error_t *ra_svn_switch(svn_ra
   /* Tell the server we want to start a switch. */
   SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool, svn_ra_svn_cmd_switch,
                                          rev, target, recurse, switch_url,
-                                         svn_depth_to_word(depth)));
+                                         svn_depth_to_word(depth),
+                                         send_copyfrom_args, ignore_ancestry));
   SVN_ERR(handle_auth_request(sess_baton, pool));
 
   /* Fetch a reporter for the caller to drive.  The reporter will drive

Modified: subversion/trunk/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/marshal.c?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/marshal.c Sat Feb 23 21:41:10 2013
@@ -964,6 +964,8 @@ vwrite_cmd_switch(svn_ra_svn_conn_t *con
   SVN_ERR(vwrite_tuple_boolean(conn, pool, ap));
   SVN_ERR(vwrite_tuple_cstring(conn, pool, ap));
   SVN_ERR(vwrite_tuple_word(conn, pool, ap));
+  SVN_ERR(vwrite_tuple_boolean(conn, pool, ap));
+  SVN_ERR(vwrite_tuple_boolean(conn, pool, ap));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/serve.c?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/serve.c (original)
+++ subversion/trunk/subversion/svnserve/serve.c Sat Feb 23 21:41:10 2013
@@ -1862,10 +1862,13 @@ static svn_error_t *switch_cmd(svn_ra_sv
   /* Default to unknown.  Old clients won't send depth, but we'll
      handle that by converting recurse if necessary. */
   svn_depth_t depth = svn_depth_unknown;
+  apr_uint64_t send_copyfrom_args; /* Optional; default FALSE */
+  apr_uint64_t ignore_ancestry; /* Optional; default TRUE */
 
   /* Parse the arguments. */
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?r)cbc?w", &rev, &target,
-                                 &recurse, &switch_url, &depth_word));
+  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?r)cbc?w?BB", &rev, &target,
+                                 &recurse, &switch_url, &depth_word,
+                                 &send_copyfrom_args, &ignore_ancestry));
   target = svn_relpath_canonicalize(target, pool);
   switch_url = svn_uri_canonicalize(switch_url, pool);
 
@@ -1892,8 +1895,8 @@ static svn_error_t *switch_cmd(svn_ra_sv
   return accept_report(NULL, NULL,
                        conn, pool, b, rev, target, switch_path, TRUE,
                        depth,
-                       FALSE /* TODO(sussman): no copyfrom args for now */,
-                       TRUE);
+                       (send_copyfrom_args == TRUE) /* send_copyfrom_args */,
+                       (ignore_ancestry != FALSE) /* ignore_ancestry */);
 }
 
 static svn_error_t *status(svn_ra_svn_conn_t *conn, apr_pool_t *pool,

Modified: subversion/trunk/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/switch_tests.py?rev=1449413&r1=1449412&r2=1449413&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/switch_tests.py Sat Feb 23 21:41:10 2013
@@ -2933,11 +2933,6 @@ def switch_to_spaces(sbox):
                                         repo_url + '/A%20with more%20spaces',
                                         None, None, expected_status)
 
-# When 'switch' of a dir brings in a replacement of a child file with no
-# textual difference, the switch doesn't report any incoming change at all,
-# (and so won't raise a tree conflict if there is a local mod).  'update'
-# on the other hand does report the replacement as expected.
-@XFail()
 def switch_across_replacement(sbox):
   "switch across a node replacement"
   sbox.build()
@@ -2950,6 +2945,14 @@ def switch_across_replacement(sbox):
   sbox.simple_add('A/mu')
   sbox.simple_commit()  # r2
 
+  # When 'switch' of a dir brings in a replacement of a child file with no
+  # textual difference and ignoring ancestry, the switch doesn't report any
+  # incoming change at all, (and so won't raise a tree conflict if there is
+  # a local mod).  'update' on the other hand does report the replacement
+  # as expected.
+
+  # This test FAILs when using a Subversion 1.0-1.7 svnserve.
+
   expected_output = svntest.wc.State(sbox.wc_dir, {
     'A/mu' : Item(status='A ', prev_status='D '),
     })



Mime
View raw message