Cover photo for post The problem with CVS tree of PEAR

The problem with CVS tree of PEAR

Es everyone should know there is a official PHP CVS repository, where PEAR is a module. Here is a small overview, what the average PEAR developer has to do, if he likes/has to use CVS with his package.

The problem

The structure of the PEAR directory (locally on the users maschine) looks similar to this:

-- pear ---- ... ---- Image ------ Text -------- Line.php ------ Text.php ---- ...

While the developement structure on CVS looks like this:

-- pear ---- ... ---- Image_Text ------ Text -------- Line.php ------ Text.php ----- ...

I think, everybody simply realizes, where the problem is. Normaly one would expet to have the same directory structure in both environment, to check out a complete developement from CVS.

My solution for that:

Change your projects CVS structure like this:

-- pear ---- ... ---- Image_Text ------ Image -------- Text ---------- Line.php -------- Text.php ---- ...

You now have to add the pathes to your projects directories in your local repository to the include_path, eg. by doing this:

$pear_module = "/whatever/.../pear-cvs/pear"; $your_pathes = $pear_module . "/Image_Text"; $your_pathes .= $pear_module . "/Image_Tools"; ini_set('include_path', $your_pathes . ini_get('include_path'));

Maybe anyone can use this for easier developement.


The local direcotry structure in users machine according to CS is:

pear ---- ... ---- Image------ Text.php ------ Text-------- Line.php ---- ...

-- Mika Tuupola at 2003-11-12

Right, Mika. I missed that. Will change that in the post and although in my projects! ;)

Thanks for the hint!

Toby at 2003-11-12