CVS commands for branching a Drupal 5 module to Drupal 6
following add1sun's page: http://drupal.org/node/315987
Ebony-II:~ ben$ cd /RCS/
Ebony-II:RCS ben$ mkdir projects
Ebony-II:RCS ben$ cd projects/
Ebony-II:projects ben$ export CVSROOT=:pserver:agaric@cvs.drupal.org:/cvs/drupal-contrib
Ebony-II:projects ben$ cvs login
Note: For whatever reason, I've had to go through the exporting the cvs root and logging in part for every new project. See Committing a patch to a contributed module you maintain.
Ebony-II:projects ben$ mkdir enabled_modules
Ebony-II:projects ben$ cd enabled_modules/
Ebony-II:enabled_modules ben$ cvs co -d HEAD_enabled_modules contributions/modules/enabled_modules
Ebony-II:enabled_modules ben$ cvs co -d 5_enabled_modules -r DRUPAL-5 contributions/modules/enabled_modules
You may notice that "HEAD" appears to be less recent than Drupal 5, missing as it is a .install file.
So we will follow dww's third way (Option #3 in this comment to synch head when making a split of a module into a new version.
We can skip straight to the third step, copying Drupal 5 into head so we can branch a Drupal 6. Replace all the files from HEAD with the latest copies from your active development branch:
Ebony-II:enabled_modules ben$ cp -r 5_enabled_modules/* HEAD_enabled_modules
Ebony-II:enabled_modules ben$ cd HEAD_enabled_modules/
Ebony-II:HEAD_enabled_modules ben$ cvs diff -up
Ebony-II:HEAD_enabled_modules ben$ cvs commit -m "Synching HEAD with the latest Drupal 5 code in preparation for Drupal 6 branch"
Ebony-II:HEAD_enabled_modules ben$ cvs tag -b DRUPAL-6--1
All right, now let's get this out of HEAD so we can start turning it into Drupal 6 for real. (Although I feel bad about blatantly lying in labeling Drupal 5 code as Drupal 6. Oh no. That will be fixed as we work with the DRUPAL-6--1 branch. HEAD is synched with the latest Drupal 5 now which may be a little confusing, but is better than it was before.
New we jump back to add1sun's instructions to make the Drupal 6 folder:
Ebony-II:HEAD_enabled_modules ben$ cd ../
Ebony-II:enabled_modules ben$ mkdir 6_enabled_modules
Ebony-II:enabled_modules ben$ cvs co -d 6_enabled_modules -r DRUPAL-6--1 contributions/modules/enabled_modules
Then I proceeded to go through the module and update it to Drupal 6, beginning with the .info file, which I highlight here because it's a bit buried on the Converting 5.x modules to 6.x page.
Ebony-II:6_enabled_modules ben$ cd 6_enabled_modules/
Ebony-II:6_enabled_modules ben$ vi enabled_modules.info
Ebony-II:6_enabled_modules ben$ vi enabled_modules.module
And committed it:
Ebony-II:6_enabled_modules ben$ cvs commit -m "first attempt at Drupal 6 upgrade"
Comments
Post new comment