Changeset 1449


Ignore:
Timestamp:
Dec 22, 2011, 3:11:55 AM (12 years ago)
Author:
Peter Johansson
Message:

refs #387. svncopyright no longer listens to property
svndigest:ignore. New revision (71) in test repo where
svncopyright:ignore was added to dir_to_be ignored.

Location:
trunk
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/CacheCopyer.cc

    r1321 r1449  
    4242  bool CacheCopyer::enter(Directory& dir)
    4343  {
    44     if (dir.ignore())
     44    if (dir.svndigest_ignore() && dir.svncopyright_ignore())
    4545      return false;
    4646
     
    6161  void CacheCopyer::visit(File& file)
    6262  {
    63     if (file.ignore())
     63    if (file.svndigest_ignore() && file.svncopyright_ignore())
    6464      return;
    6565    std::string src_file = file.cache_name();
  • trunk/lib/CopyrightVisitor.cc

    r1437 r1449  
    103103  bool CopyrightVisitor::enter(Directory& dir)
    104104  {
    105     if (dir.ignore() || dir.svncopyright_ignore())
     105    if (dir.svncopyright_ignore())
    106106      return false;
    107107    return true;
     
    189189  void CopyrightVisitor::visit(File& file)
    190190  {
    191     if (file.ignore() || file.svncopyright_ignore())
     191    if (file.svncopyright_ignore())
    192192      return;
    193193    update_copyright(file);
  • trunk/lib/Directory.cc

    r1435 r1449  
    9494    stats_.reset();
    9595    for (NodeIterator i=daughters_.begin(); i!=daughters_.end(); ++i)
    96       if (!(*i)->ignore()) {
     96      if (!(*i)->svndigest_ignore()) {
    9797        stats_ += (*i)->stats();
    9898        (*i)->stats().reset();
  • trunk/lib/Node.cc

    r1356 r1449  
    7373
    7474  std::string Node::author(void) const
    75   { 
    76     if (ignore())
    77       return svninfo_.last_changed_author(); 
     75  {
     76    if (svndigest_ignore())
     77      return svninfo_.last_changed_author();
    7878    assert(log().commits().size());
    7979    return log().latest_commit().author();
     
    149149  {
    150150    if (!log_) {
    151       if (ignore())
     151      if (svndigest_ignore())
    152152        log_ = new SVNlog;
    153153      else {
     
    180180  bool Node::svncopyright_ignore(void) const
    181181  {
    182     return property_.svncopyright_ignore();
     182    return property_.svncopyright_ignore() || binary() || link_;
    183183  }
    184184
     
    186186  bool Node::svndigest_ignore(void) const
    187187  {
    188     return property_.svndigest_ignore();
     188    return property_.svndigest_ignore() || binary() || link_;
    189189  }
    190190
  • trunk/lib/Node.h

    r1356 r1449  
    9999
    100100    /**
    101        @brief Check whether node should be ignored in statistics.
    102 
    103        If a node is to be ignored the statistics implementer should
    104        respect this state. Currently binary files and items with
    105        property svndigest:ignore are to be ignored by svndigest. If
    106        the node is a directory then the direcotry and its siblings
    107        should be ignored by statistics.
    108 
    109        @return True of node should be ignored by statistics.
    110 
    111        @see SVNproperty::svndigest_ingorable
    112     */
    113     inline bool ignore(void) const
    114     { return binary() || svndigest_ignore() || link_; }
    115 
    116     /**
    117101       Create the TinyStats based on the stored CollectionStats
    118102     */
     
    158142
    159143    /**
    160        @brief Check if item used to create this object has been
    161        assigned property svndigest:ignore.
    162 
    163        Currently files with property svndigest:ignore are to be
    164        ignored by svndigest. It is the responsibility of the
    165        statistics implementer to obey the ignore state.
    166 
    167        @return True if item property svndigest:ignore was set.
     144       @brief Check if Node should be ignored by svndigest.
     145
     146       Binary files and links will be ignored as well as nodes with
     147       property svndigest:ignore set to "" as that implies that all
     148       revs should be ignored.
     149
     150       @return True if item property svndigest:ignore was set with
     151       empty string or node is binary or link.
     152
     153       \see SVNpropert::svndigest_ignore()
    168154    */
    169155    bool svndigest_ignore(void) const;
  • trunk/lib/NodeCounter.cc

    r1254 r1449  
    4141  bool NodeCounter::enter(Directory& dir)
    4242  {
    43     if (dir.ignore())
     43    if (dir.svndigest_ignore())
    4444      return false;
    4545    ++directories_;
     
    6161  void NodeCounter::visit(File& file)
    6262  {
    63     if (!file.ignore())
     63    if (!file.svndigest_ignore())
    6464      ++files_;
    6565  }
  • trunk/lib/NodePrinter.cc

    r1435 r1449  
    8686  void NodePrinter::print(const bool verbose) const
    8787  {
    88     if (node().ignore())
     88    if (node().svndigest_ignore())
    8989      return;
    9090    if (!Configuration::instance().output_file() && !node().dir())
  • trunk/lib/SvndigestVisitor.cc

    r1423 r1449  
    3939  bool SvndigestVisitor::enter(Directory& dir)
    4040  {
    41     if (dir.ignore())
     41    if (dir.svndigest_ignore())
    4242      return false;
    4343    return true;
     
    5858  void SvndigestVisitor::visit(File& file)
    5959  {
    60     if (!file.ignore())
     60    if (!file.svndigest_ignore())
    6161      file.parse(verbose_, ignore_cache_);
    6262    if (report_) {
    6363      file.init_tiny_stats();
    64       if (!file.ignore()) {
     64      if (!file.svndigest_ignore()) {
    6565        FilePrinter fp(file);
    6666        fp.print(verbose_);
  • trunk/test/copyright2_test.sh

    r1266 r1449  
    3131$SVN update $rootdir -r 45
    3232$SVN update $rootdir/lib
     33# to get svncopyright:ignore property
     34$SVN update $rootdir/dir_to_be_ignored -r 71
    3335# cannot use old config file because it's invalid
    3436$SVN update $rootdir/.svndigest
    3537
    3638SVNCOPYRIGHT_run 0 -r $rootdir --ignore-cache --verbose
    37 rm -rf $rootdir
    3839
    3940$GREP '^Parsing.*dir_to_be_ignored' stdout && exit_fail
    4041
     42rm -rf $rootdir
    4143exit_success;
  • trunk/test/repo/db/current

    r1182 r1449  
    1 70 2z 4
     171 31 4
Note: See TracChangeset for help on using the changeset viewer.