[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Added feature suppress_modifications to mailer

From: Nicklas Norling <nicklas.norling_at_ifsab.se>
Date: 2004-03-10 14:25:38 CET

Added the ability to configure parameter suppress_modifications
in accordance with the other suppress_* parameters. The example
config has the feature as an opt-in.
The patch will enable a admin to send out commit emails containing
no diff what so ever. This is useful in dealing with low-bandwidth sites
that still wants the benefit of commit emails.

Changes where made to the files:
svn/trunk/tools/hook-scripts/mailer/mailer.conf.example
svn/trunk/tools/hook-scripts/mailer/mailer.py

svn diff against the trunk for the two files:

Index: mailer.conf.example
===================================================================
--- mailer.conf.example (revision 8959)
+++ mailer.conf.example (working copy)
@@ -166,6 +166,13 @@
 # option's value.
 #suppress_adds = yes
 
+# When set to "yes", the mailer will suppress the creation of a diff which
+# modifies lines in a file. If this is set to anything else, or
+# is simply commented out, then the diff will be inserted. Note that the
+# modifications is always mentioned in the message header, regardless of
this
+# option's value.
+#suppress_modifications = yes
+
 #
--------------------------------------------------------------------------
 
 #

Index: mailer.py
===================================================================
--- mailer.py (revision 8959)
+++ mailer.py (working copy)
@@ -467,6 +467,11 @@
     # don't bother to show an empty diff. prolly just a prop change.
     return
   else:
+ suppress == cfg.get('suppress_modifications', group, params)
+ if suppress == 'yes':
+ # Generate no diff for modification according to config file
setting
+ return
+
     output.write('\nModified: %s\n' % change.path)
     diff = svn.fs.FileDiff(repos.get_root(change.base_rev),
                            change.base_path[1:],

/Nicke
Received on Wed Mar 10 14:26:05 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.