You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/08/02 14:30:59 UTC
svn commit: r1153106 -
/subversion/trunk/subversion/tests/cmdline/externals_tests.py
Author: rhuijben
Date: Tue Aug 2 12:30:58 2011
New Revision: 1153106
URL: http://svn.apache.org/viewvc?rev=1153106&view=rev
Log:
Add test to verify that we don't allow checking out file externals from a
repository with a different repository root.
(Currently wc-ng assumes that all nodes in a directory are from the same
repository (url and uuid), just like wc-1.0. svn status will asserts this
condition)
* subversion/tests/cmdline/externals_tests.py
(file_externals_different_repos): New function.
(test_list): Add test.
Found by: danielsh
Modified:
subversion/trunk/subversion/tests/cmdline/externals_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/externals_tests.py?rev=1153106&r1=1153105&r2=1153106&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/externals_tests.py Tue Aug 2 12:30:58 2011
@@ -28,6 +28,7 @@
import sys
import os
import re
+import shutil
# Our testing module
import svntest
@@ -1876,6 +1877,38 @@ 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"
+
+ sbox.build()
+
+ wc_dir = sbox.wc_dir
+ r1_url = sbox.repo_url
+
+ r2_dir, r2_url = sbox.add_repo_path('2')
+ shutil.copytree(sbox.repo_dir, r2_dir)
+
+
+ sbox.simple_propset('svn:externals',
+ 'r1-e-1 ' + r1_url + '/iota\n' +
+ r1_url + '/iota r1-e-2\n' +
+ 'r2-e-1 ' + r2_url + '/iota\n' +
+ r2_url + '/iota r2-e-2\n' +
+ '^/iota rr-e-1\n', '')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'r1-e-1' : Item(status='A '),
+ 'r1-e-2' : Item(status='A '),
+ 'rr-e-1' : Item(status='A '),
+ })
+
+ # 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)
+
+
########################################################################
# Run the tests
@@ -1914,6 +1947,7 @@ test_list = [ None,
incoming_file_on_file_external,
incoming_file_external_on_file,
exclude_externals,
+ file_externals_different_repos,
]
if __name__ == '__main__':