| Summary: | Add X- header to SVN commit mail to facilitate filtering / sorting | ||
|---|---|---|---|
| Product: | Services | Reporter: | Ed Maste <emaste> |
| Component: | Core Infrastructure | Assignee: | Ryan Steinmetz <zi> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | CC: | allanjude, peter, zi |
| Priority: | --- | ||
| Version: | unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Ed Maste
2015-05-27 15:17:33 UTC
Reassign. Set assignee back. I misread the issue. Proposed patch:
Index: mailer.py
===================================================================
--- mailer.py (revision 283617)
+++ mailer.py (working copy)
@@ -243,11 +243,12 @@
# hdrs = 'From: %s\n' \
# hdrs = 'To: %s\n' \
hdrs = 'Subject: %s\n' \
+ 'X-SVN-Dirs: %s\n' \
'X-SVN-Group: %s\n' \
'MIME-Version: 1.0\n' \
'Content-Type: text/plain; charset=UTF-8\n' \
'Content-Transfer-Encoding: 8bit\n' \
- % (subject, group or "defaults")
+ % (subject, subject, group or "defaults")
# % (self.from_addr, string.join(self.to_addrs, ', '), subject)
if self.reply_to:
hdrs = '%sReply-To: %s\n' % (hdrs, self.reply_to)
Patches are welcome - the code is in the svn tree for the commit mail generator. > Patches are welcome - the code is in the svn tree for the commit mail generator. There's a patch above in comment #3 -- is it not suitable? Ping? Ping? Ping? Just checked out the patch and, unless I am mistaken, this will just copy the entire subject of the email to a new header called X-SVN-Dirs. So X-SVN-Dirs would be "svn commit: r320309 - stable/11/sys/i386/isa" Do you want X-SVN-Dirs set to "stable/11/sys/i386/isa?" IIANM this is the intention. The ultimate goal is to replace the subject line with the headline of the commit, but preserve the original subject line in a header so that existing mail sorting rules can easily be adapted. Allan is correct, the goal is to allow straightforward conversion of any existing filtering rules. Maybe "X-SVN-Info" would be a better name? A commit references this bug: Author: zi Date: Tue Jun 27 16:05:11 UTC 2017 New revision: 320410 URL: https://svnweb.freebsd.org/changeset/base/320410 Log: - Add in additional X-SVN-* headers to assist with mail sorting PR: 200484 Requested by: emaste Changes: svnadmin/hooks/scripts/mailer.py A commit references this bug: Author: zi Date: Tue Jun 27 16:09:35 UTC 2017 New revision: 444474 URL: https://svnweb.freebsd.org/changeset/ports/444474 Log: - Add in additional X-SVN-* headers to assist with mail sorting PR: 200484 Requested by: emaste Approved by: portmgr (me, wearing clusteradm hat) Changes: svnadmin/hooks/scripts/mailer.py I took your original idea and broke it out to follow the existing headers that other projects use, as well as add in X-SVN-Paths to capture the path information. This should give everyone more flexibility while maintaining the ability to filter on whatever they want, hopefully now with more ease. Please let me know if this change meets your needs. (In reply to Ryan Steinmetz from comment #14) Examples of the new headers in use: X-SVN-Commit-Author: sunpoet X-SVN-Commit-Paths: head/www/rubygem-actioncable5 X-SVN-Commit-Revision: 444488 X-SVN-Commit-Repository: ports X-SVN-Group: svnadmin X-SVN-Commit-Author: zi X-SVN-Commit-Paths: svnadmin/hooks/scripts X-SVN-Commit-Revision: 320410 X-SVN-Commit-Repository: base A commit references this bug: Author: zi Date: Tue Jun 27 16:41:00 UTC 2017 New revision: 50411 URL: https://svnweb.freebsd.org/changeset/doc/50411 Log: - Add in additional X-SVN-* headers to assist with mail sorting PR: 200484 Requested by: emaste Changes: svnadmin/hooks/scripts/mailer.py Confirmed as fixed via IRC w/submitter. |