Changeset 1449
- Timestamp:
- Dec 22, 2011, 3:11:55 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/CacheCopyer.cc
r1321 r1449 42 42 bool CacheCopyer::enter(Directory& dir) 43 43 { 44 if (dir. ignore())44 if (dir.svndigest_ignore() && dir.svncopyright_ignore()) 45 45 return false; 46 46 … … 61 61 void CacheCopyer::visit(File& file) 62 62 { 63 if (file. ignore())63 if (file.svndigest_ignore() && file.svncopyright_ignore()) 64 64 return; 65 65 std::string src_file = file.cache_name(); -
trunk/lib/CopyrightVisitor.cc
r1437 r1449 103 103 bool CopyrightVisitor::enter(Directory& dir) 104 104 { 105 if (dir. ignore() || dir.svncopyright_ignore())105 if (dir.svncopyright_ignore()) 106 106 return false; 107 107 return true; … … 189 189 void CopyrightVisitor::visit(File& file) 190 190 { 191 if (file. ignore() || file.svncopyright_ignore())191 if (file.svncopyright_ignore()) 192 192 return; 193 193 update_copyright(file); -
trunk/lib/Directory.cc
r1435 r1449 94 94 stats_.reset(); 95 95 for (NodeIterator i=daughters_.begin(); i!=daughters_.end(); ++i) 96 if (!(*i)-> ignore()) {96 if (!(*i)->svndigest_ignore()) { 97 97 stats_ += (*i)->stats(); 98 98 (*i)->stats().reset(); -
trunk/lib/Node.cc
r1356 r1449 73 73 74 74 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(); 78 78 assert(log().commits().size()); 79 79 return log().latest_commit().author(); … … 149 149 { 150 150 if (!log_) { 151 if ( ignore())151 if (svndigest_ignore()) 152 152 log_ = new SVNlog; 153 153 else { … … 180 180 bool Node::svncopyright_ignore(void) const 181 181 { 182 return property_.svncopyright_ignore() ;182 return property_.svncopyright_ignore() || binary() || link_; 183 183 } 184 184 … … 186 186 bool Node::svndigest_ignore(void) const 187 187 { 188 return property_.svndigest_ignore() ;188 return property_.svndigest_ignore() || binary() || link_; 189 189 } 190 190 -
trunk/lib/Node.h
r1356 r1449 99 99 100 100 /** 101 @brief Check whether node should be ignored in statistics.102 103 If a node is to be ignored the statistics implementer should104 respect this state. Currently binary files and items with105 property svndigest:ignore are to be ignored by svndigest. If106 the node is a directory then the direcotry and its siblings107 should be ignored by statistics.108 109 @return True of node should be ignored by statistics.110 111 @see SVNproperty::svndigest_ingorable112 */113 inline bool ignore(void) const114 { return binary() || svndigest_ignore() || link_; }115 116 /**117 101 Create the TinyStats based on the stored CollectionStats 118 102 */ … … 158 142 159 143 /** 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() 168 154 */ 169 155 bool svndigest_ignore(void) const; -
trunk/lib/NodeCounter.cc
r1254 r1449 41 41 bool NodeCounter::enter(Directory& dir) 42 42 { 43 if (dir. ignore())43 if (dir.svndigest_ignore()) 44 44 return false; 45 45 ++directories_; … … 61 61 void NodeCounter::visit(File& file) 62 62 { 63 if (!file. ignore())63 if (!file.svndigest_ignore()) 64 64 ++files_; 65 65 } -
trunk/lib/NodePrinter.cc
r1435 r1449 86 86 void NodePrinter::print(const bool verbose) const 87 87 { 88 if (node(). ignore())88 if (node().svndigest_ignore()) 89 89 return; 90 90 if (!Configuration::instance().output_file() && !node().dir()) -
trunk/lib/SvndigestVisitor.cc
r1423 r1449 39 39 bool SvndigestVisitor::enter(Directory& dir) 40 40 { 41 if (dir. ignore())41 if (dir.svndigest_ignore()) 42 42 return false; 43 43 return true; … … 58 58 void SvndigestVisitor::visit(File& file) 59 59 { 60 if (!file. ignore())60 if (!file.svndigest_ignore()) 61 61 file.parse(verbose_, ignore_cache_); 62 62 if (report_) { 63 63 file.init_tiny_stats(); 64 if (!file. ignore()) {64 if (!file.svndigest_ignore()) { 65 65 FilePrinter fp(file); 66 66 fp.print(verbose_); -
trunk/test/copyright2_test.sh
r1266 r1449 31 31 $SVN update $rootdir -r 45 32 32 $SVN update $rootdir/lib 33 # to get svncopyright:ignore property 34 $SVN update $rootdir/dir_to_be_ignored -r 71 33 35 # cannot use old config file because it's invalid 34 36 $SVN update $rootdir/.svndigest 35 37 36 38 SVNCOPYRIGHT_run 0 -r $rootdir --ignore-cache --verbose 37 rm -rf $rootdir38 39 39 40 $GREP '^Parsing.*dir_to_be_ignored' stdout && exit_fail 40 41 42 rm -rf $rootdir 41 43 exit_success; -
trunk/test/repo/db/current
r1182 r1449 1 7 0 2z41 71 31 4
Note: See TracChangeset
for help on using the changeset viewer.