[CalendarServer-changes] [9293] CalendarServer/branches/users/glyph/uuid-normalize/txdav/common/ datastore/sql.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu May 24 13:34:30 PDT 2012
Revision: 9293
http://trac.macosforge.org/projects/calendarserver/changeset/9293
Author: glyph at apple.com
Date: 2012-05-24 13:34:30 -0700 (Thu, 24 May 2012)
Log Message:
-----------
Make sure that duplicate calendar homes are always UID-normalized before copying their contents.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/uuid-normalize/txdav/common/datastore/sql.py
Modified: CalendarServer/branches/users/glyph/uuid-normalize/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/glyph/uuid-normalize/txdav/common/datastore/sql.py 2012-05-24 20:34:27 UTC (rev 9292)
+++ CalendarServer/branches/users/glyph/uuid-normalize/txdav/common/datastore/sql.py 2012-05-24 20:34:30 UTC (rev 9293)
@@ -4122,6 +4122,7 @@
fixedThisHome = yield fixOneCalendarHome(this)
else:
fixedThisHome = 0
+ fixedOtherHome = 0
if this is None:
log_msg(format="%(uid)r appears to be missing, already processed",
uid=UID)
@@ -4136,6 +4137,8 @@
"[%(homeType)s]",
uid=UID, newuid=newname, homeType=homeTypeName)
other = yield t.homeWithUID(homeType, newname)
+ if homeType == ECALENDARTYPE:
+ fixedOtherHome = yield fixOneCalendarHome(other)
if other is not None:
this = yield mergeHomes(t, this, other, homeType)
# NOTE: WE MUST NOT TOUCH EITHER HOME OBJECT AFTER THIS
@@ -4146,8 +4149,9 @@
elapsed = end - start
allElapsed.append(elapsed)
log_msg(format="Scanned UID %(uid)s; %(elapsed)s seconds elapsed,"
- " %(fixes)s properties fixed.", uid=UID, elapsed=elapsed,
- fixes=fixedThisHome)
+ " %(fixes)s properties fixed (%(duplicate)s fixes in "
+ "duplicate).", uid=UID, elapsed=elapsed, fixes=fixedThisHome,
+ duplicate=fixedOtherHome)
returnValue(None)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120524/92dee513/attachment-0001.html>
More information about the calendarserver-changes
mailing list