The problem with CVS tree of PEAR - Blog - Open Source - - php, photography and private stuff

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.

If you liked this blog post or learned something, please consider using flattr to contribute back: .



Add new comment

Fields with bold names are mandatory.