ooo-build r12798 - in trunk: . scratch/rcsutil



Author: kyoshida
Date: Wed Jun  4 18:19:42 2008
New Revision: 12798
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12798&view=rev

Log:
2008-06-04  Kohei Yoshida  <kyoshida novell com>

	* scratch/rcsutil/parse_rcs.py: fixed some bugs that prevented the 
	parser from parsing certain rlog outputs.


Modified:
   trunk/ChangeLog
   trunk/scratch/rcsutil/parse_rcs.py

Modified: trunk/scratch/rcsutil/parse_rcs.py
==============================================================================
--- trunk/scratch/rcsutil/parse_rcs.py	(original)
+++ trunk/scratch/rcsutil/parse_rcs.py	Wed Jun  4 18:19:42 2008
@@ -292,7 +292,8 @@
     # regex pattern for category match
     reCategory = '^' + alphnum + '(' + alphnum + '|\ )*\:'
 
-    reRevSeparator = '^\-+$'
+    # regex pattern for revision separator
+    reRevSeparator = '^\-{28}$'
 
 
     def __init__ (self, lines):
@@ -417,6 +418,11 @@
 The first two lines contain auxiliary information about the commit, while the
 rest of the lines contain commit message.
 """
+        if self.__isEndLogSeparator(i):
+            # The description block is empty.  This happens when the file is
+            # committed initially without any subsequent commits.
+            return i
+
         if not self.__isRevSeparator(i):
             self.descError = True
             self.debugPrint("revision separator expected", True)
@@ -720,7 +726,7 @@
         obj.debug = self.debug
         obj.parse()
         if obj.isError():
-            sys.stderr.write("error parsing " + filepath)
+            sys.stderr.write("error parsing " + filepath + "\n")
             self.isError = True
 
 #       obj.output()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]