subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From futat...@apache.org
Subject svn propchange: r1877712 - svn:log
Date Sun, 17 May 2020 23:53:52 GMT
Author: futatuki
Revision: 1877712
Modified property: svn:log

Modified: svn:log at Sun May 17 23:53:52 2020
------------------------------------------------------------------------------
--- svn:log (original)
+++ svn:log Sun May 17 23:53:52 2020
@@ -1,4 +1,24 @@
-Use safe bytes literals when set string values in working copy entries. 
+entries-dump: Escape string-typed attribute values when serializing
+them as Python string literals.
+
+Before this commit, a filesystem node named "foo\bar" (a single,
+7-character path component) would cause "e.name = 'foo\bar'" to be
+emitted.  In genral, the unescaped backslash would manifest as a test
+failure or a SyntaxError, depending on the following characters.
+
+This was triggered by update_tests.py 76 windows_update_backslash under
+Python 3 on Windows.
+
+There can be some other characters that should be escaped.  For example,
+user names can contain "'" (a single quote character) and/or """ (a
+double quote character), which would potentially cause a SyntaxError
+even if we choose either of them to quote string literals.  To avoid
+overlooking such potentially unsafe characters, I decided to use hex
+value escape for all characters.  
+
+Furthermore, to ensure that values are decoded to Unicode as UTF-8 byte
+sequences when we use hex value escape under Python 3, we print them as
+bytes values and then encode them.
 
 * subversion/tests/cmdline/entries-dump.c
   (print_prefix): New function.
@@ -11,8 +31,10 @@ Use safe bytes literals when set string
   - Print "Entry" class definition as prefix before entry_dump() or tree_dump() 
   - Style fix on if statement (using blocks). 
   (): Add include files for assert() and svn_xml_escape_attr_cstring()
+
 * subversion/tests/cmdline/svntest/main.py
   (run_entiresdump, run_entriesdump_tree): Move definition of "Entry" class
   into generated code by entries-dump execution. 
 
-Review By: danielsh
+Found by: svn-windows-ra buildbot
+Reviewed By: danielsh


Mime
View raw message