Changeset 129 for trunk/lib/Stats.cc


Ignore:
Timestamp:
Aug 2, 2006, 7:56:18 PM (15 years ago)
Author:
Jari Häkkinen
Message:

Addresses ticket:23. Changed usage of 'svn info' to API calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Stats.cc

    r118 r129  
    2424
    2525#include "Stats.h"
     26
    2627#include "GnuplotFE.h"
     28#include "SVNinfo.h"
    2729#include "utility.h"
    2830
     
    3436#include <map>
    3537#include <numeric>
    36 #include <sstream>
    3738#include <string>
    3839#include <unistd.h>
     
    4849  {
    4950    // Make sure latest revision is set properly
    50     std::map<std::string,std::string> svn_info = info(path);
    51     std::stringstream ss;
    52     ss << (svn_info.count("Revision") ? svn_info["Revision"] : "0");
    53     ss >> revision_;
    54     ss.clear();
    55     ss << (svn_info.count("Last Changed Rev") ? svn_info["Last Changed Rev"] : "0");
    56     ss >> last_changed_rev_;
     51    SVNinfo svn_info(path);
     52    revision_=svn_info.rev();
     53    last_changed_rev_=svn_info.last_changed_rev();
    5754  }
    5855
Note: See TracChangeset for help on using the changeset viewer.