[Zope-Checkins] CVS: Zope/utilities - check_catalog.py:1.3
Andreas Jung
andreas@zope.com
Tue, 13 Nov 2001 11:36:03 -0500
Update of /cvs-repository/Zope/utilities
In directory cvs.zope.org:/tmp/cvs-serv19117/utilities
Modified Files:
check_catalog.py
Log Message:
added checks for PathIndex
=== Zope/utilities/check_catalog.py 1.2 => 1.3 ===
+ elif idx.meta_type in ['PathIndex']:
+
+ RIDS = IISet()
+
+ for rids in map(None,idx._index.values()):
+ map(RIDS.insert , rids.values()[0])
+
+ diff = difference(RIDS, IISet(_cat.data.keys()))
+ if len(diff)!=0:
+ print '\tERR: Problem with forward entries'
+ print '\tERR: too much forward entries:', diff
+ else:
+ print '\tOK: Forward entries (%d entries)' % (len(RIDS))
+
+
+ if idx.meta_type in ['FieldIndex','KeywordIndex','PathIndex']:
+
# check backward entries
RIDS = IISet(idx._unindex.keys())
diff = difference(RIDS, IISet(_cat.data.keys()))
@@ -167,8 +184,9 @@
else:
print '\tOK: Backward entries (%d entries)' % (len(RIDS))
- else:
- print "\tWARN: no check implemented yet"
+
+
+
@@ -191,7 +209,7 @@
for o,v in opts:
if o in ['-h','--help']: usage()
- if o in ['--FieldIndex','--KeywordIndex','PathIndex']:
+ if o in ['--FieldIndex','--KeywordIndex','--PathIndex']:
indexes.append(o[2:])
checkCatalog(args,indexes)