[Zope-Checkins] SVN: Zope/branches/2.13/ `undoMultiple` was still broken as transactions were not undone

Godefroid Chapelle gotcha at bubblenet.be
Mon Sep 19 04:57:57 EST 2011


Log message for revision 122837:
  `undoMultiple` was still broken as transactions were not undone 
  in the proper order : tids were stored and retrieved as dictionary keys. 
  

Changed:
  U   Zope/branches/2.13/doc/CHANGES.rst
  U   Zope/branches/2.13/src/App/Undo.py

-=-
Modified: Zope/branches/2.13/doc/CHANGES.rst
===================================================================
--- Zope/branches/2.13/doc/CHANGES.rst	2011-09-19 09:36:26 UTC (rev 122836)
+++ Zope/branches/2.13/doc/CHANGES.rst	2011-09-19 09:57:57 UTC (rev 122837)
@@ -11,6 +11,9 @@
 Bugs Fixed
 ++++++++++
 
+- `undoMultiple` was still broken as transactions were not undone in the proper
+  order : tids were stored and retrieved as dictionary keys. 
+
 - Updated distributions:
 
   - Products.ZCatalog = 2.13.20

Modified: Zope/branches/2.13/src/App/Undo.py
===================================================================
--- Zope/branches/2.13/src/App/Undo.py	2011-09-19 09:36:26 UTC (rev 122836)
+++ Zope/branches/2.13/src/App/Undo.py	2011-09-19 09:57:57 UTC (rev 122837)
@@ -132,15 +132,17 @@
     def manage_undo_transactions(self, transaction_info=(), REQUEST=None):
         """
         """
-        tids = {}
+        tids = []
+        descriptions = []
         for tid in transaction_info:
             tid = tid.split()
             if tid:
-                tids[decode64(tid[0])] = tid[-1]
+                tids.append(decode64(tid[0]))
+                descriptions.append(tid[-1])
 
         if tids:
-            transaction.get().note("Undo %s" % ' '.join(tids.values()))
-            self._p_jar.db().undoMultiple(tids.keys())
+            transaction.get().note("Undo %s" % ' '.join(descriptions))
+            self._p_jar.db().undoMultiple(tids)
 
         if REQUEST is None:
             return



More information about the Zope-Checkins mailing list