Tuesday, April 7, 2009

Drupal modul hacking or patching

If you want to get a certain module from drupal.org (often referred to as DO) and maybe want to work on it, you really want to check it out from the CVS they have.

For example getting the DRUPAL-6--2 revision of the yui_editor module into a new directory called yui_editor works like this (replace yui_editor with the modules name you're working on):

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -r DRUPAL-6--2 -d yui_editor contributions/modules/yui_editor

You can find out which tags are available on this site
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/yui_editor/

you can then modify it and create a patch like this:

cd yui_editor
cvs diff -up > myfirst.patch

This makes it possible to hack a module and still be able to update it via

cvs up

I hope it helps!

More:
http://en.wikipedia.org/wiki/Concurrent_Versions_System
http://drupal.org/node/321

No comments: