From owner-svn-src-svnadmin@freebsd.org Tue Jun 27 16:05:12 2017 Return-Path: Delivered-To: svn-src-svnadmin@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BADD8D88B3E; Tue, 27 Jun 2017 16:05:12 +0000 (UTC) (envelope-from zi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8727C6FA6C; Tue, 27 Jun 2017 16:05:12 +0000 (UTC) (envelope-from zi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5RG5Bmo087951; Tue, 27 Jun 2017 16:05:11 GMT (envelope-from zi@FreeBSD.org) Received: (from zi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5RG5B8O087950; Tue, 27 Jun 2017 16:05:11 GMT (envelope-from zi@FreeBSD.org) Message-Id: <201706271605.v5RG5B8O087950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zi set sender to zi@FreeBSD.org using -f From: Ryan Steinmetz Date: Tue, 27 Jun 2017 16:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r320410 - svnadmin/hooks/scripts 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-svnadmin@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the admin / configuration tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 16:05:12 -0000 Author: zi (ports committer) Date: Tue Jun 27 16:05:11 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 Modified: svnadmin/hooks/scripts/mailer.py Modified: svnadmin/hooks/scripts/mailer.py ============================================================================== --- svnadmin/hooks/scripts/mailer.py Tue Jun 27 15:14:06 2017 (r320409) +++ svnadmin/hooks/scripts/mailer.py Tue Jun 27 16:05:11 2017 (r320410) @@ -235,6 +235,8 @@ class MailedOutput(OutputBase): def mail_headers(self, group, params): subject = self.make_subject(group, params) + dirlist_limit = 200 + dirlist = self.dirlist[:dirlist_limit] + bool(self.dirlist[dirlist_limit:]) * '...' try: subject.encode('ascii') except UnicodeError: @@ -244,10 +246,15 @@ class MailedOutput(OutputBase): # hdrs = 'To: %s\n' \ hdrs = 'Subject: %s\n' \ 'X-SVN-Group: %s\n' \ + 'X-SVN-Commit-Author: %s\n' \ + 'X-SVN-Commit-Paths: %s\n' \ + 'X-SVN-Commit-Revision: %d\n' \ + 'X-SVN-Commit-Repository: %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, group or "defaults", self.repos.author or 'no_author', + dirlist, self.repos.rev, os.path.basename(self.repos.repos_dir)) # % (self.from_addr, string.join(self.to_addrs, ', '), subject) if self.reply_to: hdrs = '%sReply-To: %s\n' % (hdrs, self.reply_to) @@ -397,8 +404,10 @@ class Commit(Messenger): dirlist = string.join(dirlist) if commondir: self.output.subject = 'r%d - in %s: %s' % (repos.rev, commondir, dirlist) + self.output.dirlist = 'in %s: %s' % (commondir, dirlist) else: self.output.subject = 'r%d - %s' % (repos.rev, dirlist) + self.output.dirlist = '%s' % (dirlist) def generate(self): "Generate email for the various groups and option-params."