You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/05/14 21:38:22 UTC
svn commit: r1338359 -
/subversion/trunk/subversion/tests/cmdline/import_tests.py
Author: stsp
Date: Mon May 14 19:38:21 2012
New Revision: 1338359
URL: http://svn.apache.org/viewvc?rev=1338359&view=rev
Log:
Extend an import test to act as a regression test for the fix made in r1205193.
* subversion/tests/cmdline/import_tests.py
(import_eol_style): Verify that a mixed-eol style does not result in an
import error for files which got svn:eol-style=native via auto-props.
Such files should be normalised during import. This test fails with
r1205193 backed out.
Modified:
subversion/trunk/subversion/tests/cmdline/import_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/import_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/import_tests.py?rev=1338359&r1=1338358&r2=1338359&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/import_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/import_tests.py Mon May 14 19:38:21 2012
@@ -298,6 +298,7 @@ def import_avoid_empty_revision(sbox):
#----------------------------------------------------------------------
# test for issue 2433: "import" does not handle eol-style correctly
+# and for normalising files with mixed line-endings upon import (r1205193)
@Issue(2433)
def import_eol_style(sbox):
"import should honor the eol-style property"
@@ -315,6 +316,7 @@ enable-auto-props = yes
[auto-props]
*.dsp = svn:eol-style=CRLF
+*.txt = svn:eol-style=native
'''
tmp_dir = os.path.abspath(svntest.main.temp_dir)
config_dir = os.path.join(tmp_dir, 'autoprops_config')
@@ -369,6 +371,26 @@ enable-auto-props = yes
file_path,
'--config-dir', config_dir)
+ # create a file with inconsistent EOLs and eol-style=native, and import it
+ file_name = "test.txt"
+ file_path = file_name
+ imp_dir_path = 'dir2'
+ imp_file_path = os.path.join(imp_dir_path, file_name)
+
+ os.mkdir(imp_dir_path, 0755)
+ svntest.main.file_append_binary(imp_file_path,
+ "This is file test.txt.\n" + \
+ "The second line.\r\n" + \
+ "The third line.\r")
+
+ # The import should succeed and not error out
+ svntest.actions.run_and_verify_svn(None, None, [], 'import',
+ '-m', 'Log message for new import',
+ imp_dir_path,
+ sbox.repo_url,
+ '--config-dir', config_dir)
+
+
#----------------------------------------------------------------------
@Issue(3983)
def import_into_foreign_repo(sbox):