You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

63 lines
2.5 KiB

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