Implement a maximum message length; will be used for emails (SMTP,
Pipe outputs).

* tools/hook-scripts/mailer/mailer.py:
  (Writer.__init__): accept and save a MAXBYTES value.
  (Writer.write): introduce a new write_limited() local function to
    check if writing S will surpass the defined maximum length. Raise
    MessageTooLarge, when that happens. Return this new local function
    as a wrapper on the conditional _write() function.
  (OutputBase.send): pass a MAXBYTES value to the Writer() creation.
    ### TBD to fetch this from the configuration.
    Bugfix: must seek to the start of the buffer, after truncating it.
    Capture MessageTooLarge on the "short" write, and put a message
    into the buffer that the (email) was truncated.
  (generate_urls): add a placeholder function to construct emails
    using URLs to (ViewVC) web pages showing each diff.


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