| <rmikefree...@gmail.com> |
t(ServerConduit, HTTPMixin):
</span><span class="add">+class SimpleHTTPConduit(LinkableConduit, ManifestEngineMixin, HTTPMixin):
</span><span class="cx"> &quot;&quot;&quot;
Useful for get-only subscriptions of remote .ics files
&quot;&quot;&quot;
</span></pre></div>
<a id="trunkchandlerparcelsosafsharingfilesystem_conduitpy"></a>
<div class="modfile"><h4>Modified: trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py (12370 => 12371)</h4>
<pre class="diff">
<span class="info">--- 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)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> from i18n import ChandlerMessageFactory as _
</span><span class="rem">-class FileSystemConduit(conduits.ServerConduit, conduits.ManifestEngineMixin):
</span><span class="add">+class FileSystemConduit(conduits.LinkableConduit, conduits.Manf getTextType(self):
+ raise NotImplementedError, &amp;amp;quot;RepositoryView.getTextType&amp;amp;quot;
+
def isLoading(self):
return (self._status &amp;amp;amp;amp; RepositoryView.LOADING) != 0
@@ -268,7 +281 @@
ifundaw |
Wed, 04 May, 01:07 |
| ghoff |
s">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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(&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(&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(&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(&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(&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(&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">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnpanclass="rem">-classCosmoConduit(ServerConduit,TokenEngineMixin,HTTPMixin):</span><spanclass="add">+classCosmoConduit(BaseConduit,TokenEngineMixin,HTTPMixin):</span><spanclass="cx">pass</span><spanclass="lines">@@-881,7+1302,7@@</span><spanclass="cx"></span><spanclass="rem">-classSimpleHTTPConduit(ServerConduit,HTTPMixin):</span><spanclass="add">+classSimpleHTTPConduit(LinkableConduit,ManifestEngineMixin,HTTPMixin):</span><spanclass="cx">&quot;&quot;&quot;Usefulforget-onlysubscriptionsofremote.icsfiles&quot;&quot;&quot;</span></pre></div><aid="trunkchandlerparcelsosafsharingfilesystem_conduitpy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-21,7+21,7@@</span><spanclass="cx">fromi18nimportChandlerMessageFactoryas_</span><spanclass="rem">-classFileSystemConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classFileSystemConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">defgetLocation(self,privilege=None):ifself.hasLocalAttributeValue(&quot;sharePath&quot;)and\</span></pre></div><aid="trunkchandlerparcelsosafsharinginmemory_conduitpy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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):
</span><span class="add">+class FileSystemConduit(conduits.LinkableConduit, conduits.Manf getTextType(self):
+ raise NotImplementedError, &amp;amp;quot;RepositoryView.getTextType&amp;amp;quot;
+
def isLoading(self):
return (self._status &amp;amp;amp;amp; RepositoryView.LOADING) != 0
@@ -268,7 +281 @@
ifundaw |
Tue, 06 May, 02:17 |
| s |
ass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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(&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;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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):
</span><span class="add">+class FileSystemConduit(conduits.LinkableConduit, conduits.Manf getTextType(self):
+ raise NotImplementedError, &amp;amp;quot;RepositoryView.getTextType&amp;amp;quot;
+
def isLoading(self):
return (self._status &amp;amp;amp;amp; RepositoryView.LOADING) != 0
@@ -268,7 +281 @@
ifundaw |
Sun, 17 Mar, 03:05 |
|
ode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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(&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(&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(&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(&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(&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)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnpanclass="rem">-classCosmoConduit(ServerConduit,TokenEngineMixin,HTTPMixin):</span><spanclass="add">+classCosmoConduit(BaseConduit,TokenEngineMixin,HTTPMixin):</span><spanclass="cx">pass</span><spanclass="lines">@@-881,7+1302,7@@</span><spanclass="cx"></span><spanclass="rem">-classSimpleHTTPConduit(ServerConduit,HTTPMixin):</span><spanclass="add">+classSimpleHTTPConduit(LinkableConduit,ManifestEngineMixin,HTTPMixin):</span><spanclass="cx">&quot;&quot;&quot;Usefulforget-onlysubscriptionsofremote.icsfiles&quot;&quot;&quot;</span></pre></div><aid="trunkchandlerparcelsosafsharingfilesystem_conduitpy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-21,7+21,7@@</span><spanclass="cx">fromi18nimportChandlerMessageFactoryas_</span><spanclass="rem">-classFileSystemConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classFileSystemConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">defgetLocation(self,privilege=None):ifself.hasLocalAttributeValue(&quot;sharePath&quot;)and\</span></pre></div><aid="trunkchandlerparcelsosafsharinginmemory_conduitpy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnpanclass="rem">-classCosmoConduit(ServerConduit,TokenEngineMixin,HTTPMixin):</span><spanclass="add">+classCosmoConduit(BaseConduit,TokenEngineMixin,HTTPMixin):</span><spanclass="cx">pass</span><spanclass="lines">@@-881,7+1302,7@@</span><spanclass="cx"></span><spanclass="rem">-classSimpleHTTPConduit(ServerConduit,HTTPMixin):</span><spanclass="add">+classSimpleHTTPConduit(LinkableConduit,ManifestEngineMixin,HTTPMixin):</span><spanclass="cx">&quot;&quot;&quot;Usefulforget-onlysubscriptionsofremote.icsfiles&quot;&quot;&quot;</span></pre></div><aid="trunkchandlerparcelsosafsharingfilesystem_conduitpy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-21,7+21,7@@</span><spanclass="cx">fromi18nimportChandlerMessageFactoryas_</span><spanclass="rem">-classFileSystemConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classFileSystemConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">defgetLocation(self,privilege=None):ifself.hasLocalAttributeValue(&quot;sharePath&quot;)and\</span></pre></div><aid="trunkchandlerparcelsosafsharinginmemory_conduitpy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnpanclass="rem">-classCosmoConduit(ServerConduit,TokenEngineMixin,HTTPMixin):</span><spanclass="add">+classCosmoConduit(BaseConduit,TokenEngineMixin,HTTPMixin):</span><spanclass="cx">pass</span><spanclass="lines">@@-881,7+1302,7@@</span><spanclass="cx"></span><spanclass="rem">-classSimpleHTTPConduit(ServerConduit,HTTPMixin):</span><spanclass="add">+classSimpleHTTPConduit(LinkableConduit,ManifestEngineMixin,HTTPMixin):</span><spanclass="cx">&quot;&quot;&quot;Usefulforget-onlysubscriptionsofremote.icsfiles&quot;&quot;&quot;</span></pre></div><aid="trunkchandlerparcelsosafsharingfilesystem_conduitpy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/filesystem_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-21,7+21,7@@</span><spanclass="cx">fromi18nimportChandlerMessageFactoryas_</span><spanclass="rem">-classFileSystemConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classFileSystemConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">defgetLocation(self,privilege=None):ifself.hasLocalAttributeValue(&quot;sharePath&quot;)and\</span></pre></div><aid="trunkchandlerparcelsosafsharinginmemory_conduitpy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span><spanclass="rem">-ifcode==MergeError.DELETE:-logger.debug(&quot;Sharingconflictonitem%(item)s,&quot;-&quot;deletedlocally,modifiedremotely&quot;,-{'item':item,}-)-returnTrue</span><spanclass="cx"></span><spanclass="rem">-#Uncommenttogetsharingconflictlogmessages:-#iflogger.getEffectiveLevel()&lt;=logging.DEBUG:-#logger.debug(&quot;Sharingconflictonitem%(item)s,attribute&quot;-#&quot;%(attribute)s:%(local)svs%(remote)s&quot;,{-#'item':item,-#'attribute':attribute,-#'local':unicode(getattr(item,attribute,-#Nil)).encode('utf8'),-#'remote':unicode(value).encode('utf8'),-#})</span><spanclass="cx"></span><spanclass="rem">-#@@@MORProbablynotagoodideatocreatenewitemsinsidethe-#conflictresolutioncallback.-#-#Commentingoutfornow-#SharingConflictNotification(itsView=item.itsView,-#displayName=&quot;Conflictforattribute%s&quot;%attribute,-#attribute=attribute,-#local=unicode(getattr(item,attribute,None)),-#remote=unicode(value),-#items=[item])--#ifupdateCallback:-#updateCallback(-#msg=_(u&quot;Conflictforitem'%(name)s'&quot;-#&quot;attribute:%(attribute)s'%(local)s'vs'%(remote)s'&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(&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"><h4>Modified:trunk/chandler/parcels/osaf/sharing/inmemory_conduit.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---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)</span><spanclass="lines">@@-20,7+20,7@@</span><spanclass="cx">shareDict={}</span><spanclass="rem">-classInMemoryConduit(conduits.ServerConduit,conduits.ManifestEngineMixin):</span><spanclass="add">+classInMemoryConduit(conduits.LinkableConduit,conduits.ManifestEngineMixin):</span><spanclass="cx">&quot;&quot;&quot;Atestconduit,storingdatainadictionary&quot;&quot;&quot;def__init__(self,*args,**kw):</span></pre></div><aid="trunkchandlerparcelsosafsharingsharespy"></a><divclass="modfile"><h4>Modified:trunk/chandler/parcels/osaf/sharing/shares.py(12370=>12371)</h4><preclass="diff"><spanclass="info">---trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1722:00:15UTC(rev12370)+++trunk/chandler/parcels/osaf/sharing/shares.py2006-11-1723:02:02UTC(rev12371)</span><spanclass="lines">@@-15,8+15,6@@</span><spanclass="cx">'Share','OneTimeShare','OneTimeFileSystemShare',</span><spanclass="rem">-'isReadOnlyMode',-'setReadOnlyMode',</span><spanclass="cx">]</span><spanclass="lines">@@-26,9+24,6@@</span><spanclass="cx">importerrorsfromcallbacksimport*importlogging</span><spanclass="rem">-importzanshin,M2Crypto.BIO,twisted.web.http-fromrepository.item.ItemimportItem-fromrepository.persistence.RepositoryErrorimportMergeError</span><spanclass="cx">importlogginglogger=logging.getLogger(__name__)</span><spanclass="lines">@@-36,23+31,6@@</span><spanclass="cx"></span><spanclass="rem">-#Aflagtoallowadevelopertoturnoffallpublishingwhiledebugging-_readOnlyMode=False-defisReadOnlyMode():-return_readOnlyMode-defsetReadOnlyMode(active):-global_readOnlyMode-_readOnlyMode=active----------</span><spanclass="cx">classmodeEnum(schema.Enumeration):values=&quot;put&quot;,&quot;get&quot;,&quot;both&quot;</span><spanclass="lines">@@-166,9+144,9@@</span><spanclass="cx">self.conduit.close()defsync(self,modeOverride=None,updateCallback=None,forceUpdate=None):</span><spanclass="rem">-returnself._sync(modeOverride=modeOverride,-updateCallback=updateCallback,-forceUpdate=forceUpdate)</span><spanclass="add">+returnself.conduit.sync(modeOverride=modeOverride,+updateCallback=updateCallback,+forceUpdate=forceUpdate)</span><spanclass="cx">defput(self,updateCallback=None):returnself.sync(modeOverride='put',updateCallback=updateCallback,</span><spanclass="lines">@@-228,418+206,11@@</span><spanclass="cx">returnshares</span><spanclass="rem">-def_sync(self,modeOverride=None,updateCallback=None,forceUpdate=None):-fromformatsimportCloudXMLFormat-fromICalendarimportICalendarFormat-fromwebdav_conduitimportWebDAVConduit-fromcaldav_conduitimportCalDAVConduit</span><spanclass="cx"></span><spanclass="rem">-if_readOnlyMode:-modeOverride='get'-logger.warning(&quot;Sharinginread-onlymode&quot;)</span><spanclass="cx"></span><spanclass="rem">-defmergeFunction(code,item,attribute,value):-#'value'istheonefromthe*this*view-#getattr(item,attribute)isthevaluefromadifferentview</span><spanclass="cx"></span&am |