You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/01/23 15:41:36 UTC
svn commit: r1560701 -
/subversion/trunk/subversion/tests/cmdline/copy_tests.py
Author: brane
Date: Thu Jan 23 14:41:35 2014
New Revision: 1560701
URL: http://svn.apache.org/r1560701
Log:
Follow up to r1560690: add a test case for copying relocated sources.
* subversion/tests/cmdline/copy_tests.py: Import 'sys'.
(copy_relocate): New test case.
(test_list): Add copy_relocate.
Patch by: rhuijben (tweaked by me)
Modified:
subversion/trunk/subversion/tests/cmdline/copy_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1560701&r1=1560700&r2=1560701&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Thu Jan 23 14:41:35 2014
@@ -25,7 +25,7 @@
######################################################################
# General modules
-import stat, os, re, shutil, logging
+import stat, os, re, shutil, logging, sys
logger = logging.getLogger()
@@ -5787,6 +5787,33 @@ def copy_over_excluded(sbox):
sbox.ospath('A/C'),
sbox.ospath('A/D'))
+def copy_relocate(sbox):
+ "copy from a relocated location"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ tmp_dir = sbox.add_wc_path('relocated')
+
+ shutil.copytree(sbox.repo_dir, tmp_dir)
+
+ url = 'file://'
+
+ if sys.platform == 'win32':
+ url += '/'
+
+ url += os.path.abspath(tmp_dir).replace(os.path.sep, '/')
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'relocate', url, wc_dir)
+
+ copiedpath = sbox.ospath('AA')
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'cp', url + '/A', copiedpath)
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'info', copiedpath)
+
########################################################################
# Run the tests
@@ -5904,6 +5931,7 @@ test_list = [ None,
copy_to_unversioned_parent,
copy_text_conflict,
copy_over_excluded,
+ copy_relocate,
]
if __name__ == '__main__':