Different CVS projects in same dir-tree?

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
Heavy
Forum Contributor
Posts: 478
Joined: Sun Sep 22, 2002 7:36 am
Location: Viksjöfors, Hälsingland, Sweden
Contact:

Different CVS projects in same dir-tree?

Post by Heavy »

I use CVS since I was a PHP baby.
However, I have a question.

I have built a very nice framework consisting of a platform on which both automation and design are flexible. Consider the following site structure:

base_dir/ADMIN/blahblah.php
base_dir/modules/module1/several_php_files*.php
base_dir/modules/module2/several_php_files*.php
base_dir/modules/module3/several_php_files*.php
base_dir/themes/theme1/lots_of_html_files_and_images*
base_dir/themes/theme2/lots_of_html_files_and_images*
base_dir/themes/theme3/lots_of_html_files_and_images*

The modules are somewhat general and does not really bind to any specific customer.
The themes on the other hand, are very customer specific (of course).

And when I like to start working on a new system, I want - say - the ADMIN dir and some selected modules and maybe an existing theme to customize.

This leads to associations of CVS modules, and I have laborated with it for about an hour today - and I am not so impressed. It seems from my laborations that it is (I would be) very likely to do something wrong here, and check out files and directories that I didn't want to. (I tried CVS's facilities for module aliases with directory exclusion as well as ordinary modules.)

Is it maybe so, that I should rather separate the subdirectories that I would call "modules" in the context of my framework than fiddling with CVS modules. I mean so that that my local files are actually arranged the following way in the repository:

base_dir/ADMIN/blahblah.php
modules_for_framework/module1/several_php_files*.php
modules_for_framework/module2/several_php_files*.php
modules_for_framework/module3/several_php_files*.php
themes_for_framework/theme1/lots_of_html_files_and_images*
themes_for_framework/theme2/lots_of_html_files_and_images*
themes_for_framework/theme3/lots_of_html_files_and_images*

and thus check them out individually with the -d option. As the manual says:
For example, given a module `foo' that contains the file `bar.c', the command `cvs co -d dir foo' will create directory `dir' and place `bar.c' inside. Similarly, given a module `bar' which has subdirectory `baz' wherein there is a file `quux.c', the command `cvs co -d dir bar/baz' will create directory `dir' and place `quux.c' inside.
Then I can checkout safely without getting a lot of garbage (I mean excellent php code) into my tree. But this requires that the directory layout in the repository would have to be other than the layout in the running code.

Why is this an issue?
Because if I develop several themes for different organisations they would both get the same tree of themes if I accidently updated the installed software as result of an accidental mistake. Well, I would probably know what I am doing, but what if someone else would be the admin in one case...

So I wonder,
Any better suggestions?
User avatar
Heavy
Forum Contributor
Posts: 478
Joined: Sun Sep 22, 2002 7:36 am
Location: Viksjöfors, Hälsingland, Sweden
Contact:

Post by Heavy »

This post describes sort of what I wanted here:
viewtopic.php?p=145879#145879
Post Reply