[CalendarServer-changes] [11540] CalendarServer/trunk/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jul 19 08:40:18 PDT 2013
Revision: 11540
http://trac.calendarserver.org//changeset/11540
Author: cdaboo at apple.com
Date: 2013-07-19 08:40:18 -0700 (Fri, 19 Jul 2013)
Log Message:
-----------
Fix ordering to allow deterministic testing.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/directory/principal.py
CalendarServer/trunk/twistedcaldav/storebridge.py
Modified: CalendarServer/trunk/twistedcaldav/directory/principal.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/principal.py 2013-07-19 15:38:10 UTC (rev 11539)
+++ CalendarServer/trunk/twistedcaldav/directory/principal.py 2013-07-19 15:40:18 UTC (rev 11540)
@@ -232,6 +232,7 @@
("emailAddresses", None, "Email Addresses",
customxml.EmailAddressSet),
}
+ _fieldList = [v for _ignore_k, v in sorted(_fieldMap.iteritems(), key=lambda x:x[0])]
def propertyToField(self, property, match):
@@ -250,7 +251,7 @@
def principalSearchPropertySet(self):
props = []
- for _ignore_field, _ignore_converter, description, xmlClass in self._fieldMap.itervalues():
+ for _ignore_field, _ignore_converter, description, xmlClass in self._fieldList:
props.append(
davxml.PrincipalSearchProperty(
davxml.PropertyContainer(
Modified: CalendarServer/trunk/twistedcaldav/storebridge.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/storebridge.py 2013-07-19 15:38:10 UTC (rev 11539)
+++ CalendarServer/trunk/twistedcaldav/storebridge.py 2013-07-19 15:40:18 UTC (rev 11540)
@@ -82,6 +82,7 @@
from twistedcaldav.customxml import calendarserver_namespace
from twistedcaldav.instance import InvalidOverriddenInstanceError, \
TooManyInstancesError
+import collections
"""
Wrappers to translate between the APIs in L{txdav.caldav.icalendarstore} and
@@ -1163,7 +1164,7 @@
except InvalidICalendarDataError:
return None
- by_uid = {}
+ by_uid = collections.OrderedDict()
by_tzid = {}
for subcomponent in vcal.subcomponents():
if subcomponent.name() == "VTIMEZONE":
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130719/943bfa24/attachment.html>
More information about the calendarserver-changes
mailing list