Is anyone but me bothered by this behavior of undoable_transactions()?
If I have a folder /foo and another folder /foobar,
transactions for /foobar are displayed in 

This is clearly caused by lib/python/ZopeUndo/
The behavior matches the docstring - Prefix only cares
if one string starts with the other, nothing more.
But is that really desirable?
Since this is intended purely for use in Zope, wouldn't it
be more useful if it cared about paths as such?

Something like (untested):

class PathPrefix:
    """A PathPrefix() is equal to any path string it is a prefix of.

    Two prefixes can not be compared.

    __no_side_effects__ = 1 # what's this mean anyway?

    def __init__(self, path):
        path_as_list = path.split('/')
        self.length = len(path_as_list)
        self.path = path_as_list

    def __cmp__(self, o):
        other_path = o.split('/')
        rval = cmp(other[:self.length], self.path)
        return rval


Paul Winkler
Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to