svn commit: r286376 - svnadmin/hooks/scripts

Peter Wemm peter at FreeBSD.org
Thu Aug 6 18:18:08 UTC 2015


Author: peter
Date: Thu Aug  6 18:18:07 2015
New Revision: 286376
URL: https://svnweb.freebsd.org/changeset/base/286376

Log:
  Catch cases where a log message is canonified all the way down to nothing
  due to an empty template being sent.

Modified:
  svnadmin/hooks/scripts/log-police.py

Modified: svnadmin/hooks/scripts/log-police.py
==============================================================================
--- svnadmin/hooks/scripts/log-police.py	Thu Aug  6 18:15:56 2015	(r286375)
+++ svnadmin/hooks/scripts/log-police.py	Thu Aug  6 18:18:07 2015	(r286376)
@@ -64,8 +64,14 @@ def fix_txn(fs, txn_name):
   log_message = svn.fs.svn_fs_txn_prop(txn, "svn:log")
   if log_message is not None:
     new_message = fix_log_message(log_message)
+    if new_message.strip() == "":
+      sys.stderr.write("Log message required\n")
+      sys.exit(1)
     if new_message != log_message:
       svn.fs.svn_fs_change_txn_prop(txn, "svn:log", new_message)
+  else:
+    sys.stderr.write("Log message required\n")
+    sys.exit(1)
 
 
 def fix_rev(fs, revnum):


More information about the svn-src-svnadmin mailing list