[thelist] CVS questions

Seb seb at members.evolt.org
Mon Jan 14 05:13:10 CST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 08:29 14/01/2002, Richard Bennett wrote:
>Hi,
>We have a software project which includes a web front-end.
>Now we will be licensing the code too a partner, and they want to run it
>under a different name.
>So the product-name has to be changed in all the source-code, the docs, the
>web-interface etc.
>
>Is there a way in CVS to develop the two versions consecutively?

Concurrently or consecutively? (Concurrent, which is the "C" in "CVS" is at 
the same time. Consecutively is one after the other.)

>I know I can do branching, but if the name is in each file somewhere, that
>won't work, as changes would have to be applied in both branches.
>I'd want some kind of global variable (like the keywords), or someway to
>include code in a file (like SSI).
>
>Any ideas?
>Or should we consider another code-management system? (CVS is not setup yet
>on this project)

Do yourself as really big favour, and only branch the code if the 
*functionality* is going to change.

If all you're doing is changing strings and images, reference them through 
external resource files that can be used globally throughout your code. 
That way, you just need to wrap up your CVS release scripts with a 
deployment script that utilises the appropriate resources.

You don't mention what language/platform you're using, so in general, just 
create a script that defines appropriate variables, and include it at the 
top of each page/script. Then replace your hard-coded names with variables, 
such that:

<title>My Current Site</title>

becomes
<title><%= site_name %></title>

or whatever is appropriate for your language.


Separation of content from presentation in this way will save you a *lot* 
of time. If you were to attempt to fork your code just because a few 
non-functional words have changed, you're practically doubling your efforts.

Seb.


-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPEK9ir2V451Vxr52EQIoCQCfc2oEodB2zgMHGXBXI/ZwYCPwm5wAn1iT
7r5gEuysvmm0zoPwFInJveZU
=atBn
-----END PGP SIGNATURE-----





More information about the thelist mailing list