[CalendarServer-changes] [9278] CalendarServer/branches/users/glyph/uuid-normalize/twistedcaldav/ directory/augment.py

source_changes at macosforge.org source_changes at macosforge.org
Thu May 24 13:33:47 PDT 2012


Revision: 9278
          http://trac.macosforge.org/projects/calendarserver/changeset/9278
Author:   glyph at apple.com
Date:     2012-05-24 13:33:47 -0700 (Thu, 24 May 2012)
Log Message:
-----------
For now, normalize UUIDs in augments XML database whenever it's opened.  Also, don't use 'OrNot' version of normalization since there are no urn:uuid:s in there.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/uuid-normalize/twistedcaldav/directory/augment.py

Modified: CalendarServer/branches/users/glyph/uuid-normalize/twistedcaldav/directory/augment.py
===================================================================
--- CalendarServer/branches/users/glyph/uuid-normalize/twistedcaldav/directory/augment.py	2012-05-24 20:33:44 UTC (rev 9277)
+++ CalendarServer/branches/users/glyph/uuid-normalize/twistedcaldav/directory/augment.py	2012-05-24 20:33:47 UTC (rev 9278)
@@ -31,6 +31,7 @@
 from twistedcaldav.directory.xmlaugmentsparser import XMLAugmentsParser
 from twistedcaldav.xmlutil import newElementTreeWithRoot, addSubElement,\
     writeXML, readXML
+from twistedcaldav.directory.util import normalizeUUID
 
 
 log = Logger()
@@ -98,11 +99,10 @@
         @return: a L{Deferred} that fires when all records have been
             normalized.
         """
-        from txdav.base.datastore.util import normalizeUUIDOrNot
         remove = []
         add = []
         for uid in (yield self.getAllUIDs()):
-            nuid = normalizeUUIDOrNot(uid)
+            nuid = normalizeUUID(uid)
             if uid != nuid:
                 old = yield self._lookupAugmentRecord(uid)
                 new = copy.deepcopy(old)
@@ -266,6 +266,7 @@
             raise
 
         self.lastCached = time.time()
+        self.normalizeUUIDs()
 
 
     def getAllUIDs(self):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120524/b585ac33/attachment-0001.html>


More information about the calendarserver-changes mailing list