We're using CVSspam utility which is plugged as post-commit hook into CVS and sends nice emails with summary of changes and internal links to dev team.
And, we're also using Perl's AutoSplit heavily and commit .al files to repository (yep, we're going to change this later ;)). So, after changing single .pm module the reports contain tons of duplicates: first, they contain the same changes in corresponding .al files. What is worse, most of other .al files get mofidied as well, because of line renumbering.
So, i've fixed CVSspam a little, so it could exclude certain files from reports.
Add this to svsspam.conf:
# file masks, separated by whitespace: $ignore_files = "*.al" # or, for example: $ignore_files = "*.al *.gif"
And the patch itself:
--- ../cvsspam-0.2.12/collect_diffs.rb 2005-07-11 18:53:29.000000000 +0300 +++ collect_diffs.rb 2009-10-15 19:47:17.000000000 +0300 @@ -27,4 +27,8 @@
$dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}" +def shell_mask2regex(mask) + '^' + mask.gsub('.', '\.').gsub('?', '.').gsub('*', '.*') + '$' +end + def find_data_dir
Dir["#{$tmpdir}/#{$dirtemplate}-*"].each do |dir|
@@ -195,4 +199,6 @@
changes.each do |change|
+ next if $ignore_file_regexes and $ignore_file_regexes.any?{|r| change.file =~ /#{r}/} + # record version information file.puts "#V #{change.fromVer},#{change.toVer}" @@ -338,4 +344,5 @@
$diff_ignore_keywords = false $task_keywords = [] +$ignore_file_regexes = nil unless ENV.has_key?('CVSROOT') @@ -427,4 +433,7 @@
end load $config
+ if $ignore_files
+ $ignore_file_regexes = $ignore_files.split(/\s+/).map{|i| shell_mask2regex(i)} + end else blah("Config file '#{$config}' not found, ignoring")

Leave a comment