[CalendarServer-changes] [11511] CalendarServer/branches/users/gaya/directorybacker

source_changes at macosforge.org source_changes at macosforge.org
Fri Jul 12 17:52:52 PDT 2013


Revision: 11511
          http://trac.calendarserver.org//changeset/11511
Author:   gaya at apple.com
Date:     2013-07-12 17:52:52 -0700 (Fri, 12 Jul 2013)
Log Message:
-----------
merge from trunk 11509

Modified Paths:
--------------
    CalendarServer/branches/users/gaya/directorybacker/calendarserver/platform/darwin/od/opendirectory.py
    CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/test/test_timezones.py
    CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/timezones.py
    CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Africa/Casablanca.ics
    CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Asia/Jerusalem.ics
    CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Asia/Tel_Aviv.ics
    CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Israel.ics
    CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/timezones.xml
    CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/version.txt
    CalendarServer/branches/users/gaya/directorybacker/txdav/xml/base.py

Property Changed:
----------------
    CalendarServer/branches/users/gaya/directorybacker/


Property changes on: CalendarServer/branches/users/gaya/directorybacker
___________________________________________________________________
Modified: svn:mergeinfo
   - /CalDAVTester/trunk:11193-11198
/CalendarServer/branches/config-separation:4379-4443
/CalendarServer/branches/egg-info-351:4589-4625
/CalendarServer/branches/generic-sqlstore:6167-6191
/CalendarServer/branches/new-store:5594-5934
/CalendarServer/branches/new-store-no-caldavfile:5911-5935
/CalendarServer/branches/new-store-no-caldavfile-2:5936-5981
/CalendarServer/branches/release/CalendarServer-4.3-dev:10180-10190,10192
/CalendarServer/branches/users/cdaboo/batchupload-6699:6700-7198
/CalendarServer/branches/users/cdaboo/cached-subscription-calendars-5692:5693-5702
/CalendarServer/branches/users/cdaboo/component-set-fixes:8130-8346
/CalendarServer/branches/users/cdaboo/directory-cache-on-demand-3627:3628-3644
/CalendarServer/branches/users/cdaboo/implicituidrace:8137-8141
/CalendarServer/branches/users/cdaboo/ischedule-dkim:9747-9979
/CalendarServer/branches/users/cdaboo/managed-attachments:9985-10145
/CalendarServer/branches/users/cdaboo/more-sharing-5591:5592-5601
/CalendarServer/branches/users/cdaboo/partition-4464:4465-4957
/CalendarServer/branches/users/cdaboo/pods:7297-7377
/CalendarServer/branches/users/cdaboo/pycalendar:7085-7206
/CalendarServer/branches/users/cdaboo/pycard:7227-7237
/CalendarServer/branches/users/cdaboo/queued-attendee-refreshes:7740-8287
/CalendarServer/branches/users/cdaboo/relative-config-paths-5070:5071-5105
/CalendarServer/branches/users/cdaboo/shared-calendars-5187:5188-5440
/CalendarServer/branches/users/cdaboo/store-scheduling:10876-11129
/CalendarServer/branches/users/cdaboo/timezones:7443-7699
/CalendarServer/branches/users/cdaboo/txn-debugging:8730-8743
/CalendarServer/branches/users/gaya/sharedgroups-3:11088-11204
/CalendarServer/branches/users/glyph/always-abort-txn-on-error:9958-9969
/CalendarServer/branches/users/glyph/case-insensitive-uid:8772-8805
/CalendarServer/branches/users/glyph/conn-limit:6574-6577
/CalendarServer/branches/users/glyph/contacts-server-merge:4971-5080
/CalendarServer/branches/users/glyph/dalify:6932-7023
/CalendarServer/branches/users/glyph/db-reconnect:6824-6876
/CalendarServer/branches/users/glyph/deploybuild:7563-7572
/CalendarServer/branches/users/glyph/digest-auth-redux:10624-10635
/CalendarServer/branches/users/glyph/disable-quota:7718-7727
/CalendarServer/branches/users/glyph/dont-start-postgres:6592-6614
/CalendarServer/branches/users/glyph/hang-fix:11465-11491
/CalendarServer/branches/users/glyph/imip-and-admin-html:7866-7984
/CalendarServer/branches/users/glyph/ipv6-client:9054-9105
/CalendarServer/branches/users/glyph/launchd-wrapper-bis:11413-11436
/CalendarServer/branches/users/glyph/linux-tests:6893-6900
/CalendarServer/branches/users/glyph/migrate-merge:8690-8713
/CalendarServer/branches/users/glyph/misc-portability-fixes:7365-7374
/CalendarServer/branches/users/glyph/more-deferreds-6:6322-6368
/CalendarServer/branches/users/glyph/more-deferreds-7:6369-6445
/CalendarServer/branches/users/glyph/multiget-delete:8321-8330
/CalendarServer/branches/users/glyph/new-export:7444-7485
/CalendarServer/branches/users/glyph/one-home-list-api:10048-10073
/CalendarServer/branches/users/glyph/oracle:7106-7155
/CalendarServer/branches/users/glyph/oracle-nulls:7340-7351
/CalendarServer/branches/users/glyph/other-html:8062-8091
/CalendarServer/branches/users/glyph/parallel-sim:8240-8251
/CalendarServer/branches/users/glyph/parallel-upgrade:8376-8400
/CalendarServer/branches/users/glyph/parallel-upgrade_to_1:8571-8583
/CalendarServer/branches/users/glyph/q:9560-9688
/CalendarServer/branches/users/glyph/queue-locking-and-timing:10204-10289
/CalendarServer/branches/users/glyph/quota:7604-7637
/CalendarServer/branches/users/glyph/sendfdport:5388-5424
/CalendarServer/branches/users/glyph/shared-pool-fixes:8436-8443
/CalendarServer/branches/users/glyph/shared-pool-take2:8155-8174
/CalendarServer/branches/users/glyph/sharedpool:6490-6550
/CalendarServer/branches/users/glyph/sharing-api:9192-9205
/CalendarServer/branches/users/glyph/skip-lonely-vtimezones:8524-8535
/CalendarServer/branches/users/glyph/sql-store:5929-6073
/CalendarServer/branches/users/glyph/start-service-start-loop:11060-11065
/CalendarServer/branches/users/glyph/subtransactions:7248-7258
/CalendarServer/branches/users/glyph/table-alias:8651-8664
/CalendarServer/branches/users/glyph/uidexport:7673-7676
/CalendarServer/branches/users/glyph/unshare-when-access-revoked:10562-10595
/CalendarServer/branches/users/glyph/use-system-twisted:5084-5149
/CalendarServer/branches/users/glyph/uuid-normalize:9268-9296
/CalendarServer/branches/users/glyph/warning-cleanups:11347-11357
/CalendarServer/branches/users/glyph/xattrs-from-files:7757-7769
/CalendarServer/branches/users/sagen/applepush:8126-8184
/CalendarServer/branches/users/sagen/inboxitems:7380-7381
/CalendarServer/branches/users/sagen/locations-resources:5032-5051
/CalendarServer/branches/users/sagen/locations-resources-2:5052-5061
/CalendarServer/branches/users/sagen/purge_old_events:6735-6746
/CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/branches/users/sagen/resources-2:5084-5093
/CalendarServer/branches/users/sagen/testing:10827-10851,10853-10855
/CalendarServer/branches/users/wsanchez/transations:5515-5593
/CalendarServer/trunk:9759-9832,11085-11111,11120-11501
   + /CalDAVTester/trunk:11193-11198
