Want to get Lullabot article, videocast, and podcast announcements delivered right to your in-box?
Let us know your email address (we won't share it) and we'll let you know when anything exciting happens.
CVS quick reference
March 21, 2006
After a 5 year hiatus (when I was using Moveable Type 1.x), I've decided to bring back my blog, built on Drupal, of course :-)
Anyways, I often find myself looking for those useful Drupal CVS commands to keep it in sync and wanted to put those in a central place. This is just a quick reference, for a more detailed CVS reference, check out the Drupal Handbook.
-
To checkout Drupal HEAD (e.g., the latest CVS version of Drupal):
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout drupal - To checkout Drupal 4.7.x (or similarly any branch):
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -r DRUPAL-4-7 drupal -
To checkout HEAD of a specific module:
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d DIRECTORY_TO_PUT_IN contributions/modules/MODULE_NAME
-
To checkout a the 4.7.x branch of a module:
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d DIRECTORY_TO_PUT_IN -r DRUPAL-4-7 contributions/modules/MODULE_NAME
-
To update any type of checkout:
cvs update -dP -
To find all modified files (then open up custom.diff):
cvs diff -u -F^f > custom.diff
For a more complete CVS reference, checkout Open Source Development with CVS.



RSS Feed



Comments
More detailed article?
So it has come to my attention that some people might be interested in a more detailed article about CVS and how you can use it to keep your Drupal site up to date.
Would you guys be interested in this? Please leave your comments!
always.
always.
Yes please!
And also, an explanation of what "HEAD" is, and how to just type one command, and know everything on my site is at the latest version. (If possible)
:)
Thanks
jacauc
Absolutely. That would be
Absolutely. That would be fantastic.
CVS is on my list of things
CVS is on my list of things to learn. I was actually going to call in to ask about it. I would love a good primer!
CVS article!
Really useful, please do it! Even this short article helped me. It seems that 99% of the docs available are for developers updating cvs.
CVS / SVN?
Would Subversion (SVN) not also be a useful subject to learn - I know there are pros and cons to both, but there's a useful movie covering SVN also:
http://media.clickablebliss.com/screencasts/intro_to_subversion_small.mo...
Yes, SVN would be, but as of
Yes, SVN would be, but as of now, Drupal is running on CVS. Perhaps if it switches to SVN one day...
Drupal tags and committing
Extending this to show how Drupal developers can work with HEAD/4-7/4-6 versions of the contributed modules they maintain would be fantastic. There is much confusion concerning these points and when it is done wrongly, a module never reaches its target audience.
cvs update -r DRUPAL-5 -dP
Be nice to add something like this command to update a checkout to a different version.
Thanks
Thanks for the quick reference! Added to my favorites...
CVS and SVN reference articles
I support the idea of a CVS reference article. I would also be interested in putting a Subversion reference article out there. I am comfortable with the use of the Subversion client in the bash shell but am just getting starting with CVS. We use Subversion (svn) at work but I'm now wanting to contribute some of the code I've done to various Drupal contrib modules, which are all stored using a CVS repository.
Something I've been able to do is code common svn tasks as bash scripts, which I do on Windows using Cygwin. An example is the setting of svn properties such as
svn:keywordsandsvn:eol-style. I created a script namedsvnps.shwhich sets these svn properties for files and accepts various command line options to change the default behaviour.I'd be happy to share these scripts if there is an appropriate place to post them. Any ideas anyone? How about a Lullabot article on scripted Drupal development tools to help developers with common tasks? I'd be happy to contribute.
Post new comment