Changeset 234 for trunk/bin/Parameter.cc


Ignore:
Timestamp:
Apr 9, 2007, 2:08:26 PM (14 years ago)
Author:
Peter Johansson
Message:

fixes #87 and #95 and #103 and #104 and #80 and #108, and refs #69

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/Parameter.cc

    r229 r234  
    2424
    2525#include "Parameter.h"
     26
     27#include "ColumnStream.h"
    2628#include "utility.h"
    2729#include <config.h> // this header file is created by configure
     
    4345      bool ok=false;
    4446      std::string myargv(argv[i]);
    45       if (myargv=="-c" || myargv=="--config"){
     47      if (myargv=="--config-file"){
    4648        if (++i<argc){
    4749          config_file_= std::string(argv[i]);
     
    136138
    137139    if (config_file_.empty())
    138       runtime_error(string("svndigest: Parameter --config requires argument."));
     140      runtime_error(string("svndigest: Parameter --config-file requires argument."));
    139141
    140142  }
     
    157159  {
    158160    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;
    188198  }
    189199
Note: See TracChangeset for help on using the changeset viewer.