User login

Committing a project to Drupal's CVS

Taken directly from Drupal.org's Step-by-step create a CVS project, with our notes.

First time:

You need to begin by applying for a CVS account if you do not already have one. Your application will be more likely to be approved if you first submit an issue requesting comaintainership of an existing project (where the developer in charge will endorse your request, and by extension your CVS rights). Then you can refer to this request when you apply for the CVS account. Copy the URI of the page to which you are taken when your application is submitted. Then go to http://drupal.org/cvs-account and in the comments, supply a link to that URI.

For instance, to request comaintainership of the Community Managed Taxonomy module, I (Alan) went to http://drupal.org/project/cmt. After I filed my request, I was taken to http://drupal.org/node/262051. I copied that URI. Then I went to http://drupal.org/cvs-account and referred to http://drupal.org/node/262051 in the "Motivation" field.

We also like to create the project node (Create content, project) on Drupal.org first since it must be done before the code put in the repository is tagged anyway.

Once you have your CVS account and project node, continue as follows:

export CVSROOT=:pserver:agaric@cvs.drupal.org:/cvs/drupal-contrib

cvs login

Enter your password. After success:

cvs co -l contributions/modules

("-l" prevents it from checking out every contributed module, but if you have a few hundred megabytes of hard drive space... well, Agaric recommends you check out by version tag in any case. A little on that below.)

Every time:

(Note: Instead of this step, Agaric now checks out from our subversion repository.)

cp -r path-to-your-local-project/myproject contributions/modules

cd contributions/modules/

(So Agaric's new method here is:

svn co https:// [server name here] /srv/svn/agaric/agaric-modules/myprojectname/5/myprojectname myprojectname

And continue immediately with the below.)

cvs add myprojectname

cd myprojectname

cvs add *

(repeat for subdirectories)

cvs commit -m "Initial checkin of myprojectname, 4.7 version"

To update the files in your cvs directory, when you edit your files, you can now run from that folder cvs diff -u to see what the changes are, and run "cvs commit" to send those changes to the server. Add new files as above cvs add filename.

And this, from Drupal's CVS maintainer guide:

Before you can create a branch or release tag, you must create a project on drupal.org.

Get in position (needlessly going an extra directory deep, I think):

cd contributions (or from where we were, cd ../../)

Create a branch:

cvs tag -b DRUPAL-5 modules/myprojectname

Agaric Exclusive! Working with your branches:

This isn't documented anywhere that we found, which almost certainly means that there's something incorrect or otherwise a bad idea about the way we do it. But hey, that's the Agaric way.

