[Checkins] SVN: lovely.relation/trunk/ repapre release
Manfred Schwendinger
manfred.schwendiger at lovelysystems.com
Wed Oct 17 11:41:45 EDT 2007
Log message for revision 80903:
repapre release
Changed:
U lovely.relation/trunk/CHANGES.txt
U lovely.relation/trunk/setup.py
U lovely.relation/trunk/src/lovely/relation/README.txt
U lovely.relation/trunk/src/lovely/relation/app.py
U lovely.relation/trunk/src/lovely/relation/browser.py
-=-
Modified: lovely.relation/trunk/CHANGES.txt
===================================================================
--- lovely.relation/trunk/CHANGES.txt 2007-10-17 13:52:30 UTC (rev 80902)
+++ lovely.relation/trunk/CHANGES.txt 2007-10-17 15:41:45 UTC (rev 80903)
@@ -5,6 +5,12 @@
After
=====
+2007/10/17 1.1.1
+================
+
+- better logging.
+- repair zmi bug.
+
2007/10/17 1.1.1a4
==================
Modified: lovely.relation/trunk/setup.py
===================================================================
--- lovely.relation/trunk/setup.py 2007-10-17 13:52:30 UTC (rev 80902)
+++ lovely.relation/trunk/setup.py 2007-10-17 15:41:45 UTC (rev 80903)
@@ -21,7 +21,7 @@
from setuptools import setup, find_packages, Extension
setup(name='lovely.relation',
- version='1.1.1a4',
+ version='1.1.1',
url='http://svn.zope.org/lovely.relation',
license='ZPL 2.1',
description='Lovely Relation Packages for Zope3',
Modified: lovely.relation/trunk/src/lovely/relation/README.txt
===================================================================
--- lovely.relation/trunk/src/lovely/relation/README.txt 2007-10-17 13:52:30 UTC (rev 80902)
+++ lovely.relation/trunk/src/lovely/relation/README.txt 2007-10-17 15:41:45 UTC (rev 80903)
@@ -444,6 +444,7 @@
We can call the repair method to repair the relation container.
>>> repairer.repair()
+ 0
We can get the targets of our source.
@@ -465,6 +466,7 @@
If we repair the relation container
>>> repairer.repair()
+ 2
we can ask for the targets of the source without a key error.
Modified: lovely.relation/trunk/src/lovely/relation/app.py
===================================================================
--- lovely.relation/trunk/src/lovely/relation/app.py 2007-10-17 13:52:30 UTC (rev 80902)
+++ lovely.relation/trunk/src/lovely/relation/app.py 2007-10-17 15:41:45 UTC (rev 80903)
@@ -479,7 +479,10 @@
# - source token can be loaded
# - target tokens can be loaded
# if one of them can not be loaded the relation is deleted.
- index = self.context.relationIndex
+
+ count = 0
+ context = removeSecurityProxy(self.context)
+ index = context.relationIndex
for key, name in list(index._reltoken_name_TO_objtokenset.keys()):
objs = index._reltoken_name_TO_objtokenset[(key, name)]
if objs is None:
@@ -491,6 +494,7 @@
except KeyError:
# the object can not be resolved: remove the relation
rel = data['load'](key, index, {})
- self.context.remove(rel)
+ context.remove(rel)
+ count += 1
break
-
+ return count
Modified: lovely.relation/trunk/src/lovely/relation/browser.py
===================================================================
--- lovely.relation/trunk/src/lovely/relation/browser.py 2007-10-17 13:52:30 UTC (rev 80902)
+++ lovely.relation/trunk/src/lovely/relation/browser.py 2007-10-17 15:41:45 UTC (rev 80903)
@@ -38,7 +38,8 @@
@form.action(u'Repair', condition='repairable')
def do_repair(self, action, data):
repairer = IRepair(self.context)
- self.status = u'Repaired'
+ count = repairer.repair()
+ self.status = u'Repaired %s relations' %count
@form.action(u'Not Repairable', condition='notRepairable')
def do_notrepair(self, action, data):
More information about the Checkins
mailing list