/CalendarServer/branches/config-separation:4379-4443
/CalendarServer/branches/egg-info-351:4589-4625
/CalendarServer/branches/generic-sqlstore:6167-6191
/CalendarServer/branches/new-store:5594-5934
/CalendarServer/branches/new-store-no-caldavfile:5911-5935
/CalendarServer/branches/new-store-no-caldavfile-2:5936-5981
/CalendarServer/branches/release/CalendarServer-4.3-dev:10180-10190,10192
/CalendarServer/branches/users/cdaboo/batchupload-6699:6700-7198
/CalendarServer/branches/users/cdaboo/cached-subscription-calendars-5692:5693-5702
/CalendarServer/branches/users/cdaboo/component-set-fixes:8130-8346
/CalendarServer/branches/users/cdaboo/directory-cache-on-demand-3627:3628-3644
/CalendarServer/branches/users/cdaboo/implicituidrace:8137-8141
/CalendarServer/branches/users/cdaboo/ischedule-dkim:9747-9979
/CalendarServer/branches/users/cdaboo/managed-attachments:9985-10145
/CalendarServer/branches/users/cdaboo/more-sharing-5591:5592-5601
/CalendarServer/branches/users/cdaboo/partition-4464:4465-4957
/CalendarServer/branches/users/cdaboo/pods:7297-7377
/CalendarServer/branches/users/cdaboo/pycalendar:7085-7206
/CalendarServer/branches/users/cdaboo/pycard:7227-7237
/CalendarServer/branches/users/cdaboo/queued-attendee-refreshes:7740-8287
/CalendarServer/branches/users/cdaboo/relative-config-paths-5070:5071-5105
/CalendarServer/branches/users/cdaboo/shared-calendars-5187:5188-5440
/CalendarServer/branches/users/cdaboo/store-scheduling:10876-11129
/CalendarServer/branches/users/cdaboo/timezones:7443-7699
/CalendarServer/branches/users/cdaboo/txn-debugging:8730-8743
/CalendarServer/branches/users/gaya/sharedgroups-3:11088-11204
/CalendarServer/branches/users/glyph/always-abort-txn-on-error:9958-9969
/CalendarServer/branches/users/glyph/case-insensitive-uid:8772-8805
/CalendarServer/branches/users/glyph/conn-limit:6574-6577
/CalendarServer/branches/users/glyph/contacts-server-merge:4971-5080
/CalendarServer/branches/users/glyph/dalify:6932-7023
/CalendarServer/branches/users/glyph/db-reconnect:6824-6876
/CalendarServer/branches/users/glyph/deploybuild:7563-7572
/CalendarServer/branches/users/glyph/digest-auth-redux:10624-10635
/CalendarServer/branches/users/glyph/disable-quota:7718-7727
/CalendarServer/branches/users/glyph/dont-start-postgres:6592-6614
/CalendarServer/branches/users/glyph/hang-fix:11465-11491
/CalendarServer/branches/users/glyph/imip-and-admin-html:7866-7984
/CalendarServer/branches/users/glyph/ipv6-client:9054-9105
/CalendarServer/branches/users/glyph/launchd-wrapper-bis:11413-11436
/CalendarServer/branches/users/glyph/linux-tests:6893-6900
/CalendarServer/branches/users/glyph/migrate-merge:8690-8713
/CalendarServer/branches/users/glyph/misc-portability-fixes:7365-7374
/CalendarServer/branches/users/glyph/more-deferreds-6:6322-6368
/CalendarServer/branches/users/glyph/more-deferreds-7:6369-6445
/CalendarServer/branches/users/glyph/multiget-delete:8321-8330
/CalendarServer/branches/users/glyph/new-export:7444-7485
/CalendarServer/branches/users/glyph/one-home-list-api:10048-10073
/CalendarServer/branches/users/glyph/oracle:7106-7155
/CalendarServer/branches/users/glyph/oracle-nulls:7340-7351
/CalendarServer/branches/users/glyph/other-html:8062-8091
/CalendarServer/branches/users/glyph/parallel-sim:8240-8251
/CalendarServer/branches/users/glyph/parallel-upgrade:8376-8400
/CalendarServer/branches/users/glyph/parallel-upgrade_to_1:8571-8583
/CalendarServer/branches/users/glyph/q:9560-9688
/CalendarServer/branches/users/glyph/queue-locking-and-timing:10204-10289
/CalendarServer/branches/users/glyph/quota:7604-7637
/CalendarServer/branches/users/glyph/sendfdport:5388-5424
/CalendarServer/branches/users/glyph/shared-pool-fixes:8436-8443
/CalendarServer/branches/users/glyph/shared-pool-take2:8155-8174
/CalendarServer/branches/users/glyph/sharedpool:6490-6550
/CalendarServer/branches/users/glyph/sharing-api:9192-9205
/CalendarServer/branches/users/glyph/skip-lonely-vtimezones:8524-8535
/CalendarServer/branches/users/glyph/sql-store:5929-6073
/CalendarServer/branches/users/glyph/start-service-start-loop:11060-11065
/CalendarServer/branches/users/glyph/subtransactions:7248-7258
/CalendarServer/branches/users/glyph/table-alias:8651-8664
/CalendarServer/branches/users/glyph/uidexport:7673-7676
/CalendarServer/branches/users/glyph/unshare-when-access-revoked:10562-10595
/CalendarServer/branches/users/glyph/use-system-twisted:5084-5149
/CalendarServer/branches/users/glyph/uuid-normalize:9268-9296
/CalendarServer/branches/users/glyph/warning-cleanups:11347-11357
/CalendarServer/branches/users/glyph/xattrs-from-files:7757-7769
/CalendarServer/branches/users/sagen/applepush:8126-8184
/CalendarServer/branches/users/sagen/inboxitems:7380-7381
/CalendarServer/branches/users/sagen/locations-resources:5032-5051
/CalendarServer/branches/users/sagen/locations-resources-2:5052-5061
/CalendarServer/branches/users/sagen/purge_old_events:6735-6746
/CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/branches/users/sagen/resources-2:5084-5093
/CalendarServer/branches/users/sagen/testing:10827-10851,10853-10855
/CalendarServer/branches/users/wsanchez/transations:5515-5593
/CalendarServer/trunk:9759-9832,11085-11111,11120-11510

