[CalendarServer-changes] [1938]
CalendarServer/trunk/twistedcaldav/itip.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Oct 3 08:43:47 PDT 2007
Revision: 1938
http://trac.macosforge.org/projects/calendarserver/changeset/1938
Author: cdaboo at apple.com
Date: 2007-10-03 08:43:47 -0700 (Wed, 03 Oct 2007)
Log Message:
-----------
Server no longer updates the SEQUENCE property value on the master component when an overridden
component is changed and has a new SEQUENCE.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/itip.py
Modified: CalendarServer/trunk/twistedcaldav/itip.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/itip.py 2007-10-02 21:15:05 UTC (rev 1937)
+++ CalendarServer/trunk/twistedcaldav/itip.py 2007-10-03 15:43:47 UTC (rev 1938)
@@ -392,11 +392,6 @@
existing_calendar = updatecal.iCalendar(calmatch)
existing_master = existing_calendar.masterComponent()
exdates = []
- max_sequence = None
- if existing_master:
- max_sequence = existing_master.propertyValue("SEQUENCE")
- if max_sequence is None:
- max_sequence = 0
for component in calendar.subcomponents():
if component.name() == "VTIMEZONE":
@@ -411,7 +406,6 @@
if compareComponents(old_component, component) < 0:
# Exclude the cancelled instance
exdates.append(component.getRecurrenceIDUTC())
- max_sequence = max(max_sequence, component.propertyValue("SEQUENCE"))
# Remove the existing component.
existing_calendar.removeComponent(old_component)
@@ -421,18 +415,12 @@
if compareComponents(existing_master, component) < 0:
# Exclude the cancelled instance
exdates.append(component.getRecurrenceIDUTC())
- max_sequence = max(max_sequence, component.propertyValue("SEQUENCE"))
# If we have any EXDATEs lets add them to the existing calendar object and write
# it back.
if exdates:
if existing_master:
existing_master.addProperty(Property("EXDATE", exdates))
- seq = existing_master.getProperty("SEQUENCE")
- if seq:
- seq.setValue(max_sequence)
- else:
- existing_master.addProperty(Property("SEQUENCE", max_sequence))
# See if there are still components in the calendar - we might have deleted the last overridden instance
# in which case the calendar object is empty (except for VTIMEZONEs).
@@ -884,12 +872,6 @@
# We will update the SEQUENCE on the master to the highest value of the current one on the master
# or the ones in the components we are changing.
- existing_master = oldcal.masterComponent()
- max_sequence = None
- if existing_master:
- max_sequence = existing_master.propertyValue("SEQUENCE")
- if max_sequence is None:
- max_sequence = 0
for component in newcal.subcomponents():
if component.name() == "VTIMEZONE":
@@ -900,15 +882,7 @@
if old_component:
oldcal.removeComponent(old_component)
oldcal.addComponent(component)
- max_sequence = max(max_sequence, component.propertyValue("SEQUENCE"))
- if existing_master:
- seq = existing_master.getProperty("SEQUENCE")
- if seq:
- seq.setValue(max_sequence)
- else:
- existing_master.addProperty(Property("SEQUENCE", max_sequence))
-
def getAllInfo(collection, calendar, ignore):
"""
Find each component in the calendar collection that has a matching UID with
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20071003/3a16e782/attachment.html
More information about the calendarserver-changes
mailing list