Changeset 423
- Timestamp:
- Jun 29, 2007, 8:43:29 PM (14 years ago)
- Location:
- trunk/bin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/Parameter.cc
r374 r423 71 71 ok=true; 72 72 } 73 } 74 else if (myargv=="--report") { 75 report_=true; 76 ok=true; 77 } 78 else if (myargv=="--no-report") { 79 report_=false; 80 ok=true; 73 81 } 74 82 else if (myargv=="--revisions") { … … 156 164 force_=false; 157 165 generate_config_=false; 166 report_=false; 158 167 revisions_=false; 159 168 root_="."; … … 187 196 << "[<ROOT>/.svndigest/config]\n" 188 197 << "-f, --force\tif sub-directory named <ROOT> exists in " 189 << "target directory, remove sub-directory before writing results .\n"198 << "target directory, remove sub-directory before writing results\n" 190 199 << "-g, --generate-config\twrite configuration file " 191 200 << "to standard output and exit\n" 192 201 << "-h, --help\tdisplay this help and exit\n" 202 << " --no-report\tCreate no HTML report\n" 203 << " --revisions\tUse revision numbers as time scale " 204 << "instead of dates [dates]\n" 193 205 << "-r, --root=ROOT\tsvn controlled directory to perform " 194 206 << "statistics calculation on [" << root_ << "]\n" 195 << " --revisions\tUse revision numbers as time scale "196 << "instead of dates [dates].\n"197 207 << "-t, --target=TARGET\toutput directory [" << targetdir_ << "]\n" 198 208 << "-v, --verbose\texplain what is being done\n" -
trunk/bin/Parameter.h
r240 r423 41 41 inline bool force(void) const { return force_; } 42 42 inline bool generate_config(void) const { return generate_config_; } 43 inline bool report(void) const { return report_; } 43 44 inline bool revisions(void) const { return revisions_; } 44 45 /// @return absolute path to root directory … … 58 59 bool force_; 59 60 bool generate_config_; 61 bool report_; 60 62 bool revisions_; 61 63 std::string root_; -
trunk/bin/svndigest.cc
r372 r423 146 146 stats+=tree->parse(option->verbose()); 147 147 148 // remove target if needed 149 if (need_to_erase_target) { 148 if (option->report()) { 149 // remove target if needed 150 if (need_to_erase_target) { 150 151 if (option->verbose()) 151 152 std::cout << "Removing old target tree: " << target_path << "\n"; 152 153 rmdirhier(target_path); 153 } 154 155 if (option->verbose()) 156 std::cout << "Generating output" << std::endl; 157 if (!option->revisions()) 158 GnuplotFE::instance()->set_dates(SVNlog(repo).date()); 159 chdir(option->targetdir().c_str()); 160 mkdir(tree->name()); 161 chdir(tree->name().c_str()); 162 GnuplotFE::instance()->command(std::string("cd '")+option->targetdir()+"/" 163 +tree->name()+"'"); 164 print_css("svndigest.css"); 165 SVNlog local_log(option->root()); 166 print_main_page(tree->name(), local_log, stats, 167 tree->url()); 168 mkdir("all"); 169 mkdir("images"); 170 touch("all/index.html"); 171 touch("images/index.html"); 172 for (std::set<std::string>::const_iterator i = stats.authors().begin(); 173 i!=stats.authors().end(); ++i) { 174 mkdir(*i); 175 touch(std::string(*i+"/index.html")); 176 } 177 try { 178 tree->print(option->verbose()); 179 } 180 catch (const std::runtime_error& x) { 181 std::cerr << "svndigest: " << x.what() << std::endl; 182 exit(-1); 154 } 155 156 if (option->verbose()) 157 std::cout << "Generating output" << std::endl; 158 if (!option->revisions()) 159 GnuplotFE::instance()->set_dates(SVNlog(repo).date()); 160 chdir(option->targetdir().c_str()); 161 mkdir(tree->name()); 162 chdir(tree->name().c_str()); 163 GnuplotFE::instance()->command(std::string("cd '")+option->targetdir()+"/" 164 +tree->name()+"'"); 165 print_css("svndigest.css"); 166 SVNlog local_log(option->root()); 167 print_main_page(tree->name(), local_log, stats, 168 tree->url()); 169 mkdir("all"); 170 mkdir("images"); 171 touch("all/index.html"); 172 touch("images/index.html"); 173 for (std::set<std::string>::const_iterator i = stats.authors().begin(); 174 i!=stats.authors().end(); ++i) { 175 mkdir(*i); 176 touch(std::string(*i+"/index.html")); 177 } 178 try { 179 tree->print(option->verbose()); 180 } 181 catch (const std::runtime_error& x) { 182 std::cerr << "svndigest: " << x.what() << std::endl; 183 exit(-1); 184 } 183 185 } 184 186
Note: See TracChangeset
for help on using the changeset viewer.