Re: Please DO NOT commit code that does not compile

From: Andrei Adamchik (aadamchi..obox.com)
Date: Sat May 12 2001 - 15:44:58 EDT


A bit more on the topic of collaborative development. Being CVS newbies we
overlooked one important feature - branching & merging. The above subject
should read "Please DO NOT commit code that does not compile *TO THE MAIN
CODE TRUNK*". Basically if you are working on some changes that take longer
then 1 day, you can always create your own code branch with the intention
to merge it to the main code trunk later on, while other developers can
continue to work with the main trunk.

To branch you can do "cvs tag -b my-branch" and then do "cvs update -r
my-branch" to get branch "sticky" tag in your working directory.

Later the main trunk can be merged with the branch by following these steps:
1) checking main trunk code out in a directory separate from the branch
working directory 2) merge is done by using "cvs update -j my-branch" (or
whatever the latest tag on your branch happen to be) , 3) merge conflicts
should be resolved 4) new version of main trunk should be committed.

There is more to that then just those commands, so if you are going this
way, I suggest you read documentation first and understand what is really
going on during each step.

Another use of branches is doing releases : for release a branch is
created. All major changes (targeting future releases) are done to the main
trunk. All the bug fixes and minor changes go the branch and will be
included in release. This way code freeze prior to release does not stop
developers from working on new features.

Enjoy

Andrei



This archive was generated by hypermail 2b30 : Sat Aug 04 2001 - 16:21:24 EDT