Ignore:
Timestamp:
Oct 23, 2010, 6:41:33 PM (11 years ago)
Author:
Peter Johansson
Message:

refs #476. Merged visitor branch into trunk. Used 'svn merge /branches/visitor' because --reintegrate did (currently) not work on our repo. Since I could not merge as suggested in subversion manual, I reverted all mergeinfo properties to avoid future confusion by svn-client. This means (I think) that there will be no connection about this commit and the visitor branch, but to svn-client this will look like a large changeset (just like a merge in the old days).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Directory.cc

    r1186 r1234  
    2727#include "html_utility.h"
    2828#include "Node.h"
     29#include "NodeVisitor.h"
    2930#include "SVN.h"
    3031#include "SVNlog.h"
     32#include "TinyStats.h"
    3133#include "utility.h"
    3234
     
    99101  }
    100102
     103
     104  void Directory::collect_stats(void)
     105  {
     106    stats_.reset();
     107    for (NodeIterator i=daughters_.begin(); i!=daughters_.end(); ++i)
     108      if (!(*i)->ignore()) {
     109        stats_ += (*i)->stats();
     110        (*i)->stats().reset();
     111      }
     112  }
     113
     114
    101115  bool Directory::dir(void) const
    102116  {
    103117    return true;
    104118  }
     119
    105120
    106121  std::string Directory::href(void) const
     
    139154  {
    140155    stats_.reset();
    141     // Directories themselved give no contribution to statistics.
     156    assert(0 && "we are not using this function, are we?");
     157    /*
    142158    for (NodeIterator i=daughters_.begin(); i!=daughters_.end(); ++i)
    143159      if (!(*i)->ignore())
    144160        stats_ += (*i)->parse(verbose, ignore);
     161    */
    145162    return stats_;
    146163  }
     
    149166  void Directory::print_core(const bool verbose) const
    150167  {
    151     mkdir("blame_output/" + local_path());
     168    //mkdir("blame_output/" + local_path());
    152169    // print daughter nodes
    153     for (NodeConstIterator i=daughters_.begin(); i!=daughters_.end(); ++i)
    154       (*i)->print(verbose);
     170    //for (NodeConstIterator i=daughters_.begin(); i!=daughters_.end(); ++i)
     171    //  (*i)->print(verbose);
    155172  }
    156173
     
    169186      outdir   += "/"+local_path();
    170187    }
    171     mkdir(outdir);
     188    mkdir_p(outdir);
    172189    if (user=="all")
    173       mkdir(imagedir);
     190      mkdir_p(imagedir);
    174191    std::string html_name = outdir+"/index.html";
    175192    std::ofstream os(html_name.c_str());
     
    278295  }
    279296
     297
     298  void Directory::traverse(NodeVisitor& visitor)
     299  {
     300    visitor.enter(*this);
     301    for (NodeIterator first=daughters_.begin(), end=daughters_.end();
     302         first!=end; ++first)
     303      (*first)->traverse(visitor);
     304    visitor.leave(*this);
     305  }
     306
     307
    280308}} // end of namespace svndigest and namespace theplu
Note: See TracChangeset for help on using the changeset viewer.