- Timestamp:
- Apr 9, 2007, 2:08:26 PM (16 years ago)
- Location:
- trunk/bin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/Parameter.cc
r229 r234 24 24 25 25 #include "Parameter.h" 26 27 #include "ColumnStream.h" 26 28 #include "utility.h" 27 29 #include <config.h> // this header file is created by configure … … 43 45 bool ok=false; 44 46 std::string myargv(argv[i]); 45 if (myargv=="- c" || myargv=="--config"){47 if (myargv=="--config-file"){ 46 48 if (++i<argc){ 47 49 config_file_= std::string(argv[i]); … … 136 138 137 139 if (config_file_.empty()) 138 runtime_error(string("svndigest: Parameter --config requires argument."));140 runtime_error(string("svndigest: Parameter --config-file requires argument.")); 139 141 140 142 } … … 157 159 { 158 160 defaults(); 159 std::cout << "\n" 160 << "usage: svndigest [options]\n" 161 << "\n" 162 << "svndigest traverses a directory structure (controlled by\n" 163 << "subversion) and calculates developer statistics entries.\n" 164 << "The top level directory of the directory structure to\n" 165 << "traverse is set with the -r option. The result is written to\n" 166 << "the current working directory or a directory set with the\n" 167 << "-t option.\n" 168 << "\n" 169 << "Valid options:\n" 170 << " --copyright : update copyright statement\n" 171 << " -c [--config] arg : configuration file [" 172 << config_file_ << "]\n" 173 << " -f [--force] : remove target directory/file if it exists\n" 174 << " [no force]. NOTE recursive delete.\n" 175 << " -g [--generate-config] : write configuration file " 176 << "to standard output and exit\n" 177 << " -h [--help] : display this help and exit\n" 178 << " -r [--root] arg : svn controlled directory to perform\n" 179 << " statistics calculation on [" 180 << root_ << "]\n" 181 << " -rev [--revisions]: Use revision numbers as time scale\n" 182 << " instead of dates [dates].\n" 183 << " -t [--target] arg : output directory [" 184 << targetdir_ << "]\n" 185 << " -v [--verbose] : explain what is being done\n" 186 << " --version : print version information and exit\n" 187 << std::endl; 161 162 ColumnStream cs(std::cout, 1); 163 cs.width(0)=68; 164 cs.margin(0)=2; 165 ColumnStream cs2(std::cout, 3); 166 cs2.width(0)=24; 167 cs2.width(1)=2; 168 cs2.width(2)=50; 169 cs2.margin(0)=2; 170 171 std::cout << "usage: svndigest [options]\n" 172 << "\n"; 173 174 cs << "svndigest traverses a directory structure (controlled by " 175 << "subversion) and calculates developer statistics entries. " 176 << "The top level directory of the directory structure to " 177 << "traverse is set with the -r option. The result is written to " 178 << "the current working directory or a directory set with the " 179 << "-t option.\n"; 180 std::cout << "\nValid options:\n"; 181 182 cs2 << "--copyright\t:\tupdate copyright statement\n" 183 << "--config-file arg\t:\tconfiguration file [" 184 << config_file_ << "]\n" 185 << "-f [--force]\t:\tremove target directory/file if it exists " 186 << "[no force]. NOTE recursive delete.\n" 187 << "-g [--generate-config]\t:\twrite configuration file " 188 << "to standard output and exit\n" 189 << "-h [--help]\t:\tdisplay this help and exit\n" 190 << "-r [--root] arg\t:\tsvn controlled directory to perform " 191 << "statistics calculation on [" << root_ << "]\n" 192 << "-rev [--revisions]\t:\tUse revision numbers as time scale " 193 << "instead of dates [dates].\n" 194 << "-t [--target] arg\t:\toutput directory [" << targetdir_ << "]\n" 195 << "-v [--verbose]\t:\texplain what is being done\n" 196 << "--version\t:\tprint version information and exit\n"; 197 std::cout << std::endl; 188 198 } 189 199 -
trunk/bin/svndigest.cc
r230 r234 32 32 #include "SVN.h" 33 33 #include "SVNinfo.h" 34 #include "SVNlog.h" 34 35 #include "utility.h" 35 36 … … 129 130 stats+=tree.parse(option->verbose()); 130 131 131 // Retrieve commit dates. 132 std::vector<std::string> commit_dates; 132 // Retrieve commit dates etc from SVNlog. 133 133 try { 134 134 if (option->verbose()) 135 135 std::cout << "Retrieving commit dates" << std::endl; 136 136 svn->setup_ra_session(repo); 137 commit_dates=svn->commit_dates(repo);138 137 } 139 138 catch (SVNException e) { … … 141 140 exit(-1); 142 141 } 143 // Is this line needed? 144 svn->setup_ra_session(repo); 145 std::vector<std::string> authors=svn->authors(repo); 142 SVNlog svnlog(repo); 146 143 147 144 // remove target if needed … … 155 152 std::cout << "Generating output" << std::endl; 156 153 if (!option->revisions()) 157 GnuplotFE::instance()->set_dates( commit_dates);154 GnuplotFE::instance()->set_dates(svnlog.date()); 158 155 chdir(option->targetdir().c_str()); 159 156 mkdir(tree.name()); … … 162 159 +tree.name()+"'"); 163 160 print_css("svndigest.css"); 164 print_main_page(tree.name(), commit_dates, stats);161 print_main_page(tree.name(), svnlog, stats); 165 162 mkdir("all"); 166 163 for (std::set<std::string>::const_iterator i = stats.authors().begin(); … … 180 177 std::cout << "Updating copyright statements" << std::endl; 181 178 std::map<std::string, std::string> alias(config->copyright_alias()); 182 tree.print_copyright( commit_dates, authors,alias);179 tree.print_copyright(alias); 183 180 } 184 181 catch (const std::runtime_error& x) {
Note: See TracChangeset
for help on using the changeset viewer.