Create a new send() method on OutputBase to wrap up the construction
of messages, with a long-format and a short-format fallback.

* tools/hook-scripts/mailer/mailer.py:
  (OutputBase.send): new method to pull together the start/finish on
    SELF, and use of the WRITER. This incorporates the new
    MessageTooLarge exception to fall back to a shorter message
    generation function.
  (Commit.generate): move message generation into a new long_commit()
    local function, and use .send() to build/send a message. Switch to
    using FAILED rather than RET.
  (PropChange.generate): similar to above, with long_propchange()
  (Lock.generate): similar to above, with long_lock()
  (class MessageTooLarge): new exception for when a generated message
    becomes too large, and a fallback to a short message is needed.
    This is caught in OutputBase.send(), but not (yet) raised.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1914899 13f79535-47bb-0310-9956-ffa450edef68
1 file changed