[CalendarServer-changes] [14863] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri May 29 13:22:36 PDT 2015
Revision: 14863
http://trac.calendarserver.org//changeset/14863
Author: cdaboo at apple.com
Date: 2015-05-29 13:22:36 -0700 (Fri, 29 May 2015)
Log Message:
-----------
Latest CDT. Minor trash tweaks.
Modified Paths:
--------------
CalendarServer/trunk/requirements-dev.txt
CalendarServer/trunk/twistedcaldav/controlapi.py
CalendarServer/trunk/txdav/caldav/datastore/sql.py
CalendarServer/trunk/txdav/common/datastore/sql.py
Modified: CalendarServer/trunk/requirements-dev.txt
===================================================================
--- CalendarServer/trunk/requirements-dev.txt 2015-05-29 20:19:32 UTC (rev 14862)
+++ CalendarServer/trunk/requirements-dev.txt 2015-05-29 20:22:36 UTC (rev 14863)
@@ -8,4 +8,4 @@
q
tl.eggdeps
--editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVClientLibrary/trunk@14856#egg=CalDAVClientLibrary
---editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@14859#egg=CalDAVTester
+--editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@14862#egg=CalDAVTester
Modified: CalendarServer/trunk/twistedcaldav/controlapi.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/controlapi.py 2015-05-29 20:19:32 UTC (rev 14862)
+++ CalendarServer/trunk/twistedcaldav/controlapi.py 2015-05-29 20:22:36 UTC (rev 14863)
@@ -39,6 +39,9 @@
DAVResourceWithoutChildrenMixin
from twistedcaldav.resource import ReadOnlyNoCopyResourceMixIn
+from txdav.caldav.datastore.scheduling.work import ScheduleOrganizerWork, \
+ ScheduleOrganizerSendWork, ScheduleReplyWork, ScheduleRefreshWork, \
+ ScheduleAutoReplyWork
from txdav.who.groups import GroupCacherPollingWork, GroupRefreshWork, \
GroupAttendeeReconciliationWork, GroupDelegateChangesWork, \
GroupShareeReconciliationWork
@@ -337,3 +340,15 @@
))
returnValue(self._ok("ok", "Group refresh scheduled"))
+
+
+ @inlineCallbacks
+ def action_schedulingdone(self, j):
+ """
+ Wait for all schedule queue items to complete.
+ """
+ yield JobItem.waitWorkDone(self._store.newTransaction, reactor, 120.0, (
+ ScheduleOrganizerWork, ScheduleOrganizerSendWork, ScheduleReplyWork, ScheduleRefreshWork, ScheduleAutoReplyWork,
+ ))
+
+ returnValue(self._ok("ok", "Scheduling done"))
Modified: CalendarServer/trunk/txdav/caldav/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/sql.py 2015-05-29 20:19:32 UTC (rev 14862)
+++ CalendarServer/trunk/txdav/caldav/datastore/sql.py 2015-05-29 20:22:36 UTC (rev 14863)
@@ -5205,8 +5205,9 @@
if ical_new.mainType() is not None:
if coercePartstatsInExistingResource:
+ organizer = ical_new.getOrganizer()
for attendee in ical_new.getAllAttendeeProperties():
- if attendee.parameterValue("SCHEDULE-AGENT", "SERVER").upper() == "SERVER" and attendee.hasParameter("PARTSTAT"):
+ if attendee.parameterValue("SCHEDULE-AGENT", "SERVER").upper() == "SERVER" and attendee.hasParameter("PARTSTAT") and attendee.value() != organizer:
attendee.setParameter("PARTSTAT", "NEEDS-ACTION")
yield self._setComponentInternal(ical_new, internal_state=ComponentUpdateState.SPLIT_ATTENDEE)
@@ -5299,7 +5300,7 @@
newdata = caldata.duplicate()
newdata.bumpiTIPInfo(doSequence=True)
for attendee in newdata.getAllAttendeeProperties():
- if attendee.parameterValue("SCHEDULE-AGENT", "SERVER").upper() == "SERVER" and attendee.hasParameter("PARTSTAT"):
+ if attendee.parameterValue("SCHEDULE-AGENT", "SERVER").upper() == "SERVER" and attendee.hasParameter("PARTSTAT") and attendee.value() != organizer:
attendee.setParameter("PARTSTAT", "NEEDS-ACTION")
Modified: CalendarServer/trunk/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql.py 2015-05-29 20:19:32 UTC (rev 14862)
+++ CalendarServer/trunk/txdav/common/datastore/sql.py 2015-05-29 20:22:36 UTC (rev 14863)
@@ -89,6 +89,7 @@
import datetime
import inspect
import itertools
+import os
import sys
import time
from uuid import uuid4
@@ -5258,9 +5259,12 @@
@inlineCallbacks
def toTrash(self):
+
+ # Preserve existing resource name extension
+ newName = str(uuid4()) + os.path.splitext(self.name())[1]
+
originalCollection = self._parentCollection._resourceID
trash = yield self._parentCollection.ownerHome().getTrash(create=True)
- newName = str(uuid4())
yield self.moveTo(trash, name=newName)
self._original_collection = originalCollection
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150529/69d586a5/attachment.html>
More information about the calendarserver-changes
mailing list