/[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.5 by jonen, Sat Jan 18 23:58:36 2003 UTC revision 1.13 by jonen, Sun Jan 19 01:51:41 2003 UTC
# Line 746  end Line 746  end
746  if $subjectPrefix == nil  if $subjectPrefix == nil
747    $subjectPrefix = "[CVS #{Repository.array.join(',')}]"    $subjectPrefix = "[CVS #{Repository.array.join(',')}]"
748  end  end
749    $fileEntries.each do |file|  
750      unless file.repository == $subjectPrefix  # HACK: put all file names at mail subject
751        last_repository = file.repository  all_files = ""
752        file = #{htmlEncode(last_repository.common_prefix)}  $fileEntries.each do |file|
753        all_files = all_files + " " + file    name = htmlEncode(file.name_after_common_prefix)
754      end    if all_files != ""
755        all_files = all_files + ";" + name + ":"
756      else
757        all_files = name + ":"
758    end    end
759  mailSubject = all_files  end
760  mailSubject = "#{$subjectPrefix} #{$mailSubject}"  
761    mailSubject = "#{$subjectPrefix} #{all_files} #{$mailSubject}"
762  if mailSubject.length > $maxSubjectLength  if mailSubject.length > $maxSubjectLength
763    mailSubject = mailSubject[0, $maxSubjectLength]    mailSubject = mailSubject[0, $maxSubjectLength]
764  end  end
# Line 854  HEAD Line 858  HEAD
858        end        end
859        lastPath = thisPath        lastPath = thisPath
860      end      end
861        if all_files == nil
862          all_files = name
863        else
864          all_files = all_files + " " + name
865        end
866      if file.addition?      if file.addition?
867        name = "<span id=\"added\">#{name}</span>"        name = "<span id=\"added\">#{name}</span>"
868      elsif file.removal?      elsif file.removal?
# Line 895  HEAD Line 904  HEAD
904        mail.print("<td align=\"center\">#{viewcvsFile(file.path,file.fromVer)} #{viewcvsDiff(file)} #{viewcvsFile(file.path,file.toVer)}</td>")        mail.print("<td align=\"center\">#{viewcvsFile(file.path,file.fromVer)} #{viewcvsDiff(file)} #{viewcvsFile(file.path,file.toVer)}</td>")
905      end      end
906    
907      mail.puts("</tr>")      mail.puts("</tr>")    
908    end    end
909      
910    if $fileEntries.size>1    if $fileEntries.size>1
911      # give total number of lines added/removed accross all files      # give total number of lines added/removed accross all files
912      mail.print("<tr><td>&nbsp;</td>")      mail.print("<tr><td>&nbsp;</td>")
# Line 964  HEAD Line 974  HEAD
974    mail.puts("</body></html>")    mail.puts("</body></html>")
975    
976  end  end
977    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.13

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