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
(top doc string): Document that the lock/unlock logging reads
paths from stdin.
(global scope): Fail safely when the older Subversion library is
(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.
(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.
(PropChange.generate, Lock.generate, TextCommitRenderer.render):
Compose the body of notification based on the body_format
TextCommitRenderer._render_diffs): Accept the write function
(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
(__main__.usage): Indicate values expected from standard input.
(__main__): Fall back to the raw repoditory path when path
canonicalization is not implemented.
Set a restrictive default for_paths to show only changes
matching user-defined groups. Comment on configuring
subject_format and body_format.
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
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.
Received on Fri Nov 16 22:32:39 2007
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org