B. Contributing a Module through CVS

This article is largely taken from http://drupal.org/node/112902. The following is essentially a walk-through focusing on the actual process involved when submitting modules to Drupal

Drupal

An open-source content management system that is used on this site and is taking over the world..org. This is by no means a detailed CVS guide and I am not a CVS expert. After spending days combing through the Drupal

Drupal

An open-source content management system that is used on this site and is taking over the world.
Handbook (and asking the experts) to put it all together, I decided to write it all down for my own reference and share it with others.

It is highly recommended that you read the detailed CVS instructions in the Drupal

Drupal

An open-source content management system that is used on this site and is taking over the world. Handbook at some point. This guide is for Windows users and a CVS client is used, so you don't have to use command-line. There are decent instructions already available for LinuxA Unix variant that has become very popular. It has itself spawned numerous variants, although not all of those enjoy open-source status. users.

I also recommend that you familiarize yourself with the Drupal coding standards. I then suggest you download and install the Coder module for checking your application of the standards. Then it's always nice to at least lay the groundwork for translation of your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP., so check out the Translation Template Extractor module. There will be more on this later.

The assumption is that a stable release will be submitted, meaning that the moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. has been tested thoroughly (preferably by others), the PHPRecursive acronym for "PHP: Hypertext Preprocessor" - is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. code has been checked for security vulnerabilities, the CSSCascading Style Sheet - a hierarchical means of specifying how to format HTML elements on the page has been validated etc, and the moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. is ready to share with the Drupal

Drupal

An open-source content management system that is used on this site and is taking over the world. community.

Adding a moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. to Drupal

Drupal

An open-source content management system that is used on this site and is taking over the world.
CVS

  1. First you will need to apply for a CVS account with Drupal.org.
  2. Once your account is approved you will be able to add projects. But first, you will want to upload your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. to the Drupal

    Drupal

    An open-source content management system that is used on this site and is taking over the world. CVS server. There are several CVS GUI clients available. I chose to use TortoiseCVS per recommendation from a Drupal

    Drupal

    An open-source content management system that is used on this site and is taking over the world.
    developer. You can download TortoiseCVS here.
  3. After you have installed TortoiseCVS, browse to the folder that contains all of the files for your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP.. The commands for TortoiseCVS are accessed via the context menu when you right-click on a folder.
  4. Right-click the folder for your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP.. Select CVS > Make New ModuleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP.. Make sure that Password server (:pserver:) is selected for Protocol:. For CVSROOT: copy and paste or type the following line, replacing "username" with your username for your CVS account with Drupal

    Drupal

    An open-source content management system that is used on this site and is taking over the world.
    (note: username is case-sensitive).

  5. :pserver:username@cvs.drupal.org:/cvs/drupal-contrib

  6. For the ModuleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP.: field, copy and paste or type in the following line replacing "modulename" with the name of your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP.. This should match the name of the folder which contains your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. files:

  7. contributions/modules/modulename

    Press OK. TortoiseCVS will do it's thing and should report that the operation was successful. This has created a directory in Drupal

    Drupal

    An open-source content management system that is used on this site and is taking over the world. CVS to contain the files for your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP.. You can verify that the directory was created by visiting the Index of contributions.

  8. Now the folder for your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. will have a green checkmark on it. The next thing to do is create your first CVS branch (more on maintaining your branches will be in another article). Right-click the folder and select CVS > Branch. Depending on which version of Drupal

    Drupal

    An open-source content management system that is used on this site and is taking over the world.
    you're releasing the moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. for, you will want to use one of the following branches for New branch name:

  9. DRUPAL-6
    DRUPAL-5
    DRUPAL-4-7

  10. Next you will want to create a CVS tag for the specific version of the moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. you are releasing. This helps to keep track of different releases. Since this is the initial stable release you will start with 1.0. Use one of the following tags below depending on the version of Drupal

    Drupal

    An open-source content management system that is used on this site and is taking over the world.
    :

  11. DRUPAL-6--1-0
    DRUPAL-5--1-0
    DRUPAL-4-7--1-0

    When this is complete, the moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. has been registered on Drupal

    Drupal

    An open-source content management system that is used on this site and is taking over the world. CVS and the branch and tags have been designated.

  12. Time to add the files. Right-click on the moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. folder again and select CVS Add Contents. All of the files in your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. folder will be selected automatically. Press OK.
  13. Now the files have to be commited. Open the folder for your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP.. You will see orange plus signs on all of the files indicating that they have been added. Select these files, right-click and choose CVS Commit. In the Comment field, add something like "Initial Release for Drupal

    Drupal

    An open-source content management system that is used on this site and is taking over the world.
    5.0" and press OK. If your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. folder contains sub-folders i.e. "/images" etc. you may need to repeat this procedure for all of the files in each sub-folder since the commit command is not always recursive.
  14. Creating a project for your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. on Drupal

    Drupal

    An open-source content management system that is used on this site and is taking over the world.
    .org

  15. It is now time to add your project on Drupal

    Drupal

    An open-source content management system that is used on this site and is taking over the world.
    .org. Login to your account. Click on Create content > Project. Most of the fields on the Submit project form should be self-explanatory. The Short project name should match the name of the folder that contains your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. files. For CVS tree, use the following URL and replace "modulename" with the short project name you entered earlier:

  16. http://cvs.drupal.org/viewcvs/drupal/contributions/modules/modulename

    After everything applicable has been filled in, click Submit. Don't worry, you can come back and fill in missing details later.

  17. Now to add the release that was uploaded to CVS earlier. This is an easy step to forget, but don't or you will have wasted all your time. Click the Add new release linkThe technique which points to another page, anywhere on the Internet, from the current page. for your project - the one on the project page (the "create content » release" doesn't do it). Select the appropriate CVS identifier. The next screen is fairly self-explanatory. Click Submit.

That's it! Whew! Now your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. is officially managed through Drupal

Drupal

An open-source content management system that is used on this site and is taking over the world. CVS and included as a project on Drupal

Drupal

An open-source content management system that is used on this site and is taking over the world.
.org. If you want to add a screenshot, first read the Theme screenshot guidelines. You will need to Submit an issue with the Drupal

Drupal

An open-source content management system that is used on this site and is taking over the world.
.org webmasters in order to have your screenshot added.

So there you have it. Ten "easy" steps to add your moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. to Drupal

Drupal

An open-source content management system that is used on this site and is taking over the world.. Perhaps not that easy, but it is to be expected that there will be some tedious procedures to deal with in order to keep the quality of contributions high while maintaining a community effort like Drupal

Drupal

An open-source content management system that is used on this site and is taking over the world.
. Hopefully this has been informative and will save some time and headache for people who aren't familiar with CVS but would like to contribute a Drupal

Drupal

An open-source content management system that is used on this site and is taking over the world.
moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP.. Again, it is recommended that you read through the Drupal

Drupal

An open-source content management system that is used on this site and is taking over the world.
handbook so that you have a more complete understanding of CVS; here is a good place to start.