[Top][All Lists]

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

Re: How can we maintain modules/directories/files between production and

From: Pierre Asselin
Subject: Re: How can we maintain modules/directories/files between production and development environment using CVS
Date: 18 Dec 2001 21:22:11 -0600

"Datla, Raghav" <address@hidden> writes:

>  As a CVS administrator,  How can we maintain modules/directories/files
>when we have environments like production, stage and Development.
>I mean once Developers develop some code, test it and then I want to keep
>these files or code in the production cycle after testing is done.

One way is to do the development on the trunk, i.e. normal CVS ==
development tree.  When the code does to staging, that's a release
and it needs to be tagged.  At the same time, create a bugfix branch
starting at the staging tag.

    $ cvs tag STAGE_4_0
    $ cvs tag -b STAGE_4_0_bugfix

Then go off and check out a tree on the bugfix branch.  That's your
staging tree.  It is initially identical to what you just tagged on
the trunk, because the bugfix branch is empty.  If you find bugs,
they will be committed to the bugfix branch.

    $ cvs checkout -rSTAGE_4_0_bugfix project
    (Start qa work.)

When the code goes from staging to production, that's another
release and you tag it again (while still on the bugfix branch).
Then you go elsewhere and check out or export with the production
tag to get your production tree.

    $ cvs tag -rPROD_4_0_0
    $ cd /production/area
    $ cvs export -rPROD_4_0_0 project

You may or may not want to start a production-bugfix branch off of
the production tag.  It's easier not to, and it wouldn't do you
any good if the production trees are exported.  Just do all your
bug fixes on the staging tree and re-tag, re-export to production.

Finally, merge the bugfix branch to the trunk periodically

    $ cd /your/old/development/tree
    $ cvs update -jSTAGE_4_0 -jPROD_4_0_0
    (fix conflicts)
    $ cvs commit
    $ cvs tag -F -rPROD_4_0_0 STAGE_4_0_MERGED

The last command plants a "moving tag" (-F option) at the point you
just merged.  If you fix 3 more bugs and rachet up to PROD_4_0_3,
you can merge the new bugfixes from where you left off, then move the

    $ cvs update -jSTAGE_4_0_MERGED -jPROD_4_0_3
    (fix conflicts)
    $ cvs commit
    $ cvs tag -F -rPROD_4_0_3 STAGE_4_0_MERGED

Resist the urge to merge cool new features from development to
staging and production.  Branches are much easier to handle if the
merges are unidirectional.  If the development tree is that good,
start over with STAGE_4_1.

Pierre Asselin
Westminster, Colorado

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

reply via email to

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