f8536d
# ./pullrev.sh 1439592 1447513
f8536d
f8536d
http://svn.apache.org/viewvc?view=revision&revision=1439592
f8536d
http://svn.apache.org/viewvc?view=revision&revision=1447513
f8536d
f8536d
https://bugzilla.redhat.com/show_bug.cgi?id=1379593
f8536d
f8536d
--- subversion-1.7.14/tools/hook-scripts/mailer/mailer.conf.example
f8536d
+++ subversion-1.7.14/tools/hook-scripts/mailer/mailer.conf.example
f8536d
@@ -146,7 +146,16 @@
f8536d
 #
f8536d
 #   from_addr = %(author)s@example.com
f8536d
 #
f8536d
+# The substitution variable "repos_basename" is provided, and is set to
f8536d
+# the directory name of the repository. This can be useful to set
f8536d
+# a custom subject that can be re-used in multiple repositories:
f8536d
 #
f8536d
+#   commit_subject_prefix = [svn-%(repos_basename)s]
f8536d
+#
f8536d
+# For example if the repository is at /path/to/repo/project-x then
f8536d
+# the subject of commit emails will be prefixed with [svn-project-x]
f8536d
+#
f8536d
+#
f8536d
 # SUMMARY
f8536d
 #
f8536d
 # While mailer.py will work to minimize the number of mail messages
f8536d
--- subversion-1.7.14/tools/hook-scripts/mailer/mailer.py
f8536d
+++ subversion-1.7.14/tools/hook-scripts/mailer/mailer.py
f8536d
@@ -98,7 +98,10 @@
f8536d
   if cmd == 'commit':
f8536d
     revision = int(cmd_args[0])
f8536d
     repos = Repository(repos_dir, revision, pool)
f8536d
-    cfg = Config(config_fname, repos, { 'author' : repos.author })
f8536d
+    cfg = Config(config_fname, repos,
f8536d
+                 {'author': repos.author,
f8536d
+                  'repos_basename': os.path.basename(repos.repos_dir)
f8536d
+                 })
f8536d
     messenger = Commit(pool, cfg, repos)
f8536d
   elif cmd == 'propchange' or cmd == 'propchange2':
f8536d
     revision = int(cmd_args[0])
f8536d
@@ -108,14 +111,20 @@
f8536d
     repos = Repository(repos_dir, revision, pool)
f8536d
     # Override the repos revision author with the author of the propchange
f8536d
     repos.author = author
f8536d
-    cfg = Config(config_fname, repos, { 'author' : author })
f8536d
+    cfg = Config(config_fname, repos,
f8536d
+                 {'author': author,
f8536d
+                  'repos_basename': os.path.basename(repos.repos_dir)
f8536d
+                 })
f8536d
     messenger = PropChange(pool, cfg, repos, author, propname, action)
f8536d
   elif cmd == 'lock' or cmd == 'unlock':
f8536d
     author = cmd_args[0]
f8536d
     repos = Repository(repos_dir, 0, pool) ### any old revision will do
f8536d
     # Override the repos revision author with the author of the lock/unlock
f8536d
     repos.author = author
f8536d
-    cfg = Config(config_fname, repos, { 'author' : author })
f8536d
+    cfg = Config(config_fname, repos,
f8536d
+                 {'author': author,
f8536d
+                  'repos_basename': os.path.basename(repos.repos_dir)
f8536d
+                 })
f8536d
     messenger = Lock(pool, cfg, repos, author, cmd == 'lock')
f8536d
   else:
f8536d
     raise UnknownSubcommand(cmd)