[Erp5-dev] In-ZODB diff

Pelletier Vincent vincent at nexedi.com
Thu Nov 23 11:06:01 CET 2006


Hi.

I just commited a diff tool for in-zodb objects.

It is in a beta state, and lacks many features.
I will add them if I need them - feel free to do it before I do :) .

Installation :

Update ERP5/Extensions/Diff.py (will be created by svn up)
Install erp5_forge (or upgrade it if it does not contain the diff script).
Create an external method (prefered place is portal_skins/external_method).
  Properties :
    Id : diff_recursive
    Module Name : ERP5.Diff
    Function Name : diff_recursive

Usage :

From the URL :
  /some/path/diff?a=/first/diff/path&b=/second/diff/path
    Will show the diff between /first/diff/path and /second/diff/path.
  /some/path/diff?a=/first/diff/path
    Will show the diff between /some/path and /second/diff/path.

From a script :
  return context.diff(a=object_a, b=object_b)
    Will return the diff between object_a and object_b.

Now, the limitation list :
-Not recursive yet : only diffs ojects immediatelly contained in the diff'ed
 objects - they must therefor be containers (folders).
-diff only show differences in functions' body. Argument definitions are not
 compared.
-diff only zope objects, no support for documents (ie, objects with a portal 
type)
-html rendered from a python script and not from a page template.

-- 
Vincent Pelletier



More information about the Erp5-dev mailing list