subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1153110 - in /subversion/trunk/subversion: libsvn_client/externals.c tests/cmdline/externals_tests.py
Date Tue, 02 Aug 2011 12:57:52 GMT
Author: rhuijben
Date: Tue Aug  2 12:57:51 2011
New Revision: 1153110

URL: http://svn.apache.org/viewvc?rev=1153110&view=rev
Log:
Properly skip checking out file externals from a different repository than
intended. This fixes the XFail test committed in r1153106.

* subversion/libsvn_client/externals.c
  (handle_external_item_change): Check if the repository roots match to avoid
    corrupting the working copy state.

* subversion/tests/cmdline/externals_tests.py
  (file_externals_different_repos): Remove XFail marker. Add relocate and
    second update to test more scenarios.

Modified:
    subversion/trunk/subversion/libsvn_client/externals.c
    subversion/trunk/subversion/tests/cmdline/externals_tests.py

Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1153110&r1=1153109&r2=1153110&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Tue Aug  2 12:57:51 2011
@@ -898,6 +898,11 @@ handle_external_item_change(const struct
                    scratch_pool));
           break;
         case svn_node_file:
+          if (strcmp(eb->repos_root_url, ra_cache.repos_root_url))
+            return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+                      _("Unsupported external: "
+                        "url of file external '%s' is not in repository '%s'"),
+                      new_url, eb->repos_root_url);
           SVN_ERR(switch_file_external(local_abspath,
                                        new_url,
                                        &new_item->peg_revision,

Modified: subversion/trunk/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/externals_tests.py?rev=1153110&r1=1153109&r2=1153110&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/externals_tests.py Tue Aug  2 12:57:51 2011
@@ -1877,7 +1877,6 @@ def exclude_externals(sbox):
                                         None, None, None, None, False,
                                         '--set-depth', 'infinity', wc_dir)
 
-@XFail()
 def file_externals_different_repos(sbox):
   "update file externals via different url"
 
@@ -1906,7 +1905,21 @@ def file_externals_different_repos(sbox)
   # The externals from r2 should fail, but currently pass.
   # This creates a wc.db inconsistency
   svntest.actions.run_and_verify_update(wc_dir,
-                                        expected_output, None, None)
+                                        expected_output, None, None,
+                                        'svn: warning: W200007: Unsupported.*')
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'relocate', r1_url, r2_url, wc_dir)
+
+
+  expected_output = svntest.wc.State(wc_dir, {
+    'r2-e-1'            : Item(status='A '),
+    'r2-e-2'            : Item(status='A '),
+  })
+
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output, None, None,
+                                        '.*svn: warning: W170000:.*')
 
 
 ########################################################################



Mime
View raw message