Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
ed9971a9
Commit
ed9971a9
authored
Nov 13, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed code that has gone into check_catalog.py
parent
b493e7f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
43 deletions
+0
-43
lib/python/Products/ZCatalog/Catalog.py
lib/python/Products/ZCatalog/Catalog.py
+0
-43
No files found.
lib/python/Products/ZCatalog/Catalog.py
View file @
ed9971a9
...
...
@@ -676,47 +676,4 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
__call__
=
searchResults
def
checkConsistency
(
self
):
""" perform some consistency checks on the catalog """
from
types
import
IntType
from
BTrees.IIBTree
import
IISet
,
difference
,
intersection
l_data
=
list
(
self
.
data
.
keys
())
l_data
.
sort
()
l_uids
=
list
(
self
.
uids
.
values
())
l_uids
.
sort
()
l_paths
=
list
(
self
.
data
.
keys
())
l_paths
.
sort
()
assert
l_data
==
l_uids
assert
l_data
==
l_paths
for
id
,
idx
in
self
.
indexes
.
items
():
if
idx
.
meta_type
==
'FieldIndex'
:
RIDS
=
IISet
()
for
key
,
rids
in
idx
.
_index
.
items
():
if
isinstance
(
rids
,
IntType
):
RIDS
.
insert
(
rids
)
else
:
map
(
RIDS
.
insert
,
rids
.
keys
())
diff
=
difference
(
RIDS
,
IISet
(
self
.
data
.
keys
()))
assert
len
(
diff
)
==
0
,
'Index %s: problem with forward entries'
%
id
RIDS
=
IISet
()
for
key
,
rids
in
idx
.
_index
.
items
():
if
isinstance
(
rids
,
IntType
):
RIDS
.
insert
(
rids
)
else
:
map
(
RIDS
.
insert
,
rids
.
keys
())
diff
=
difference
(
RIDS
,
IISet
(
self
.
data
.
keys
()))
assert
len
(
diff
)
==
0
,
'Index %s: problems with backward entries'
%
id
class
CatalogError
(
Exception
):
pass
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment