mailer.py: provide a "repos_dir basename" substitution variable.

Patch by: Janos Gyerik <janos.gyerik@gmail.com>
(log message by me)
Review by: breser, cmpilato, danielsh

* tools/hook-scripts/mailer/mailer.py
  (main): Define 'repos_basename' for substitution.

* tools/hook-scripts/mailer/mailer.conf.example
  (SUBSTITUTIONS): Document "%(repos_basename)s".


git-svn-id: http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/mailer@1439592 13f79535-47bb-0310-9956-ffa450edef68
Follow-up to r1439592:

* tools/hook-scripts/mailer/mailer.py
  (main): Fix a copy-paste error in r1439592.

Patch by: Nick Peelman <nick@peelman.us>


git-svn-id: http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/mailer@1447513 13f79535-47bb-0310-9956-ffa450edef68
Fix problems with the mailer.py test suite and fix mailer.py not showing
directories with property deletions as being modified.

When using svn.repos.replay() property deletions don't show up in the
returned changelist from editor.get_changes().items() since the
changed_dir_prop function on the delta editor never gets called.  This
could be a bug in the Python bindings or our C code.  Setting send_deltas
to true and calling svn.repos.replay2() resolves the problem.

Some of the failures were simply that the group output is in a different
order than it was in the file.  I suspect that the order of output from
mailer.py is not determinate, so long term this test setup will likely
have to be rewritten.

* mailer/mailer.py
  (Commit.__init__): Switch to using svn.repos.replay2() and pass 1 for
    send_deltas.

* mailer/tests/mailer-init.sh
  Use --force when setting the svn:new_svn_prop since we reject properties
  starting with svn: when we don't know about them.  Set the mime-type
  when adding a binary file since we only check for binary files by the
  mime-type.

* mailer/tests/mailer-t1.output
  Reorder some of the output to match the generated output (at least for me)
  


git-svn-id: http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/mailer@1449582 13f79535-47bb-0310-9956-ffa450edef68
Add a Date header and a Message-ID header to the mail generated by mailer.py.

* tools/hook-scripts/mailer/mailer.py
  (MailedOutput.mail_headers): Add a Date and Message-Id header to the output.

Patch by: Nick Peelman <nick{_AT_}peelman.us>
(Tweaked by me to remove revision from Message-ID)


git-svn-id: http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/mailer@1449592 13f79535-47bb-0310-9956-ffa450edef68
replace REPONAME in subject prefix with the base directory name of the repo
fixed the implementation based on comments by Daniel
updated from svn trunk
bugfix: uninitialized variable was used
added note in readme that soon this repo will be dropped
param was renamed from "repodir" to "repos_basename"
merged from upstream