Changeset 1136 for trunk


Ignore:
Timestamp:
Jul 18, 2010, 9:18:58 PM (11 years ago)
Author:
Peter Johansson
Message:

fixes #329. config option to exclude pages for files in report (only output directories).

Location:
trunk/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Configuration.cc

    r1135 r1136  
    197197          else if (equal_true(rhs))
    198198            output_blame_information_ = true;
     199          else {
     200            throw Config_error(line, "");
     201          }
     202        }
     203        else if (lhs=="file") {
     204          if (equal_false(rhs))
     205            output_file_ = false;
     206          else if (equal_true(rhs))
     207            output_file_ = true;
    199208          else {
    200209            throw Config_error(line, "");
     
    496505    image_anchor_format_ = "png";
    497506    output_blame_information_ = true;
     507    output_file_ = true;
    498508  }
    499509
     
    502512  {
    503513    return output_blame_information_;
     514  }
     515
     516
     517  bool Configuration::output_file(void) const
     518  {
     519    return output_file_;
    504520  }
    505521
     
    536552       << "blame-information = ";
    537553    if (conf.output_blame_information())
     554      os << "yes\n";
     555    else
     556      os << "no\n";
     557    os << "# if true report will have pages for files and not only "
     558       << "directories.\n"
     559       << "file = ";
     560    if (conf.output_file())
    538561      os << "yes\n";
    539562    else
  • trunk/lib/Configuration.h

    r1133 r1136  
    108108     */
    109109    bool output_blame_information(void) const;
     110
     111    /**
     112       \return true (default) if we wanna output stats for file
     113     */
     114    bool output_file(void) const;
    110115
    111116    ///
     
    172177    std::string image_format_;
    173178    bool output_blame_information_;
     179    bool output_file_;
    174180    std::string trac_root_;
    175181  };
  • trunk/lib/Node.cc

    r978 r1136  
    2323#include "Node.h"
    2424
     25#include "Configuration.h"
    2526#include "Date.h"
    2627#include "HtmlStream.h"
     
    104105    // there is no output for nodes when user has zero contribution
    105106    else if (user!="all" && !stats.lines(user))
     107      os << name();
     108    else if (!Configuration::instance().output_file() && !this->dir())
    106109      os << name();
    107110    else
     
    195198  {
    196199    if (ignore())
     200      return;
     201    if (!Configuration::instance().output_file() && !this->dir())
    197202      return;
    198203    if (verbose)
Note: See TracChangeset for help on using the changeset viewer.