Changeset 1451


Ignore:
Timestamp:
Dec 22, 2011, 5:41:30 AM (9 years ago)
Author:
Peter Johansson
Message:

add ignore_revs variable to CopyrightStats? interface, refs #387

Location:
trunk/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/CopyrightStats.cc

    r1438 r1451  
    4040namespace svndigest {
    4141
     42  using yat::utility::SegmentSet;
     43
    4244  CopyrightStats::CopyrightStats(const std::string& path, bool ignore_cache,
    43                                  const std::map<int, svn_revnum_t>& year2rev)
     45                                 const std::map<int, svn_revnum_t>& year2rev,
     46                                 const SegmentSet<svn_revnum_t>& ignore_revs)
    4447    : path_(path)
    4548  {
  • trunk/lib/CopyrightStats.h

    r1376 r1451  
    2525#include "Alias.h"
    2626
     27#include "yat/SegmentSet.h"
     28
    2729#include <subversion-1/svn_types.h>
    2830
     
    3133#include <string>
    3234
    33 namespace theplu{
    34 namespace svndigest{
     35namespace theplu {
     36namespace svndigest {
    3537
    3638  /**
     
    4345     */
    4446    CopyrightStats(const std::string& path, bool ignore_cache,
    45                    const std::map<int, svn_revnum_t>& year2rev);
     47                   const std::map<int, svn_revnum_t>& year2rev,
     48                   const yat::utility::SegmentSet<svn_revnum_t>& ignore_revs);
    4649
    4750    const std::map<int, std::set<std::string> >& map(void) const;
  • trunk/lib/CopyrightVisitor.cc

    r1449 r1451  
    128128    if (verbose_)
    129129      std::cout << "Parsing '" << file.path() << "'\n";
    130     CopyrightStats stats(file.path(), ignore_cache_, year2rev_);
     130    const yat::utility::SegmentSet<svn_revnum_t>& ignore_revs =
     131      file.property().svncopyright_ignore_rev();
     132    CopyrightStats stats(file.path(), ignore_cache_, year2rev_, ignore_revs);
    131133    const std::map<int, std::set<std::string> >& year2users = stats.map();
    132134    assert(!year2users.empty());
     
    192194      return;
    193195    update_copyright(file);
    194 
    195     //file.parse(verbose_, ignore_cache_);
    196     //update_copyright(file);
    197     //file.stats().reset();
    198196  }
    199197
  • trunk/lib/CopyrightVisitor.h

    r1376 r1451  
    2626#include "NodeVisitor.h"
    2727
     28#include "yat/SegmentSet.h"
     29
    2830#include <subversion-1/svn_types.h>
    2931
     
    5052
    5153    /**
    52        \return false if dir.ignore or dir.svncopyright_ignore
     54       \return false if dir.svncopyright_ignore
    5355     */
    5456    bool enter(Directory& dir);
     
    6062
    6163    /**
    62        Updating copyright in \a file 
     64       Updating copyright in \a file
    6365     */
    6466    void visit(File& file);
Note: See TracChangeset for help on using the changeset viewer.