Modified: CalendarServer/branches/users/gaya/directorybacker/calendarserver/platform/darwin/od/opendirectory.py
===================================================================
--- CalendarServer/branches/users/gaya/directorybacker/calendarserver/platform/darwin/od/opendirectory.py	2013-07-13 00:42:37 UTC (rev 11510)
+++ CalendarServer/branches/users/gaya/directorybacker/calendarserver/platform/darwin/od/opendirectory.py	2013-07-13 00:52:52 UTC (rev 11511)
@@ -172,7 +172,7 @@
             return Directory(session, node, nodeName)
 
         code = error.code()
-        log.debug("Received code %d from node call: %s" % (code, error))
+        log.debug("Received code {code} from node call: {err}", code=code, err=error)
 
         if code in RETRY_CODES:
             tries -= 1
@@ -205,7 +205,7 @@
             return details
 
         code = error.code()
-        log.debug("Received code %d from node details call: %s" % (code, error))
+        log.debug("Received code {code} from node details call: {err}", code=code, err=error)
 
         if code in RETRY_CODES:
             tries -= 1
@@ -254,7 +254,7 @@
             return results
 
         code = error.code()
-        log.debug("Received code %d from query call: %s" % (code, error))
+        log.debug("Received code {code} from query call: {err}", code=code, err=error)
 
         if code in RETRY_CODES:
             tries -= 1
