subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1145572 - /subversion/trunk/contrib/server-side/fsfsverify.py
Date Tue, 12 Jul 2011 12:53:46 GMT
Author: stsp
Date: Tue Jul 12 12:53:46 2011
New Revision: 1145572

URL: http://svn.apache.org/viewvc?rev=1145572&view=rev
Log:
* contrib/server-side/fsfsverify.py
  (NodeRev): Improve error reporting on invalid or unknown node-rev fields.

Modified:
    subversion/trunk/contrib/server-side/fsfsverify.py

Modified: subversion/trunk/contrib/server-side/fsfsverify.py
URL: http://svn.apache.org/viewvc/subversion/trunk/contrib/server-side/fsfsverify.py?rev=1145572&r1=1145571&r2=1145572&view=diff
==============================================================================
--- subversion/trunk/contrib/server-side/fsfsverify.py (original)
+++ subversion/trunk/contrib/server-side/fsfsverify.py Tue Jul 12 12:53:46 2011
@@ -673,11 +673,17 @@ class NodeRev(object):
       try:
         (field, value) = line.split(':', 1)
       except:
-        print repr(line)
-        print self.nodeOffset
-        print f.tell()
+        print("line: '%s'" % repr(line))
+        print("Node revision offset: %i" % self.nodeOffset)
+        print("Current file position: %i" % f.tell())
         raise
 
+      if field == "":
+        print("line: '%s'" % repr(line))
+        print("Node revision offset: %i" % self.nodeOffset)
+        print("Current file position: %i" % f.tell())
+        raise Exception("Empty field in node revision")
+
       # pull of the leading space and trailing new line
       if len(value) < 2:
           raise FsfsVerifyException("value needs to contain 2 or more bytes (%d)" % currentOffset)
@@ -742,6 +748,10 @@ class NodeRev(object):
         self.copyroot = value
       elif field == 'copyfrom':
         self.copyfrom = value
+      elif field == 'count' or field == 'minfo-cnt' or field == 'minfo-here':
+        pass
+      else:
+        raise Exception("Unrecognized field '%s'\n" % field)
 
     if self.type.type == 'dir':
       if self.text:



Mime
View raw message