[Zope] Re: Revisionmanager Bugs for Win!?

Sebastian Krollmann sebastian.krollmann at gmx.net
Thu Jan 29 14:05:56 EST 2004


Hi again,

> 3. I get conflicts with the following method in another Product:
> FileSystemSite.FSPythonScript.FSPythonScript.document_src()
> in _get_source:
>
>         if hasattr(obj, 'document_src'):
>             result = mapply(obj.document_src, keyword=kw)

I found a quick solution to this problem:
adding .aq_explicit to object avoids possible errors due to aquisition of
the methods.
That solves at least the above problem. Adding it generally will prevent the
same thing elsewhere.

RevisionManager.RevisionManager.get_source:

-- snip
        if hasattr(obj.aq_explicit, 'document_src'): # added aq_explicit
            result = mapply(obj.document_src, keyword=kw)
        elif hasattr(obj.aq_explicit, 'read'):
            result = obj.read()
        elif hasattr(obj.aq_explicit, 'EditableBody'):
            result = obj.EditableBody()
        elif hasattr(obj.aq_explicit, 'manage_FTPget'):
            result = mapply(obj.manage_FTPget, keyword=kw)
        else:
            result = ""
-- snip


I found some more problems:

4. The add tab didn't work for my environment (Zope2.7(ActivePython2.3.2)
WinXP)
I didn't see any object to add, even when I added some Dtml-Documents e.g.
It seems that RevisionManager.getChildrenNotInModule() does not work
properly.
So for a quick solution I hacked RevisionManager/www/addObjects.pt

changed 'getChildrenNotInModule' to 'getChildren' to see all Objects in the
hierachy

-- snip

<!-- form starts -->
<form action="rm_addObjects" method="post" name="itemlist">
<table cellspacing="0" border="0"
       tal:define="ZopeTree python:modules['Products'].ZopeTree.ZopeTree;
                   tree
python:ZopeTree(here.getTreeWrappedModuleFolder(), 'path',
                                            'getChildren', request,
                                            'add-tree');
                   flatDicts tree/getFlatDicts">

-- snip

5. I could not manage to change the source of a dtml document in the zorb
via update.
After changing the source of a local working copy of the file,committing it
with WinCvs
and updating it with RevisionManager I got the new revision shown up in the
status tab.
Also the right info for a diff between the revisions but the source of the
corresponding
zorb-object didn't change at all.

May be I am missing something? How should it be done?

Thanks for any hints,

Sebastian Krollmann






More information about the Zope mailing list