[Top][All Lists]

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

Re: One source directory, two repositories.

From: James Youngman
Subject: Re: One source directory, two repositories.
Date: 05 Sep 2001 20:09:41 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

"Stu" <address@hidden> writes:

> I have a dream.  I want to have 2 CVS trees. One with the changes
> that make up a production build and one with the one liner daily
> changes.  

Correction: you are having a nightmare.  

> Basically I don't want to make a mess of my production build tree
> with test changes and little bug fixes 10 times a day.  

Use separate branches for bugfixes and production releases; merge the
bugfixes into the production release stream in controlled batches. 

[ snip complex setup description ]

>     When all is said and done (and I realize it's going to be a pain to get
> it into this state, but it's possible) 

Remember that configuration management is about people as well as (in
fact more than) programs.  Make your CM scheme hard to follow, and
people will fail to follow it.

The ideal CM scheme allows the project to accomplish what it needs
without requiring everybody to get everything right procedurally 100%
of the time.  If it's _impossible_ to do things the wrong way, even

When devising CM schemes, I tend to find it helpful to stereotype
developers as well-intentioned professionals who are a bit forgetful
and certainly extremely busy.  If your CM scheme doesn't work in that
situation, throw it away now, because later you'll wish you had. 

> you can have one directory with your project source code in it, and
> be able to do daily commits to one tree and production commits to
> the other, without having to copy source code anywhere.

Change "tree" to "branch", and you're good to go - and you don't have
the awkward setup you described.

And -- and this is not related at all to your query -- do not EVER
copy code.  Maybe 20% of errors in large systems I've worked on are
caused by people

(1) copying and pasting code, but not adequately adapting the copy for
    its new purpose, or
(2) finding a bug and fixing it, but only in 1 of the N copies of
    similar code (while in reality there is 1 bug in each copied 

It's much better to refactor the original code to cope with both new
cases than it is to make two copies of the original code.  This is
still true even if you end up with three functions, the engine plus
two short wrapper or adapter functions. 

>     Does anybody know of such a thing already built into cvs that I'm
> missing? Or is there a better way to get this kind of functionality
> with/without cvs?

Use branches.

James Youngman
Manchester, UK.  +44 161 226 7339
PGP (GPG) key ID for <address@hidden> is 64A95EE5 (F1B83152).

reply via email to

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