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/AddStats.cc

    r646 r784  
    44  Copyright (C) 2008 Peter Johansson
    55
    6   This file is part of svndigest, http://trac.thep.lu.se/svndigest
     6  This file is part of svndigest, http://dev.thep.lu.se/svndigest
    77
    88  svndigest is free software; you can redistribute it and/or modify it
    99  under the terms of the GNU General Public License as published by
    10   the Free Software Foundation; either version 2 of the License, or
     10  the Free Software Foundation; either version 3 of the License, or
    1111  (at your option) any later version.
    1212
     
    1717
    1818  You should have received a copy of the GNU General Public License
    19   along with this program; if not, write to the Free Software
    20   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    21   02111-1307, USA.
     19  along with svndigest. If not, see <http://www.gnu.org/licenses/>.
    2220*/
    2321
     
    3129#include <cassert>
    3230#include <cstdlib>
     31#include <functional>
    3332#include <map>
    3433#include <string>
     
    5453
    5554
    56   void AddStats::do_parse(const std::string& path)
     55  void AddStats::do_parse(const std::string& path, svn_revnum_t rev)
    5756  {
    58     LineTypeParser parser(path);
    5957    SVNlog log(path);
    60     typedef std::set<svn_revnum_t> RevSet;
     58    typedef std::set<svn_revnum_t, std::greater<svn_revnum_t> > RevSet;
    6159    RevSet revs;
    6260    std::transform(log.commits().begin(), log.commits().end(),
    63                    std::inserter(revs, revs.begin()), GetRevision());
    64     for (RevSet::iterator rev_iter=revs.begin();rev_iter!=revs.end();++rev_iter){
     61                   std::inserter(revs, revs.begin()),
     62                   std::mem_fun_ref(&Commitment::revision));
     63    for (RevSet::iterator rev_iter=revs.begin();
     64         rev_iter!=revs.end() && *rev_iter>=rev; ++rev_iter){
    6565      SVNblame svn_blame(path, *rev_iter);
     66      LineTypeParser parser(path);
    6667      while (svn_blame.valid()) {
     68        LineTypeParser::line_type lt = parser.parse(svn_blame.line());
    6769        if (*rev_iter==svn_blame.revision())
    68           add(svn_blame.author(), *rev_iter, parser.parse(svn_blame.line()));
     70          add(svn_blame.author(), *rev_iter, lt);
    6971        // I dont trust blame and log behave consistent (stop-on-copy).
    7072        revs.insert(svn_blame.revision());
     
    7274      }
    7375    }
    74    
    75     accumulate_stats();
     76    accumulate_stats(rev);
    7677  }
    7778
Note: See TracChangeset for help on using the changeset viewer.