Ignore:
Timestamp:
Jun 4, 2008, 12:05:22 AM (13 years ago)
Author:
Jari Häkkinen
Message:

Merged trunk changes r608:645 to replacing_gnuplot branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/replacing_gnuplot/lib/File.cc

    r597 r646  
    4141#include <iostream>
    4242#include <map>
     43#include <stdexcept>
    4344#include <string>
    4445#include <sys/stat.h>
     
    6667    const Stats& stats = stats_["add"];
    6768   
    68 
    69     for (LogIterator i=log.begin(); i<log.end(); ++i){
     69    typedef std::vector<Commitment>::iterator LogIterator;
     70    for (LogIterator i=log.commits().begin(); i<log.commits().end(); ++i){
    7071      if (i->revision() &&
    7172          (stats(LineTypeParser::code, i->author(), i->revision()) >
     
    183184    std::string cache_dir = directory_name(path()) + std::string(".svndigest/");
    184185    std::string cache_file = cache_dir + name()+std::string(".svndigest-cache");
    185     if (node_exist(cache_file)){
     186    if (!ignore && node_exist(cache_file)){
    186187      std::ifstream is(cache_file.c_str());
    187188      if (stats_.load_cache(is)){
     
    190191      is.close();
    191192    }
    192     else
     193    else {
    193194      stats_.parse(path_);
     195    }
    194196    if (!node_exist(cache_dir))
    195197      mkdir(cache_dir);
     
    262264      if (*line_type==LineTypeParser::other)
    263265        os << "line-other";
    264       else if (*line_type==LineTypeParser::comment)
     266      else if (*line_type==LineTypeParser::comment ||
     267               *line_type==LineTypeParser::copyright)       
    265268        os << "line-comment";
    266       else
     269      else if (*line_type==LineTypeParser::code)
    267270        os << "line-code";
     271      else {
     272        std::string msg="File::print_blame(): unexpected line type found";
     273        throw std::runtime_error(msg);
     274      }
    268275      os << "\">" << blame.line_no()+1
    269276         << "</td>\n<td>";
     
    313320                        const SVNlog& log) const
    314321  {
    315     std::string outpath = stats_type+"/"+user+"/"+line_type+"/"+local_path();
     322    std::string lpath = local_path();
     323    if (lpath.empty())
     324      lpath = "index";
     325    std::string outpath = stats_type+"/"+user+"/"+line_type+"/"+lpath;
    316326    std::string imagefile = stats_type+"/"+"images/"+line_type+"/"+
    317       local_path_+".png";
     327      lpath+".png";
    318328    std::string html_name(outpath + ".html");
    319329    std::ofstream os(html_name.c_str());
    320     print_header(os, name(), level_+3, user, line_type, local_path()+".html",
     330    print_header(os, name(), level_+3, user, line_type, lpath+".html",
    321331                 stats_type);
    322332    path_anchor(os);
    323 
    324333    os << "<p class=\"plot\">\n<img src='";
    325334    for (size_t i=0; i<level_; ++i)
Note: See TracChangeset for help on using the changeset viewer.