subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1437213 - in /subversion/trunk/subversion: libsvn_client/copy.c tests/cmdline/copy_tests.py
Date Tue, 22 Jan 2013 22:06:47 GMT
Author: rhuijben
Date: Tue Jan 22 22:06:47 2013
New Revision: 1437213

URL: http://svn.apache.org/viewvc?rev=1437213&view=rev
Log:
* subversion/libsvn_client/copy.c
  (repos_to_wc_copy_single): Following up on r1437203, also send the foreign
    repository notifications when copying a single file.

* subversion/tests/cmdline/copy_tests.py
  (repos_to_wc): Verify output for the file copy from a foreign repository.

Modified:
    subversion/trunk/subversion/libsvn_client/copy.c
    subversion/trunk/subversion/tests/cmdline/copy_tests.py

Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1437213&r1=1437212&r2=1437213&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Tue Jan 22 22:06:47 2013
@@ -1546,6 +1546,21 @@ repos_to_wc_copy_single(svn_client__copy
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(dst_abspath));
 
+  if (!same_repositories && ctx->notify_func2)
+    {
+      svn_wc_notify_t *notify;
+      notify = svn_wc_create_notify_url(
+                            pair->src_abspath_or_url,
+                            svn_wc_notify_foreign_copy_begin,
+                            pool);
+      notify->kind = pair->src_kind;
+      ctx->notify_func2(ctx->notify_baton2, notify, pool);
+
+      /* Allow a theoretical cancel to get through. */
+      if (ctx->cancel_func)
+        SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
+    }
+
   if (pair->src_kind == svn_node_dir)
     {
       if (same_repositories)
@@ -1616,17 +1631,6 @@ repos_to_wc_copy_single(svn_client__copy
         }
       else
         {
-          if (ctx->notify_func2)
-            {
-              svn_wc_notify_t *notify;
-              notify = svn_wc_create_notify_url(
-                                    pair->src_abspath_or_url,
-                                    svn_wc_notify_foreign_copy_begin,
-                                    pool);
-
-              ctx->notify_func2(ctx->notify_baton2, notify, pool);
-            }
-
           SVN_ERR(svn_client__copy_foreign(pair->src_abspath_or_url,
                                            dst_abspath,
                                            &pair->src_peg_revision,

Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1437213&r1=1437212&r2=1437213&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Tue Jan 22 22:06:47 2013
@@ -998,8 +998,12 @@ def repos_to_wc(sbox):
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'copy', E_url, wc_dir)
 
-  # But file case should work fine.
-  svntest.actions.run_and_verify_svn(None, None, [], 'copy', pi_url, wc_dir)
+  expected_output = [
+    '--- Copying from foreign repository URL \'%s\':\n' % pi_url,
+    'A         %s\n' % sbox.ospath('pi'),
+  ]
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'copy', pi_url, wc_dir)
 
   expected_output = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_output.add({



Mime
View raw message