info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Ideas for handling hardcoded URLs on a CVS managed website?


From: Ryan Grow
Subject: RE: Ideas for handling hardcoded URLs on a CVS managed website?
Date: Mon, 23 Apr 2001 12:51:42 -0600

I would look at some ways to handle this outside of CVS.

Are there any ways you could use relative directory urls wherever possible
in the code to minimize the number of places where production may have a
different url than development?
Another possibility is to have the code be driven by a configuration file
that identifies 
which url's could be used for which servers and that configuration file is
maintained outside of cvs, so each developer could have a configuration file
that is different from the one that defines the url's used by production or
test. It would be the responsibility of the code to read the configuration
file at startup time.

It seems like to me that if data must be different in the different
environments, then it would be easier to manage that data outside of CVS
with something like a configuration file. That is the way I've seen this
handled in the past. The important thing with configuration files is to make
sure that they are managed well and it's straightforward to make sure that
production has the correct configuration at all times.

Another class of problem that seems similar to this is identifying the name
of the database to connect to. I've also seen this problem solved with
configuration files outside of the software source control.

Ryan

-----Original Message-----
From: address@hidden [mailto:address@hidden
Sent: Friday, April 20, 2001 11:31 PM
To: Georgi Kostov
Cc: info-cvs mailing list
Subject: Re: Ideas for handling hardcoded URLs on a CVS managed website?


[ On Saturday, April 21, 2001 at 00:16:59 (+0300), Georgi Kostov wrote: ]
> Subject: Ideas for handling hardcoded URLs on a CVS managed website?
>
> Can you give me some ideas how to manage with this problem? I indended 
> to write a script that will replace each hardcoded link with a keyword 
> (using a dictionary) before commiting the file to the repository but I 
> haven't thought of how to deal with updates/checkouts.

You're headed in the right direction.  You need a "build system"
(eg. make) and some filter tools (eg. sed, m4, awk, cpp, etc.).

-- 
                                                        Greg A. Woods

+1 416 218-0098      VE3TCP      <address@hidden>     <address@hidden>
Planix, Inc. <address@hidden>;   Secrets of the Weird <address@hidden>

_______________________________________________
Info-cvs mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/info-cvs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]