[development] how to make branches in CVS

Derek Wright drupal at dwwright.net
Sat Nov 25 20:36:09 UTC 2006


i've had a few reports from people trying to make a DRUPAL-5 or  
DRUPAL-4-7--2 branch for their module, and then when they go to make  
a new release node to point to the branch, it's not there in the list  
of available choices.  see http://drupal.org/node/97337 for details.

in many cases, the problem is that the maintainer is jumping through  
many hoops to avoid a simple cvs command that works.  this bizarre  
method of making a new branch wasn't something i coded the scripts  
that connect our CVS repository to the DB to handle, so the branches  
"get lost" with respect to the release system.

basically, their method is some variant of:

% cvs checkout -r DRUPAL-5 contributions/modules
% mkdir contributions/modules/foo
% cp /full/path/to/HEAD/version/of/foo/* contributions/modules/foo
% cd contributions/modules/foo
% cvs add *
% cvs commit -m "adding foo to DRUPAL-5 branch" *

all to avoid learning how to do:

% cvs tag -b DRUPAL-5 contributions/modules/foo


i have no idea where this method for making branches came from, it's  
not documented anywhere in our CVS handbooks, and it's causing both  
the people who follow it and me extra grief.

PLEASE stop doing it this way. ;)

just use "cvs tag -b DRUPAL-5" in your HEAD workspace when you're  
ready to make the DRUPAL-5 branch.
similarly, if you're getting ready to make a DRUPAL-4-7--2 branch to  
start adding new features for a 4.7.x version of your module, just do:

% cvs checkout -r DRUPAL-4-7 contributions/modules/foo
% cvs tag -b DRUPAL-4-7--2 contributions/modules/foo

thanks,
-derek

p.s. obviously, the simple method can be found all over the place in  
http://drupal.org/handbook/cvs for those who bother to read such  
things. ;)



More information about the development mailing list