[Commits] (vajda) more on cloud trace feature
commits at osafoundation.org
commits at osafoundation.org
Tue Apr 5 11:15:13 PDT 2005
Commit by: vajda
Modified files:
chandler/application/tests/TestClouds.py 1.6 1.7
chandler/repository/schema/Cloud.py 1.25 1.26
Log message:
more on cloud trace feature
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/application/tests/TestClouds.py.diff?r1=text&tr1=1.6&r2=text&tr2=1.7
http://cvs.osafoundation.org/index.cgi/chandler/repository/schema/Cloud.py.diff?r1=text&tr1=1.25&r2=text&tr2=1.26
Index: chandler/repository/schema/Cloud.py
diff -u chandler/repository/schema/Cloud.py:1.25 chandler/repository/schema/Cloud.py:1.26
--- chandler/repository/schema/Cloud.py:1.25 Mon Apr 4 19:23:40 2005
+++ chandler/repository/schema/Cloud.py Tue Apr 5 11:15:12 2005
@@ -1,6 +1,6 @@
-__revision__ = "$Revision: 1.25 $"
-__date__ = "$Date: 2005/04/05 02:23:40 $"
+__revision__ = "$Revision: 1.26 $"
+__date__ = "$Date: 2005/04/05 18:15:12 $"
__copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -332,6 +332,18 @@
for other in endpoint.iterValues(item):
yield other
+ def traceItem(self, item, trace):
+
+ found = True
+ while found:
+ found = False
+ for (other, endpoint), others in trace.iteritems():
+ if item in others:
+ yield (item, other, '.'.join(endpoint.attribute))
+ item = other
+ found = True
+ break
+
class Endpoint(Item):
Index: chandler/application/tests/TestClouds.py
diff -u chandler/application/tests/TestClouds.py:1.6 chandler/application/tests/TestClouds.py:1.7
--- chandler/application/tests/TestClouds.py:1.6 Mon Apr 4 19:23:39 2005
+++ chandler/application/tests/TestClouds.py Tue Apr 5 11:15:11 2005
@@ -1,8 +1,8 @@
"""
Test of Cloud copy
"""
-__revision__ = "$Revision: 1.6 $"
-__date__ = "$Date: 2005/04/05 02:23:39 $"
+__revision__ = "$Revision: 1.7 $"
+__date__ = "$Date: 2005/04/05 18:15:11 $"
__copyright__ = "Copyright (c) 2003-2004 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -40,9 +40,11 @@
]
sB = self.rep.findPath("//parcels/clouds/data/sprocketB")
- for (item, endpoint), others in trace.iteritems():
- if sB in others:
- print "%s was added by following '%s' on %s" %(sB, '.'.join(endpoint.attribute), item._repr_())
+ cloud = widgetA.itsKind.getClouds('default')[0]
+ for item, other, attribute in cloud.traceItem(sB, trace):
+ print "%s was added by following '%s' on %s" %(item._repr_(),
+ attribute,
+ other._repr_())
for item in items:
path = str(item.itsPath)
More information about the Commits
mailing list