@@ -308,7 +308,7 @@
             return results
 
         code = error.code()
-        log.debug("Received code %d from query call: %s" % (code, error))
+        log.debug("Received code {code} from query call: {err}", code=code, err=error)
 
         if code in RETRY_CODES:
             tries -= 1
@@ -361,7 +361,7 @@
             return results
 
         code = error.code()
-        log.debug("Received code %d from query call: %s" % (code, error))
+        log.debug("Received code {code} from query call: {err}", code=code, err=error)
 
         if code in RETRY_CODES:
             tries -= 1
@@ -393,7 +393,7 @@
             return record
 
         code = error.code()
-        log.debug("Received code %d from recordWithRecordType call: %s" % (code, error))
+        log.debug("Received code {code} from recordWithRecordType call: {err}", code=code, err=error)
 
         if code in RETRY_CODES:
             tries -= 1
@@ -422,22 +422,22 @@
     tries = NUM_TRIES
     while tries:
 
-        log.debug("Checking basic auth for user '%s' (tries remaining: %d)" %
-            (user, tries))
+        log.debug("Checking basic auth for user '{user}' (tries remaining: {tries})", 
+            user=user, tries=tries)
 
         result, error = record.verifyPassword_error_(password, None)
         if not error:
-            log.debug("Basic auth for user '%s' result: %s" % (user, result))
+            log.debug("Basic auth for user '{user}' result: {result}", user=user, result=result)
             return result
 
         code = error.code()
 
         if code == INCORRECT_CREDENTIALS:
