[CalendarServer-changes] [13767] CalendarServer/branches/users/gaya/groupsharee2

source_changes at macosforge.org source_changes at macosforge.org
Wed Jul 16 17:43:19 PDT 2014


Revision: 13767
          http://trac.calendarserver.org//changeset/13767
Author:   gaya at apple.com
Date:     2014-07-16 17:43:18 -0700 (Wed, 16 Jul 2014)
Log Message:
-----------
merge in trunk through r13765

Revision Links:
--------------
    http://trac.calendarserver.org//changeset/13765

Modified Paths:
--------------
    CalendarServer/branches/users/gaya/groupsharee2/bin/_build.sh
    CalendarServer/branches/users/gaya/groupsharee2/bin/_py.sh
    CalendarServer/branches/users/gaya/groupsharee2/calendarserver/tools/dbinspect.py
    CalendarServer/branches/users/gaya/groupsharee2/conf/auth/accounts-test.xml
    CalendarServer/branches/users/gaya/groupsharee2/conf/auth/generate_test_accounts.py
    CalendarServer/branches/users/gaya/groupsharee2/conf/caldavd-test.plist
    CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/loadtest/sim.py
    CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/httpTests.py
    CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/multiget.py
    CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/propfind.py
    CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/propfind_invite.py
    CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/query.py
    CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/sync.py
    CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/sqlusage.py
    CalendarServer/branches/users/gaya/groupsharee2/requirements-dev.txt
    CalendarServer/branches/users/gaya/groupsharee2/requirements-stable.txt
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/datafilters/peruserdata.py
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/datafilters/test/test_peruserdata.py
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/ical.py
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/method/get.py
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/method/report_calendar_query.py
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/method/report_common.py
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/resource.py
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/scheduling_store/caldav/resource.py
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/storebridge.py
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3184A66-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3184D26-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185326-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31854DA-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31856AC-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318585A-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185A14-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185BBD-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185D63-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185F20-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31860C8-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318627C-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186426-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31865E4-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186792-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186938-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186ADE-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186C96-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186E3A-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186FE7-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318719A-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3187343-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188906-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188B3A-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188CFF-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188EAA-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189058-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189203-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31893C2-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189572-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189716-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31898D4-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189A88-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189C32-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189DEC-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189F94-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A148-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A2F3-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A4BA-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A6E1-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A898-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318AA54-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318ABFE-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318ADAA-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318AF53-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318B108-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318B2D2-1ED0-11D9-A5E0-000A958A3252.ics
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/test_icalendar.py
    CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/test_multiget.py
    CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/scheduling/freebusy.py
    CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/scheduling/processing.py
    CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/sql.py
    CalendarServer/branches/users/gaya/groupsharee2/txdav/dps/client.py

Added Paths:
-----------
    CalendarServer/branches/users/gaya/groupsharee2/contrib/tools/statsanalysis.py

Modified: CalendarServer/branches/users/gaya/groupsharee2/bin/_build.sh
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/bin/_build.sh	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/bin/_build.sh	2014-07-17 00:43:18 UTC (rev 13767)
@@ -111,7 +111,7 @@
     dep_packages="${TWEXT_PKG_CACHE}";
   fi;
 
-  project="$(setup_print name)";
+  project="$(setup_print name)" || project="<unknown>";
 
   # Find some hashing commands
   # sha1() = sha1 hash, if available
@@ -121,34 +121,34 @@
 
   hash="";
 
-  if type -ft openssl > /dev/null; then
+  if find_cmd openssl > /dev/null; then
     if [ -z "${hash}" ]; then hash="md5"; fi;
-    md5 () { "$(type -p openssl)" dgst -md5 "$@"; }
-  elif type -ft md5 > /dev/null; then
+    md5 () { "$(find_cmd openssl)" dgst -md5 "$@"; }
+  elif find_cmd md5 > /dev/null; then
     if [ -z "${hash}" ]; then hash="md5"; fi;
-    md5 () { "$(type -p md5)" "$@"; }
-  elif type -ft md5sum > /dev/null; then
+    md5 () { "$(find_cmd md5)" "$@"; }
+  elif find_cmd md5sum > /dev/null; then
     if [ -z "${hash}" ]; then hash="md5"; fi;
-    md5 () { "$(type -p md5sum)" "$@"; }
+    md5 () { "$(find_cmd md5sum)" "$@"; }
   fi;
 
-  if type -ft sha1sum > /dev/null; then
+  if find_cmd sha1sum > /dev/null; then
     if [ -z "${hash}" ]; then hash="sha1sum"; fi;
-    sha1 () { "$(type -p sha1sum)" "$@"; }
+    sha1 () { "$(find_cmd sha1sum)" "$@"; }
   fi;
-  if type -ft shasum > /dev/null; then
+  if find_cmd shasum > /dev/null; then
     if [ -z "${hash}" ]; then hash="sha1"; fi;
-    sha1 () { "$(type -p shasum)" "$@"; }
+    sha1 () { "$(find_cmd shasum)" "$@"; }
   fi;
 
   if [ "${hash}" = "sha1" ]; then
     hash () { sha1 "$@"; }
   elif [ "${hash}" = "md5" ]; then
     hash () { md5 "$@"; }
-  elif type -t cksum > /dev/null; then
+  elif find_cmd cksum > /dev/null; then
     hash="hash";
     hash () { cksum "$@" | cut -f 1 -d " "; }
-  elif type -t sum > /dev/null; then
+  elif find_cmd sum > /dev/null; then
     hash="hash";
     hash () { sum "$@" | cut -f 1 -d " "; }
   else
