[GLLUG] CVS variables

Edward Glowacki glowack2@msu.edu
31 Mar 2003 10:03:43 -0500


On Fri, 2003-03-28 at 17:36, Joe Glass wrote:
> Hello gllug members! 
> 
> I have a CVS project (a php web application) that I work on from
> multiple machines run on multiple sites.  Does anyone know of a way to
> make CVS search & replace variables in the project's configuration file
> automatically?  I know CVS can do this with CVS version numbers, dates,
> etc; but I'd like to replace default variables such as mysql user names,
> pathnames, etc.
> 
> Thanks in advance to any responses,
> 
> Joe Glass

Sounds more like something that should be done in a makefile or install
script.  Those kind of changes don't really seem to belong in CVS.

One option I thought of is to setup the application so that it looks for
a config file, but don't have that config file in CVS directly. 
Instead, have copies of all your various system's config files in a
subdirectory (in CVS), then symbolicly link the correct one to the
filename your application expects.  Since CVS won't have a file for the
config, it won't overwrite the link, and you'll only need to re-make the
link if you delete your working copy or start a new one.

-ED

-- 
Edward Glowacki <glowack2@msu.edu>