[Zodb-checkins] CVS: Packages/ZopeUndo - Prefix.py:1.1.66.3

Martijn Pieters mj at zopatista.com
Sun Sep 25 18:28:56 EDT 2005


Update of /cvs-repository/Packages/ZopeUndo
In directory cvs.zope.org:/tmp/cvs-serv6271/lib/python/ZopeUndo

Modified Files:
      Tag: Zope-2_7-branch
	Prefix.py 
Log Message:
Fix for Collector #1810: A previous bugfix (#1726) broke listing undoable
transactions for users defined in a non-root acl_users folder. Zope logs a
acl_users path together with a username (separated by a space) and this
previous fix failed to take this into account. Fixed by taking anything after
the last space in the compared path out of the equation.


=== Packages/ZopeUndo/Prefix.py 1.1.66.2 => 1.1.66.3 ===
--- Packages/ZopeUndo/Prefix.py:1.1.66.2	Wed Apr 27 14:57:45 2005
+++ Packages/ZopeUndo/Prefix.py	Sun Sep 25 18:28:25 2005
@@ -54,6 +54,10 @@
     def __cmp__(self, o):
         self.fixme()
         other_path = o.split('/')
+        if other_path and ' ' in other_path[-1]:
+            # don't include logged username in comparison
+            pos = other_path[-1].rfind(' ')
+            other_path[-1] = other_path[-1][:pos]
         return cmp(other_path[:self.length], self.path)
 
     def __repr__(self):



More information about the Zodb-checkins mailing list