Ignore:
Timestamp:
Apr 9, 2009, 10:18:54 PM (12 years ago)
Author:
Jari Häkkinen
Message:

Merged trunk changes r645:782 to replacing_gnuplot branch.

Location:
branches/replacing_gnuplot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/replacing_gnuplot

    • Property svn:ignore
      •  

        old new  
        88autom4te.cache
        99INSTALL
        10 COPYING
        1110aclocal.m4
        1211Makefile
  • branches/replacing_gnuplot/lib/first_page.cc

    r646 r784  
    44  Copyright (C) 2006 Peter Johansson
    55  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
    6 
    7   This file is part of svndigest, http://trac.thep.lu.se/svndigest
     6  Copyright (C) 2009 Peter Johansson
     7
     8  This file is part of svndigest, http://dev.thep.lu.se/svndigest
    89
    910  svndigest is free software; you can redistribute it and/or modify it
    1011  under the terms of the GNU General Public License as published by
    11   the Free Software Foundation; either version 2 of the License, or
     12  the Free Software Foundation; either version 3 of the License, or
    1213  (at your option) any later version.
    1314
     
    1819
    1920  You should have received a copy of the GNU General Public License
    20   along with this program; if not, write to the Free Software
    21   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    22   02111-1307, USA.
     21  along with svndigest. If not, see <http://www.gnu.org/licenses/>.
    2322*/
    2423
     
    6059    set<string> authors;
    6160    std::transform(log.commits().begin(), log.commits().end(),
    62                    std::inserter(authors, authors.begin()), GetAuthor());
     61                   std::inserter(authors, authors.begin()),
     62                   std::mem_fun_ref(&Commitment::author));
    6363    // erase invalid authors
    6464    authors.erase("");
     
    8484  {
    8585    assert(log.commits().size());
    86     Date begin(log.commits()[0].date());
    87     Date end(log.commits().back().date());
    88     std::string timefmt("%a, %e %b %Y  %H:%M:%S");
     86    Date begin(log.commits().begin()->date());   
     87    Date end(log.latest_commit().date());
     88    std::string timefmt("%a %b %e %H:%M:%S %Y");
    8989
    9090    os << "<div class=\"main\">"
     
    102102    os << end.difftime(begin);
    103103    os << "</td></tr>\n"
    104        << "<tr><td>Smallest Revision:</td><td>" << log.commits()[0].revision()
    105        << "</td></tr>\n"
    106        << "<tr><td>Largest Revision:</td><td>" <<log.commits().back().revision()
     104       << "<tr><td>Smallest Revision:</td><td>"
     105       << log.commits().begin()->revision()
     106       << "</td></tr>\n"
     107       << "<tr><td>Largest Revision:</td><td>" << log.latest_commit().revision()
    107108       << "</td></tr>\n"
    108109       << "<tr><td>Revision Count:</td><td>" << log.commits().size()
     
    119120                     const Stats& stats)
    120121  {
     122    HtmlStream hs(os);
    121123    os << "<div class=\"main\">"
    122124       << "<table class=\"main\"><thead><tr><th colspan=\"2\">"
     
    131133       <<"</tr>";
    132134
    133     std::string timefmt("%Y %b %d %H:%M:%S");
     135    std::string timefmt("%Y-%m-%d  %H:%M");
    134136    using namespace std;
    135137    for (vector<Commitment>::const_iterator i=lc.begin(); i!=lc.end(); ++i) {
     
    146148         << "%)</td><td>" << stats.comments(i->author()) << " ("
    147149         << 100*stats.comments(i->author())/(stats.comments()?stats.comments():1)
    148          << "%)</td><td>" << Date(i->date())(timefmt) << "</td>" <<"</tr>";
     150         << "%)</td><td>";
     151      hs << Date(i->date())(timefmt);
     152      os << "</td>" <<"</tr>";
    149153    }
    150154    os << "<tr><td>Total</td>";
     
    169173       << "<td>Removed</td><td>Message</td></tr>\n";
    170174    HtmlStream hs(os);
    171     std::string timefmt("%Y %b %d %H:%M:%S");
     175    std::string timefmt("%Y-%m-%d  %H:%M");
    172176    const size_t maxlength = 80;
    173177    const Configuration& conf = Configuration::instance();
    174     typedef std::vector<Commitment>::const_reverse_iterator iter;
     178    typedef SVNlog::container::const_reverse_iterator iter;
     179    size_t count = 0;
    175180    for (iter i=log.commits().rbegin();
    176          i < std::min(i+10,log.commits().rend()); ++i) {
     181         i != log.commits().rend() && count<10; ++i) {
    177182      os << "<tr><td>"
    178183         << anchor(std::string("classic/")+i->author()+"/total/index.html",
     
    180185         << "</td>";
    181186      Date date(i->date());
    182       os << "<td>" << date(timefmt) << "</td>";
     187      os << "<td>";
     188      hs << date(timefmt);
     189      os << "</td>";
    183190      os << "<td>";
    184191      os << trac_revision(i->revision());
     
    211218
    212219      os << "</td></tr>\n";
     220      ++count;
    213221    }
    214222    os << "</table></div>\n";
Note: See TracChangeset for help on using the changeset viewer.