Boost logo

Boost-Commit :

From: bdawes_at_[hidden]
Date: 2007-11-06 11:10:11


Author: bemandawes
Date: 2007-11-06 11:10:11 EST (Tue, 06 Nov 2007)
New Revision: 40840
URL: http://svn.boost.org/trac/boost/changeset/40840

Log:
Add repository URL and revision number, plus other minor tweaks and fixes.
Text files modified:
   trunk/tools/inspect/inspect.cpp | 40 +++++++++++++++++++++++++++++++---------
   1 files changed, 31 insertions(+), 9 deletions(-)

Modified: trunk/tools/inspect/inspect.cpp
==============================================================================
--- trunk/tools/inspect/inspect.cpp (original)
+++ trunk/tools/inspect/inspect.cpp 2007-11-06 11:10:11 EST (Tue, 06 Nov 2007)
@@ -84,6 +84,25 @@
   typedef std::vector< error_msg > error_msg_vector;
   error_msg_vector msgs;
 
+// get info (as a string) if inspect_root is svn working copy --------------//
+
+ string info( const fs::path & inspect_root )
+ {
+ string rev;
+ string repos;
+ fs::path entries( inspect_root / ".svn" / "entries" );
+ fs::ifstream entries_file( entries );
+ if ( entries_file )
+ {
+ std::getline( entries_file, rev );
+ std::getline( entries_file, rev );
+ std::getline( entries_file, rev );
+ std::getline( entries_file, rev ); // revision number as a string
+ std::getline( entries_file, repos ); // repository as a string
+ }
+ return repos + " at revision " + rev;
+ }
+
 // visit_predicate (determines which directories are visited) --------------//
 
   typedef bool(*pred_type)(const path&);
@@ -629,6 +648,7 @@
 
   string inspector_keys;
   fs::initial_path();
+
 
   {
 
@@ -681,8 +701,7 @@
         "\n"
         "An inspection program <http://www.boost.org/tools/inspect/index.html>\n"
         "checks each file in the current Boost CVS for various problems,\n"
- "generating this as output. Problems detected include tabs in files,\n"
- "missing copyrights, broken URL's, and similar misdemeanors.\n"
+ "generating an HTML page as output.\n"
         "\n"
       ;
 
@@ -709,21 +728,24 @@
       // we should not use a table, of course [gps]
       "<table>\n"
       "<tr>\n"
- "<td><img src=\"../boost.png\" alt=\"Boost logo\" />"
+ "<td><img src=\"http://www.boost.org/boost.png\" alt=\"Boost logo\" />"
       "</td>\n"
       "<td>\n"
       "<h1>Boost Inspection Report</h1>\n"
       "<b>Run Date:</b> " << run_date << "\n"
- "&nbsp;&nbsp;/ " << validator_link( "validate me" ) << " /\n"
+ //"&nbsp;&nbsp;/ " << validator_link( "validate me" ) << " /\n"
       "</td>\n"
       "</tr>\n"
       "</table>\n"
 
- "<p>An <a href=\"http://www.boost.org/tools/inspect/index.html\">inspection\n"
- "program</a> checks each file in the current Boost CVS for various problems,\n"
- "generating this web page as output. Problems detected include tabs in files,\n"
- "missing copyrights, broken URL's, and similar misdemeanors.</p>\n"
+ "<p>This report is generated by an <a href=\"http://www.boost.org/tools/inspect/index.html\">inspection\n"
+ "program</a> that checks files for the problems noted below.</p>\n"
       ;
+ std::cout
+ << "<p>The files checked were from "
+ << info( fs::initial_path() )
+ << ".</p>\n";
+
 
     std::cout
       << "<h2>Totals</h2>\n<pre>"
@@ -736,7 +758,7 @@
         itr != inspectors.end(); ++itr )
   {
     const string line_break (
- display_text == display_format? "\n" : "<br />\n"); // gps
+ display_text == display_format? "\n" : "<br>\n"); // gps
 
     inspector_keys += static_cast<string>(" ")
         + itr->inspector->name()


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk