Changeset 91 for trunk/bin


Ignore:
Timestamp:
Mar 23, 2006, 11:56:17 PM (15 years ago)
Author:
Jari Häkkinen
Message:

Fixes #4, #19, #32, #34: Started to implement subversion API usage.

Location:
trunk/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/Makefile.am

    r84 r91  
    2828noinst_HEADERS = Parameter.h rmdirhier.h
    2929
    30 LDADD = @top_srcdir@/lib/libsvnstat.a
     30LDADD = @top_srcdir@/lib/libsvnstat.a -L/usr/local/apr/lib \
     31  -lsvn_client-1 -lsvn_wc-1 -lsvn_ra-1 -lsvn_subr-1 -lapr-0
    3132
    32 INCLUDES = -I@top_srcdir@/lib
     33INCLUDES = -I@top_srcdir@/lib -I/usr/local/include/subversion-1 -I/usr/local/apr/include/apr-0
     34
     35# Needed to compile svn API stuff
     36svnstat_CXXFLAGS = -Wno-long-long
    3337
    3438clean-local:
  • trunk/bin/svnstat.cc

    r84 r91  
    2323
    2424#include "Parameter.h"
     25
    2526#include "CommitStat.h"
    2627#include "Directory.h"
    2728#include "GnuplotFE.h"
    2829#include "rmdirhier.h"
     30#include "SVN.h"
    2931
    3032#include <stdexcept>
     
    5052  Parameter option(argc,argv);
    5153
     54  SVN* svn=SVN::instance();
     55  try {
     56    svn->setup_wc_adm_access(option.root());
     57  }
     58  catch (SVNException e) {
     59    std::cerr << "\nsvtstat: " << e.what() << "\nsvnstat: " << option.root()
     60              << " is not under subversion control\n" << std::endl;
     61    exit(-1);
     62  }
     63
    5264  if (createdir(option.targetdir(),option.force())) {
    5365    std::cerr << "\nFailed to create target directory '" << option.targetdir()
     
    6375    GnuplotFE::instance()->set_dates(cs.date());
    6476  }
    65  
    66   string prefix("svnstat_");
    67   Directory tree(option.root(),prefix);
    68   tree.purge(option.verbose());
     77
     78  Directory tree(option.root(),"svnstat_");
    6979  tree.parse(option.verbose());
    7080
Note: See TracChangeset for help on using the changeset viewer.