$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r61956 - trunk/tools/regression/src
From: steven_at_[hidden]
Date: 2010-05-13 16:32:41
Author: steven_watanabe
Date: 2010-05-13 16:32:40 EDT (Thu, 13 May 2010)
New Revision: 61956
URL: http://svn.boost.org/trac/boost/changeset/61956
Log:
Automatically add the command line for run.py to the comment file
Text files modified: 
   trunk/tools/regression/src/collect_and_upload_logs.py |    28 ++++++++++++++++++++++++++++            
   1 files changed, 28 insertions(+), 0 deletions(-)
Modified: trunk/tools/regression/src/collect_and_upload_logs.py
==============================================================================
--- trunk/tools/regression/src/collect_and_upload_logs.py	(original)
+++ trunk/tools/regression/src/collect_and_upload_logs.py	2010-05-13 16:32:40 EDT (Thu, 13 May 2010)
@@ -228,6 +228,34 @@
             f.close()    
     else:
         utils.log( 'Warning: comment file "%s" is not found.' % comment_file )
+
+    lines = ['']
+    for arg in sys.argv:
+        # Make sure that the ftp details are hidden
+        arg = re.sub( 'ftp://.*$', 'ftp://XXXXX', arg )
+
+        # Escape quotes
+        arg = re.sub( r'(\\|")', r'\\\1', arg )
+
+        # Quote arguments if needed
+        if arg.find( ' ' ) != -1:
+            arg = '"%s"' % arg
+        if len( lines[-1] ) + len( arg ) + 2 >= 80:
+            # align backslashes
+            lines[-1] += ' ' * ( 79 - len( lines[-1] ) )
+            # indent lines after the first
+            lines.append( '  ' )
+        lines[-1] += ( arg + ' ' )
+
+    results_xml.characters( '<hr>' )
+    results_xml.characters( '<dl>' )
+    results_xml.characters( '<dt>Command Line</dt>' )
+    results_xml.characters( '<dd>' )
+    results_xml.characters( '<pre>' )
+    results_xml.characters( '\\\n'.join(lines) )
+    results_xml.characters( '</pre>' )
+    results_xml.characters( '</dd>' )
+    results_xml.characters( '</dl>\n' )
  
     results_xml.endElement( 'comment' )