-            log.debug("Basic auth for user '%s' failed due to incorrect credentials" % (user,))
+            log.debug("Basic auth for user '{user}' failed due to incorrect credentials", user=user)
             return False
 
-        log.debug("Basic auth for user '%s' failed with code %d (%s)" %
-            (user, code, error))
+        log.debug("Basic auth for user '{user}' failed with code {code} ({err})",
+            user=user, code=code, err=error)
 
         if code in RETRY_CODES:
             tries -= 1
@@ -468,8 +468,8 @@
     tries = NUM_TRIES
     while tries:
 
-        log.debug("Checking digest auth for user '%s' (tries remaining: %d)" %
-            (user, tries))
+        log.debug("Checking digest auth for user '{user}' (tries remaining: {tries})",
+            user=user, tries=tries)
 
         # TODO: what are these other return values?
         result, mystery1, mystery2, error = record.verifyExtendedWithAuthenticationType_authenticationItems_continueItems_context_error_(
@@ -478,17 +478,17 @@
             None, None, None
         )
         if not error:
-            log.debug("Digest auth for user '%s' result: %s" % (user, result))
+            log.debug("Digest auth for user '{user}' result: {result}", user=user, result=result)
             return result
 
         code = error.code()
 
         if code == INCORRECT_CREDENTIALS:
-            log.debug("Digest auth for user '%s' failed due to incorrect credentials" % (user,))
+            log.debug("Digest auth for user '{user}' failed due to incorrect credentials", user=user)
             return False
 
-        log.debug("Digest auth for user '%s' failed with code %d (%s)" %
-            (user, code, error))
+        log.debug("Digest auth for user '{user}' failed with code {code} ({err})",
+            user=user, code=code, err=error)
 
         if code in RETRY_CODES:
             tries -= 1

Modified: CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/test/test_timezones.py
===================================================================
--- CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/test/test_timezones.py	2013-07-13 00:42:37 UTC (rev 11510)
+++ CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/test/test_timezones.py	2013-07-13 00:52:52 UTC (rev 11511)
@@ -23,6 +23,7 @@
 from pycalendar.timezone import PyCalendarTimezone
 
 import os
+import threading
 
 class TimezoneProblemTest (twistedcaldav.test.util.TestCase):
     """
@@ -216,6 +217,7 @@
     """
 
     def setUp(self):
+        super(TimezonePackageTest, self).setUp()
         TimezoneCache.clear()
         TimezoneCache.create()
 
@@ -274,3 +276,32 @@
         copy_tz = readTZ("America/New_York")
 
         self.assertEqual(str(pkg_tz), str(copy_tz))
+
+
+    def test_copyPackage_Concurrency(self):
+        """
+        Test that concurrent copying of the tz package works.
+        """
+
+        self.patch(config, "UsePackageTimezones", False)
+        TimezoneCache.clear()
+
+        ex = [False, False]
+        def _try(n):
+            try:
+                TimezoneCache.create()
+            except:
+                ex[n] = True
+
+        t1 = threading.Thread(target=_try, args=(0,))
+        t2 = threading.Thread(target=_try, args=(1,))
+        t1.start()
+        t2.start()
+        t1.join()
+        t2.join()
+
+        self.assertFalse(ex[0])
+        self.assertFalse(ex[1])
+
+        self.assertTrue(os.path.exists(os.path.join(config.DataRoot, "zoneinfo")))
+        self.assertTrue(os.path.exists(os.path.join(config.DataRoot, "zoneinfo", "America", "New_York.ics")))

