+++ /dev/null
-Index: cvsspam.rb
-===================================================================
---- cvsspam.rb (revision 229)
-+++ cvsspam.rb (working copy)
-@@ -671,6 +671,12 @@
- def diff(file)
- '->'
- end
-+
-+ # may be overridden by subclasses that are able to make a hyperlink to a
-+ # history log for a file
-+ def log(file)
-+ ''
-+ end
- end
-
- # Superclass for objects that can link to CVS frontends on the web (ViewCVS,
-@@ -711,6 +717,14 @@
- "<a href=\"#{diff_url(file)}\">#{super(file)}</a>"
- end
-
-+ def log(file)
-+ link = log_url(file)
-+ if link
-+ return "<span id=\"info\">(<a href=\"#{link}\">log</a>)</span>"
-+ end
-+ return nil
-+ end
-+
- protected
- def add_repo(url)
- if @repository_name
-@@ -723,6 +737,10 @@
- url
- end
- end
-+
-+ def log_url(file)
-+ nil
-+ end
- end
-
- # Link to ViewCVS
-@@ -781,6 +799,17 @@
- def diff_url(file)
- add_repo("#{@base_url}#{urlEncode(file.path)}.diff?r1=text&tr1=#{file.fromVer}&r2=text&tr2=#{file.toVer}&f=h")
- end
-+
-+ protected
-+
-+ def log_url(file)
-+ if file.toVer
-+ log_anchor = "#rev#{file.toVer}"
-+ else
-+ log_anchor = ""
-+ end
-+ add_repo("#{@base_url}#{urlEncode(file.path)}#{log_anchor}")
-+ end
- end
-
-
-@@ -1547,11 +1576,14 @@
- elsif file.removal?
- name = "<span id=\"removed\">#{name}</span>"
- end
-+ mail.print("<td>")
- if file.has_diff?
-- mail.print("<td><tt>#{prefix}<a href=\"#file#{file_count}\">#{name}</a></tt></td>")
-+ mail.print("<tt>#{prefix}<a href=\"#file#{file_count}\">#{name}</a></tt>")
- else
-- mail.print("<td><tt>#{prefix}#{name}</tt></td>")
-+ mail.print("<tt>#{prefix}#{name}</tt>")
- end
-+ mail.print(" #{$frontend.log(file)}")
-+ mail.print("</td>")
- if file.isEmpty
- mail.print("<td colspan=\"2\" align=\"center\"><small id=\"info\">[empty]</small></td>")
- elsif file.isBinary
+++ /dev/null
---- cvsspam/cvsspam.rb~ 2006-02-28 11:30:01.000000000 +0200
-+++ cvsspam/cvsspam.rb 2006-03-02 00:49:48.000000000 +0200
-@@ -546,6 +546,10 @@
- match =~ /([0-9]+)/
- "<a href=\"#{$ticketURL.sub(/%s/, $1)}\">#{match}</a>"
- }
-+issueSub = proc { |match|
-+ match =~ /([0-9]+)/
-+ "<a href=\"#{$issueURL.sub(/%s/, $1)}\">#{match}</a>"
-+}
- wikiSub = proc { |match|
- match =~ /\[\[(.*)\]\]/
- raw = $1
-@@ -1281,6 +1285,7 @@
- $wikiURL = nil
- $jiraURL = nil
- $ticketURL = nil
-+$issueURL = nil
- $viewcvsURL = nil
- $choraURL = nil
- $cvswebURL = nil
-@@ -1393,6 +1398,9 @@
- if $ticketURL != nil
- commentSubstitutions['\b[Tt][Ii][Cc][Kk][Ee][Tt]\s*#?[0-9]+\b'] = ticketSub
- end
-+if $issueURL != nil
-+ commentSubstitutions['\b[Ii][Ss][Ss][Uu][Ee]\s*#?[0-9]+\b'] = issueSub
-+end
- if $wikiURL != nil
- commentSubstitutions['\[\[.+\]\]'] = wikiSub
- end
+++ /dev/null
-Index: cvsspam.rb
-===================================================================
---- cvsspam.rb (revision 231)
-+++ cvsspam.rb (working copy)
-@@ -1301,6 +1301,7 @@
- # 2MiB limit on attached diffs,
- $mail_size_limit = 1024 * 1024 * 2
- $arg_charset = nil
-+$cvsroot_email_header = false
-
- require 'getoptlong'
-
-@@ -1735,6 +1736,8 @@
- # sensible header formatting, and for ensuring that the body is seperated
- # from the message headers by a blank line (as it is required to be).
- class MailContext
-+ ENCODE_HEADERS = ["Subject", "X-CVSspam-Module-Path"]
-+
- def initialize(io)
- @done_headers = false
- @io = io
-@@ -1744,8 +1747,8 @@
- # called
- def header(name, value)
- raise "headers already commited" if @done_headers
-- if name == "Subject"
-- $encoder.encode_header(@io, "Subject", value)
-+ if ENCODE_HEADERS.include?(name)
-+ $encoder.encode_header(@io, name, value)
- else
- @io.puts("#{name}: #{value}")
- end
-@@ -1883,6 +1886,14 @@
- end
- end
- mail.header("X-Mailer", "CVSspam #{$version} <http://www.badgers-in-foil.co.uk/projects/cvsspam/>")
-+ if $cvsroot_email_header
-+ mod = '/'
-+ if Repository.count == 1
-+ rep = Repository.array.first
-+ mod << "#{rep.common_prefix}"
-+ end
-+ mail.header("X-CVSspam-Module-Path", mod)
-+ end
-
- mail.body do |body|
- make_html_email(body)
+++ /dev/null
---- cvsspam.rb 2005-07-26 17:17:23.000000000 +0100
-+++ cvsspam.rb-fix 2005-07-26 17:17:18.000000000 +0100
-@@ -116,6 +116,8 @@
- UNDERSCORE = chr("_")
- SPACE = chr(" ")
- TAB = chr("\t")
-+ HOOK = chr("?")
-+ EQUALS = chr("=")
-
- # encode a header value according to the RFC-2047 quoted-printable spec,
- # allowing non-ASCII characters to appear in header values, and wrapping
-@@ -137,7 +139,7 @@
- # return a string representing the given character-code in quoted-printable
- # format
- def quoted_encode_char(b)
-- if b>126 || b==UNDERSCORE || b==TAB
-+ if b>126 || b==UNDERSCORE || b==TAB || b==HOOK || b==EQUALS
- sprintf("=%02x", b)
- elsif b == SPACE
- "_"