@@ -160,7 +160,7 @@
 setup_print () {
   what="$1"; shift;
 
-  PYTHONPATH="${wd}:${PYTHONPATH:-}" "${bootstrap_python}" - << EOF
+  PYTHONPATH="${wd}:${PYTHONPATH:-}" "${bootstrap_python}" - 2>/dev/null << EOF
 from __future__ import print_function
 import setup
 print(setup.${what})
@@ -568,11 +568,13 @@
 #
 py_dependencies () {
   python="${py_bindir}/python";
+  py_ve_tools="${dev_home}/ve_tools";
 
   export PATH="${py_virtualenv}/bin:${PATH}";
   export PYTHON="${python}";
-  export PYTHONPATH="${wd}:${PYTHONPATH:-}";
+  export PYTHONPATH="${py_ve_tools}/lib:${wd}:${PYTHONPATH:-}";
 
+
   # Work around a change in Xcode tools that breaks Python modules in OS X
   # 10.9.2 and prior due to a hard error if the -mno-fused-madd is used, as
   # it was in the system Python, and is therefore passed along by disutils.
@@ -601,7 +603,7 @@
 
   # Make sure setup got called enough to write the version file.
 
-  "${python}" "${wd}/setup.py" check > /dev/null;
+  PYTHONPATH="${PYTHONPATH}" "${python}" "${wd}/setup.py" check > /dev/null;
 
   if [ -d "${dev_home}/pip_downloads" ]; then
     pip_install="pip_install_from_cache";
@@ -626,24 +628,14 @@
 
 
 bootstrap_virtualenv () {
-  py_ve_tools="${dev_home}/ve_tools";
-
-  if [ -d "${py_ve_tools}/lib" ]; then
-    export PYTHONPATH="${py_ve_tools}/lib:${PYTHONPATH:-}";
-  fi;
-
-  if "${bootstrap_python}" -m virtualenv > /dev/null 2>&1; then
-    return 0;
-  fi;
-
   mkdir -p "${py_ve_tools}";
   mkdir -p "${py_ve_tools}/lib";
   mkdir -p "${py_ve_tools}/junk";
 
   for pkg in             \
-      pip-1.5.4          \
-      virtualenv-1.11.4  \
-      setuptools-3.4.4   \
+      setuptools-5.4.1   \
+      pip-1.5.6          \
+      virtualenv-1.11.6  \
   ; do
          name="${pkg%-*}";
       version="${pkg#*-}";
@@ -669,8 +661,6 @@
 
       rm -rf "${tmp}";
   done;
-
-  export PYTHONPATH="${py_ve_tools}/lib:${PYTHONPATH:-}";
 }
 
 

Modified: CalendarServer/branches/users/gaya/groupsharee2/bin/_py.sh
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/bin/_py.sh	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/bin/_py.sh	2014-07-17 00:43:18 UTC (rev 13767)
@@ -15,6 +15,18 @@
 # limitations under the License.
 ##
 
+find_cmd () {
+  local cmd="$1"; shift;
+
+  local path="$(type "${cmd}" 2>/dev/null | sed "s|^${cmd} is \(a tracked alias for \)\{0,1\}||")";
+
+  if [ -z "${cmd}" ]; then
+    return 1;
+  fi;
+
+  echo "${path}";
+}
+
 # Echo the major.minor version of the given Python interpreter.
 
 py_version () {
@@ -38,7 +50,7 @@
   fi;
 
   local py_version="$(py_version "${python}")";
-  if [ "${py_version/./}" -lt "25" ]; then
+  if [ "$(echo "${py_version}" | sed 's|\.||')" -lt "25" ]; then
     return 1;
   fi;
   return 0;
@@ -72,7 +84,7 @@
       "/sw/bin/python${v}"                                              \
       ;
     do
-      if p="$(type -p "${p}")"; then
+      if p="$(find_cmd "${p}")"; then
         if try_python "${p}"; then
           echo "${p}";
           return 0;
@@ -148,7 +160,7 @@
   # the part of the PostgreSQL build process which builds pl_python.  Note that
   # detect_python_version, above, already honors $PYTHON, so if this is already
   # set it won't be stomped on, it will just be re-set to the same value.
-  export PYTHON="$(type -p ${bootstrap_python})";
+  export PYTHON="$(find_cmd ${bootstrap_python})";
 
   if [ -z "${bootstrap_python:-}" ]; then
     echo "No suitable python found. Python 2.6 or 2.7 is required.";

Modified: CalendarServer/branches/users/gaya/groupsharee2/calendarserver/tools/dbinspect.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/calendarserver/tools/dbinspect.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/calendarserver/tools/dbinspect.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -37,7 +37,6 @@
 
 from twistedcaldav import caldavxml
 from twistedcaldav.config import config
-from twistedcaldav.datafilters.peruserdata import PerUserDataFilter
 from twistedcaldav.directory import calendaruserproxy
 from twistedcaldav.stdconfig import DEFAULT_CONFIG_FILE
 
@@ -98,7 +97,7 @@
 
 @inlineCallbacks
 def UserNameFromUID(txn, uid):
-    record = yield txn.directoryService().recordWithGUID(uid)
+    record = yield txn.directoryService().recordWithUID(uid)
     returnValue(record.shortNames[0] if record else "(%s)" % (uid,))
 
 
@@ -116,7 +115,7 @@
         record = yield txn.directoryService().recordWithShortName(CalRecordType.resource, value)
     if record is None:
         record = yield txn.directoryService().recordWithShortName(RecordType.group, value)
-    returnValue(record.guid if record else None)
+    returnValue(record.uid if record else None)
 
 
 
@@ -772,8 +771,7 @@
             returnValue(None)
         for name, _ignore_uid, _ignore_type in matches:
             event = yield calendar.calendarObjectWithName(name)
-            ical_data = yield event.component()
-            ical_data = PerUserDataFilter(uid).filter(ical_data)
+            ical_data = yield event.componentForUser()
             ical_data.stripStandardTimezones()
 
             table = tables.Table()

Modified: CalendarServer/branches/users/gaya/groupsharee2/conf/auth/accounts-test.xml
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/conf/auth/accounts-test.xml	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/conf/auth/accounts-test.xml	2014-07-17 00:43:18 UTC (rev 13767)
@@ -844,6 +844,14 @@
     <email>user100 at example.com</email>
 </record>
 <record type="user">
+    <uid>10000000-0000-0000-0000-000000000101</uid>
+    <guid>10000000-0000-0000-0000-000000000101</guid>
+    <short-name>user101</short-name>
+    <password>user101</password>
+    <full-name>User 101</full-name>
+    <email>user101 at example.com</email>
+</record>
+<record type="user">
     <uid>50000000-0000-0000-0000-000000000001</uid>
     <guid>50000000-0000-0000-0000-000000000001</guid>
     <short-name>public01</short-name>

Modified: CalendarServer/branches/users/gaya/groupsharee2/conf/auth/generate_test_accounts.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/conf/auth/generate_test_accounts.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/conf/auth/generate_test_accounts.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -59,8 +59,8 @@
 </record>
 """.format(uid=uid, guid=guid, fullName=fullName))
 
-# user01-100
-for i in xrange(1, 501 if EXTRA_GROUPS else 101):
+# user01-101
+for i in xrange(1, 501 if EXTRA_GROUPS else 102):
     out.write("""<record type="user">
     <uid>{guid}</uid>
     <guid>{guid}</guid>

Modified: CalendarServer/branches/users/gaya/groupsharee2/conf/caldavd-test.plist
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/conf/caldavd-test.plist	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/conf/caldavd-test.plist	2014-07-17 00:43:18 UTC (rev 13767)
@@ -784,34 +784,6 @@
       <!-- General options for scheduling -->
       <key>Options</key>
       <dict>
-        <key>AllowGroupAsOrganizer</key>
-        <false/>
-        <key>AllowLocationAsOrganizer</key>
-        <false/>
-        <key>AllowResourceAsOrganizer</key>
-        <false/>
-        <key>AttendeeRefreshBatch</key>
-        <integer>0</integer>
-        <key>AttendeeRefreshCountLimit</key>
-        <integer>50</integer>
-
-		<key>AutoSchedule</key>
-		<dict>
-			<key>Enabled</key>
-			<true/>
-			<key>Always</key>
-			<false/>
-			<!-- Default mode for auto-schedule processing, one of:
-	              "none"            - no auto-scheduling
-	              "accept-always"   - always accept, ignore busy time
-	              "decline-always"  - always decline, ignore free time
-	              "accept-if-free"  - accept if free, do nothing if busy
-	              "decline-if-busy" - decline if busy, do nothing if free
-	              "automatic"       - accept if free, decline if busy -->
-	        <key>DefaultMode</key>
-	        <string>automatic</string>
-		</dict>
-
 		<key>WorkQueues</key>
 		<dict>
 			<key>Enabled</key>

Modified: CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/loadtest/sim.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/loadtest/sim.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/loadtest/sim.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -488,7 +488,7 @@
             _ignore_scheme, hostname, _ignore_path, _ignore_query, _ignore_fragment = urlsplit(self.serverStats["server"])
             data = self.readStatsSock((hostname.split(":")[0], self.serverStats["Port"],), True)
             if "Failed" not in data:
-                data = data["stats"]["5m"]
+                data = data["stats"]["5m"] if "stats" in data else data["5 Minutes"]
                 result = (
                     safeDivision(float(data["requests"]), 5 * 60),
                     safeDivision(data["t"], data["requests"]),

Modified: CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/httpTests.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/httpTests.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/httpTests.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -31,7 +31,7 @@
             self.timing = timing
 
 
-    def __init__(self, label, sessions, logFilePath):
+    def __init__(self, label, sessions, logFilePath, logFilePrefix):
         """
         @param label: label used to identify the test
         @type label: C{str}
@@ -39,6 +39,7 @@
         self.label = label
         self.sessions = sessions
         self.logFilePath = logFilePath
+        self.logFilePrefix = logFilePrefix
         self.result = None
 
 
@@ -95,7 +96,7 @@
         offset = 0
         while True:
             if lines[offset] == "*** SQL Stats ***":
-                if lines[offset + 2].split()[1] != "unlabeled":
+                if lines[offset + 2].startswith("Label: <"):
                     count = extractInt(lines[offset + 4])
                     rows = extractInt(lines[offset + 5])
                     timing = extractFloat(lines[offset + 6])
@@ -105,7 +106,8 @@
         else:
             self.result = HTTPTestBase.SQLResults(-1, -1, 0.0)
 
-        with open("%s-%d-%s" % (self.logFilePath, event_count, self.label), "w") as f:
+        # Archive current sqlstats file
+        with open("%s-%s-%d-%s" % (self.logFilePath, self.logFilePrefix, event_count, self.label), "w") as f:
             f.write(data)
 
 

Modified: CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/multiget.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/multiget.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/multiget.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -26,8 +26,8 @@
     A multiget operation
     """
 
-    def __init__(self, label, sessions, logFilePath, count):
-        super(MultigetTest, self).__init__(label, sessions, logFilePath)
+    def __init__(self, label, sessions, logFilePath, logFilePrefix, count):
+        super(MultigetTest, self).__init__(label, sessions, logFilePath, logFilePrefix)
         self.count = count
 
 

Modified: CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/propfind.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/propfind.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/propfind.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -25,8 +25,8 @@
     A propfind operation
     """
 
-    def __init__(self, label, sessions, logFilePath, depth=1):
-        super(PropfindTest, self).__init__(label, sessions, logFilePath)
+    def __init__(self, label, sessions, logFilePath, logFilePrefix, depth=1):
+        super(PropfindTest, self).__init__(label, sessions, logFilePath, logFilePrefix)
         self.depth = headers.Depth1 if depth == 1 else headers.Depth0
 
 

Modified: CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/propfind_invite.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/propfind_invite.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/propfind_invite.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -26,8 +26,8 @@
     A propfind operation
     """
 
-    def __init__(self, label, sessions, logFilePath, depth=1):
-        super(PropfindInviteTest, self).__init__(label, sessions, logFilePath)
+    def __init__(self, label, sessions, logFilePath, logFilePrefix, depth=1):
+        super(PropfindInviteTest, self).__init__(label, sessions, logFilePath, logFilePrefix)
         self.depth = headers.Depth1 if depth == 1 else headers.Depth0
 
 

Modified: CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/query.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/query.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/query.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -60,8 +60,8 @@
     A sync operation
     """
 
-    def __init__(self, label, sessions, logFilePath, count):
-        super(QueryTest, self).__init__(label, sessions, logFilePath)
+    def __init__(self, label, sessions, logFilePath, logFilePrefix, count):
+        super(QueryTest, self).__init__(label, sessions, logFilePath, logFilePrefix)
         self.count = count
 
 

Modified: CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/sync.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/sync.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/requests/sync.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -58,8 +58,8 @@
     A sync operation
     """
 
-    def __init__(self, label, sessions, logFilePath, full, count):
-        super(SyncTest, self).__init__(label, sessions, logFilePath)
+    def __init__(self, label, sessions, logFilePath, logFilePrefix, full, count):
+        super(SyncTest, self).__init__(label, sessions, logFilePath, logFilePrefix)
         self.full = full
         self.count = count
         self.synctoken = ""

Modified: CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/sqlusage.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/sqlusage.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/contrib/performance/sqlusage/sqlusage.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -115,15 +115,15 @@
 
         # Set of requests to execute
         requests = [
-            MultigetTest("mget-1" if self.compact else "multiget-1", sessions, self.logFilePath, 1),
-            MultigetTest("mget-50" if self.compact else "multiget-50", sessions, self.logFilePath, 50),
-            PropfindTest("prop-cal" if self.compact else "propfind-cal", sessions, self.logFilePath, 1),
-            SyncTest("s-full" if self.compact else "sync-full", sessions, self.logFilePath, True, 0),
-            SyncTest("s-1" if self.compact else "sync-1", sessions, self.logFilePath, False, 1),
-            QueryTest("q-1" if self.compact else "query-1", sessions, self.logFilePath, 1),
-            QueryTest("q-10" if self.compact else "query-10", sessions, self.logFilePath, 10),
-            PutTest("put", sessions, self.logFilePath),
-            InviteTest("invite", sessions, self.logFilePath),
+            MultigetTest("mget-1" if self.compact else "multiget-1", sessions, self.logFilePath, "event", 1),
+            MultigetTest("mget-50" if self.compact else "multiget-50", sessions, self.logFilePath, "event", 50),
+            PropfindTest("prop-cal" if self.compact else "propfind-cal", sessions, self.logFilePath, "event", 1),
+            SyncTest("s-full" if self.compact else "sync-full", sessions, self.logFilePath, "event", True, 0),
+            SyncTest("s-1" if self.compact else "sync-1", sessions, self.logFilePath, "event", False, 1),
+            QueryTest("q-1" if self.compact else "query-1", sessions, self.logFilePath, "event", 1),
+            QueryTest("q-10" if self.compact else "query-10", sessions, self.logFilePath, "event", 10),
+            PutTest("put", sessions, self.logFilePath, "event"),
+            InviteTest("invite", sessions, self.logFilePath, "event"),
         ]
         self.requestLabels = [request.label for request in requests]
 
@@ -221,14 +221,14 @@
 
         # Set of requests to execute
         requests = [
-            MultigetTest("mget-1" if self.compact else "multiget-1", sessions, self.logFilePath, 1),
-            MultigetTest("mget-50" if self.compact else "multiget-50", sessions, self.logFilePath, 50),
-            PropfindInviteTest("propfind", sessions, self.logFilePath, 1),
-            SyncTest("s-full" if self.compact else "sync-full", sessions, self.logFilePath, True, 0),
-            SyncTest("s-1" if self.compact else "sync-1", sessions, self.logFilePath, False, 1),
-            QueryTest("q-1" if self.compact else "query-1", sessions, self.logFilePath, 1),
-            QueryTest("q-10" if self.compact else "query-10", sessions, self.logFilePath, 10),
-            PutTest("put", sessions, self.logFilePath),
+            MultigetTest("mget-1" if self.compact else "multiget-1", sessions, self.logFilePath, "share", 1),
+            MultigetTest("mget-50" if self.compact else "multiget-50", sessions, self.logFilePath, "share", 50),
+            PropfindInviteTest("propfind", sessions, self.logFilePath, "share", 1),
+            SyncTest("s-full" if self.compact else "sync-full", sessions, self.logFilePath, "share", True, 0),
+            SyncTest("s-1" if self.compact else "sync-1", sessions, self.logFilePath, "share", False, 1),
+            QueryTest("q-1" if self.compact else "query-1", sessions, self.logFilePath, "share", 1),
+            QueryTest("q-10" if self.compact else "query-10", sessions, self.logFilePath, "share", 10),
+            PutTest("put", sessions, self.logFilePath, "share"),
         ]
         self.requestLabels = [request.label for request in requests]
 
@@ -286,7 +286,7 @@
         for i in range(n - self.currentCount):
             index = self.currentCount + i + 2
             users.append("user%02d" % (index,))
-            uids.append("urn:x-uid:user%02d" % (index,))
+            uids.append("urn:x-uid:10000000-0000-0000-0000-000000000%03d" % (index,))
         session.addInvitees(URL(path=calendarhref), uids, True)
 
         # Now accept each one

Copied: CalendarServer/branches/users/gaya/groupsharee2/contrib/tools/statsanalysis.py (from rev 13765, CalendarServer/trunk/contrib/tools/statsanalysis.py)
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/contrib/tools/statsanalysis.py	                        (rev 0)
+++ CalendarServer/branches/users/gaya/groupsharee2/contrib/tools/statsanalysis.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -0,0 +1,217 @@
+#!/usr/bin/env python
+##
+# Copyright (c) 2010-2014 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+from __future__ import print_function
+
+import getopt
+import matplotlib.pyplot as plt
+import os
+import sys
+
+dataset = {}
+
+def analyze(fpath, title):
+
+    print("Analyzing data for %s" % (fpath,))
+    dataset[title] = {}
+    with open(fpath) as f:
+        for line in f:
+            if line.startswith("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"):
+                analyzeRecord(f, title)
+
+    print("Stored %d data points" % (len(dataset[title]),))
+
+
+def analyzeRecord(liter, title):
+
+    dt = liter.next()
+    time = dt[11:]
+    seconds = 60 * (60 * int(time[0:2]) + int(time[3:5])) + int(time[6:8])
+    for line in liter:
+        if line.startswith("| Overall:"):
+            overall = parseOverall(line)
+            dataset[title][seconds] = overall
+        elif line.startswith("| Method"):
+            methods = parseMethods(liter)
+            dataset[title][seconds].update(methods)
+            break
+
+def parseOverall(line):
+
+    splits = line.split("|")
+    overall = {}
+    keys = (
+        ("Requests", lambda x: int(x)),
+        ("Av. Requests per second", lambda x: float(x)),
+        ("Av. Response", lambda x: float(x)),
+        ("Av. Response no write", lambda x: float(x)),
+        ("Max. Response", lambda x: float(x)),
+        ("Slot Average", lambda x: float(x)),
+        ("CPU Average", lambda x: float(x[:-1])),
+        ("CPU Current", lambda x: float(x[:-1])),
+        ("Memory Current", lambda x: float(x[:-1])),
+        ("500's", lambda x: int(x)),
+    )
+    for ctr, item in enumerate(keys):
+        key, conv = item
+        overall["Overall:{}".format(key)] = conv(splits[2 + ctr].strip())
+
+    return overall
+
+
+def parseMethods(liter):
+
+    while liter.next()[1] != "-":
+        pass
+
+    methods = {}
+    for line in liter:
+        if line[0] == "+":
+            break
+        splits = line.split("|")
+        keys = (
+            ("Count", lambda x: int(x)),
+            ("Count %", lambda x: float(x[:-1])),
+            ("Av. Response", lambda x: float(x)),
+            ("Av. Response %", lambda x: float(x[:-1])),
+            ("Total Resp. %", lambda x: float(x[:-1])),
+        )
+        for ctr, item in enumerate(keys):
+            key, conv = item
+            methods["Method:{}:{}".format(splits[1].strip(), key)] = conv(splits[2 + ctr].strip())
+
+    return methods
+
+
+def plotSeries(key, ymin=None, ymax=None):
+
+
+    color = iter(("b+", "r+", "g+",))
+    for _ignore_title, data in sorted(dataset.items(), key=lambda x: x[0]):
+        x1, y1 = zip(*[(k / 3600.0, v[key]) for k, v in sorted(data.items(), key=lambda x: x[0]) if key in v])
+    
+    #   print("".join(["{}\t{}\n".format(x, y) for x, y in zip(x1, y1)]))
+    
+        plt.plot(x1, y1, color.next())
+
+    #plt.legend((key,), 'upper left', shadow=True, fancybox=True)
+    plt.xlabel("Hours")
+    plt.ylabel(key)
+    plt.xlim(0, 24)
+    if ymin is not None:
+        plt.ylim(ymin=ymin)
+    if ymax is not None:
+        plt.ylim(ymax=ymax)
+    plt.xticks(
+        (1, 4, 7, 10, 13, 16, 19, 22,),
+        (18, 21, 0, 3, 6, 9, 12, 15,),
+    )
+    plt.show()
+
+
+def usage(error_msg=None):
+    if error_msg:
+        print(error_msg)
+
+    print("""Usage: statsanalysis [options]
+Options:
+    -h             Print this help and exit
+    -s             Directory to scan for data [~/stats]
+
+Arguments:
+
+Description:
+This utility will analyze the output of the readStats tool and
+generate some pretty plots of data.
+""")
+
+    if error_msg:
+        raise ValueError(error_msg)
+    else:
+        sys.exit(0)
+
+if __name__ == "__main__":
+
+    scanDir = os.path.expanduser("~/stats")
+    options, args = getopt.getopt(sys.argv[1:], "hs:", [])
+
+    for option, value in options:
+        if option == "-h":
+            usage()
+        elif option == "-s":
+            scanDir = os.path.expanduser(value)
+        else:
+            usage("Unrecognized option: %s" % (option,))
+
+    if scanDir and len(args) != 0:
+        usage("No arguments allowed when scanning a directory")
+
+    pwd = os.getcwd()
+
+    fnames = os.listdir(scanDir)
+    count = 1
+    for name in fnames:
+        if name.startswith("stats_all.log"):
+            print("Found file: %s" % (os.path.join(scanDir, name),))
+            trailer = name[len("stats_all.log"):]
+            if trailer.startswith("-"):
+                trailer = trailer[1:]
+            initialDate = None
+            analyze(os.path.join(scanDir, name), trailer)
+            count += 1
+
+    keys = set()
+    for data in dataset.values():
+        for items in data.values():
+            keys.update([":".join(k.split(":")[:2]) for k in items.keys()])
+    keys = sorted(list(keys))
+    while True:
+        print("Select a key:")
+        print("\n".join(["{:2d}. {}".format(ctr + 1, key) for ctr, key in enumerate(keys)]))
+        print(" Q. Quit\n")
+        cmd = raw_input("Key: ")
+        if cmd.lower() == 'q':
+            print("\nQuitting")
+            break
+        try:
+            position = int(cmd) - 1
+        except ValueError:
+            print("Invalid key. Try again.\n")
+            continue
+
+        if keys[position].startswith("Method:"):
+            key = keys[position]
+            methodkeys = ("Count", "Count %", "Av. Response", "Av. Response %", "Total Resp. %")
+            while True:
+                print("Select a sub-key:")
+                print("\n".join(["{:2d}. {}".format(ctr + 1, subkey) for ctr, subkey in enumerate(methodkeys)]))
+                print(" B. Back\n")
+                cmd = raw_input("SubKey: ")
+                if cmd.lower() == 'b':
+                    key = None
+                    break
+                try:
+                    position = int(cmd) - 1
+                except ValueError:
+                    print("Invalid subkey. Try again.\n")
+                    continue
+                break
+            key = "{}:{}".format(key, methodkeys[position]) if key is not None else None
+        else:
+            key = keys[position]
+
+        if key:
+            plotSeries(key, ymin=0, ymax=None)

Modified: CalendarServer/branches/users/gaya/groupsharee2/requirements-dev.txt
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/requirements-dev.txt	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/requirements-dev.txt	2014-07-17 00:43:18 UTC (rev 13767)
@@ -7,4 +7,4 @@
 mockldap
 q
 --editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVClientLibrary/trunk@13420#egg=CalDAVClientLibrary
---editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@13716#egg=CalDAVTester
+--editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@13739#egg=CalDAVTester

Modified: CalendarServer/branches/users/gaya/groupsharee2/requirements-stable.txt
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/requirements-stable.txt	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/requirements-stable.txt	2014-07-17 00:43:18 UTC (rev 13767)
@@ -5,7 +5,7 @@
 # For CalendarServer development, don't try to get these projects from PyPI; use svn.
 
 -e .
--e svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@13724#egg=twextpy
+-e svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@13750#egg=twextpy
 -e svn+http://svn.calendarserver.org/repository/calendarserver/PyKerberos/trunk@13420#egg=kerberos
 -e svn+http://svn.calendarserver.org/repository/calendarserver/PyCalendar/trunk@13711#egg=pycalendar
 

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/datafilters/peruserdata.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/datafilters/peruserdata.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/datafilters/peruserdata.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -109,45 +109,15 @@
 
         # Now transfer any components over
         if peruser_component:
-            self._mergeBack(ical, peruser_component)
+            self._filterBack(ical, peruser_component)
+        else:
+            self._defaultFilter(ical)
 
         return ical
 
 
-    def merge(self, icalnew, icalold):
+    def _filterBack(self, ical, peruser):
         """
-        Merge the new data with the old taking per-user information into account.
-
-        @param icalnew: new calendar data
-        @type icalnew: L{Component} or C{str}
-        @param icalold: existing calendar data
-        @type icalold: L{Component} or C{str}
-
-        @return: L{Component} for the merged calendar data
-        """
-
-        # Make sure input is valid
-        icalnew = self.validCalendar(icalnew)
-
-        # There cannot be any X-CALENDARSERVER-PERUSER components in the new data
-        for component in tuple(icalnew.subcomponents()):
-            if component.name() == PERUSER_COMPONENT:
-                raise ValueError("Cannot merge calendar data with X-CALENDARSERVER-PERUSER components in it")
-
-        # First split the new data into common and per-user pieces
-        self._splitPerUserData(icalnew)
-        if icalold is None:
-            return icalnew
-
-        # Make sure input is valid
-        icalold = self.validCalendar(icalold)
-
-        self._mergeRepresentations(icalnew, icalold)
-        return icalnew
-
-
-    def _mergeBack(self, ical, peruser):
-        """
         Merge the per-user data back into the main calendar data.
 
         @param ical: main calendar data to merge into
@@ -179,7 +149,7 @@
                 if ical_component is None:
                     continue
                 peruser_component = peruser_recurrence_map[rid]
-                self._mergeBackComponent(ical_component, peruser_component)
+                self._filterBackComponent(ical_component, peruser_component)
                 ical.addComponent(ical_component)
         elif peruser_only_set:
             # We used to error out here, but instead we should silently ignore this error and keep going
@@ -189,7 +159,7 @@
         for rid in union_set:
             ical_component = ical.overriddenComponent(rid)
             peruser_component = peruser_recurrence_map[rid]
-            self._mergeBackComponent(ical_component, peruser_component)
+            self._filterBackComponent(ical_component, peruser_component)
 
         # For ones in main data but no per-user data, we try and copy over the master per-user data
         if ical_only_set:
@@ -197,16 +167,17 @@
             if peruser_master:
                 for rid in ical_only_set:
                     ical_component = ical.overriddenComponent(rid)
-                    self._mergeBackComponent(ical_component, peruser_master)
+                    self._filterBackComponent(ical_component, peruser_master)
 
 
-    def _mergeBackComponent(self, ical, peruser):
+    def _filterBackComponent(self, ical, peruser):
         """
         Copy all properties and sub-components from per-user data into the main component
-        @param ical:
-        @type ical:
-        @param peruser:
-        @type peruser:
+
+        @param ical: main calendar component data to merge into
+        @type ical: L{Component}
+        @param peruser: the per-user data to merge in
+        @type peruser: L{Component}
         """
 
         # Each sub-component
@@ -220,6 +191,52 @@
             ical.addProperty(property)
 
 
+    def _defaultFilter(self, ical):
+        """
+        There is no per-user component. Instead apply default properties to the data for this user.
+    
+        @param ical: the iCalendar object to process
+        @type ical: L{Component}
+        """
+
+        # TRANSP property behavior: if the event is all-day add TRANSP:TRANSPARENT, otherwise do nothing
+        comp = ical.mainComponent()
+        if comp.name() == "VEVENT" and comp.propertyValue("DTSTART").isDateOnly() and not comp.hasProperty("TRANSP"):
+            ical.addPropertyToAllComponents(Property("TRANSP", "TRANSPARENT"))
+
+
+    def merge(self, icalnew, icalold):
+        """
+        Merge the new data with the old taking per-user information into account.
+
+        @param icalnew: new calendar data
+        @type icalnew: L{Component} or C{str}
+        @param icalold: existing calendar data
+        @type icalold: L{Component} or C{str}
+
+        @return: L{Component} for the merged calendar data
+        """
+
+        # Make sure input is valid
+        icalnew = self.validCalendar(icalnew)
+
+        # There cannot be any X-CALENDARSERVER-PERUSER components in the new data
+        for component in tuple(icalnew.subcomponents()):
+            if component.name() == PERUSER_COMPONENT:
+                raise ValueError("Cannot merge calendar data with X-CALENDARSERVER-PERUSER components in it")
+
+        # First split the new data into common and per-user pieces
+        self._splitPerUserData(icalnew)
+        if icalold is None:
+            return icalnew
+
+        # Make sure input is valid
+        icalold = self.validCalendar(icalold)
+
+        self._mergeRepresentations(icalnew, icalold)
+        return icalnew
+
+
     def _splitPerUserData(self, ical):
         """
         Split the per-user data out of the "normal" iCalendar components into separate per-user
@@ -249,6 +266,9 @@
             perinstance_component = Component(PERINSTANCE_COMPONENT) if self.uid else None
             perinstance_id_different = False
 
+            # Special case certain default property values
+            self._defaultMerge(component)
+
             # Transfer per-user properties from main component to per-instance component
             for property in tuple(component.properties()):
                 if property.name() in PerUserDataFilter.PERUSER_PROPERTIES or property.name().startswith("X-") and property.name() not in PerUserDataFilter.IGNORE_X_PROPERTIES:
@@ -316,6 +336,21 @@
                 ical.removeComponent(subcomponent)
 
 
+    def _defaultMerge(self, component):
+        """
+        Handle default property values during a merge.
+
+        @param component: the iCalendar component to process
+        @type component: L{Component}
+        """
+
+        # Special handling for TRANSP: if it is not present on an all-day event,
+        # add TRANSP:OPAQUE so that the default is explicitly included, since otherwise
+        # L_defaultFilter) will add TRANSP:TRANSPARENT
+        if component.name() == "VEVENT" and component.propertyValue("DTSTART").isDateOnly() and not component.hasProperty("TRANSP"):
+            component.addProperty(Property("TRANSP", "OPAQUE"))
+
+
     def _mergeRepresentations(self, icalnew, icalold):
 
         # Test for simple case first

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/datafilters/test/test_peruserdata.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/datafilters/test/test_peruserdata.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/datafilters/test/test_peruserdata.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -6707,3 +6707,582 @@
         result02 = PerUserDataFilter("user02").filter(peruser.duplicate())
         self.assertEqual(str(result02), data02)
         TimezoneCache.clear()
+
+
+
+class PerUserDataFilterTestTransp (twistedcaldav.test.util.TestCase):
+
+    def test_filter(self):
+
+        data = (
+            (
+                "Event timed, no per-user",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID:20080602T120000Z
+DTSTART:20080602T130000Z
+DTEND:20080602T140000Z
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+END:VEVENT
+END:VCALENDAR
+""",
+                None,
+                None,
+            ),
+            (
+                "Event all-day, no per-user",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID:20080602
+DTSTART;VALUE=DATE:20080602
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+END:VEVENT
+END:VCALENDAR
+""",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+TRANSP:TRANSPARENT
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID;VALUE=DATE:20080602
+DTSTART;VALUE=DATE:20080602
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+""",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+TRANSP:TRANSPARENT
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID;VALUE=DATE:20080602
+DTSTART;VALUE=DATE:20080602
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+""",
+            ),
+            (
+                "Event timed, per-user user01 no transp",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+X-FOO:BAR
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+X-FOO:BAR
+END:VEVENT
+END:VCALENDAR
+""",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+            ),
+            (
+                "Event all-day, per-user user01 no transp",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+X-FOO:BAR
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+X-FOO:BAR
+END:VEVENT
+END:VCALENDAR
+""",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+""",
+            ),
+            (
+                "Event timed, per-user user01 with transp",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+X-FOO:BAR
+TRANSP:TRANSPARENT
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+TRANSP:TRANSPARENT
+X-FOO:BAR
+END:VEVENT
+END:VCALENDAR
+""",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+            ),
+            (
+                "Event all-day, per-user user01 with transp",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+X-FOO:BAR
+TRANSP:OPAQUE
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+TRANSP:OPAQUE
+X-FOO:BAR
+END:VEVENT
+END:VCALENDAR
+""",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+""",
+            ),
+        )
+
+        for title, txt, result1, result2 in data:
+            txt = txt.replace("\n", "\r\n")
+            self.assertEqual(str(PerUserDataFilter("user01").filter(txt)), result1.replace("\n", "\r\n") if result1 is not None else txt, msg=title)
+            self.assertEqual(str(PerUserDataFilter("user02").filter(txt)), result2.replace("\n", "\r\n") if result2 is not None else txt, msg=title)
+
+
+    def test_merge(self):
+
+        data = (
+            (
+                "Event timed, no-existing per-user",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+                "user01",
+                None,
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+
+            ),
+            (
+                "Event all-day, no existing per-user",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+                "user01",
+                None,
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+TRANSP:OPAQUE
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+
+            ),
+            (
+                "Event timed, existing per-user",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+                "user02",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+TRANSP:TRANSPARENT
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+TRANSP:TRANSPARENT
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+            ),
+            (
+                "Event all-day, existing per-user",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+                "user02",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+TRANSP:OPAQUE
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user02
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+TRANSP:OPAQUE
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+TRANSP:OPAQUE
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+
+            ),
+        )
+
+        for title, txt, user, before, after in data:
+            txt = txt.replace("\n", "\r\n")
+            self.assertEqual(str(PerUserDataFilter(user).merge(txt, before)), after.replace("\n", "\r\n"), msg=title)

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/ical.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/ical.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/ical.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -3525,6 +3525,18 @@
         return changed
 
 
+    def adjustedTransp(self):
+        """
+        Determine the TRANSP value for this component. Note that for all-day VEVENTs
+        we are going to treat the default as TRANSPARENT and not OPAQUE
+        """
+        transp = self.propertyValue("TRANSP")
+        if transp is None and self.name() == "VEVENT" and self.propertyValue("DTSTART").isDateOnly():
+            return "TRANSPARENT"
+        else:
+            return "OPAQUE" if transp is None else transp
+
+
     def allPerUserUIDs(self):
 
         results = set()

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/method/get.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/method/get.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/method/get.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -87,7 +87,7 @@
                 if accepted_type is None:
                     raise HTTPError(StatusResponse(responsecode.NOT_ACCEPTABLE, "Cannot generate requested data type"))
 
-                caldata = (yield self.iCalendarForUser(request))
+                caldata = (yield self.iCalendarForUser())
 
                 # Filter any attendee hidden instances
                 caldata = HiddenInstanceFilter().filter(caldata)

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/method/report_calendar_query.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/method/report_calendar_query.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/method/report_calendar_query.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -216,7 +216,7 @@
                     child_uri_name = child_uri[child_uri.rfind("/") + 1:]
 
                     if generate_calendar_data or not index_query_ok:
-                        calendar = (yield child.iCalendarForUser(request))
+                        calendar = (yield child.iCalendarForUser())
                         assert calendar is not None, "Calendar %s is missing from calendar collection %r" % (child_uri_name, self)
                     else:
                         calendar = None
@@ -240,7 +240,7 @@
             # Check private events access status
             isowner = (yield calresource.isOwner(request))
 
-            calendar = (yield calresource.iCalendarForUser(request))
+            calendar = (yield calresource.iCalendarForUser())
             yield queryCalendarObjectResource(calresource, uri, None, calendar, timezone)
 
         returnValue(True)

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/method/report_common.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/method/report_common.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/method/report_common.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -366,7 +366,7 @@
         if isinstance(property, caldavxml.CalendarData):
             # Handle private events access restrictions
             if calendar is None:
-                calendar = (yield resource.iCalendarForUser(request))
+                calendar = (yield resource.iCalendarForUser())
             filtered = HiddenInstanceFilter().filter(calendar)
             filtered = PrivateEventFilter(resource.accessMode, isowner).filter(filtered)
             filtered = CalendarDataFilter(property, timezone).filter(filtered)
@@ -669,12 +669,12 @@
                 # Add extended details
                 if do_event_details:
                     child = (yield request.locateChildResource(calresource, name))
-                    calendar = (yield child.iCalendarForUser(request))
+                    calendar = (yield child.iCalendarForUser())
                     _addEventDetails(calendar, event_details, rich_options, timerange, tzinfo)
 
         else:
             child = (yield request.locateChildResource(calresource, name))
-            calendar = (yield child.iCalendarForUser(request))
+            calendar = (yield child.iCalendarForUser())
 
             # The calendar may come back as None if the resource is being changed, or was deleted
             # between our initial index query and getting here. For now we will ignore this error, but in
@@ -716,7 +716,7 @@
                 # Add extended details
                 if calendar.mainType() == "VEVENT" and do_event_details:
                     child = (yield request.locateChildResource(calresource, name))
-                    calendar = (yield child.iCalendarForUser(request))
+                    calendar = (yield child.iCalendarForUser())
                     _addEventDetails(calendar, event_details, rich_options, timerange, tzinfo)
 
     returnValue(matchtotal)

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/resource.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/resource.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/resource.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -66,7 +66,6 @@
 from twistedcaldav.config import config
 from twistedcaldav.customxml import calendarserver_namespace
 from twistedcaldav.datafilters.hiddeninstance import HiddenInstanceFilter
-from twistedcaldav.datafilters.peruserdata import PerUserDataFilter
 from twistedcaldav.datafilters.privateevents import PrivateEventFilter
 from twistedcaldav.extensions import DAVResource, DAVPrincipalResource, \
     DAVResourceWithChildrenMixin
@@ -1059,20 +1058,6 @@
         return self._newStoreParentHome.isDefaultCalendar(self._newStoreObject)
 
 
-    @inlineCallbacks
-    def iCalendarForUser(self, request):
-
-        caldata = yield self.iCalendar()
-
-        accessUID = (yield self.resourceOwnerPrincipal(request))
-        if accessUID is None:
-            accessUID = ""
-        else:
-            accessUID = accessUID.principalUID()
-
-        returnValue(PerUserDataFilter(accessUID).filter(caldata))
-
-
     def iCalendarAddressDoNormalization(self, ical):
         """
         Normalize calendar user addresses in the supplied iCalendar object into their
@@ -1476,12 +1461,10 @@
 
 
     @inlineCallbacks
-    def iCalendarFiltered(self, isowner, accessUID=None):
+    def iCalendarFiltered(self, isowner):
 
         # Now "filter" the resource calendar data
-        caldata = (yield self.iCalendar())
-        if accessUID:
-            caldata = PerUserDataFilter(accessUID).filter(caldata)
+        caldata = (yield self.iCalendarForUser())
         caldata = HiddenInstanceFilter().filter(caldata)
         caldata = PrivateEventFilter(self.accessMode, isowner).filter(caldata)
         returnValue(caldata)

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/scheduling_store/caldav/resource.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/scheduling_store/caldav/resource.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/scheduling_store/caldav/resource.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -149,6 +149,11 @@
         )
 
 
+    def dynamicProperties(self):
+        return super(ScheduleInboxResource, self).dynamicProperties() + (
+            customxml.CalendarAvailability.qname(),
+        )
+
     def resourceType(self):
         return davxml.ResourceType.scheduleInbox
 

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/storebridge.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/storebridge.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/storebridge.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -1136,7 +1136,6 @@
 
         tzids = set()
         isowner = (yield self.isOwner(request))
-        accessPrincipal = (yield self.resourceOwnerPrincipal(request))
 
         for name in (yield self._newStoreObject.listObjectResources()):
             try:
@@ -1153,7 +1152,7 @@
 
                 # Get the access filtered view of the data
                 try:
-                    subcalendar = yield child.iCalendarFiltered(isowner, accessPrincipal.principalUID() if accessPrincipal else "")
+                    subcalendar = yield child.iCalendarFiltered(isowner)
                 except ValueError:
                     continue
                 assert subcalendar.name() == "VCALENDAR"
@@ -2675,6 +2674,7 @@
     def componentForUser(self):
         return self._newStoreObject.componentForUser()
 
+    iCalendarForUser = componentForUser
 
     def validIfScheduleMatch(self, request):
         """

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3184A66-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3184A66-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3184A66-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020102
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20031231;BYMONTH=1
 SUMMARY:New Year's Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3184D26-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3184D26-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3184D26-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020122
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040118;BYMONTH=1;BYDAY=3MO
 SUMMARY:Martin Luther King's Birthday (observed)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185326-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185326-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185326-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020213
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2
 SUMMARY:Lincoln's Birthday
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31854DA-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31854DA-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31854DA-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020215
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2
 SUMMARY:Valentine's Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31856AC-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31856AC-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31856AC-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020219
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040215;BYMONTH=2;BYDAY=3MO
 SUMMARY:President's Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318585A-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318585A-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318585A-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020223
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040221;BYMONTH=2
 SUMMARY:Washington's Birthday
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185A14-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185A14-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185A14-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020318
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=3
 SUMMARY:St. Patrick's Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185BBD-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185BBD-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185BBD-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -8,5 +8,6 @@
 DTSTART;VALUE=DATE:20020331
 DTEND;VALUE=DATE:20020401
 SUMMARY:Easter
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185D63-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185D63-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185D63-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020416
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=4
 SUMMARY:Tax Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185F20-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185F20-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3185F20-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020513
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5;BYDAY=2SU
 SUMMARY:Mother's Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31860C8-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31860C8-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31860C8-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020528
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040530;BYMONTH=5;BYDAY=-1MO
 SUMMARY:Memorial Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318627C-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318627C-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318627C-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020530
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5
 SUMMARY:John F. Kennedy's Birthday
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186426-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186426-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186426-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020617
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=6;BYDAY=3SU
 SUMMARY:Father's Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31865E4-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31865E4-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31865E4-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020705
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040703;BYMONTH=7
 SUMMARY:Independence Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186792-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186792-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186792-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020903
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040905;BYMONTH=9;BYDAY=1MO
 SUMMARY:Labor Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186938-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186938-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186938-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20021015
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20041010;BYMONTH=10;BYDAY=2MO
 SUMMARY:Columbus Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186ADE-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186ADE-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186ADE-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20021028
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
 SUMMARY:Daylight Saving Time Ends
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186C96-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186C96-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186C96-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20021101
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=10
 SUMMARY:Halloween
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186E3A-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186E3A-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186E3A-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20021112
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20041110;BYMONTH=11
 SUMMARY:Veteran's Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186FE7-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186FE7-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3186FE7-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20021129
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20041124;BYMONTH=11;BYDAY=4TH
 SUMMARY:Thanksgiving
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318719A-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318719A-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318719A-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20021226
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20041224;BYMONTH=12
 SUMMARY:Christmas Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3187343-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3187343-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3187343-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -8,5 +8,6 @@
 DTSTART;VALUE=DATE:20030420
 DTEND;VALUE=DATE:20030421
 SUMMARY:Easter
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188906-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188906-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188906-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20020408
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=4;BYDAY=1SU
 SUMMARY:Daylight Saving Time Begins
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188B3A-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188B3A-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188B3A-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -10,5 +10,6 @@
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2
 SEQUENCE:3
 SUMMARY:Groundhog Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188CFF-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188CFF-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188CFF-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DURATION:P1D
 SEQUENCE:2
 SUMMARY:April Fool's Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188EAA-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188EAA-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3188EAA-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -10,5 +10,6 @@
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040502;BYMONTH=5;BYDAY=1MO
 SEQUENCE:5
 SUMMARY:May Day Bank Holiday
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189058-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189058-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189058-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -10,5 +10,6 @@
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5
 SEQUENCE:3
 SUMMARY:Cinco de Mayo
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189203-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189203-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189203-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -10,5 +10,6 @@
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=6
 SEQUENCE:3
 SUMMARY:Flag Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31893C2-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31893C2-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31893C2-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20050328
 SEQUENCE:3
 SUMMARY:Easter
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189572-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189572-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189572-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -10,5 +10,6 @@
 RRULE:FREQ=YEARLY;INTERVAL=1
 SEQUENCE:3
 SUMMARY:April Fool's Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189716-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189716-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189716-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20040102
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=1
 SUMMARY:New Year's Day\n(fed holiday)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31898D4-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31898D4-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C31898D4-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20040120
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=1;BYDAY=3MO
 SUMMARY:Martin Luther King's Birthday observed\n(fed holiday)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189A88-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189A88-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189A88-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20040217
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2;BYDAY=3MO
 SUMMARY:President's Day\n(fed holiday)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189C32-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189C32-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189C32-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20040223
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2
 SUMMARY:Washington's Birthday (actual)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189DEC-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189DEC-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189DEC-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20040412
 SEQUENCE:2
 SUMMARY:Easter
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189F94-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189F94-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C3189F94-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20060417
 SEQUENCE:2
 SUMMARY:Easter
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A148-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A148-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A148-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20040601
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5;BYDAY=-1MO
 SUMMARY:Memorial Day\n(fed holiday)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A2F3-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A2F3-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A2F3-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -10,5 +10,6 @@
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5;BYDAY=1MO
 SEQUENCE:5
 SUMMARY:May Day (bank holiday)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A4BA-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A4BA-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A4BA-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20040705
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=7
 SUMMARY:Independence Day\n(fed holiday)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A6E1-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A6E1-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A6E1-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20040907
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=9;BYDAY=1MO
 SUMMARY:Labor Day\n(fed holiday)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A898-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A898-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318A898-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20041012
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=10;BYDAY=2MO
 SUMMARY:Columbus Day\n(fed holiday)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318AA54-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318AA54-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318AA54-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20041112
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11
 SUMMARY:Veteran's Day\n(fed holiday)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318ABFE-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318ABFE-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318ABFE-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -10,5 +10,6 @@
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11;BYDAY=4TH
 SEQUENCE:1
 SUMMARY:Thanksgiving\n(fed holiday)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318ADAA-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318ADAA-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318ADAA-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -9,5 +9,6 @@
 DTEND;VALUE=DATE:20041226
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=12
 SUMMARY:Christmas Day\n(fed holiday)
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318AF53-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318AF53-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318AF53-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -10,5 +10,6 @@
 RRULE:FREQ=YEARLY;INTERVAL=1
 SEQUENCE:3
 SUMMARY:New Year's Eve
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318B108-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318B108-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318B108-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -10,5 +10,6 @@
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=9;BYDAY=2SU
 SEQUENCE:3
 SUMMARY:Grandparent's Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318B2D2-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318B2D2-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/data/Holidays/C318B2D2-1ED0-11D9-A5E0-000A958A3252.ics	2014-07-17 00:43:18 UTC (rev 13767)
@@ -11,5 +11,6 @@
   November
 SEQUENCE:2
 SUMMARY:Election Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/test_icalendar.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/test_icalendar.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/test_icalendar.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -10886,3 +10886,181 @@
             changed = component.cleanOrganizerScheduleAgent()
             self.assertEqual(sorted(normalize_iCalStr(component).splitlines()), sorted(normalize_iCalStr(result).splitlines()), msg=title)
             self.assertEqual(changed, result_changed, msg=title)
+
+
+    def test_adjustedTransp(self):
+        """
+        Test that L{Component.adjustedTransp} returns the correct TRANSP value.
+        """
+
+        data = (
+            (
+                "Event timed, no TRANSP",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+END:VEVENT
+END:VCALENDAR
+""",
+                "OPAQUE",
+            ),
+            (
+                "Event timed, TRANSP:OPAQUE",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR
+""",
+                "OPAQUE",
+            ),
+            (
+                "Event timed, TRANSP:TRANSPARENT",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+""",
+                "TRANSPARENT",
+            ),
+            (
+                "Event all-day, no TRANSP",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+END:VEVENT
+END:VCALENDAR
+""",
+                "TRANSPARENT",
+            ),
+            (
+                "Event all-day, TRANSP:OPAQUE",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR
+""",
+                "OPAQUE",
+            ),
+            (
+                "Event all-day, TRANSP:TRANSPARENT",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+""",
+                "TRANSPARENT",
+            ),
+            (
+                "Todo timed, no TRANSP",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VTODO
+UID:12345-67890
+DUE:20080601T120000Z
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+END:VTODO
+END:VCALENDAR
+""",
+                "OPAQUE",
+            ),
+            (
+                "Todo all-day, no TRANSP",
+                """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VTODO
+UID:12345-67890
+DUE;VALUE=DATE:20080601
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+END:VTODO
+END:VCALENDAR
+""",
+                "OPAQUE",
+            ),
+        )
+
+        for title, txt, result in data:
+            component = Component.fromString(txt).mainComponent()
+            transp = component.adjustedTransp()
+            self.assertEqual(transp, result, msg=title)

Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/test_multiget.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/test_multiget.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/test/test_multiget.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -136,6 +136,7 @@
 DTSTAMP:20020101T121212Z
 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20031231;BYMONTH=1
 SUMMARY:New Year's Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR
 """.replace("\n", "\r\n"),
@@ -150,6 +151,7 @@
 DTSTAMP:20020101T121212Z
 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2
 SUMMARY:Valentine's Day
+TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR
 """.replace("\n", "\r\n")

Modified: CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/scheduling/freebusy.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/scheduling/freebusy.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/scheduling/freebusy.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -356,6 +356,9 @@
                     fbtype,
                 ))
 
+    # Cache directory record lookup outside this loop as it is expensive and will likely
+    # always end up being called with the same organizer address.
+    recordUIDCache = {}
     for key in aggregated_resources.iterkeys():
 
         name, uid, type, test_organizer = key
@@ -375,8 +378,14 @@
                 if excludeuid:
                     # See if we have a UID match
                     if (excludeuid == uid):
-                        test_record = (yield calresource.directoryService().recordWithCalendarUserAddress(test_organizer)) if test_organizer else None
-                        test_uid = test_record.uid if test_record else ""
+                        if test_organizer:
+                            test_uid = recordUIDCache.get(test_organizer)
+                            if test_uid is None:
+                                test_record = (yield calresource.directoryService().recordWithCalendarUserAddress(test_organizer))
+                                test_uid = test_record.uid if test_record else ""
+                                recordUIDCache[test_organizer] = test_uid
+                        else:
+                            test_uid = ""
 
                         # Check that ORGANIZER's match (security requirement)
                         if (organizer is None) or (organizer_uid == test_uid):
@@ -435,8 +444,14 @@
                 # See if we have a UID match
                 if (excludeuid == uid):
                     test_organizer = calendar.getOrganizer()
-                    test_record = (yield calresource.principalForCalendarUserAddress(test_organizer)) if test_organizer else None
-                    test_uid = test_record.principalUID() if test_record else ""
+                    if test_organizer:
+                        test_uid = recordUIDCache.get(test_organizer)
+                        if test_uid is None:
+                            test_record = (yield calresource.directoryService().recordWithCalendarUserAddress(test_organizer))
+                            test_uid = test_record.uid if test_record else ""
+                            recordUIDCache[test_organizer] = test_uid
+                    else:
+                        test_uid = ""
 
                     # Check that ORGANIZER's match (security requirement)
                     if (organizer is None) or (organizer_uid == test_uid):

Modified: CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/scheduling/processing.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/scheduling/processing.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/scheduling/processing.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -43,6 +43,7 @@
 import hashlib
 import json
 import uuid
+import time
 
 """
 CalDAV implicit processing.
@@ -754,7 +755,9 @@
                             end=str(makeTimedUTC(instance.end)),
                         )
 
+                        t = time.time()
                         yield generateFreeBusyInfo(testcal, fbinfo, tr, 0, uid, servertoserver=True, accountingItems=accounting if len(instances) == 1 else None)
+                        print time.time() - t
 
                         # If any fbinfo entries exist we have an overlap
                         if len(fbinfo[0]) or len(fbinfo[1]) or len(fbinfo[2]):

Modified: CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/sql.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/sql.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -3415,7 +3415,7 @@
             start = instance.start
             end = instance.end
             floating = instance.start.floating()
-            transp = instance.component.propertyValue("TRANSP") == "TRANSPARENT"
+            transp = instance.component.adjustedTransp() == "TRANSPARENT"
             fbtype = instance.component.getFBType()
             start.setTimezoneUTC(True)
             end.setTimezoneUTC(True)

Modified: CalendarServer/branches/users/gaya/groupsharee2/txdav/dps/client.py
===================================================================
--- CalendarServer/branches/users/gaya/groupsharee2/txdav/dps/client.py	2014-07-16 23:30:52 UTC (rev 13766)
+++ CalendarServer/branches/users/gaya/groupsharee2/txdav/dps/client.py	2014-07-17 00:43:18 UTC (rev 13767)
@@ -195,8 +195,8 @@
         if "fieldsList" in results:
             numResults = len(results["fieldsList"])
         log.debug(
-            "DPS call {command} duration={duration:.2f}s, results={numResults}",
-            command=command, duration=duration, numResults=numResults
+            "DPS call {command} duration={duration:.2f}ms, results={numResults}",
+            command=command, duration=1000.0 * duration, numResults=numResults
         )
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140716/49e8b3b3/attachment-0001.html>


More information about the calendarserver-changes mailing list