CVS is different from Subversion (SVN) in how branches are tracked. In appearance (that is, how you deal with the repository and so what matters to us right now) Subversion's branches are stored in actual physical folders. You check out your project, and all the branches and tags are in subfolders. In CVS, doing a basic checkout gets you head, I guess, and any branches aren't visible. You have to check out each branch separately. So the Agaric way of setting up a local checkout of our modules (modules that we have contributed to Drupal.org's contributed modules and are responsible for maintaining) so that we can patch and develop Drupal 4.7, 5, and 6 separately.

(If starting in a new location, go through the export CVSROOT and login steps again. See the beginning of this page.)

Then:

cvs co -r DRUPAL-4-7 -d myprojectname/contrib-4.7.x-1.x contributions/modules/myprojectname

cvs co -r DRUPAL-5 -d myprojectname/contrib-5.x-1.x contributions/modules/myprojectname

Now you can make changes to your local copies, now separated by version, cvs commit them to the repository, and your branches will be kept up to date.

A quick review of how to make those changes:

After editing files, you can just commit. After adding a file, you have to first use cvs add from within the contrib-V.x-1.x directory in this case.

cd myproject/contrib-5.x-1.x/
cvs add myproject.info

Then, commit:

cvs commit -m "Updated .module to drupal 5 and added .info file"

Create an official release:

cd contributions/modules/myprojectname
cvs update -dP -r DRUPAL-5  // do not run this from another directory unless you want everything
cvs tag DRUPAL-5--1-0

See also:

Notes:

cp -r (copy) recommended over mv (move) for us fearful types.

This error message, warning: failed to open .cvspass for reading: No such file or directory I only received the first time I tried cvs login.

cvs commit -m "Pertinient message about what you are committing"

cvs add myprojectname
? myprojectname/myprojectname.module
cvs add: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
cvs rlog: could not read RCS file for contributions/modules/myprojectname/directory

This may have to do with completely ignoring the instruction "(your local cvs project folder needs to reside in the proper folder of your local cvs application - search for your hard drive for "cvs" if you are unsure where this is!)"

Regardless, everything seemed to work.

Ignore random stuff in the directory (readme.txt, upload.txt, and snap.module in my case) after cvs checkout -l contributions/modules

If you run into trouble, just start in a new place on your hard drive and follow http://drupal.org/handbook/cvs/quickstart again.

Taken directly from Drupal.org's Step-by-step create a CVS project, with our notes.

First time:

You need to begin by applying for a CVS account if you do not already have one. Your application will be more likely to be approved if you first submit an issue requesting comaintainership of an existing project (where the developer in charge will endorse your request, and by extension your CVS rights). Then you can refer to this request when you apply for the CVS account. Copy the URI of the page to which you are taken when your application is submitted. Then go to http://drupal.org/cvs-account and in the comments, supply a link to that URI.

For instance, to request comaintainership of the Community Managed Taxonomy module, I (Alan) went to http://drupal.org/project/cmt. After I filed my request, I was taken to http://drupal.org/node/262051. I copied that URI. Then I went to http://drupal.org/cvs-account and referred to http://drupal.org/node/262051 in the "Motivation" field.

We also like to create the project node (Create content, project) on Drupal.org first since it must be done before the code put in the repository is tagged anyway.

Once you have your CVS account and project node, continue as follows:

export CVSROOT=:pserver:agaric@cvs.drupal.org:/cvs/drupal-contrib

cvs login

Enter your password. After success:

cvs co -l contributions/modules

("-l" prevents it from checking out every contributed module, but if you have a few hundred megabytes of hard drive space... well, Agaric recommends you check out by version tag in any case. A little on that below.)

Every time:

(Note: Instead of this step, Agaric now checks out from our subversion repository.)

cp -r path-to-your-local-project/myproject contributions/modules

cd contributions/modules/

(So Agaric's new method here is:

svn co https:// [server name here] /srv/svn/agaric/agaric-modules/myprojectname/5/myprojectname myprojectname

And continue immediately with the below.)

cvs add myprojectname

cd myprojectname

cvs add *

(repeat for subdirectories)

cvs commit -m "Initial checkin of myprojectname, 4.7 version"

To update the files in your cvs directory, when you edit your files, you can now run from that folder cvs diff -u to see what the changes are, and run "cvs commit" to send those changes to the server. Add new files as above cvs add filename.

And this, from Drupal's CVS maintainer guide:

Before you can create a branch or release tag, you must create a project on drupal.org.

Get in position (needlessly going an extra directory deep, I think):

cd contributions (or from where we were, cd ../../)

Create a branch:

cvs tag -b DRUPAL-5 modules/myprojectname

Agaric Exclusive! Working with your branches:

This isn't documented anywhere that we found, which almost certainly means that there's something incorrect or otherwise a bad idea about the way we do it. But hey, that's the Agaric way.

CVS is different from Subversion (SVN) in how branches are tracked. In appearance (that is, how you deal with the repository and so what matters to us right now) Subversion's branches are stored in actual physical folders. You check out your project, and all the branches and tags are in subfolders. In CVS, doing a basic checkout gets you head, I guess, and any branches aren't visible. You have to check out each branch separately. So the Agaric way of setting up a local checkout of our modules (modules that we have contributed to Drupal.org's contributed modules and are responsible for maintaining) so that we can patch and develop Drupal 4.7, 5, and 6 separately.

(If starting in a new location, go through the export CVSROOT and login steps again. See the beginning of this page.)

Then:

cvs co -r DRUPAL-4-7 -d myprojectname/contrib-4.7.x-1.x contributions/modules/myprojectname

cvs co -r DRUPAL-5 -d myprojectname/contrib-5.x-1.x contributions/modules/myprojectname

Now you can make changes to your local copies, now separated by version, cvs commit them to the repository, and your branches will be kept up to date.

A quick review of how to make those changes:

After editing files, you can just commit. After adding a file, you have to first use cvs add from within the contrib-V.x-1.x directory in this case.

cd myproject/contrib-5.x-1.x/
cvs add myproject.info

Then, commit:

cvs commit -m "Updated .module to drupal 5 and added .info file"

Create an official release:

cd contributions/modules/myprojectname
cvs update -dP -r DRUPAL-5  // do not run this from another directory unless you want everything
cvs tag DRUPAL-5--1-0

See also:

Notes:

cp -r (copy) recommended over mv (move) for us fearful types.

This error message, warning: failed to open .cvspass for reading: No such file or directory I only received the first time I tried cvs login.

cvs commit -m "Pertinient message about what you are committing"

cvs add myprojectname
? myprojectname/myprojectname.module
cvs add: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
cvs rlog: could not read RCS file for contributions/modules/myprojectname/directory

This may have to do with completely ignoring the instruction "(your local cvs project folder needs to reside in the proper folder of your local cvs application - search for your hard drive for "cvs" if you are unsure where this is!)"

Regardless, everything seemed to work.

Ignore random stuff in the directory (readme.txt, upload.txt, and snap.module in my case) after cvs checkout -l contributions/modules

If you run into trouble, just start in a new place on your hard drive and follow http://drupal.org/handbook/cvs/quickstart again.

Comments

Very complete approach,

Very complete approach, worked for me as far as I tested (create project + branch of development)
Thanks!

Thanks for helping out with

Thanks for helping out with what is often a hard-to-understand concept.

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.