Modified: CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/timezones.py
===================================================================
--- CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/timezones.py	2013-07-13 00:42:37 UTC (rev 11510)
+++ CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/timezones.py	2013-07-13 00:52:52 UTC (rev 11511)
@@ -128,24 +128,48 @@
     def validatePath():
         dbpath = FilePath(TimezoneCache.getDBPath())
         if not dbpath.exists():
-            # Move package data to the path
-            pkgpath = TimezoneCache.FilteredFilePath(TimezoneCache._getPackageDBPath())
-            log.info("Copying timezones from %s to %s" % (pkgpath.path, dbpath.path,))
-            pkgpath.copyFilteredDirectoryTo(dbpath)
+            TimezoneCache.copyPackage("Copying")
         else:
             # Check if pkg is more recent and copy over
             pkgversion = TimezoneCache.getTZVersion(TimezoneCache._getPackageDBPath())
             dbversion = TimezoneCache.getTZVersion(dbpath.path)
             if pkgversion > dbversion:
                 dbpath.remove()
-                pkgpath = TimezoneCache.FilteredFilePath(TimezoneCache._getPackageDBPath())
-                log.info("Updating timezones at %s with %s" % (dbpath.path, pkgpath.path,))
-                pkgpath.copyFilteredDirectoryTo(dbpath)
+                TimezoneCache.copyPackage("Updating")
             else:
                 log.info("Valid timezones at %s" % (dbpath.path,))
 
 
     @staticmethod
+    def copyPackage(title):
+        """
+        Copy package directory to db path using a temporary sibling to avoid potential
+        concurrency race conditions.
+
+        @param title: string to use in log entry
+        @type title: C{str}
+        """
+        dbpath = FilePath(TimezoneCache.getDBPath())
+        pkgpath = TimezoneCache.FilteredFilePath(TimezoneCache._getPackageDBPath())
+        log.info(
+            "{title} timezones from {pkg} to {to}",
+            title=title,
+            pkg=pkgpath.path,
+            to=dbpath.path
+        )
+
+        # Use temp directory to copy to first
+        temp = dbpath.temporarySibling()
+        pkgpath.copyFilteredDirectoryTo(temp)
+
+        # Move to actual path if it stll does not exist
+        if not dbpath.exists():
+            temp.moveTo(dbpath)
+        else:
+            temp.remove()
+
+
+    @staticmethod
     def clear():
         PyCalendarTimezoneDatabase.clearTimezoneDatabase()
 

Modified: CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Africa/Casablanca.ics
===================================================================
--- CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Africa/Casablanca.ics	2013-07-13 00:42:37 UTC (rev 11510)
+++ CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Africa/Casablanca.ics	2013-07-13 00:52:52 UTC (rev 11511)
@@ -24,7 +24,7 @@
 RDATE:20090601T000000
 RDATE:20100502T000000
 RDATE:20110403T000000
-RDATE:20130808T020000
+RDATE:20130810T020000
 RDATE:20140729T020000
 RDATE:20150718T020000
 RDATE:20160707T020000
@@ -52,7 +52,7 @@
 RDATE:20090821T000000
 RDATE:20100808T000000
 RDATE:20110731T000000
-RDATE:20130709T030000
+RDATE:20130707T030000
 RDATE:20140629T030000
 RDATE:20150618T030000
 RDATE:20160607T030000

Modified: CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Asia/Jerusalem.ics
===================================================================
--- CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Asia/Jerusalem.ics	2013-07-13 00:42:37 UTC (rev 11510)
+++ CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Asia/Jerusalem.ics	2013-07-13 00:52:52 UTC (rev 11511)
@@ -9,7 +9,7 @@
 DTSTART:18800101T000000
 RDATE:18800101T000000
 TZNAME:JMT
