[Commits] (pavlov) need to get the etag and lastModified after we have completed merging and syncing to avoid thinking we need to sync later

commits at osafoundation.org commits at osafoundation.org
Tue Aug 17 11:39:06 PDT 2004


Commit by: pavlov
Modified files:
chandler/parcels/osaf/framework/webdav/Sync.py 1.2 1.3

Log message:
need to get the etag and lastModified after we have completed merging and syncing to avoid thinking we need to sync later


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/webdav/Sync.py.diff?r1=text&tr1=1.2&r2=text&tr2=1.3

Index: chandler/parcels/osaf/framework/webdav/Sync.py
diff -u chandler/parcels/osaf/framework/webdav/Sync.py:1.2 chandler/parcels/osaf/framework/webdav/Sync.py:1.3
--- chandler/parcels/osaf/framework/webdav/Sync.py:1.2	Tue Aug 17 09:41:34 2004
+++ chandler/parcels/osaf/framework/webdav/Sync.py	Tue Aug 17 11:39:05 2004
@@ -52,6 +52,15 @@
         # put back merged local changes
         syncToServer(dav, item)
 
+    if serverChanges or localChanges:
+        # Make sure we have the latest etag and lastModified
+        # Note: some servers *cough*xythos*cough* change the etag when you
+        # do a PROPPATCH
+        item.etag = dav.etag
+        item.lastModified = dav.lastModified
+        item.sharedVersion = item._version
+
+
 
 
 
@@ -120,11 +129,6 @@
     print url, r.status, r.reason
     print r.read()
 
-    # argh!! i hate this.. we have to get the etag again here since
-    # some servers *cough*xythos*cough* change the etag when you proppatch
-    item.etag = dav.etag
-    item.lastModified = dav.lastModified
-    item.sharedVersion = item._version
 
 
 
@@ -189,7 +193,7 @@
     origUUID = davItem.itsUUID
     newItem = repository.findUUID(sharing.itemMap[origUUID])
     if newItem:
-        syncItem(dav, newItem)
+        dav.sync(newItem)
         return newItem
 
     # otherwise, create a new item for the davItem



More information about the Commits mailing list