<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[14672] CalendarServer/trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/14672">14672</a></dd>
<dt>Author</dt> <dd>sagen@apple.com</dd>
<dt>Date</dt> <dd>2015-04-10 10:57:10 -0700 (Fri, 10 Apr 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Simplification of ObjectResource removal APIs: .remove( ) always does implicit and will move to trash if enabled; .purge(implicitly=True) always bypasses the trash, and implicit can be turned off</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunkcalendarservertoolscalverifypy">CalendarServer/trunk/calendarserver/tools/calverify.py</a></li>
<li><a href="#CalendarServertrunkcalendarservertoolspurgepy">CalendarServer/trunk/calendarserver/tools/purge.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingprocessingpy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/processing.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingutilspy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/utils.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoresqlpy">CalendarServer/trunk/txdav/caldav/datastore/sql.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoresql_externalpy">CalendarServer/trunk/txdav/caldav/datastore/sql_external.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoretestcommonpy">CalendarServer/trunk/txdav/caldav/datastore/test/common.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoretesttest_attachmentspy">CalendarServer/trunk/txdav/caldav/datastore/test/test_attachments.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoretesttest_sqlpy">CalendarServer/trunk/txdav/caldav/datastore/test/test_sql.py</a></li>
<li><a href="#CalendarServertrunktxdavcarddavdatastoresqlpy">CalendarServer/trunk/txdav/carddav/datastore/sql.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorefilepy">CalendarServer/trunk/txdav/common/datastore/file.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorepoddingmigrationhome_syncpy">CalendarServer/trunk/txdav/common/datastore/podding/migration/home_sync.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorepoddingmigrationtesttest_home_syncpy">CalendarServer/trunk/txdav/common/datastore/podding/migration/test/test_home_sync.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoresqlpy">CalendarServer/trunk/txdav/common/datastore/sql.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoresql_externalpy">CalendarServer/trunk/txdav/common/datastore/sql_external.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoresql_notificationpy">CalendarServer/trunk/txdav/common/datastore/sql_notification.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoretesttest_trashpy">CalendarServer/trunk/txdav/common/datastore/test/test_trash.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoretestutilpy">CalendarServer/trunk/txdav/common/datastore/test/util.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoreworktesttest_inbox_cleanuppy">CalendarServer/trunk/txdav/common/datastore/work/test/test_inbox_cleanup.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkcalendarservertoolscalverifypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/calendarserver/tools/calverify.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/calendarserver/tools/calverify.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/calendarserver/tools/calverify.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -739,7 +739,7 @@
</span><span class="cx"> calendar = yield home.childWithID(calendarID)
</span><span class="cx"> calendarObj = yield calendar.objectResourceWithID(resid)
</span><span class="cx"> objname = calendarObj.name()
</span><del>- yield calendarObj.remove(implicitly=False, bypassTrash=True)
</del><ins>+ yield calendarObj.purge(implicitly=False)
</ins><span class="cx"> yield self.txn.commit()
</span><span class="cx"> self.txn = self.store.newTransaction()
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunkcalendarservertoolspurgepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/calendarserver/tools/purge.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/calendarserver/tools/purge.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/calendarserver/tools/purge.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -994,7 +994,7 @@
</span><span class="cx"> yield storeCalHome.removeUnacceptedShares()
</span><span class="cx"> notificationHome = yield txn.notificationsWithUID(storeCalHome.uid())
</span><span class="cx"> if notificationHome is not None:
</span><del>- yield notificationHome.remove(bypassTrash=True)
</del><ins>+ yield notificationHome.purge()
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="lines">@@ -1059,7 +1059,7 @@
</span><span class="cx"> if not self.dryrun:
</span><span class="cx"> retry = False
</span><span class="cx"> try:
</span><del>- yield childResource.remove(implicitly=doScheduling, bypassTrash=True)
</del><ins>+ yield childResource.purge(implicitly=doScheduling)
</ins><span class="cx"> incrementCount = True
</span><span class="cx"> except Exception, e:
</span><span class="cx"> print("Exception deleting %s: %s" % (uri, str(e)))
</span><span class="lines">@@ -1069,7 +1069,7 @@
</span><span class="cx"> # Try again with implicit scheduling off
</span><span class="cx"> print("Retrying deletion of %s with scheduling turned off" % (uri,))
</span><span class="cx"> try:
</span><del>- yield childResource.remove(implicitly=False, bypassTrash=True)
</del><ins>+ yield childResource.purge(implicitly=False)
</ins><span class="cx"> incrementCount = True
</span><span class="cx"> except Exception, e:
</span><span class="cx"> print("Still couldn't delete %s even with scheduling turned off: %s" % (uri, str(e)))
</span><span class="lines">@@ -1112,7 +1112,7 @@
</span><span class="cx"> print("Deleting calendar: %s" % (calendarName,))
</span><span class="cx"> if not self.dryrun:
</span><span class="cx"> if calColl.owned():
</span><del>- yield storeCalHome.removeChildWithName(calendarName, bypassTrash=True)
</del><ins>+ yield storeCalHome.removeChildWithName(calendarName, useTrash=False)
</ins><span class="cx"> else:
</span><span class="cx"> yield calColl.unshare()
</span><span class="cx">
</span><span class="lines">@@ -1179,7 +1179,7 @@
</span><span class="cx"> if not self.dryrun:
</span><span class="cx"> # Also remove the addressbook collection itself
</span><span class="cx"> if abColl.owned():
</span><del>- yield storeAbHome.removeChildWithName(abName, bypassTrash=True)
</del><ins>+ yield storeAbHome.removeChildWithName(abName, useTrash=False)
</ins><span class="cx"> else:
</span><span class="cx"> yield abColl.unshare()
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingprocessingpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/processing.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/processing.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/processing.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -1009,7 +1009,7 @@
</span><span class="cx"> @type name: C{str}
</span><span class="cx"> """
</span><span class="cx">
</span><del>- yield resource._removeInternal(internal_state=ComponentRemoveState.INTERNAL, bypassTrash=True)
</del><ins>+ yield resource._removeInternal(internal_state=ComponentRemoveState.INTERNAL, useTrash=False)
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> def resetAttendeePartstat(self, component, cuas, partstat, hadRSVP=False):
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingutilspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/utils.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/utils.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/utils.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> # Delete all but the first one
</span><span class="cx"> log.debug("Should only have zero or one scheduling object resource with UID '%s' in calendar home: %s" % (uid, calendar_home,))
</span><span class="cx"> for resource in objectResources[1:]:
</span><del>- yield resource._removeInternal(internal_state=ComponentRemoveState.INTERNAL, bypassTrash=True)
</del><ins>+ yield resource._removeInternal(internal_state=ComponentRemoveState.INTERNAL, useTrash=False)
</ins><span class="cx"> objectResources = objectResources[:1]
</span><span class="cx">
</span><span class="cx"> returnValue(objectResources[0] if len(objectResources) == 1 else None)
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoresqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/sql.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/sql.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/caldav/datastore/sql.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -591,7 +591,7 @@
</span><span class="cx"> for objectResource in objectResources:
</span><span class="cx"> # The matching calendar resource is in the trash, so delete it
</span><span class="cx"> if (yield objectResource.isInTrash()):
</span><del>- yield objectResource.remove(bypassTrash=True)
</del><ins>+ yield objectResource.purge(implicitly=False)
</ins><span class="cx"> continue
</span><span class="cx"> if ok_object and objectResource._resourceID == ok_object._resourceID:
</span><span class="cx"> continue
</span><span class="lines">@@ -1321,7 +1321,7 @@
</span><span class="cx">
</span><span class="cx"> if child is None:
</span><span class="cx"> child = yield self.objectResourceWithID(rid)
</span><del>- yield child._removeInternal(internal_state=ComponentRemoveState.INTERNAL, bypassTrash=True)
</del><ins>+ yield child._removeInternal(internal_state=ComponentRemoveState.INTERNAL, useTrash=False)
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> def calendarObjectsInTimeRange(self, start, end, timeZone):
</span><span class="lines">@@ -3598,7 +3598,7 @@
</span><span class="cx">
</span><span class="cx"> # Now forcibly delete the event
</span><span class="cx"> if not inserting:
</span><del>- yield self._removeInternal(internal_state=ComponentRemoveState.INTERNAL, bypassTrash=True)
</del><ins>+ yield self._removeInternal(internal_state=ComponentRemoveState.INTERNAL, useTrash=False)
</ins><span class="cx"> raise ResourceDeletedError("Resource modified but immediately deleted by the server.")
</span><span class="cx"> else:
</span><span class="cx"> raise AttendeeAllowedError("Attendee cannot create event for Organizer: {0}".format(implicit_result,))
</span><span class="lines">@@ -4173,28 +4173,32 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><del>- def remove(self, implicitly=True, bypassTrash=False):
- if (yield self.isInTrash()):
- implicitly = False
- returnValue((
- yield self._removeInternal(
- internal_state=ComponentRemoveState.NORMAL if implicitly else ComponentRemoveState.NORMAL_NO_IMPLICIT, bypassTrash=bypassTrash
- )
- ))
</del><ins>+ def toTrash(self):
+ yield self._removeInternal(
+ internal_state=ComponentRemoveState.NORMAL, useTrash=config.EnableTrashCollection
+ )
</ins><span class="cx">
</span><span class="cx">
</span><del>- def purge(self):
</del><ins>+ @inlineCallbacks
+ def _reallyRemove(self):
+ yield self._removeInternal(
+ internal_state=ComponentRemoveState.NORMAL, useTrash=False
+ )
+
+
+ @inlineCallbacks
+ def purge(self, implicitly=True):
</ins><span class="cx"> """
</span><del>- Do a "silent" removal of this object resource.
</del><ins>+ Do an (optionally implicit) removal of this object resource, bypassing the trash.
</ins><span class="cx"> """
</span><del>- return self._removeInternal(
- ComponentRemoveState.NORMAL_NO_IMPLICIT, bypassTrash=True
</del><ins>+ yield self._removeInternal(
+ internal_state=ComponentRemoveState.NORMAL if implicitly else ComponentRemoveState.NORMAL_NO_IMPLICIT, useTrash=False
</ins><span class="cx"> )
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def _removeInternal(
</span><del>- self, internal_state=ComponentRemoveState.NORMAL, bypassTrash=False
</del><ins>+ self, internal_state=ComponentRemoveState.NORMAL, useTrash=False
</ins><span class="cx"> ):
</span><span class="cx">
</span><span class="cx"> isinbox = self._calendar.isInbox()
</span><span class="lines">@@ -4205,6 +4209,13 @@
</span><span class="cx"> # Get data we need for implicit scheduling
</span><span class="cx"> calendar = (yield self.componentForUser())
</span><span class="cx"> scheduler = ImplicitScheduler(logItems=self._txn.logItems)
</span><ins>+ # Cannot do implicit in sharee's shared calendar
+ if not self.calendar().owned():
+ scheduler.setSchedulingNotAllowed(
+ ShareeAllowedError,
+ "Sharee's cannot schedule",
+ )
+
</ins><span class="cx"> do_implicit_action, _ignore = (yield scheduler.testImplicitSchedulingDELETE(
</span><span class="cx"> self.calendar(),
</span><span class="cx"> self,
</span><span class="lines">@@ -4214,40 +4225,31 @@
</span><span class="cx"> if do_implicit_action:
</span><span class="cx"> yield NamedLock.acquire(self._txn, "ImplicitUIDLock:{0}".format(hashlib.md5(calendar.resourceUID()).hexdigest(),))
</span><span class="cx">
</span><del>-
</del><span class="cx"> if isinbox:
</span><del>- bypassTrash = True
</del><ins>+ useTrash = False
</ins><span class="cx"> else:
</span><span class="cx"> calendar = (yield self.componentForUser())
</span><span class="cx"> status = calendar.mainComponent().getProperty("STATUS")
</span><span class="cx"> if status is not None:
</span><span class="cx"> status = status.strvalue()
</span><span class="cx"> if status == "CANCELLED":
</span><del>- bypassTrash = True
</del><ins>+ useTrash = False
</ins><span class="cx">
</span><del>- if bypassTrash:
</del><ins>+ if useTrash:
+ # Always remove the group attendee link to prevent trashed items from being reconciled when a group changes
+ yield GroupAttendeeRecord.deletesimple(self._txn, resourceID=self._resourceID)
+
+ yield super(CalendarObject, self).toTrash()
+
+ else:
</ins><span class="cx"> # Need to also remove attachments
</span><span class="cx"> if internal_state != ComponentRemoveState.INTERNAL:
</span><span class="cx"> if self._dropboxID:
</span><span class="cx"> yield DropBoxAttachment.resourceRemoved(self._txn, self._resourceID, self._dropboxID)
</span><span class="cx"> yield ManagedAttachment.resourceRemoved(self._txn, self._resourceID)
</span><span class="cx">
</span><del>- yield super(CalendarObject, self).reallyRemove()
- else:
- # Always remove the group attendee link to prevent trashed items from being reconciled when a group changes
- yield GroupAttendeeRecord.deletesimple(self._txn, resourceID=self._resourceID)
</del><ins>+ yield super(CalendarObject, self)._reallyRemove()
</ins><span class="cx">
</span><del>- # Do scheduling check before the move to trash
- if scheduler is not None:
- # Cannot do implicit in sharee's shared calendar
- if not self.calendar().owned():
- scheduler.setSchedulingNotAllowed(
- ShareeAllowedError,
- "Sharee's cannot schedule",
- )
-
- yield super(CalendarObject, self).remove()
-
</del><span class="cx"> # Do scheduling
</span><span class="cx"> if scheduler is not None:
</span><span class="cx"> yield scheduler.doImplicitScheduling()
</span><span class="lines">@@ -5122,7 +5124,7 @@
</span><span class="cx"> yield self._setComponentInternal(ical_new, internal_state=ComponentUpdateState.SPLIT_ATTENDEE)
</span><span class="cx"> else:
</span><span class="cx"> # The split removed all components from this object - remove it
</span><del>- yield self._removeInternal(internal_state=ComponentRemoveState.INTERNAL, bypassTrash=True)
</del><ins>+ yield self._removeInternal(internal_state=ComponentRemoveState.INTERNAL, useTrash=False)
</ins><span class="cx">
</span><span class="cx"> # Create a new resource and store its data (but not if the parent is "inbox", or if it is empty)
</span><span class="cx"> if not self.calendar().isInbox() and ical_old.mainType() is not None:
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoresql_externalpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/sql_external.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/sql_external.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/caldav/datastore/sql_external.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -219,7 +219,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> def _removeInternal(
</span><del>- self, internal_state=ComponentRemoveState.NORMAL, bypassTrash=False
</del><ins>+ self, internal_state=ComponentRemoveState.NORMAL, useTrash=False
</ins><span class="cx"> ):
</span><span class="cx"> raise AssertionError("CalendarObjectExternal: not supported")
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoretestcommonpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/test/common.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/test/common.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/common.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -883,7 +883,7 @@
</span><span class="cx"> ctxn = self.concurrentTransaction()
</span><span class="cx"> calendar1prime = yield self.calendarUnderTest(ctxn)
</span><span class="cx"> obj1 = yield calendar1prime.calendarObjectWithName("1.ics")
</span><del>- yield obj1.remove(bypassTrash=True)
</del><ins>+ yield obj1.purge()
</ins><span class="cx"> yield ctxn.commit()
</span><span class="cx"> try:
</span><span class="cx"> retrieval = yield calendarObject.component()
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoretesttest_attachmentspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/test/test_attachments.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/test/test_attachments.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/test_attachments.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -687,7 +687,7 @@
</span><span class="cx">
</span><span class="cx"> # Fully remove resource
</span><span class="cx"> objects = yield self.trashObjectsUnderTest()
</span><del>- yield objects[0].remove(bypassTrash=True)
</del><ins>+ yield objects[0].purge()
</ins><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> # Attachments don't exist and will not count towards quota
</span><span class="lines">@@ -741,7 +741,7 @@
</span><span class="cx">
</span><span class="cx"> # Remove resource
</span><span class="cx"> obj = yield self.calendarObjectUnderTest()
</span><del>- yield obj.remove(bypassTrash=True)
</del><ins>+ yield obj.purge()
</ins><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> self.assertFalse(os.path.exists(apath1))
</span><span class="lines">@@ -836,7 +836,7 @@
</span><span class="cx">
</span><span class="cx"> # Remove resource
</span><span class="cx"> obj = yield self.calendarObjectUnderTest()
</span><del>- yield obj.remove(bypassTrash=True)
</del><ins>+ yield obj.purge()
</ins><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> self.assertTrue(os.path.exists(apath))
</span><span class="lines">@@ -848,7 +848,7 @@
</span><span class="cx">
</span><span class="cx"> # Remove resource
</span><span class="cx"> obj = yield self.calendarObjectUnderTest(name="test.ics")
</span><del>- yield obj.remove(bypassTrash=True)
</del><ins>+ yield obj.purge()
</ins><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> self.assertFalse(os.path.exists(apath))
</span><span class="lines">@@ -1314,7 +1314,7 @@
</span><span class="cx">
</span><span class="cx"> # Fully remove resource
</span><span class="cx"> objects = yield self.trashObjectsUnderTest()
</span><del>- yield objects[0].remove(bypassTrash=True)
</del><ins>+ yield objects[0].purge()
</ins><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> # Attachments don't exist and will not count towards quota
</span><span class="lines">@@ -1362,7 +1362,7 @@
</span><span class="cx">
</span><span class="cx"> # Remove resource
</span><span class="cx"> obj = yield self.calendarObjectUnderTest()
</span><del>- yield obj.remove(bypassTrash=True)
</del><ins>+ yield obj.purge()
</ins><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> self.assertFalse(os.path.exists(apath1))
</span><span class="lines">@@ -1402,7 +1402,7 @@
</span><span class="cx">
</span><span class="cx"> # Remove resource
</span><span class="cx"> obj = yield self.calendarObjectUnderTest()
</span><del>- yield obj.remove(bypassTrash=True)
</del><ins>+ yield obj.purge()
</ins><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> self.assertTrue(os.path.exists(apath))
</span><span class="lines">@@ -1414,7 +1414,7 @@
</span><span class="cx">
</span><span class="cx"> # Remove resource
</span><span class="cx"> obj = yield self.calendarObjectUnderTest(name="test.ics")
</span><del>- yield obj.remove(bypassTrash=True)
</del><ins>+ yield obj.purge()
</ins><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> self.assertFalse(os.path.exists(apath))
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoretesttest_sqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/test/test_sql.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/test/test_sql.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/test_sql.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -827,7 +827,7 @@
</span><span class="cx">
</span><span class="cx"> # Remove calendar and check for no properties
</span><span class="cx"> home = yield self.homeUnderTest()
</span><del>- yield home.removeCalendarWithName(name, bypassTrash=True)
</del><ins>+ yield home.removeCalendarWithName(name, useTrash=False)
</ins><span class="cx"> rows = yield _allWithID.on(self.transactionUnderTest(), resourceID=resourceID)
</span><span class="cx"> self.assertEqual(len(tuple(rows)), 0)
</span><span class="cx"> yield self.commit()
</span><span class="lines">@@ -1218,7 +1218,7 @@
</span><span class="cx"> home = yield self.transactionUnderTest().calendarHomeWithUID("home_defaults")
</span><span class="cx"> self.assertEqual(home._default_events, default_events._resourceID)
</span><span class="cx"> self.assertEqual(home._default_tasks, default_tasks._resourceID)
</span><del>- yield home.removeCalendarWithName("calendar_1-vtodo", bypassTrash=False)
</del><ins>+ yield home.removeCalendarWithName("calendar_1-vtodo", useTrash=True)
</ins><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> home = yield self.transactionUnderTest().calendarHomeWithUID("home_defaults")
</span><span class="lines">@@ -1297,7 +1297,7 @@
</span><span class="cx">
</span><span class="cx"> home = yield self.homeUnderTest(name="home_defaults")
</span><span class="cx"> calendar1 = yield home.calendarWithName("calendar_1")
</span><del>- yield calendar1.remove(bypassTrash=False)
</del><ins>+ yield calendar1.remove()
</ins><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> home = yield self.homeUnderTest(name="home_defaults")
</span><span class="lines">@@ -1335,7 +1335,7 @@
</span><span class="cx">
</span><span class="cx"> home = yield self.homeUnderTest(name="home_defaults")
</span><span class="cx"> calendar1 = yield home.calendarWithName("calendar_1")
</span><del>- yield calendar1.remove(bypassTrash=False)
</del><ins>+ yield calendar1.remove()
</ins><span class="cx"> default_events = yield home.defaultCalendar("VEVENT", create=False)
</span><span class="cx"> self.assertTrue(default_events is None)
</span><span class="cx"> yield self.commit()
</span><span class="lines">@@ -3599,7 +3599,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def test_calendarObjectSplit_removed(self):
</span><span class="cx"> """
</span><del>- Test that splitting of calendar objects dioes not occur when the object is
</del><ins>+ Test that splitting of calendar objects does not occur when the object is
</ins><span class="cx"> removed before the work can be done.
</span><span class="cx"> """
</span><span class="cx"> self.patch(config.Scheduling.Options.Splitting, "Enabled", True)
</span><span class="lines">@@ -3677,7 +3677,7 @@
</span><span class="cx"> yield self.abort()
</span><span class="cx">
</span><span class="cx"> cobj = yield self.calendarObjectUnderTest(name="data1.ics", calendar_name="calendar", home="user01")
</span><del>- yield cobj.remove(bypassTrash=True)
</del><ins>+ yield cobj.purge(implicitly=True)
</ins><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> rows = yield Select(
</span></span></pre></div>
<a id="CalendarServertrunktxdavcarddavdatastoresqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/carddav/datastore/sql.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/carddav/datastore/sql.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/carddav/datastore/sql.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -888,7 +888,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><del>- def remove(self, bypassTrash=True):
</del><ins>+ def remove(self):
</ins><span class="cx">
</span><span class="cx"> if self._resourceID == self._home._resourceID:
</span><span class="cx">
</span><span class="lines">@@ -908,6 +908,7 @@
</span><span class="cx"> else:
</span><span class="cx"> returnValue((yield super(AddressBook, self).remove()))
</span><span class="cx">
</span><ins>+ purge = remove
</ins><span class="cx">
</span><span class="cx"> def rename(self, name):
</span><span class="cx"> # better error?
</span><span class="lines">@@ -2152,7 +2153,7 @@
</span><span class="cx"> removed=True,
</span><span class="cx"> )
</span><span class="cx">
</span><del>- yield super(AddressBookObject, self).reallyRemove() # FIXME: carddav trash?
</del><ins>+ yield super(AddressBookObject, self)._reallyRemove() # FIXME: carddav trash?
</ins><span class="cx"> self._kind = None
</span><span class="cx"> self._ownerAddressBookResourceID = None
</span><span class="cx"> self._objectText = None
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorefilepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/file.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/file.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/common/datastore/file.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -848,7 +848,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> @writeOperation
</span><del>- def removeChildWithName(self, name, bypassTrash=False):
</del><ins>+ def removeChildWithName(self, name, useTrash=True):
</ins><span class="cx"> if name.startswith(".") or name in self._removedChildren:
</span><span class="cx"> raise NoSuchHomeChildError(name)
</span><span class="cx">
</span><span class="lines">@@ -1403,7 +1403,7 @@
</span><span class="cx"> raise NotImplementedError
</span><span class="cx">
</span><span class="cx">
</span><del>- def remove(self, bypassTrash=False):
</del><ins>+ def remove(self):
</ins><span class="cx">
</span><span class="cx"> # FIXME: test for undo
</span><span class="cx"> objectResourcePath = self._path
</span><span class="lines">@@ -1414,6 +1414,7 @@
</span><span class="cx">
</span><span class="cx"> self._parentCollection.removedObjectResource(self)
</span><span class="cx">
</span><ins>+ purge = remove
</ins><span class="cx">
</span><span class="cx"> def _text(self):
</span><span class="cx"> raise NotImplementedError
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorepoddingmigrationhome_syncpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/podding/migration/home_sync.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/podding/migration/home_sync.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/common/datastore/podding/migration/home_sync.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -647,7 +647,7 @@
</span><span class="cx"> local_objects = yield local_calendar.objectResourcesWithNames(purge_names)
</span><span class="cx">
</span><span class="cx"> for local_object in local_objects:
</span><del>- yield local_object.purge()
</del><ins>+ yield local_object.purge(implicitly=False)
</ins><span class="cx"> self.accounting(" Purged calendar object local-id={}.".format(local_object.id()))
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -737,7 +737,7 @@
</span><span class="cx">
</span><span class="cx"> # Purge the ones that remain
</span><span class="cx"> for local_object in local_objects.values():
</span><del>- yield local_object.purge()
</del><ins>+ yield local_object.purge(implicitly=False)
</ins><span class="cx"> self.accounting(" Purged calendar object local-id={}.".format(local_object.id()))
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorepoddingmigrationtesttest_home_syncpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/podding/migration/test/test_home_sync.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/podding/migration/test/test_home_sync.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/common/datastore/podding/migration/test/test_home_sync.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -552,7 +552,7 @@
</span><span class="cx"> home0 = yield self.homeUnderTest(txn=self.theTransactionUnderTest(0), name="user01", create=True)
</span><span class="cx"> calendar0 = yield home0.childWithName("new-calendar")
</span><span class="cx"> del details0[calendar0.id()]
</span><del>- yield calendar0.remove(bypassTrash=True)
</del><ins>+ yield calendar0.purge()
</ins><span class="cx"> yield self.commitTransaction(0)
</span><span class="cx">
</span><span class="cx"> # Trigger sync
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoresqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/sql.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/sql.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/common/datastore/sql.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -1089,7 +1089,7 @@
</span><span class="cx"> home = (yield self.calendarHomeWithUID(uid))
</span><span class="cx"> calendar = (yield home.childWithName(calendarName))
</span><span class="cx"> resource = (yield calendar.objectResourceWithName(eventName))
</span><del>- yield resource.remove(implicitly=False, bypassTrash=True)
</del><ins>+ yield resource.purge(implicitly=False)
</ins><span class="cx"> count += 1
</span><span class="cx"> returnValue(count)
</span><span class="cx">
</span><span class="lines">@@ -2312,14 +2312,18 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><del>- def removeChildWithName(self, name, bypassTrash=False):
</del><ins>+ def removeChildWithName(self, name, useTrash=True):
</ins><span class="cx"> child = yield self.childWithName(name)
</span><span class="cx"> if child is None:
</span><span class="cx"> raise NoSuchHomeChildError()
</span><span class="cx"> key = self._childrenKey(child.isInTrash())
</span><span class="cx"> resourceID = child._resourceID
</span><span class="cx">
</span><del>- yield child.remove(bypassTrash=bypassTrash)
</del><ins>+ if useTrash:
+ yield child.remove()
+ else:
+ yield child.purge()
+
</ins><span class="cx"> self._children[key].pop(name, None)
</span><span class="cx"> self._children[key].pop(resourceID, None)
</span><span class="cx">
</span><span class="lines">@@ -2961,7 +2965,7 @@
</span><span class="cx"> msg = " Removing \"{}\"...".format(summary)
</span><span class="cx"> print(msg)
</span><span class="cx"> log.info(msg)
</span><del>- yield child.reallyRemove()
</del><ins>+ yield child.purge(implicitly=False)
</ins><span class="cx"> if verbose:
</span><span class="cx"> print("")
</span><span class="cx">
</span><span class="lines">@@ -2982,7 +2986,7 @@
</span><span class="cx"> msg = " Removing \"{}\"...".format(summary)
</span><span class="cx"> print(msg)
</span><span class="cx"> log.info(msg)
</span><del>- yield child.reallyRemove()
</del><ins>+ yield child.purge(implicitly=False)
</ins><span class="cx"> if verbose:
</span><span class="cx"> print("")
</span><span class="cx">
</span><span class="lines">@@ -2991,7 +2995,7 @@
</span><span class="cx"> msg = "Removing collection \"{}\"...".format(displayName.encode("utf-8"))
</span><span class="cx"> print(msg)
</span><span class="cx"> log.info(msg)
</span><del>- yield collection.reallyRemove()
</del><ins>+ yield collection.purge()
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="lines">@@ -3577,9 +3581,10 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><del>- def remove(self, bypassTrash=False):
</del><ins>+ def remove(self):
</ins><span class="cx"> """
</span><del>- Just moves the collection to the trash
</del><ins>+ If trash is enabled, move the collection to trash, otherwise fully
+ delete it.
</ins><span class="cx"> """
</span><span class="cx">
</span><span class="cx"> if config.EnableTrashCollection:
</span><span class="lines">@@ -3587,16 +3592,13 @@
</span><span class="cx"> if isInTrash:
</span><span class="cx"> raise AlreadyInTrashError
</span><span class="cx"> else:
</span><del>- if bypassTrash:
- yield self.reallyRemove()
- else:
- yield self.toTrash()
</del><ins>+ yield self.toTrash()
</ins><span class="cx"> else:
</span><del>- yield self.reallyRemove()
</del><ins>+ yield self._reallyRemove()
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><del>- def reallyRemove(self):
</del><ins>+ def _reallyRemove(self):
</ins><span class="cx">
</span><span class="cx"> # Stop sharing first
</span><span class="cx"> yield self.ownerDeleteShare()
</span><span class="lines">@@ -3728,9 +3730,9 @@
</span><span class="cx">
</span><span class="cx"> def purge(self):
</span><span class="cx"> """
</span><del>- Do a "silent" removal of this object resource.
</del><ins>+ Do a "silent" removal of this child.
</ins><span class="cx"> """
</span><del>- return self.reallyRemove()
</del><ins>+ return self._reallyRemove()
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> def ownerHome(self):
</span><span class="lines">@@ -5062,9 +5064,9 @@
</span><span class="cx"> raise NotImplementedError
</span><span class="cx">
</span><span class="cx">
</span><del>- def remove(self, options=None):
</del><ins>+ def remove(self):
</ins><span class="cx"> """
</span><del>- Just moves the object to the trash
</del><ins>+ If trash is enabled move the object to the trash, otherwise fully delete it
</ins><span class="cx"> """
</span><span class="cx">
</span><span class="cx"> if config.EnableTrashCollection:
</span><span class="lines">@@ -5073,11 +5075,11 @@
</span><span class="cx"> else:
</span><span class="cx"> return self.toTrash()
</span><span class="cx"> else:
</span><del>- return self.reallyRemove(options=options)
</del><ins>+ return self._reallyRemove()
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><del>- def reallyRemove(self, options=None):
</del><ins>+ def _reallyRemove(self):
</ins><span class="cx"> """
</span><span class="cx"> Remove, bypassing the trash
</span><span class="cx"> """
</span><span class="lines">@@ -5185,9 +5187,9 @@
</span><span class="cx">
</span><span class="cx"> def purge(self):
</span><span class="cx"> """
</span><del>- Do a "silent" removal of this object resource.
</del><ins>+ Delete this object, bypassing trash
</ins><span class="cx"> """
</span><del>- return self.reallyRemove()
</del><ins>+ return self._reallyRemove()
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> def removeNotifyCategory(self):
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoresql_externalpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/sql_external.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/sql_external.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/common/datastore/sql_external.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx"> returnValue(child)
</span><span class="cx">
</span><span class="cx">
</span><del>- def removeChildWithName(self, name, bypassTrash=False):
</del><ins>+ def removeChildWithName(self, name, useTrash=True):
</ins><span class="cx"> """
</span><span class="cx"> No children.
</span><span class="cx"> """
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx"> """
</span><span class="cx"> if child._bindUID is None:
</span><span class="cx"> raise AssertionError("CommonHomeExternal: not supported")
</span><del>- yield super(CommonHomeExternal, self).removeChildWithName(child.name(), bypassTrash=True)
</del><ins>+ yield super(CommonHomeExternal, self).removeChildWithName(child.name(), useTrash=False)
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> def syncToken(self):
</span><span class="lines">@@ -294,13 +294,13 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><del>- def remove(self, bypassTrash=True):
</del><ins>+ def remove(self):
</ins><span class="cx"> """
</span><span class="cx"> External shares are never removed directly - instead they must be "uninvited". However,
</span><span class="cx"> the owner's external calendar can be removed.
</span><span class="cx"> """
</span><span class="cx"> if self.owned():
</span><del>- yield super(CommonHomeChildExternal, self).remove(bypassTrash=bypassTrash)
</del><ins>+ yield super(CommonHomeChildExternal, self).remove()
</ins><span class="cx"> else:
</span><span class="cx"> raise AssertionError("CommonHomeChildExternal: not supported")
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoresql_notificationpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/sql_notification.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/sql_notification.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/common/datastore/sql_notification.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -563,7 +563,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><del>- def remove(self, bypassTrash=True):
</del><ins>+ def remove(self):
</ins><span class="cx"> """
</span><span class="cx"> Remove DB rows corresponding to this notification home.
</span><span class="cx"> """
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoretesttest_trashpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/test/test_trash.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/test/test_trash.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/common/datastore/test/test_trash.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -794,7 +794,7 @@
</span><span class="cx"> txn = self.store.newTransaction()
</span><span class="cx">
</span><span class="cx"> resource = yield self._getResource(txn, "user02", trash2.name(), "")
</span><del>- yield resource.reallyRemove()
</del><ins>+ yield resource.purge()
</ins><span class="cx">
</span><span class="cx"> yield txn.commit()
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoretestutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/test/util.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/test/util.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/common/datastore/test/util.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -510,11 +510,11 @@
</span><span class="cx"> for name in ical.allowedStoreComponents:
</span><span class="cx"> yield home.removeCalendarWithName(
</span><span class="cx"> home._componentCalendarName[name],
</span><del>- bypassTrash=True
</del><ins>+ useTrash=False
</ins><span class="cx"> )
</span><span class="cx"> else:
</span><del>- yield home.removeCalendarWithName("calendar", bypassTrash=True)
- yield home.removeCalendarWithName("inbox", bypassTrash=True)
</del><ins>+ yield home.removeCalendarWithName("calendar", useTrash=False)
+ yield home.removeCalendarWithName("inbox", useTrash=False)
</ins><span class="cx"> except NoSuchHomeChildError:
</span><span class="cx"> pass
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoreworktesttest_inbox_cleanuppy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/work/test/test_inbox_cleanup.py (14671 => 14672)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/work/test/test_inbox_cleanup.py        2015-04-09 18:46:46 UTC (rev 14671)
+++ CalendarServer/trunk/txdav/common/datastore/work/test/test_inbox_cleanup.py        2015-04-10 17:57:10 UTC (rev 14672)
</span><span class="lines">@@ -164,7 +164,7 @@
</span><span class="cx"> # create orphans by deleting events
</span><span class="cx"> cal = yield self.calendarUnderTest(home="user01", name="calendar")
</span><span class="cx"> for item in (yield cal.objectResourcesWithNames(["cal1.ics", "cal3.ics"])):
</span><del>- yield item.remove(bypassTrash=True)
</del><ins>+ yield item.purge()
</ins><span class="cx">
</span><span class="cx"> # do cleanup
</span><span class="cx"> yield self.transactionUnderTest().enqueue(CleanupOneInboxWork, homeID=cal.ownerHome()._resourceID, notBefore=datetime.datetime.utcnow())
</span></span></pre>
</div>
</div>
</body>
</html>