-TZOFFSETFROM:+022056
+TZOFFSETFROM:+022054
 TZOFFSETTO:+022040
 END:STANDARD
 BEGIN:STANDARD
@@ -154,9 +154,8 @@
 TZOFFSETTO:+0300
 END:DAYLIGHT
 BEGIN:STANDARD
-DTSTART:20131006T020000
-RRULE:FREQ=YEARLY;UNTIL=20221001T230000Z;BYDAY=SU;BYMONTHDAY=2,3,4,5,6,7,8
- ;BYMONTH=10
+DTSTART:20131027T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
 TZNAME:IST
 TZOFFSETFROM:+0300
 TZOFFSETTO:+0200

Modified: CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Asia/Tel_Aviv.ics
===================================================================
--- CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Asia/Tel_Aviv.ics	2013-07-13 00:42:37 UTC (rev 11510)
+++ CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Asia/Tel_Aviv.ics	2013-07-13 00:52:52 UTC (rev 11511)
@@ -9,7 +9,7 @@
 DTSTART:18800101T000000
 RDATE:18800101T000000
 TZNAME:JMT
-TZOFFSETFROM:+022056
+TZOFFSETFROM:+022054
 TZOFFSETTO:+022040
 END:STANDARD
 BEGIN:STANDARD
@@ -154,9 +154,8 @@
 TZOFFSETTO:+0300
 END:DAYLIGHT
 BEGIN:STANDARD
-DTSTART:20131006T020000
-RRULE:FREQ=YEARLY;UNTIL=20221001T230000Z;BYDAY=SU;BYMONTHDAY=2,3,4,5,6,7,8
- ;BYMONTH=10
+DTSTART:20131027T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
 TZNAME:IST
 TZOFFSETFROM:+0300
 TZOFFSETTO:+0200

Modified: CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Israel.ics
===================================================================
--- CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Israel.ics	2013-07-13 00:42:37 UTC (rev 11510)
+++ CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/Israel.ics	2013-07-13 00:52:52 UTC (rev 11511)
@@ -9,7 +9,7 @@
 DTSTART:18800101T000000
 RDATE:18800101T000000
 TZNAME:JMT
-TZOFFSETFROM:+022056
+TZOFFSETFROM:+022054
 TZOFFSETTO:+022040
 END:STANDARD
 BEGIN:STANDARD
@@ -154,9 +154,8 @@
 TZOFFSETTO:+0300
 END:DAYLIGHT
 BEGIN:STANDARD
-DTSTART:20131006T020000
-RRULE:FREQ=YEARLY;UNTIL=20221001T230000Z;BYDAY=SU;BYMONTHDAY=2,3,4,5,6,7,8
- ;BYMONTH=10
+DTSTART:20131027T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
 TZNAME:IST
 TZOFFSETFROM:+0300
 TZOFFSETTO:+0200

Modified: CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/timezones.xml
===================================================================
--- CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/timezones.xml	2013-07-13 00:42:37 UTC (rev 11510)
+++ CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/timezones.xml	2013-07-13 00:52:52 UTC (rev 11511)
@@ -2,7 +2,7 @@
 <!DOCTYPE timezones SYSTEM "timezones.dtd">
 
 <timezones>
-  <dtstamp>2013-05-08T18:04:04Z</dtstamp>
+  <dtstamp>2013-07-11T02:11:45Z</dtstamp>
   <timezone>
     <tzid>Africa/Abidjan</tzid>
     <dtstamp>2011-10-05T11:50:21Z</dtstamp>
@@ -78,8 +78,8 @@
   </timezone>
   <timezone>
     <tzid>Africa/Casablanca</tzid>
-    <dtstamp>2013-05-08T18:04:04Z</dtstamp>
-    <md5>031f182ccba88915e1c8f21279626360</md5>
+    <dtstamp>2013-07-11T02:11:45Z</dtstamp>
+    <md5>b4e345b053c4699911078dcd16854bab</md5>
   </timezone>
   <timezone>
     <tzid>Africa/Ceuta</tzid>
@@ -1396,10 +1396,10 @@
   </timezone>
   <timezone>
     <tzid>Asia/Jerusalem</tzid>
