Use Zope into Git

Hello,
I would like to know if it is possible to use GIT in Zope.
If so, how should we proceed?
Thank you

I think you need to clarify your question, e.g. what you want to do with git.

You can e.g. define git repositories as dependencies via mr developer.

Not that I used any, but there are git-bindings out there for Python, which you could use within Zope, too.

en fait je souhaite simplement utiliser git pour gérer mes versions de code de mes solutions dans zope.
Je veux simplement pouvoir créer des branchs et faire des commits pour archiver les états de mes objets dans zope. (sans casser la ZODB)

Which code versions are you talking about? Any filesystem based extension for Zope or Plone is Python code and can be put under any version control. If you are talking about code managed through the ZMI/stored in the ZODB, then the answer is: No and DONT DO THIS.

At one of the Zope sprints I met someone from https://github.com/perfact and actually they do something what you mentioned. They have all code in ZODB, and the data in a relational db. They use some scripts which exports the contents of the ZODB and put all source under version control.

Afair gocept supported developing this solution ( https://gocept.com/ ).

That all said, I go with @zopyx - I would not recommend doing this.

Why don't you develop code the recommended way, ie in the file system?

Ok I see.
But since I use zope2, I develop in ZMI (with webdav to edit my objects in an IDE)
Where can I find a tutorial to understand how to develop in filesystem?
But in this case, what is the interest of the ZODB? I'm a little lost there!

Thank you for your answers

Search for "Zope component architecture". You will be particularly interested in so called "View"s (they often combine a Python class (for logic) and a template (for presentation). The various components relevant for a subfunction (and finally your whole application) and combined together via zcml (= Zope Component Markup Language, based on XML) files.

The ZODB is still used to host data (e.g. documents) and configuration - but typically no longer to host resources for which you want version control.

1 Like

Thanks,
I will study this.

I think you're talking about this: GitHub - perfact/zodbsync: Dump and restore objects between a ZODB and a serialized file system structure

I don't have an use for this but I found it quite interesting!

1 Like