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

    r646 r784  
    55  Copyright (C) 2006, 2007 Jari Häkkinen, Peter Johansson
    66
    7   This file is part of svndigest, http://trac.thep.lu.se/svndigest
     7  This file is part of svndigest, http://dev.thep.lu.se/svndigest
    88
    99  svndigest is free software; you can redistribute it and/or modify it
    1010  under the terms of the GNU General Public License as published by
    11   the Free Software Foundation; either version 2 of the License, or
     11  the Free Software Foundation; either version 3 of the License, or
    1212  (at your option) any later version.
    1313
     
    1818
    1919  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.
     20  along with svndigest. If not, see <http://www.gnu.org/licenses/>.
    2321*/
    2422
     
    2624
    2725#include "Functor.h"
    28 #include "GnuplotFE.h"
    2926#include "SVNblame.h"
    3027#include "SVNinfo.h"
     
    3633#include <cstdlib>
    3734#include <fstream>
     35#include <functional>
    3836#include <iostream>
    3937#include <iterator>
     
    7674
    7775
    78   void BlameStats::do_parse(const std::string& path)
     76  void BlameStats::do_parse(const std::string& path, svn_revnum_t first_rev)
    7977  {
    80     LineTypeParser parser(path);
    8178    SVNlog log(path);
    8279    typedef std::set<svn_revnum_t> RevSet;
    8380    RevSet revs;
    8481    std::transform(log.commits().begin(), log.commits().end(),
    85                    std::inserter(revs, revs.begin()), GetRevision());
    86     for (RevSet::iterator rev_iter=revs.begin();rev_iter!=revs.end();++rev_iter){
     82                   std::inserter(revs, revs.begin()),
     83                   std::mem_fun_ref(&Commitment::revision));
     84    for (RevSet::reverse_iterator rev_iter=revs.rbegin();
     85         rev_iter!=revs.rend() && *rev_iter>=first_rev; ++rev_iter){
    8786      SVNblame svn_blame(path, *rev_iter);
     87      LineTypeParser parser(path);
    8888      while (svn_blame.valid()) {
    8989        add(svn_blame.author(), *rev_iter, parser.parse(svn_blame.line()));
     
    9696    // filling in pristine revisions
    9797    RevSet::iterator rev_iter=revs.begin();
    98     for (svn_revnum_t rev = 1; rev<=revision(); ++rev){
     98    for (svn_revnum_t rev = first_rev+1; rev<=revision(); ++rev){
    9999      if (rev==*rev_iter)
    100100        ++rev_iter;
Note: See TracChangeset for help on using the changeset viewer.