[Zope] Re: GenericSetup examples?

yuppie y.2006_ at wcm-solutions.de
Mon Jun 12 08:54:26 EDT 2006


Hi Chris!


Chris Withers wrote:
> yuppie wrote:
>> I just checked in the SampleSite demo product to the doc directory of 
>> GenericSetup. You can get it from GenericSetup/trunk.
> 
> Thanks, this looks great :-)
> 
> However, it now makes me wonder:
> 
> - how would I compare the current configuration with what's on disk 
> without creating a snapshot?
> 
> - how can I "synch" just one python script or page template with what's 
> on disk?

Sorry. Both use cases are not supported.

> PS: I think there's a few rough edges on trunk:

There are more rough edges ;)

> I setup a sample site, 
> created a snapshot and then compared with what's on disk, the following 
> differences were reported:
> 
> [...]
>   <import-step id="rolemap" version="20060606-01"
>                handler="Products.GenericSetup.rolemap.importRolemap"
>                title="Role / Permission Map">
> -
> -
>    Import custom roles and non-default role-permission mappings.
> -
>   </import-step>
>   <import-step id="site" version="20060606-01"
>                handler="Products.SampleSite.exportimport.importSite"
>                title="Site">
> -
> -
>    Import site configuration.
> -
>   </import-step>
>  </import-steps>

This is annoying, but not annoying enough to make someone write a patch. 
If you use the "Ignore lines of whitespace" option you don't see these.

> Index: siteroot.xml
> ===================================================================
> --- siteroot.xml 2006/06/12 13:12:08.028 GMT+1
> +++ siteroot.xml 2006/06/12 13:01:01 GMT+1
> @@ -1,5 +1,5 @@
>  <?xml version="1.0"?>
> -<object name="mySite" meta_type="Folder">
> +<object name="siteroot" meta_type="Folder">
>   <property name="title">Sample Zope Site</property>
>   <object name="MailHost" meta_type="Mail Host"/>
>   <object name="ZCatalog" meta_type="ZCatalog"/>
> 

Avoiding this would have made the example more complex. The adapter 
responsible for that code is normally used for sub-folders, not the 
root. The name of the site root is ignored by the import handler but 
exported by the export handler.


Cheers,

	Yuppie



More information about the Zope mailing list