You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2011/10/27 04:07:36 UTC

svn commit: r1189580 - /subversion/trunk/build/transform_sql.py

Author: gstein
Date: Thu Oct 27 02:07:35 2011
New Revision: 1189580

URL: http://svn.apache.org/viewvc?rev=1189580&view=rev
Log:
Fix SQL transformation on Windows (and NetWare) builds. The \r\n pattern
messed up the output files.

Reported by: NormW <normw{_AT_}gknw.net>

* build/transform_sql.py:
  (Processor.process_file): strip trailing whitespace from the line before
    placing it into the output. this will clear off a \r character, and
    any potential trailing spaces. (continue to add a space in the format
    string so that string-joining does not create something like:
    "... FROM tableWHERE ...") we keep leading whitespace for nice
    indentation of the queries.

Modified:
    subversion/trunk/build/transform_sql.py

Modified: subversion/trunk/build/transform_sql.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/transform_sql.py?rev=1189580&r1=1189579&r2=1189580&view=diff
==============================================================================
--- subversion/trunk/build/transform_sql.py (original)
+++ subversion/trunk/build/transform_sql.py Thu Oct 27 02:07:35 2011
@@ -129,7 +129,7 @@ class Processor(object):
         # got something besides whitespace. write it out. include some whitespace
         # to separate the SQL commands. and a backslash to continue the string
         # onto the next line.
-        self.output.write('  "%s " \\\n' % line)
+        self.output.write('  "%s " \\\n' % line.rstrip())
 
     # previous line had a continuation. end the madness.
     self.close_define()