source: trunk/lib/ClassicStats.cc @ 656

Last change on this file since 656 was 656, checked in by Jari Häkkinen, 13 years ago

Removed stray include statements.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1// $Id: ClassicStats.cc 656 2008-06-09 21:46:40Z jari $
2
3/*
4  Copyright (C) 2005 Peter Johansson
5  Copyright (C) 2006, 2007 Jari Häkkinen, Peter Johansson
6
7  This file is part of svndigest, http://trac.thep.lu.se/svndigest
8
9  svndigest is free software; you can redistribute it and/or modify it
10  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  (at your option) any later version.
13
14  svndigest is distributed in the hope that it will be useful, but
15  WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  General Public License for more details.
18
19  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.
23*/
24
25#include "ClassicStats.h"
26
27#include "Functor.h"
28#include "SVNblame.h"
29#include "SVNinfo.h"
30#include "utility.h"
31
32#include <algorithm>
33#include <cassert>
34#include <cstdlib>
35#include <fstream>
36#include <iostream>
37#include <iterator>
38#include <map>
39#include <numeric>
40#include <string>
41#include <sstream>
42#include <unistd.h>
43#include <utility>
44#include <vector>
45
46
47namespace theplu{
48namespace svndigest{
49
50
51  ClassicStats::ClassicStats(const std::string& path)
52    : Stats(path)
53  {
54  }
55
56
57  ClassicStats::ClassicStats(const ClassicStats& other)
58  : Stats(other)
59  {
60  }
61
62
63  void ClassicStats::do_parse(const std::string& path)
64  {
65    LineTypeParser parser(path);
66    SVNblame svn_blame(path);
67    while (svn_blame.valid()) {
68      add(svn_blame.author(), svn_blame.revision(), 
69          parser.parse(svn_blame.line()));
70      svn_blame.next_line();
71    }
72    accumulate_stats();
73
74  }
75
76
77}} // end of namespace svndigest and namespace theplu
Note: See TracBrowser for help on using the repository browser.