Changeset 247 for branches


Ignore:
Timestamp:
Apr 29, 2007, 12:53:22 AM (16 years ago)
Author:
Peter Johansson
Message:

mergin trunk into branches/test-suite

Location:
branches/test-suite
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/test-suite/ChangeLog

    r192 r247  
    2222======================================================================
    2323
    24 
     24version 0.6:
     25  - Removed option flag '-rev'
     26 
    2527version 0.5:
    2628  - Updated documentation.
  • branches/test-suite/bin/Parameter.cc

    r234 r247  
    7373        }
    7474      }
    75       else if (myargv=="-rev" || myargv=="--revisions") {
     75      else if (myargv=="--revisions") {
    7676          revisions_=true;
    7777          ok=true;
     
    135135    // return back to cwd
    136136    if (chdir(workdir.c_str()))
    137       runtime_error(string("svndigest: Failed to access cwd: ") + workdir);
    138 
    139     if (config_file_.empty())
    140       runtime_error(string("svndigest: Parameter --config-file requires argument."));
    141 
     137      throw runtime_error(string("svndigest: Failed to access cwd: ") + workdir);
     138
     139  }
     140
     141
     142  std::string Parameter::config_file(void) const
     143  {
     144    // not default
     145    if (!config_file_.empty())
     146      return config_file_;
     147   
     148    // default behaviour
     149    return root()+"/.svndigest/config";
    142150  }
    143151
     
    145153  void Parameter::defaults(void)
    146154  {
    147     config_file_ = getenv("HOME")+"/.svndigest/config";
     155    config_file_ = "";
    148156    copyright_=false;
    149157    force_=false;
     
    163171    cs.width(0)=68;
    164172    cs.margin(0)=2;
    165     ColumnStream cs2(std::cout, 3);
     173    ColumnStream cs2(std::cout, 2);
    166174    cs2.width(0)=24;
    167     cs2.width(1)=2;
    168     cs2.width(2)=50;
     175    cs2.width(2)=52;
    169176    cs2.margin(0)=2;
    170177
     
    180187    std::cout << "\nValid options:\n";
    181188
    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 "
     189    cs2  << "    --copyright\tupdate copyright statement\n"
     190         << "    --config-file=ARG\tconfiguration file "
     191         << "[<ROOT>/.svndigest/config]\n"
     192         << "-f, --force\tremove target directory/file if it exists "
     193         << "NOTE recursive delete.\n"
     194         << "-g, --generate-config\twrite configuration file "
    188195         << "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 "
     196         << "-h, --help\tdisplay this help and exit\n"
     197         << "-r, --root=ROOT\tsvn controlled directory to perform "
    191198         << "statistics calculation on [" << root_ << "]\n"
    192          << "-rev [--revisions]\t:\tUse revision numbers as time scale "
     199         << "    --revisions\tUse revision numbers as time scale "
    193200         << "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";
     201         << "-t, --target=TARGET\toutput directory [" << targetdir_ << "]\n"
     202         << "-v, --verbose\texplain what is being done\n"
     203         << "    --version\tprint version information and exit\n";
    197204    std::cout << std::endl;
    198205  }
  • branches/test-suite/bin/Parameter.h

    r229 r247  
    3636  public:
    3737    Parameter(const int argc,const char *argv[]);
    38     inline std::string config_file(void) const { return config_file_; }
     38    std::string config_file(void) const;
    3939    inline bool copyright(void) const { return copyright_; }
    4040    /// @todo
  • branches/test-suite/lib/Directory.cc

    r235 r247  
    171171    os << "../../";
    172172    if (user=="all")
    173       os << stats_.plot(imagedir+"/index.png", local_path(),line_type);
     173      os << stats_.plot(imagedir+"/index.png", line_type);
    174174    else
    175175      os << imagedir << "/index.png";
     
    182182    os << "<th>Code</th>\n";
    183183    os << "<th>Comments</th>\n";
    184     os << "<th>Empty</th>\n";
     184    os << "<th>Other</th>\n";
    185185    os << "<th>Revision</th>\n";
    186186    os << "<th>Author</th>\n";
  • branches/test-suite/lib/File.cc

    r235 r247  
    7474    os << "../../";
    7575    if (user=="all")
    76       os << stats_.plot(imagefile, local_path(),line_type);
     76      os << stats_.plot(imagefile,line_type);
    7777    else
    7878      os << imagefile;
  • branches/test-suite/lib/Makefile.am

    r237 r247  
    2626noinst_LTLIBRARIES = libsvndigest.la
    2727
    28 noinst_HEADERS = ColumnStream.h Configuration.h
     28noinst_HEADERS = ColumnStream.h Configuration.h \
    2929  Date.h Directory.h File.h Gnuplot.h GnuplotFE.h \
    3030  HtmlStream.h html_utility.h Node.h Parser.h rmdirhier.h \
  • branches/test-suite/lib/Stats.cc

    r213 r247  
    157157
    158158  std::string Stats::plot(const std::string& filename,
    159                           const std::string& title,
    160159                          const std::string& linetype) const
    161160  {
     
    163162    gp->command("set term png");
    164163    gp->command("set output '"+filename+"'");
    165     gp->command("set title '"+title+"'");
    166164    gp->command("set xtics nomirror");
    167165    gp->command("set ytics nomirror");
  • branches/test-suite/lib/Stats.h

    r209 r247  
    9797    /// Create statistics graph.
    9898    ///
    99     std::string plot(const std::string&, const std::string&,
    100                      const std::string&) const;
     99    std::string plot(const std::string&, const std::string&) const;
    101100
    102101    ///
  • branches/test-suite/lib/html_utility.cc

    r235 r247  
    366366    else
    367367      os << "<li>";
    368     os << anchor(user+"/empty/"+path, "Empty", level,
     368    os << anchor(user+"/empty/"+path, "Other", level,
    369369                 "View statistics of empty lines");
    370370    os << "</li>"
Note: See TracChangeset for help on using the changeset viewer.