$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r83570 - in trunk/tools/regression: src/report xsl_reports
From: steven_at_[hidden]
Date: 2013-03-25 18:17:25
Author: steven_watanabe
Date: 2013-03-25 18:17:25 EDT (Mon, 25 Mar 2013)
New Revision: 83570
URL: http://svn.boost.org/trac/boost/changeset/83570
Log:
Fix crazy timestamps caused by assuming the current year.
Text files modified: 
   trunk/tools/regression/src/report/common.cpp            |     3 +--                                     
   trunk/tools/regression/xsl_reports/boost_wide_report.py |    29 +++++++++++------------------           
   2 files changed, 12 insertions(+), 20 deletions(-)
Modified: trunk/tools/regression/src/report/common.cpp
==============================================================================
--- trunk/tools/regression/src/report/common.cpp	(original)
+++ trunk/tools/regression/src/report/common.cpp	2013-03-25 18:17:25 EDT (Mon, 25 Mar 2013)
@@ -161,8 +161,7 @@
 // string.  The only special character in the pattern
 // is '*', which matches any number of consecutive characters.
 bool boost::regression::re_match(const std::string& pattern, const std::string& text) {
-    std::string regex_str;
-    std::string special(".[{()\\+?|^$");
+    std::size_t current_start = 0;
     for(std::size_t i = 0; i < pattern.size(); ++i) {
         if(pattern[i] == '*') {
             regex_str += '.';
Modified: trunk/tools/regression/xsl_reports/boost_wide_report.py
==============================================================================
--- trunk/tools/regression/xsl_reports/boost_wide_report.py	(original)
+++ trunk/tools/regression/xsl_reports/boost_wide_report.py	2013-03-25 18:17:25 EDT (Mon, 25 Mar 2013)
@@ -48,24 +48,17 @@
 # Find the mod time from unix format directory listing line
 #
 
-def get_date( words ):
-    date = words[ 5: -1 ]
-
-    month_names = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ]
-
-    year = time.gmtime()[0] # If year is not secified is it the current year
-    month = month_names.index( date[0] ) + 1
-    day = int( date[1] )
-    hours = 0 
-    minutes = 0
-
-    if  date[2].find( ":" ) != -1:
-        ( hours, minutes ) = [ int(x) for x in date[2].split( ":" ) ]
-    else:
-        # there is no way to get seconds for not current year dates
-        year = int( date[2] )
+def get_date( f, words ):
+    # f is an ftp object
 
-    return ( year, month, day, hours, minutes, 0, 0, 0, 0 )
+    (response, modtime) = f.sendcmd('MDTM %s' % words[-1]).split( None, 2 )
+    year = int( modtime[0:4] )
+    month = int( modtime[4:6] )
+    day = int( modtime[6:8] )
+    hours = int( modtime[8:10] )
+    minutes = int( modtime[10:12] )
+    seconds = int( modtime[12:14] )
+    return ( year, month, day, hours, minutes, seconds, 0, 0, 0)
 
 def list_ftp( f ):
     # f is an ftp object
@@ -79,7 +72,7 @@
     word_lines = [ x.split( None, 8 ) for x in lines ]
 
     # we don't need directories
-    result = [ file_info( l[-1], int( l[4] ), get_date( l ) ) for l in word_lines if l[0][0] != "d" ]
+    result = [ file_info( l[-1], int( l[4] ), get_date( f, l ) ) for l in word_lines if l[0][0] != "d" ]
     for f in result:
         utils.log( "    %s" % f )
     return result