openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject svn commit: r1432050 - /openoffice/devtools/scripts/svnlog2info.py
Date Fri, 11 Jan 2013 13:42:50 GMT
Author: hdu
Date: Fri Jan 11 13:42:50 2013
New Revision: 1432050

URL: http://svn.apache.org/viewvc?rev=1432050&view=rev
Log:
handle empty commit comments gracefully

because they exist: e.g. http://svn.apache.org/viewvc?view=revision&revision=1349168

Modified:
    openoffice/devtools/scripts/svnlog2info.py

Modified: openoffice/devtools/scripts/svnlog2info.py
URL: http://svn.apache.org/viewvc/openoffice/devtools/scripts/svnlog2info.py?rev=1432050&r1=1432049&r2=1432050&view=diff
==============================================================================
--- openoffice/devtools/scripts/svnlog2info.py (original)
+++ openoffice/devtools/scripts/svnlog2info.py Fri Jan 11 13:42:50 2013
@@ -81,7 +81,11 @@ def parse_svn_log_xml( svnout):
 	for log in dom.getElementsByTagName('logentry'):
 		revnum = int(log.getAttribute("revision"))
 		author = log.getElementsByTagName("author")[0].firstChild.nodeValue
-		comment = log.getElementsByTagName("msg")[0].firstChild.nodeValue
+		cmtnode = log.getElementsByTagName("msg")[0].firstChild
+		if cmtnode:	
+			comment = cmtnode.nodeValue
+		else:
+			comment = "UNCOMMENTED CHANGE"
 		all_revs.append( Revision( revnum, author, comment))
 
 	return all_revs
@@ -203,7 +207,7 @@ def revs2info( htmlname, detail_level, a
 
 def main(args):
 	if (len(args) < 4) or (5 < len(args)):
-		print "Usage: " + args[0] + "[svnurl|branchname] minrev maxrev [enduser|developer]"
+		print "Usage: " + args[0] + " [svnurl|branchname] minrev maxrev [enduser|developer]"
 		sys.exit(1)
 	svnurl = args[1]
 	revmin = args[2]



Mime
View raw message