Updating my March 8, 2006 patch to the latest trunk.
I see that the latest script can include URLs with the messages.
I believe the URL enhancment does not conflict with this patch.
[[[
Fix issue #2499: configurable subject line in email notifications
* tools/hook-scripts/mailer/mailer.py
(top doc string): Document that the lock/unlock logging reads
paths from stdin.
(global scope): Fail safely when the older Subversion library is
detected.
(OutputBase.make_subject): Format the subject line according to
the subject_format parameter.
(OutputBase.run): Accept an optional parameter which is a
function to write the output with.
(MailedOutput.write_nop): New function suppressing output when
to_addr is empty. This enables a for_path negative match.
(SMTPOutput.start): Return early on empty to_addr.
(SMTPOutput.finish): Likewise.
(StandardOutput): Derive from MailedOutput to share the message
suppression logic in case of empty to_addr.
(StandardOutput.__init__): Delete. I believe the ancestor's
__init__ will be called automatically.
(StandardOutput.start): Return early on empty to_addr. Display
to_addr otherwise. This is useful in testing.
(PipeOutput.start,
PipeOutput.finish): Likewise.
(PropChange.generate, Lock.generate, TextCommitRenderer.render):
Compose the body of notification based on the body_format
parameter.
(TextCommitRenderer._render_list,
TextCommitRenderer._render_diffs): Accept the write function
parameter.
(generate_content): Pass the body_format parameter to the commit
renderer, along with the configuration and current group.
(format_body): New function. Produces the text of the message
body based on the configuration parameter body_format.
(generate_list): Use a global static dictionary which is
initialized depending on Subversion's version. (I could not
emulate the "Replaced:" selection with the older Subversion).
(Config.get): Ignore erroneous keys when expanding parameters.
The complete value will remain unexpanded. Expand
backslash-encoded newlines.
(__main__.usage): Indicate values expected from standard input.
(__main__): Fall back to the raw repoditory path when path
canonicalization is not implemented.
* tools/hook-scripts/mailer/mailer.conf.example
Set a restrictive default for_paths to show only changes
matching user-defined groups. Comment on configuring
subject_format and body_format.
* tools/hook-scripts/mailer/mailer-t1.output
Add the new "To:" headers introduced by this patch. Adjust to
this patch stripping subject lines. I kept the "Replaced:" line
that is missing in the output produced with this patch because I
consider this a deficiency in the patch, not in the expected
output.
* tools/hook-scripts/mailer/mock-sendmail
New file. This script shows parameters and standard input
submitted to it. It is useful for testing actual emailing by
setting mail_command. Add examples of user-defined groups and
"negative match" groups.
]]]
--
Ilguiz
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 16 22:32:39 2007