- Timestamp:
- Mar 4, 2006, 7:10:07 PM (18 years ago)
- Location:
- trunk/bin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/Parameter.cc
r66 r73 11 11 12 12 Parameter::Parameter(const int argc,const char *argv[]) 13 : force_(false), root_("."), targetdir_("svnstat_output"), verbose_(false)14 13 { 15 14 defaults(); 16 15 for (int i=1; i<argc; i++) { 17 16 bool ok=false; … … 30 29 ok=true; 31 30 } 31 } 32 else if (myargv=="-rev" || myargv=="--revisions") { 33 revisions_=true; 34 ok=true; 32 35 } 33 36 else if (myargv=="-t" || myargv=="--target"){ … … 61 64 62 65 66 void Parameter::defaults(void) 67 { 68 force_=false; 69 revisions_=false; 70 root_="."; 71 targetdir_="svnstat_output"; 72 verbose_=false; 73 } 74 75 63 76 void Parameter::help(void) 64 77 { … … 80 93 << " -r [--root] arg : svn controlled directory to perform\n" 81 94 << " statistics calculation on [.]\n" 95 << " -rev [--revisions]: Use revision numbers as time scale\n" 96 << " instead of dates [dates].\n" 82 97 << " -t [--target] arg : output directory [svnstat_output]\n" 83 98 << " -v [--verbose] : explain what is being done\n" -
trunk/bin/Parameter.h
r49 r73 14 14 Parameter(const int argc,const char *argv[]); 15 15 inline bool force(void) const { return force_; } 16 inline bool revisions(void) const { return revisions_; } 16 17 inline const std::string& root(void) const { return root_; } 17 18 inline const std::string& targetdir(void) const { return targetdir_; } … … 20 21 private: 21 22 void analyse(void); 23 void defaults(void); 22 24 void help(void); 23 25 void version(void); 24 26 25 27 bool force_; 28 bool revisions_; 26 29 std::string root_; 27 30 std::string targetdir_; 28 31 bool verbose_; 29 30 32 }; 31 33 -
trunk/bin/svnstat.cc
r63 r73 4 4 #include "CommitStat.h" 5 5 #include "Directory.h" 6 #include "Gnuplot .h"6 #include "GnuplotFE.h" 7 7 #include "rmdirhier.h" 8 8 … … 35 35 } 36 36 37 if (option.verbose()) 38 std::cout << "Parsing the log." << std::endl; 39 CommitStat cs; 40 cs.parse(option.root()); 41 assert(cs.date()[0].size()); 42 Stats::gnuplot_pipe_.set_dates(cs.date()); 37 if (!option.revisions()) { 38 if (option.verbose()) 39 std::cout << "Parsing the log." << std::endl; 40 CommitStat cs; 41 cs.parse(option.root()); 42 GnuplotFE::instance()->set_dates(cs.date()); 43 } 43 44 44 45 string prefix("svnstat_"); … … 47 48 tree.parse(option.verbose()); 48 49 49 Stats::gnuplot_pipe_.command(string("cd '")+option.targetdir()+"'");50 GnuplotFE::instance()->command(string("cd '")+option.targetdir()+"'"); 50 51 chdir(option.targetdir().c_str()); 51 52 try {
Note: See TracChangeset
for help on using the changeset viewer.