/[cvs]/jonen/ruby/CVSspam/cvsspam.rb
ViewVC logotype

Diff of /jonen/ruby/CVSspam/cvsspam.rb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by jonen, Sun Jan 19 01:03:31 2003 UTC revision 1.12 by jonen, Sun Jan 19 01:42:21 2003 UTC
# Line 727  $handlers["M"].setTagHandler(tagHandler) Line 727  $handlers["M"].setTagHandler(tagHandler)
727    
728  $fileEntries = Array.new  $fileEntries = Array.new
729  $todoList = Array.new  $todoList = Array.new
 all_files = ""  
730    
731  File.open("#{$logfile}.emailtmp", File::RDWR|File::CREAT|File::TRUNC) do |mail|  File.open("#{$logfile}.emailtmp", File::RDWR|File::CREAT|File::TRUNC) do |mail|
732    
# Line 748  if $subjectPrefix == nil Line 747  if $subjectPrefix == nil
747    $subjectPrefix = "[CVS #{Repository.array.join(',')}]"    $subjectPrefix = "[CVS #{Repository.array.join(',')}]"
748  end  end
749  # HACK: put all file names at mail subject  # HACK: put all file names at mail subject
750    all_files = ""
751  $fileEntries.each do |file|  $fileEntries.each do |file|
752    name = htmlEncode(file.name_after_common_prefix)    name = htmlEncode(file.name_after_common_prefix)
753    if all_files == nil    if all_files != ""
     all_files = name  
   else  
754      all_files = all_files + ";" + name      all_files = all_files + ";" + name
755      else
756        all_files = name
757    end    end
758  end  end
759    
760  mailSubject = "#{$subjectPrefix} #{all_files} #{$mailSubject}"  mailSubject = "#{$subjectPrefix} #{all_files}: #{$mailSubject}"
761  if mailSubject.length > $maxSubjectLength  if mailSubject.length > $maxSubjectLength
762    mailSubject = mailSubject[0, $maxSubjectLength]    mailSubject = mailSubject[0, $maxSubjectLength]
763  end  end
# Line 973  HEAD Line 973  HEAD
973    mail.puts("</body></html>")    mail.puts("</body></html>")
974    
975  end  end
976    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.12

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed