[CalendarServer-changes] [2211] CalendarServer/branches/users/wsanchez/guid-calendars/twistedcaldav/ static.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Mar 6 13:07:02 PST 2008


Revision: 2211
          http://trac.macosforge.org/projects/calendarserver/changeset/2211
Author:   wsanchez at apple.com
Date:     2008-03-06 13:07:02 -0800 (Thu, 06 Mar 2008)

Log Message:
-----------
Provision self before children.

Modified Paths:
--------------
    CalendarServer/branches/users/wsanchez/guid-calendars/twistedcaldav/static.py

Modified: CalendarServer/branches/users/wsanchez/guid-calendars/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/users/wsanchez/guid-calendars/twistedcaldav/static.py	2008-03-06 21:06:33 UTC (rev 2210)
+++ CalendarServer/branches/users/wsanchez/guid-calendars/twistedcaldav/static.py	2008-03-06 21:07:02 UTC (rev 2211)
@@ -483,13 +483,14 @@
         childPath = self.fp.child(name)
         child = CalendarHomeFile(childPath.path, self, record)
         if not child.exists():
-            #
-            # Find out if the child exists at the old (pre-1.2)
-            # location (ie. in the types hierarchy instead of the GUID
-            # hierarchy).
-            #
+            self.provision()
+
             oldPath = self.parent.getChild(record.recordType).fp.child(record.shortName)
             if oldPath.exists():
+                #
+                # The child exists at the old (pre-1.2) location (ie. in the types
+                # hierarchy instead of the GUID hierarchy).  Move to new location.
+                #
                 log.msg("Moving calendar home from old location %r to new location %r." % (oldPath, childPath))
                 try:
                     oldPath.moveTo(childPath)
@@ -500,10 +501,12 @@
                         "Unable to move calendar home."
                     ))
             else:
+                #
                 # NOTE: provisionDefaultCalendars() returns a deferred, which we are ignoring.
                 # The result being that the default calendars will be present at some point
                 # in the future, not necessarily right now, and we don't have a way to wait
                 # on that to finish.
+                #
                 child.provisionDefaultCalendars()
         return child
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080306/b8507369/attachment.html 


More information about the calendarserver-changes mailing list