subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1743241 - /subversion/trunk/subversion/tests/cmdline/svntest/tree.py
Date Tue, 10 May 2016 17:48:00 GMT
Author: stefan2
Date: Tue May 10 17:48:00 2016
New Revision: 1743241

URL: http://svn.apache.org/viewvc?rev=1743241&view=rev
Log:
Follow-up to r1743236:  Unbreak tests on Windows.
As it turns out, some of our tests insist on normalizing newlines even in
binary properties.

* subversion/tests/cmdline/svntest/tree.py
  (eol_re_binary): Alternative definition for byte strings.
  (get_props): Always perform an EOL normalization, even for binary props.

Modified:
    subversion/trunk/subversion/tests/cmdline/svntest/tree.py

Modified: subversion/trunk/subversion/tests/cmdline/svntest/tree.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/tree.py?rev=1743241&r1=1743240&r2=1743241&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/tree.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/tree.py Tue May 10 17:48:00 2016
@@ -499,6 +499,7 @@ def create_from_path(path, contents=None
 
 
 eol_re = re.compile(r'(\r\n|\r)')
+eol_re_binary = re.compile(br'(\r\n|\r)')
 
 # helper for build_tree_from_wc()
 def get_props(paths):
@@ -546,6 +547,8 @@ def get_props(paths):
       # all end-of-line variants into a single LF:
       if isinstance(value, str):
         value = eol_re.sub('\n', value)
+      else:
+        value = eol_re_binary.sub(b'\n', value)
       file_props[name] = value
     files[filename] = file_props
 



Mime
View raw message