Changeset 60 for trunk/lib/CommitStat.cc


Ignore:
Timestamp:
Jan 16, 2006, 11:03:04 AM (16 years ago)
Author:
Peter Johansson
Message:

plotting vs date rather than revision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/CommitStat.cc

    r48 r60  
    33#include "CommitStat.h"
    44
     5#include <algorithm>
    56#include <fstream>
    67#include <iostream>
     
    1415  {
    1516    std::string system_call = "svn log -q " + path + " > svnstat.log.tmp";
     17    std::cout << system_call << std::endl;
    1618    int system_return = system(system_call.c_str());
    1719    if (system_return)
     
    3436
    3537      if (ss.get() == 'r'){
    36         u_int revision;
     38        size_t revision;
    3739        ss >> revision;
    3840        std::string tmp;
     
    4547        std::string time;
    4648        ss >> time;
     49
     50        date_.resize(std::max(revision+1, date_.size()));
     51        date_[revision] = date;
    4752      }
    4853    }
    4954    is.close();
     55   
     56    for(std::vector<std::string>::reverse_iterator i=date_.rbegin();
     57        i!=date_.rend(); ++i)
     58      if (i->empty()){
     59        assert(i!=date_.rbegin());
     60        *i = *(i-1);
     61      }
    5062
    5163    return system_return;
Note: See TracChangeset for help on using the changeset viewer.