Mailing list archives: June 2008

Site index · List index
Message list1 · 2 · Next »Thread · Author · Date
<rmikefree...@gmail.com> t(ServerConduit, HTTPMixin): &lt;/span&gt;&lt;span class="add"&gt;+class SimpleHTTPConduit(LinkableConduit, ManifestEngineMixin, HTTPMixin): &lt;/span&gt;&lt;span class="cx"&gt; &amp;quot;&amp;quot;&amp;quot; Useful for get-only subscriptions of remote .ics files &amp;quot;&amp;quot;&amp;quot; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt; &lt;a id="trunkchandlerparcelsosafsharingfilesystem_conduitpy"&gt;&lt;/a&gt; &lt;div class="modfile"&gt;&lt;h4&gt;Modified: trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py (12370 =&gt; 12371)&lt;/h4&gt; &lt;pre class="diff"&gt; &lt;span class="info"&gt;--- trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py 2006-11-17 22:00:15 UTC (rev 12370) +++ trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py 2006-11-17 23:02:02 UTC (rev 12371) &lt;/span&gt;&lt;span class="lines"&gt;@@ -21,7 +21,7 @@ &lt;/span&gt;&lt;span class="cx"&gt; from i18n import ChandlerMessageFactory as _ &lt;/span&gt;&lt;span class="rem"&gt;-class FileSystemConduit(conduits.ServerConduit, conduits.ManifestEngineMixin): &lt;/span&gt;&lt;span class="add"&gt;+class FileSystemConduit(conduits.LinkableConduit, conduits.Manf getTextType(self): + raise NotImplementedError, &amp;amp;amp;quot;RepositoryView.getTextType&amp;amp;amp;quot; + def isLoading(self): return (self._status &amp;amp;amp;amp;amp; RepositoryView.LOADING) != 0 @@ -268,7 +281 @@ ifundaw Wed, 04 May, 01:07
ghoff s"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sun, 31 Jul, 21:15
ghoff s"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sun, 31 Jul, 21:15
ghoff s"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sun, 31 Jul, 21:15
ghoff s"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sun, 31 Jul, 21:15
ghoff s"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sun, 31 Jul, 21:15
e t;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Fri, 26 Aug, 06:54
e t;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Fri, 26 Aug, 06:54
e t;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Fri, 26 Aug, 06:54
e t;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Fri, 26 Aug, 06:54
e t;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Fri, 26 Aug, 06:54
levin...@hvcc.edu #inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sat, 07 Apr, 02:32
p..@aronde.net ck-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Fri, 31 Jan, 19:15
peter.no...@tu-clausthal.de ck-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Fri, 31 Jan, 19:15
peter.no...@tu-clausthal.de ck-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Fri, 31 Jan, 19:15
peter.no...@tu-clausthal.de ck-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Fri, 31 Jan, 19:15
peter.no...@tu-clausthal.de ck-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Fri, 31 Jan, 19:15
ic ss="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sun, 07 Jun, 03:49
ic ss="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sun, 07 Jun, 03:49
ic ss="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sun, 07 Jun, 03:49
ic ss="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sun, 07 Jun, 03:49
e rride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnpanclass="rem"&gt;-classCosmoConduit(ServerConduit,TokenEngineMixin,HTTPMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classCosmoConduit(BaseConduit,TokenEngineMixin,HTTPMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;pass&lt;/span&gt;&lt;spanclass="lines"&gt;@@-881,7+1302,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-classSimpleHTTPConduit(ServerConduit,HTTPMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classSimpleHTTPConduit(LinkableConduit,ManifestEngineMixin,HTTPMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Usefulforget-onlysubscriptionsofremote.icsfiles&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingfilesystem_conduitpy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-21,7+21,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;fromi18nimportChandlerMessageFactoryas_&lt;/span&gt;&lt;spanclass="rem"&gt;-classFileSystemConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classFileSystemConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;defgetLocation(self,privilege=None):ifself.hasLocalAttributeValue(&amp;quot;sharePath&amp;quot;)and\&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharinginmemory_conduitpy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
e odfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 18 Feb, 17:56
<slyyd...@gmail.com> ts.ServerConduit, conduits.ManifestEngineMixin): &lt;/span&gt;&lt;span class="add"&gt;+class FileSystemConduit(conduits.LinkableConduit, conduits.Manf getTextType(self): + raise NotImplementedError, &amp;amp;amp;quot;RepositoryView.getTextType&amp;amp;amp;quot; + def isLoading(self): return (self._status &amp;amp;amp;amp;amp; RepositoryView.LOADING) != 0 @@ -268,7 +281 @@ ifundaw Tue, 06 May, 02:17
s ass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 21 May, 04:38
s ="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 21 May, 04:38
7.@gmx.at> ngconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Fri, 15 Nov, 08:32
5?Q?Fl=F6=DFer-Apotheke?= pdateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sat, 07 Aug, 00:39
Rivera Vila 9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Thu, 11 Aug, 11:40
Rivera Vila 9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Thu, 11 Aug, 11:40
s..@swbell.net> ndler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sat, 15 Oct, 00:10
ss="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 23 Feb, 05:18
r..@tnir.org> itwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Thu, 30 Jan, 06:45
<rvhatc...@gmail.com> ot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 23 Feb, 10:23
ot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 30 Nov, 00:24
ot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 30 Nov, 00:24
ot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 30 Nov, 00:24
ot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 30 Nov, 00:24
n rConduit, conduits.ManifestEngineMixin): &lt;/span&gt;&lt;span class="add"&gt;+class FileSystemConduit(conduits.LinkableConduit, conduits.Manf getTextType(self): + raise NotImplementedError, &amp;amp;amp;quot;RepositoryView.getTextType&amp;amp;amp;quot; + def isLoading(self): return (self._status &amp;amp;amp;amp;amp; RepositoryView.LOADING) != 0 @@ -268,7 +281 @@ ifundaw Sun, 17 Mar, 03:05
ode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Tue, 09 Jul, 17:05
<kommentar...@gmail.com> ;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sun, 26 Oct, 19:05
<kommentar...@gmail.com> ;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sun, 26 Oct, 19:05
va...@osafoundation.org> itwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sat, 13 Mar, 15:31
va...@osafoundation.org> itwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sat, 13 Mar, 15:31
va...@osafoundation.org> itwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sat, 13 Mar, 15:31
va...@osafoundation.org> itwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sat, 13 Mar, 15:31
va...@osafoundation.org> itwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Sat, 13 Mar, 15:31
m.@osafoundation.org> ride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnpanclass="rem"&gt;-classCosmoConduit(ServerConduit,TokenEngineMixin,HTTPMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classCosmoConduit(BaseConduit,TokenEngineMixin,HTTPMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;pass&lt;/span&gt;&lt;spanclass="lines"&gt;@@-881,7+1302,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-classSimpleHTTPConduit(ServerConduit,HTTPMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classSimpleHTTPConduit(LinkableConduit,ManifestEngineMixin,HTTPMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Usefulforget-onlysubscriptionsofremote.icsfiles&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingfilesystem_conduitpy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-21,7+21,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;fromi18nimportChandlerMessageFactoryas_&lt;/span&gt;&lt;spanclass="rem"&gt;-classFileSystemConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classFileSystemConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;defgetLocation(self,privilege=None):ifself.hasLocalAttributeValue(&amp;quot;sharePath&amp;quot;)and\&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharinginmemory_conduitpy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> ride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnpanclass="rem"&gt;-classCosmoConduit(ServerConduit,TokenEngineMixin,HTTPMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classCosmoConduit(BaseConduit,TokenEngineMixin,HTTPMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;pass&lt;/span&gt;&lt;spanclass="lines"&gt;@@-881,7+1302,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-classSimpleHTTPConduit(ServerConduit,HTTPMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classSimpleHTTPConduit(LinkableConduit,ManifestEngineMixin,HTTPMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Usefulforget-onlysubscriptionsofremote.icsfiles&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingfilesystem_conduitpy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-21,7+21,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;fromi18nimportChandlerMessageFactoryas_&lt;/span&gt;&lt;spanclass="rem"&gt;-classFileSystemConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classFileSystemConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;defgetLocation(self,privilege=None):ifself.hasLocalAttributeValue(&amp;quot;sharePath&amp;quot;)and\&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharinginmemory_conduitpy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> ride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnpanclass="rem"&gt;-classCosmoConduit(ServerConduit,TokenEngineMixin,HTTPMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classCosmoConduit(BaseConduit,TokenEngineMixin,HTTPMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;pass&lt;/span&gt;&lt;spanclass="lines"&gt;@@-881,7+1302,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-classSimpleHTTPConduit(ServerConduit,HTTPMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classSimpleHTTPConduit(LinkableConduit,ManifestEngineMixin,HTTPMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Usefulforget-onlysubscriptionsofremote.icsfiles&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingfilesystem_conduitpy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-21,7+21,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;fromi18nimportChandlerMessageFactoryas_&lt;/span&gt;&lt;spanclass="rem"&gt;-classFileSystemConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classFileSystemConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;defgetLocation(self,privilege=None):ifself.hasLocalAttributeValue(&amp;quot;sharePath&amp;quot;)and\&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharinginmemory_conduitpy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-ifcode==MergeError.DELETE:-logger.debug(&amp;quot;Sharingconflictonitem%(item)s,&amp;quot;-&amp;quot;deletedlocally,modifiedremotely&amp;quot;,-{'item':item,}-)-returnTrue&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&amp;lt;=logging.DEBUG:-#logger.debug(&amp;quot;Sharingconflictonitem%(item)s,attribute&amp;quot;-#&amp;quot;%(attribute)s:%(local)svs%(remote)s&amp;quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&amp;quot;Conflictforattribute%s&amp;quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&amp;quot;Conflictforitem'%(name)s'&amp;quot;-#&amp;quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&amp;quot;)%-#(-#{-#'name':item.getItemDisplayName(),-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,Nil))-#'remote':unicode(value),-#}-#)-#)--LOCAL_CHANGES_WIN=False--ifLOCAL_CHANGES_WIN:-returngetattr(item,attribute,Nil)#Changefrom*other*views-else:-returnvalue#Changefrom*this*view----shares=self.getLinkedShares()-metaView=shares[0].itsView--itemsMarker=shares[0].conduit.itemsMarker--stats=[]--timeTravel=False-forshareinshares:--#resourceListisanon-persistentsnapshotofwhat'sontheserver-#(orfilesystem,etc.)-share.resourceList=None--#TheCloudXMLandICalendarFormatsrequirerollingbackthe-#sharingview(akatimetravel)-if(isinstance(share.format,CloudXMLFormat)or-isinstance(share.format,ICalendarFormat)):-timeTravel=True---#Don'tcommitifwe'reusingaOneTimeShare-commit=notisinstance(shares[0],OneTimeShare)--established=shares[0].established-ifestablishedandtimeTravel:-#IfestablishedandtimeTravelisrequiredbytheformat(s)inuse,-#we'lluseourspecial'Sharing'view,rollingitback-#inhistorytothewayitwasatlastsync,justafterthecommit()-#thatfollowedthepreviousGET--forexistingViewinmetaView.repository.views:-ifexistingView.name=='Sharing':-contentView=existingView-logger.debug(&amp;qlishedNeedsCalling=(notlinkedShares[0].establishedand+needsCalling(NEWITEMSUNESTABLISHED))++ifnewItemsNeedsCallingornewItemsUnestablishedNeedsCalling:+added=[]+forstatinstats:+foruuidinstat['added']:+ifuuidnotinadded:+added.append(uuid)++ifnewItemsNeedsCalling:+callCallbacks(NEWITEMS,share=linkedShares[0],uuids=added4F0-79008D63EAB0@osafoundation.org> Mon, 03 May, 09:42
m.@osafoundation.org> dfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-20,7+20,7@@&lt;/span&gt;&lt;spanclass="cx"&gt;shareDict={}&lt;/span&gt;&lt;spanclass="rem"&gt;-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="add"&gt;+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):&lt;/span&gt;&lt;spanclass="cx"&gt;&amp;quot;&amp;quot;&amp;quot;Atestconduit,storingdatainadictionary&amp;quot;&amp;quot;&amp;quot;def__init__(self,*args,**kw):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;aid="trunkchandlerparcelsosafsharingsharespy"&gt;&lt;/a&gt;&lt;divclass="modfile"&gt;&lt;h4&gt;Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=&gt;12371)&lt;/h4&gt;&lt;preclass="diff"&gt;&lt;spanclass="info"&gt;---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-15,8+15,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;'Share','OneTimeShare','OneTimeFileSystemShare',&lt;/span&gt;&lt;spanclass="rem"&gt;-'isReadOnlyMode',-'setReadOnlyMode',&lt;/span&gt;&lt;spanclass="cx"&gt;]&lt;/span&gt;&lt;spanclass="lines"&gt;@@-26,9+24,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;importerrorsfromcallbacksimport*importlogging&lt;/span&gt;&lt;spanclass="rem"&gt;-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError&lt;/span&gt;&lt;spanclass="cx"&gt;importlogginglogger=logging.getLogger(__name__)&lt;/span&gt;&lt;spanclass="lines"&gt;@@-36,23+31,6@@&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------&lt;/span&gt;&lt;spanclass="cx"&gt;classmodeEnum(schema.Enumeration):values=&amp;quot;put&amp;quot;,&amp;quot;get&amp;quot;,&amp;quot;both&amp;quot;&lt;/span&gt;&lt;spanclass="lines"&gt;@@-166,9+144,9@@&lt;/span&gt;&lt;spanclass="cx"&gt;self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):&lt;/span&gt;&lt;spanclass="rem"&gt;-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="add"&gt;+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)&lt;/span&gt;&lt;spanclass="cx"&gt;defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,&lt;/span&gt;&lt;spanclass="lines"&gt;@@-228,418+206,11@@&lt;/span&gt;&lt;spanclass="cx"&gt;returnshares&lt;/span&gt;&lt;spanclass="rem"&gt;-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-if_readOnlyMode:-modeOverride='get'-logger.warning(&amp;quot;Sharinginread-onlymode&amp;quot;)&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&gt;&lt;spanclass="rem"&gt;-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview&lt;/span&gt;&lt;spanclass="cx"&gt;&lt;/span&am