| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Subversion
Revision: 32930
Author: julianfoad
Date: 05 Sep 2008 10:51:00
Changes:Fix a test's EOL-style portability problem introduced in r32907, and enabled
in r32913, that caused it to fail on Windows.
Suggested by: pburba
* subversion/tests/cmdline/merge_tests.py
(merge_an_eol_unification_and_set_svn_eol_style): Write out the initial
file contents in binary mode to get the exact EOL style combination we
want.
| ... | ...@@ -12611,13 +12611,15 @@ | |
| 12611 | 12611 | wc_disk.wc_dir = '' |
| 12612 | 12612 | wc_status.wc_dir = '' |
| 12613 | 12613 | |
| 12614 | content1 = 'Line1\nLine2\r\n' | |
| 12615 | content2 = 'Line1' + os.linesep + 'Line2' + os.linesep | |
| 12614 | content1 = 'Line1\nLine2\r\n' # write as 'binary' to get these exact EOLs | |
| 12615 | content2 = 'Line1\nLine2\n' # write as 'text' to get native EOLs in file | |
| 12616 | 12616 | |
| 12617 | # In the source branch, create initial state and two successive changes | |
| 12618 | svntest.main.file_write('A/mu', content1) | |
| 12617 | # In the source branch, create initial state and two successive changes. | |
| 12618 | # Use binary mode to write the first file so no newline conversion occurs. | |
| 12619 | svntest.main.file_write('A/mu', content1, 'wb') | |
| 12619 | 12620 | rev1 = svn_commit('A/mu') |
| 12620 | svntest.main.file_write('A/mu', content2) | |
| 12621 | # Use text mode to write the second copy of the file to get native EOLs. | |
| 12622 | svntest.main.file_write('A/mu', content2, 'w') | |
| 12621 | 12623 | rev2 = svn_commit('A/mu') |
| 12622 | 12624 | svn_propset('svn:eol-style', 'native', 'A/mu') |
| 12623 | 12625 | rev3 = svn_commit('A/mu') |