Be like a Drop, presentation at Surrey Drupal Users Group

Come one, come all!
http://drupal.meetup.com/18/calendar/9484302/

Download get project shell script to get drupal modules and themes from cvs.

Presentation in pdf format.

CVS for contributors

Applying for a CVS account on drupal

1. Have your module or theme up and running, with a link to the code
2. Read through CVS Application Requirements
3. Read through Coding standards, and run the coder module through.
4. Read through Writing secure code

Quick summary or making changes to cvs


$ cvs checkout mymodule
$ cd mymodule
$ ls -l
$ cvs up -Pd
$ cvs diff -up | more
$ cvs commit -m 'My changes' mymodule.info
$ cvs log mymodule.info
$ cvs add mymodule.module
$ cvs commit -m 'adding mymodule.module' mymodule.module

CVS Contrib step summary

* Checkout contributions/themes and/or contributions/modules from cvs.drupal.org
* copy your theme or module
* clean-up unnecessary fluff including .svn directories
* add files in all directories, and commit to cvs.drupal.org repository
* this commits to the HEAD of the project
* Create a DRUPAL-5 or DRUPAL-6--1 branch
* Each time before creating a new branch, sync files back to HEAD, and create a branch from HEAD not from another branch
* Create a tag from a branch for a stable release
* If there is a drupal issue associated with changes committed to cvs, be sure to quote the node id and the users which contributed, e.g. cvs commit -m "#12345 by username1, username2: added a jquery button"
* After committing a bunch of modifications, such as major bug fixes or security patches, make a tag and create a release node for it, so that it shows up in the list of downloads on drupal.org
* Note, do not commit fixes for the security vulnerability until after consultation with the Security team, so that they can sent an announcement out via the security newsletter
* Development snapshots by creating a release node pointing to the DRUPAL-5 or DRUPAL-6--1 branch. Developer snapshots are only generated 2 times per day.
* When committing bug fixes, if they span more than one version, they need to be committed to each affected branch.

$ mkdir ~/sites/contrib
$ cd ~/sites/contirb
$ cvs login
$ cvs checkout -l contributions/themes
$ cd contributions/themes

$ cp -R /mydir/mytheme .
$ cd mytheme
$ ls -al
$ find . -name '.svn' -exec 'rm -rf {}' \;
$ cd ..
$ cvs add mytheme
$ find mytheme -name '*' -exec 'cvs add {}' \;
$ cvs commit -m 'Initial commit of the mytheme theme, blah blah' mytheme

$ cvs tag -b DRUPAL-5 mytheme
$ cvs up -Pd -r DRUPAL-5 mytheme

$ cvs tag DRUPAL-5--1-0

$ cvs update -A

Working with multiple drupal versions

Create contrib directory each drupal version

$ mkdir contrib
$ cd contrib
$ cvs checkout -d themes_head -l contributions/themes
$ cvs checkout -d modules_head -l contributions/modules

$ cvs checkout -d modules_5 -l contributions/modules
$ cvs up -r DRUPAL-5 modules_5
$ cvs checkout -d themes_5 -l contributions/themes
$ cvs up -r DRUPAL-5 themes_5

$ cvs checkout -d modules_6 -l contributions/modules
$ cvs up -r DRUPAL-6--1 modules_6
$ cvs checkout -d themes_6 -l contributions/themes
$ cvs up -r DRUPAL-6--1 themes_6

$ cvs checkout -d modules_7 -l contributions/modules
$ cvs up -r DRUPAL-7--1 modules_7
$ cvs checkout -d themes_7 -l contributions/themes
$ cvs up -r DRUPAL-7--1 themes_7

Making a new branch, when there is an existing branch

* There is a tendency to create a branch e.g. DRUPAL-6--1 from an existing branch, e.g. DRUPAL-5
* Resist this urge, this creates revision numbers like 1.133.2.14.2.10.2.24.2.114
* Checkout the module from cvs HEAD

$ cvs checkout -d mytheme contributions/themes/mytheme
or
$ cd contributions/themes/mytheme
$ cvs update -A

Export the files from the most recent working branch

$ cvs export -d /tmp/mytheme_5 -r DRUPAL-5 contributions/themes/mytheme

Copy the files to cvs HEAD

$ cp -r /tmp/mytheme_5/* .

Commit the files to cvs

$ cvs diff -up | more
$ cvs commit -m 'Syncing HEAD with the latest code from DRUPAL-5'

Create a new branch

$ cvs tag -b DRUPAL-6--1

* Create a new release node: http://drupal.org/node/add/project_release/12345

Drupal project release

* Add a drupal project : http://drupal.org/node/add/project-project
* Fill out the details
* Add a release for the project
* Administer releases to mark the option "Show snapshot release"
* Add a handbook page

Resources

http://openconcept.ca/cvs_cheat_sheet
http://drupal.org/handbook/cvs/quickstart
http://drupal.org/files/maintain-release-handout.pdf
http://drupal.org/node/262432 => CVS guide for theme maintainers
http://drupal.org/handbook/cvs/quickstart => CVS guide for module maintainers
http://drupal.org/handbook/cvs/projects => Starting a Project
http://drupal.org/handbook/cvs/releases => Managing Release
http://www.angrydonuts.com/my_informal_take_on_using_the_ne

Post new comment

  • 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> <h2> <h3> <img> <hr>
  • Lines and paragraphs break automatically.

More information about formatting options