[CalendarServer-changes] [5174] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Sun Feb 21 19:03:34 PST 2010
Revision: 5174
http://trac.macosforge.org/projects/calendarserver/changeset/5174
Author: wsanchez at apple.com
Date: 2010-02-21 19:03:34 -0800 (Sun, 21 Feb 2010)
Log Message:
-----------
Undo 5173
Modified Paths:
--------------
CalendarServer/trunk/test
CalendarServer/trunk/txcaldav/calendarstore/file.py
CalendarServer/trunk/txcaldav/calendarstore/test/test_file.py
CalendarServer/trunk/txcaldav/icalendarstore.py
Added Paths:
-----------
CalendarServer/trunk/twext/python/icalendar.py
Removed Paths:
-------------
CalendarServer/trunk/twext/python/vcomponent.py
Modified: CalendarServer/trunk/test
===================================================================
--- CalendarServer/trunk/test 2010-02-22 03:02:40 UTC (rev 5173)
+++ CalendarServer/trunk/test 2010-02-22 03:03:34 UTC (rev 5174)
@@ -72,7 +72,4 @@
test_modules="calendarserver twistedcaldav twext txdav txcaldav txcarddav ${m_twisted}";
fi;
-for module in ${test_modules}; do
- cd "${wd}" && "${python}" "${twisted}/bin/trial" --rterrors ${random} ${until_fail} ${no_colour} ${coverage} "${module}";
-done;
-
+cd "${wd}" && "${python}" "${twisted}/bin/trial" --rterrors ${random} ${until_fail} ${no_colour} ${coverage} ${test_modules};
Copied: CalendarServer/trunk/twext/python/icalendar.py (from rev 5172, CalendarServer/trunk/twext/python/icalendar.py)
===================================================================
--- CalendarServer/trunk/twext/python/icalendar.py (rev 0)
+++ CalendarServer/trunk/twext/python/icalendar.py 2010-02-22 03:03:34 UTC (rev 5174)
@@ -0,0 +1,24 @@
+##
+# Copyright (c) 2010 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+"""
+iCalendar utilities
+"""
+
+# FIXME: Move twistedcaldav.ical here, but that module needs some
+# cleanup first. Perhaps after porting to libical?
+
+from twistedcaldav.ical import *
Deleted: CalendarServer/trunk/twext/python/vcomponent.py
===================================================================
--- CalendarServer/trunk/twext/python/vcomponent.py 2010-02-22 03:02:40 UTC (rev 5173)
+++ CalendarServer/trunk/twext/python/vcomponent.py 2010-02-22 03:03:34 UTC (rev 5174)
@@ -1,26 +0,0 @@
-##
-# Copyright (c) 2010 Apple Inc. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-##
-
-"""
-iCalendar utilities
-"""
-
-# FIXME: Move twistedcaldav.ical here, but that module needs some
-# cleanup first. Perhaps after porting to libical?
-
-from twistedcaldav.ical import InvalidICalendarDataError
-from twistedcaldav.ical import Component as VComponent
-from twistedcaldav.ical import Property as VProperty
Modified: CalendarServer/trunk/txcaldav/calendarstore/file.py
===================================================================
--- CalendarServer/trunk/txcaldav/calendarstore/file.py 2010-02-22 03:02:40 UTC (rev 5173)
+++ CalendarServer/trunk/txcaldav/calendarstore/file.py 2010-02-22 03:03:34 UTC (rev 5174)
@@ -33,8 +33,8 @@
from twisted.internet.defer import inlineCallbacks
from twext.python.log import LoggingMixIn
-from twext.python.vcomponent import VComponent
-from twext.python.vcomponent import InvalidICalendarDataError
+from twext.python.icalendar import Component as iComponent
+from twext.python.icalendar import InvalidICalendarDataError
from txdav.propertystore.xattr import PropertyStore
@@ -272,8 +272,8 @@
return self.path.basename()
def setComponent(self, component):
- if not isinstance(component, VComponent):
- raise TypeError(VComponent)
+ if not isinstance(component, iComponent):
+ raise TypeError(iComponent)
try:
if component.resourceUID() != self.uid():
@@ -305,7 +305,7 @@
text = self.iCalendarText()
try:
- component = VComponent.fromString(text)
+ component = iComponent.fromString(text)
except InvalidICalendarDataError, e:
raise InternalDataStoreError(
"File corruption detected (%s) in file: %s"
Modified: CalendarServer/trunk/txcaldav/calendarstore/test/test_file.py
===================================================================
--- CalendarServer/trunk/txcaldav/calendarstore/test/test_file.py 2010-02-22 03:02:40 UTC (rev 5173)
+++ CalendarServer/trunk/txcaldav/calendarstore/test/test_file.py 2010-02-22 03:03:34 UTC (rev 5174)
@@ -23,7 +23,7 @@
from twext.python.filepath import CachingFilePath as FilePath
from twisted.trial import unittest
-from twext.python.vcomponent import VComponent
+from twext.python.icalendar import Component as iComponent
from txdav.idav import IPropertyStore
@@ -477,7 +477,7 @@
"""
name = "4.ics"
assert self.calendar1.calendarObjectWithName(name) is None
- component = VComponent.fromString(event4_text)
+ component = iComponent.fromString(event4_text)
self.calendar1.createCalendarObjectWithName(name, component)
calendarObject = self.calendar1.calendarObjectWithName(name)
@@ -490,7 +490,7 @@
self.assertRaises(
CalendarObjectNameAlreadyExistsError,
self.calendar1.createCalendarObjectWithName,
- "1.ics", VComponent.fromString(event4_text)
+ "1.ics", iComponent.fromString(event4_text)
)
def test_createCalendarObjectWithName_dot(self):
@@ -502,7 +502,7 @@
self.assertRaises(
CalendarObjectNameNotAllowedError,
self.calendar1.createCalendarObjectWithName,
- ".foo", VComponent.fromString(event4_text)
+ ".foo", iComponent.fromString(event4_text)
)
@featureUnimplemented
@@ -513,7 +513,7 @@
"""
name = "foo.ics"
assert self.calendar1.calendarObjectWithName(name) is None
- component = VComponent.fromString(event1modified_text)
+ component = iComponent.fromString(event1modified_text)
self.assertRaises(
CalendarObjectUIDAlreadyExistsError,
self.calendar1.createCalendarObjectWithName,
@@ -528,7 +528,7 @@
self.assertRaises(
InvalidCalendarComponentError,
self.calendar1.createCalendarObjectWithName,
- "new", VComponent.fromString(event4notCalDAV_text)
+ "new", iComponent.fromString(event4notCalDAV_text)
)
def test_removeCalendarObjectWithName_exists(self):
@@ -653,7 +653,7 @@
"""
Rewrite component.
"""
- component = VComponent.fromString(event1modified_text)
+ component = iComponent.fromString(event1modified_text)
calendarObject = self.calendar1.calendarObjectWithName("1.ics")
oldComponent = calendarObject.component() # Trigger caching
@@ -666,7 +666,7 @@
self.assertEquals(calendarObject.component(), component)
def test_setComponent_uidchanged(self):
- component = VComponent.fromString(event4_text)
+ component = iComponent.fromString(event4_text)
calendarObject = self.calendar1.calendarObjectWithName("1.ics")
self.assertRaises(
@@ -679,7 +679,7 @@
self.assertRaises(
InvalidCalendarComponentError,
calendarObject.setComponent,
- VComponent.fromString(event4notCalDAV_text)
+ iComponent.fromString(event4notCalDAV_text)
)
def test_component(self):
@@ -689,7 +689,7 @@
component = self.object1.component()
self.failUnless(
- isinstance(component, VComponent),
+ isinstance(component, iComponent),
component
)
Modified: CalendarServer/trunk/txcaldav/icalendarstore.py
===================================================================
--- CalendarServer/trunk/txcaldav/icalendarstore.py 2010-02-22 03:02:40 UTC (rev 5173)
+++ CalendarServer/trunk/txcaldav/icalendarstore.py 2010-02-22 03:03:34 UTC (rev 5174)
@@ -47,7 +47,7 @@
from zope.interface import Interface #, Attribute
from datetime import datetime, date, tzinfo
-from twext.python.vcomponent import VComponent
+from twext.python.icalendar import Component
from txdav.idav import IPropertyStore
#
@@ -231,7 +231,7 @@
object with the same UID as the given C{component} already
exists.
@raise InvalidCalendarComponentError: if the given
- C{component} is not a valid C{VCALENDAR} L{VComponent} for
+ C{component} is not a valid C{VCALENDAR} L{Component} for
a calendar object.
"""
@@ -302,9 +302,9 @@
C{component} must have the same UID and be of the same
component type as this calendar object.
- @param component: a C{VCALENDAR} L{VComponent}.
+ @param component: a C{VCALENDAR} L{Component}.
@raise InvalidCalendarComponentError: if the given
- C{component} is not a valid C{VCALENDAR} L{VComponent} for
+ C{component} is not a valid C{VCALENDAR} L{Component} for
a calendar object.
"""
@@ -312,7 +312,7 @@
"""
Retrieve the calendar component for this calendar object.
- @return: a C{VCALENDAR} L{VComponent}.
+ @return: a C{VCALENDAR} L{Component}.
"""
def iCalendarText():
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100221/313bdd54/attachment-0001.html>
More information about the calendarserver-changes
mailing list