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| |
# HACK: put all file names at mail subject |
750 |
unless file.repository == last_repository |
$fileEntries.each do |file| |
751 |
last_repository = file.repository |
name = htmlEncode(file.name_after_common_prefix) |
752 |
file = #{htmlEncode(last_repository.common_prefix)} |
if all_files == nil |
753 |
all_files = all_files + " " + file |
all_files = name |
754 |
end |
else |
755 |
|
all_files = all_files + ";" + name |
756 |
end |
end |
757 |
mailSubject = "#{$subjectPrefix} all_files #{$mailSubject}" |
end |
758 |
|
|
759 |
|
mailSubject = "#{$subjectPrefix} #{all_files} #{$mailSubject}" |
760 |
if mailSubject.length > $maxSubjectLength |
if mailSubject.length > $maxSubjectLength |
761 |
mailSubject = mailSubject[0, $maxSubjectLength] |
mailSubject = mailSubject[0, $maxSubjectLength] |
762 |
end |
end |
856 |
end |
end |
857 |
lastPath = thisPath |
lastPath = thisPath |
858 |
end |
end |
859 |
|
if all_files == nil |
860 |
|
all_files = name |
861 |
|
else |
862 |
|
all_files = all_files + " " + name |
863 |
|
end |
864 |
if file.addition? |
if file.addition? |
865 |
name = "<span id=\"added\">#{name}</span>" |
name = "<span id=\"added\">#{name}</span>" |
866 |
elsif file.removal? |
elsif file.removal? |
902 |
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>") |
903 |
end |
end |
904 |
|
|
905 |
mail.puts("</tr>") |
mail.puts("</tr>") |
906 |
end |
end |
907 |
|
|
908 |
if $fileEntries.size>1 |
if $fileEntries.size>1 |
909 |
# give total number of lines added/removed accross all files |
# give total number of lines added/removed accross all files |
910 |
mail.print("<tr><td> </td>") |
mail.print("<tr><td> </td>") |
972 |
mail.puts("</body></html>") |
mail.puts("</body></html>") |
973 |
|
|
974 |
end |
end |
975 |
|
|