[cfe-dev] [LLVMdev] RFC: put commit messages in *-commits subject lines?

Sebastian Pop spop at codeaurora.org
Fri Jan 25 13:35:01 PST 2013


Hi Daniel,

Daniel Dunbar wrote:
> Hi Sebastion,
> 
> I've attached the current configuration file from the server.
> 
> I'm not sure how far you want to go down the "trying to get realize nice
> summary path" lines, but if svn_mailer somehow supported running an
> external script to process the commit and come up with the path that would
> be ideal for integration on the server.

I think you could modify the sources of svn_mailer to add such a hook.  When I
first investigated this issue, I ended on a bug report from the debian project
that fixed the subject line with a one line patch:

> To get the first line of the log message as a subject line, please apply this
> one line patch: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=17;bug=379534
> Note that you can directly patch the installed script: on my machine it is
> located in /usr/local/lib/python2.7/dist-packages/svnmailer/notifier/_mail.py

For your convenience, here is the patch from that debian bug report:


svnmailer: add log substitution for subject templates

Add first line of commit log as a substitution variable for
*_subject_template, E.G. add %(log)s to use.

Signed-off-by: Peter Korsgaard <jacmet at sunsite.dk>

Index: svnmailer-1.0.8/src/lib/svnmailer/notifier/_mail.py
===================================================================
--- svnmailer-1.0.8.orig/src/lib/svnmailer/notifier/_mail.py	2008-05-27 14:56:27.000000000 +0200
+++ svnmailer-1.0.8/src/lib/svnmailer/notifier/_mail.py	2008-05-27 15:01:50.000000000 +0200
@@ -314,6 +314,7 @@
             'part'    : countprefix,
             'files'   : self._getPrefixedFiles(changeset),
             'dirs'    : self._getPrefixedDirectories(changeset),
+            'log'     : self.getLog().split('\n',1)[0],
         }
 
         # We may try twice, first with files/dirs = files



Sebastian
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation



More information about the cfe-dev mailing list