[gs-cvs] rev 7787 - trunk/gs/toolbin

giles at ghostscript.com giles at ghostscript.com
Wed Mar 14 17:02:10 PDT 2007


Author: giles
Date: 2007-03-14 17:02:10 -0700 (Wed, 14 Mar 2007)
New Revision: 7787

Modified:
   trunk/gs/toolbin/split_changelog.py
Log:
Handle empty log messages.


Modified: trunk/gs/toolbin/split_changelog.py
===================================================================
--- trunk/gs/toolbin/split_changelog.py	2007-03-14 21:35:45 UTC (rev 7786)
+++ trunk/gs/toolbin/split_changelog.py	2007-03-15 00:02:10 UTC (rev 7787)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-#    Copyright (C) 2003 artofcode LLC.  All rights reserved.
+#    Copyright (C) 2003-2007 artofcode LLC.  All rights reserved.
 # 
 # This software is provided AS-IS with no warranty, either express or
 # implied.
@@ -18,7 +18,7 @@
 # $Id$
 
 # script to generate the split Changes/Details html changelogs
-# for Ghostscript from the output of 'cvs2cl.pl --xml'
+# for Ghostscript from the output of 'svn log --xml'
 
 import string, re
 import xml.parsers.expat
@@ -69,12 +69,16 @@
 		file.write('<blockquote>\n')
 		file.write('<pre>\n')
 		# todo: html-escape the msg lines
-		for line in self.data['msg']:
+		try:
+		  for line in self.data['msg']:
 			# skip the details unless wanted
 			if not details and self.r.search(line): break
 			if self.c.search(line): break
 			if self.d.search(line): break
 			file.write(line.encode('utf8'))
+		except KeyError:
+		  line = '(empty)'
+		  file.write(line.encode('utf8'))
 		file.write('</pre>\n')
 		file.write('<p>[')
 		#file.write(string.join(map(string.join, zip(self.data['name'],self.data['revision'])),', '))



More information about the gs-cvs mailing list