hello;) i work in programming team that has 6 members. we develop our application in Zope, and we write code using ZMI (Zope Management Interface). we want to use cvs to control versions of our software. is it possible use cvs with Zope (without abandoming ZMI), or is there any other solution that give similar features like cvs and can be used with ZMI? thanks for your help, regards Lukasz Indyk <dyzma@mat.uni.torun.pl>
On Wed, May 19, 2004 at 03:24:47PM +0200, Lukasz Indyk wrote:
i work in programming team that has 6 members. we develop our application in Zope, and we write code using ZMI (Zope Management Interface). we want to use cvs to control versions of our software. is it possible use cvs with Zope (without abandoming ZMI), or is there any other solution that give similar features like cvs and can be used with ZMI?
Try ZCVSFolder or CVSFile. You should be able to find both products on www.zope.org. Marius Gedminas -- If you sat a monkey down in front of a keyboard, the first thing typed would be a unix command. -- Bill Lye
Lukasz Indyk wrote at 2004-5-19 15:24 +0200:
i work in programming team that has 6 members. we develop our application in Zope, and we write code using ZMI (Zope Management Interface). we want to use cvs to control versions of our software. is it possible use cvs with Zope (without abandoming ZMI), or is there any other solution that give similar features like cvs and can be used with ZMI?
We use CMF (especially its "SkinsTool" and "Filesystem Directory View"). This allows us to have files on the filesystem and manage them via CVS. Things in the ZODB (mostly configuration) are synced via ZSyncer. -- Dieter
hello i want to use your approach for using zope with cvs (using Filesystem Directory View). i try to use the approach with my existing project. but those problems occured: 1. there is a problem with file extensions. file "richedit.html" is visible in zope as "richedit", file "tools.js" is visible as "tools" and so on. zope truncates extension of files of certain types. but file "image.gif" is visible as "image.gif", so extension is not truncated. the problem occurs when file with truncated extension is refferenced in code in other file (for example <a href="richedit.html">foo</a>). the "object not found" exception is displayed because of extension is truncated and file name is changed. files without extension ("template_edit_form") are not visible in zope at all, they start to be visible when i add extension ("template_edit_form.html"). but such renaming also makes problem with references described above. i have two files with same name but different extension ("richedit.html" and "richedit.css"). in zope there is twice "richedit" visible, but when i check properties of both "richedit" entries, then source of both entries points at "richedit.html", and no "richedit.css" is mentioned. how you solve this problem in your projects? 2. this is minor one;) i would like to keep my files at ZOPE_ROOT/MyProjects. but when i add filesystem directory view then there are only those paths available: lib/python/Products/CMFCalendar/skins lib/python/Products/CMFCalendar/skins/calendar ... lib/python/Products/CMFTopic/skins/zpt_topic so i can only choose location from the list. how to choose other location (for example ZOPE_ROOT/MyProjects)? regards Lukasz Indyk <dyzma@mat.uni.torun.pl>
Lukasz Indyk wrote at 2004-5-23 13:17 +0200:
... 1. there is a problem with file extensions. file "richedit.html" is visible in zope as "richedit", file "tools.js" is visible as "tools" and so on. zope truncates extension of files of certain types. but file "image.gif" is visible as "image.gif",
The various "FSObject" classes have different preferences with respect to keeping or removing the extension. You can always force to keep the extension for individual files by defining a "keep_extension" property in the corresponding "*.metadata" file (this assumes that you are using CMF 1.4, which you apparently do not yet do). The map from file extensions to "FSObject" subclasses is controlled by "registerFileExtension" calls. See "CMFCore/FSFile.py" for examples. You might want to remap some of the extensions. This is a bit tricky, as the last "registerFileExtension" will win. To be sure that your "registerFileExtension" is the last one, import the module that registers a competing extension and then call your "registerFileExtension". It might be necessary to define a few more classes that keep extensions. Such class definitions contain only a few lines. See "FSFile" as an example. Note that you apparently have an old code base.
From CMF 1.4 on, "FSFile" keeps extensions by default. And "FSFile" is the target for "js" extensions.
files without extension ("template_edit_form") are not visible in zope at all, they start to be visible when i add extension ("template_edit_form.html"). but such renaming also makes problem with references described above.
Files must indeed have an extension as otherwise CMF cannot determine which object type the file should get. As detailed above, some "FSObject" subclasses remove the extension. You can use such extensions without affecting references that assume no extension is there. Note, however, that you can use a specific extension only if the corresponding target type is acceptable. It may be possible that you need more "FSObject" subclasses to better control whether the extension should or should not be removed. Here is a definition for an "FSFile" class that should remove the extension (note, that a modern "FSFile" keeps the extension): class FSFileWithoutExtension(FSFile): meta_type = 'Filesystem File without extension' __init__= FSObject.__init__ # use truncated id
i have two files with same name but different extension ("richedit.html" and "richedit.css"). in zope there is twice "richedit" visible, but when i check properties of both "richedit" entries, then source of both entries points at "richedit.html", and no "richedit.css" is mentioned.
Use new CMF code (1.4), the ".css" will then no longer be stripped and this specific problem will go away. In general, problems like this may remain, though. Then, you must rename one of the problematic objects...
2. this is minor one;) i would like to keep my files at ZOPE_ROOT/MyProjects. but when i add filesystem directory view then there are only those paths available: lib/python/Products/CMFCalendar/skins lib/python/Products/CMFCalendar/skins/calendar ... lib/python/Products/CMFTopic/skins/zpt_topic
so i can only choose location from the list. how to choose other location (for example ZOPE_ROOT/MyProjects)?
Which directories are available is determined by "registerDirectory" calls. See, "CMFDefault/__init__.py", for examples. Note that it is highly recommended to keep your directories relative to your Zope installation. Otherwise, you can have problems when you migrate to a new installation with a different directory layout. The best approach (in my view): define a new directory "MyProject" in your "Products" folder. Put all necessary "registerDirectory" and "registerFileExtension" calls in its "__init__.py". Put your skins into the directory. -- Dieter
thanks a lot for such detailed answer. and sory for this post to your private mail address. best regards Lukasz Indyk <dyzma@mat.uni.torun.pl>
participants (3)
-
Dieter Maurer -
Lukasz Indyk -
Marius Gedminas