-    <dtstamp>2013-01-14T15:32:16Z</dtstamp>
+    <dtstamp>2013-07-11T02:11:45Z</dtstamp>
     <alias>Asia/Tel_Aviv</alias>
     <alias>Israel</alias>
-    <md5>68bab258f99496577d53abe2f2a12963</md5>
+    <md5>3140f1012e92c007911e7e0c02e83659</md5>
   </timezone>
   <timezone>
     <tzid>Asia/Kabul</tzid>
@@ -1613,8 +1613,8 @@
   </timezone>
   <timezone>
     <tzid>Asia/Tel_Aviv</tzid>
-    <dtstamp>2013-01-14T15:32:16Z</dtstamp>
-    <md5>955a3e37e6a05d03e74e732f0dfa8247</md5>
+    <dtstamp>2013-07-11T02:11:45Z</dtstamp>
+    <md5>1d5f36db5275e5264d3abea959dd82a5</md5>
   </timezone>
   <timezone>
     <tzid>Asia/Thimbu</tzid>
@@ -2609,8 +2609,8 @@
   </timezone>
   <timezone>
     <tzid>Israel</tzid>
-    <dtstamp>2013-01-14T15:32:16Z</dtstamp>
-    <md5>52d4f616c8db8d8df19f022dab5c328c</md5>
+    <dtstamp>2013-07-11T02:11:45Z</dtstamp>
+    <md5>109a908eaae716ddeb70a5c6dfbb3782</md5>
   </timezone>
   <timezone>
     <tzid>Jamaica</tzid>

Modified: CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/version.txt
===================================================================
--- CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/version.txt	2013-07-13 00:42:37 UTC (rev 11510)
+++ CalendarServer/branches/users/gaya/directorybacker/twistedcaldav/zoneinfo/version.txt	2013-07-13 00:52:52 UTC (rev 11511)
@@ -1 +1 @@
-IANA Timezone Registry: 2013c
\ No newline at end of file
+IANA Timezone Registry: 2013d
\ No newline at end of file

Modified: CalendarServer/branches/users/gaya/directorybacker/txdav/xml/base.py
===================================================================
--- CalendarServer/branches/users/gaya/directorybacker/txdav/xml/base.py	2013-07-13 00:42:37 UTC (rev 11510)
+++ CalendarServer/branches/users/gaya/directorybacker/txdav/xml/base.py	2013-07-13 00:52:52 UTC (rev 11511)
@@ -616,7 +616,7 @@
             return "<%s>" % (self.sname(),)
 
     def __eq__(self, other):
-        if isinstance(other, WebDAVTextElement):
+        if isinstance(other, self.__class__):
             return str(self) == str(other)
         elif type(other) in (str, unicode):
             return str(self) == other
@@ -659,7 +659,7 @@
         self.datetime() # Raise ValueError if the format is wrong
 
     def __eq__(self, other):
-        if isinstance(other, WebDAVDateTimeElement):
+        if isinstance(other, self.__class__):
             return self.datetime() == other.datetime()
         else:
             return NotImplemented
@@ -672,7 +672,7 @@
             return parse_date(s)
 
 
-class DateTimeHeaderElement (WebDAVTextElement):
+class DateTimeHeaderElement (WebDAVDateTimeElement):
     """
     WebDAV date-time element for elements that substitute for HTTP
     headers. (RFC 2068, section 3.3.1)
@@ -707,16 +707,6 @@
 
         return clazz(PCDATAElement(date))
 
-    def __init__(self, *children, **attributes):
-        super(DateTimeHeaderElement, self).__init__(*children, **attributes)
-        self.datetime() # Raise ValueError if the format is wrong
-
-    def __eq__(self, other):
-        if isinstance(other, WebDAVDateTimeElement):
-            return self.datetime() == other.datetime()
-        else:
-            return NotImplemented
-
     def datetime(self):
         s = str(self)
         if not s:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130712/450512c5/attachment-0001.html>


More information about the calendarserver-changes mailing list