[CalendarServer-changes] [11776]

source_changes at macosforge.org source_changes at macosforge.org
Tue Oct 1 16:17:36 PDT 2013


Revision: 11776
          http://trac.calendarserver.org//changeset/11776
Author:   gaya at apple.com
Date:     2013-10-01 16:17:36 -0700 (Tue, 01 Oct 2013)
Log Message:
-----------
fix tests. Add comments.

Modified Paths:
--------------
    CalDAVTester/branches/users/gaya/sharedgroupfixestester/scripts/tests/CardDAV/sharing-sync.xml
    CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/carddav/datastore/sql.py

Modified: CalDAVTester/branches/users/gaya/sharedgroupfixestester/scripts/tests/CardDAV/sharing-sync.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupfixestester/scripts/tests/CardDAV/sharing-sync.xml	2013-10-01 21:45:16 UTC (rev 11775)
+++ CalDAVTester/branches/users/gaya/sharedgroupfixestester/scripts/tests/CardDAV/sharing-sync.xml	2013-10-01 23:17:36 UTC (rev 11776)
@@ -38,7 +38,7 @@
 	</start>
 	
 	<!-- test suite below is similar to test suite in ../CalDAV/sharing-sync.xml -->
-	<test-suite name='shared addressbook' ignore='yes'>
+	<test-suite name='shared addressbook' ignore='no'>
 		<test name='1a' ignore='no'>
 			<description>Initial sync tokens</description>
 			<request print-response='no'>
@@ -4283,6 +4283,20 @@
 			<description>remove resource then addressbook</description>
 			<request user="$userid3:" pswd="$pswd3:" print-response='no'>
 				<method>DELETE</method>
+				<ruri>$addressbookpath3:/2.vcf</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+			<request user="$userid3:" pswd="$pswd3:" print-response='no'>
+				<method>DELETE</method>
+				<ruri>$addressbookpath3:/1.vcf</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+			<request user="$userid3:" pswd="$pswd3:" print-response='no'>
+				<method>DELETE</method>
 				<ruri>$addressbookpath3:/</ruri>
 				<verify>
 					<callback>statusCode</callback>

Modified: CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/carddav/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/carddav/datastore/sql.py	2013-10-01 21:45:16 UTC (rev 11775)
+++ CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/carddav/datastore/sql.py	2013-10-01 23:17:36 UTC (rev 11776)
@@ -577,7 +577,7 @@
         For shared groups.  Find the items that have be added and removed since revision in the aboMembers
         tables.  Then add in changes from the revision table.
 
-        TODO: Cover the case where the sharing changes. Thinking now that I need a unshared group tombstone.
+        TODO: Cover the case where the sharing changes. Then we can handle revision < bindRevision
 
         @param revision: the sync revision to compare to
         @type revision: C{str}
@@ -601,10 +601,19 @@
                 # perhaps we could return a multistatus result of 403 instead: TODO: Check RFC
                 raise SyncTokenValidException
 
+        path = self.name()
+
         if self.fullyShared():
-            returnValue((yield super(AddressBook, self).sharedChildResourceNamesSinceRevision(revision, depth)))
+            # add change for addressbook group
+            changed, deleted = yield super(AddressBook, self).sharedChildResourceNamesSinceRevision(revision, depth)
 
-        path = self.name()
+            ''' add the following for have addressbook group in sync report
+            if changed or deleted and depth != "1":
+                changed.add("%s/%s" % (path, self._groupForSharedAddressBookName(),))
+            '''
+
+            returnValue((changed, deleted))
+
         changed = set()
         deleted = set()
         acceptedGroupIDs = set([groupBindRow[2] for groupBindRow in groupBindRows])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20131001/a4bb3dec/attachment-0001.html>


More information about the calendarserver-changes mailing list