User login

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


Logging in to :pserver:agaric@cvs.drupal.org:2401/cvs/drupal-contrib
CVS password:

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


cvs checkout: Updating HEAD_enabled_modules
U HEAD_enabled_modules/enabled_modules.info
U HEAD_enabled_modules/enabled_modules.module

Ebony-II:enabled_modules ben$ cvs co -d 5_enabled_modules -r DRUPAL-5 contributions/modules/enabled_modules


cvs checkout: Updating 5_enabled_modules
U 5_enabled_modules/enabled_modules.info
U 5_enabled_modules/enabled_modules.install
U 5_enabled_modules/enabled_modules.module

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


cvs diff: Diffing .

Ebony-II:HEAD_enabled_modules ben$ cvs commit -m "Synching HEAD with the latest Drupal 5 code in preparation for Drupal 6 branch"


cvs commit: Examining .

Ebony-II:HEAD_enabled_modules ben$ cvs tag -b DRUPAL-6--1


cvs tag: Tagging .
T enabled_modules.info
T enabled_modules.install
T enabled_modules.module

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


cvs checkout: Updating 6_enabled_modules
U 6_enabled_modules/enabled_modules.info
U 6_enabled_modules/enabled_modules.install
U 6_enabled_modules/enabled_modules.module

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"


cvs commit: Examining .odules ben$ cvs tag -b DRUPAL-6--1
/cvs/drupal-contrib/contributions/modules/enabled_modules/enabled_modules.info,v <-- enabled_modules.info
new revision: 1.1.4.1; previous revision: 1.1
/cvs/drupal-contrib/contributions/modules/enabled_modules/enabled_modules.module,v <-- enabled_modules.moduleen$ cd ../
new revision: 1.1.2.13.2.1; previous revision: 1.1.2.13
cvs commit: Using deprecated info format strings. Convert your scripts to use
the new argument format and remove '1's from your info file format strings.

Resolution

Searched words: 
CVS synchronize sync D5 D6 branches before module development continues working with existing Drupal.org project

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.