views:

150

answers:

3

I'm using drush, which supposedly can be used instead of a cvs program to checkout from the drupal repository.

All tutorials I've found don't mention drush, instead they start with cvs.

cvs -z6 -d:pserver:anonymous:[email protected]:/cvs/drupal checkout -d cms -r DRUPAL-6 drupal

  • How do I change this command so it's compatible with drush?
  • and do I still need a CVS software? Since I'm not checking out with CVS, I'm guessing I don't anymore. I'd rather not install a CVS program on my windows machine since I don't use it version control.
A: 

You cannot make a CVS checkout with drush, IIRC. But what you can do, is that you can download a tagged version with drush that is otherwise not available. So you can use drush do download a specific version of a module.

CVS is only needed if you want to contribute patches back to the module.

googletorp
@googletorp I've used it to `drush dl` specific modules, but how do I dl the codebase and the documentation branch to create an offline copy?
syhuro
@syhuro: what do you mean? When you download a module you get the code and any doc written. Most times this is embedded in the source code.
googletorp
@googletorp: Its certainly is possible to do CVS checkout with drush (see my answer below). Also CVS is useful in many cases like updating a module version when you're working from dev branch. You simply do cvs update -dP and it updates magically.
Sid NoParrots
@noparrots: I was uncertain about cvs, hense the IIRC, but as OP doesn't have it installed he can't. Also drush can update modules faster and simpler so CVS doesn't add extra value. It just adds a bunch of clutter.
googletorp
+2  A: 

I'm not sure if you can get Drupal itself via CVS with drush, but you can use drush to checkout modules and themes from CVS. You have to specify the package handler either in your drushrc file or as an option in the drush command directly.

add the following line to your drushrc.php file: $options['package-handler'] = 'cvs';

OR, at the command line use (this example is checking out the backup_migrate module):

drush -v dl backup_migrate --package-handler=cvs

See here for more details: http://drupal.org/node/477684

Now, drush on Windows is another issue altogether. IIRC, it's not supported so it'll probably be more headache than it's worth. I'm sure drush doesn't include its own CVS client so you'll certainly still need to get a CVS client configured on your machine.

Aaron
A: 

Add the following lines in your /etc/bash.bashrc (or ~/.bashrc) file and all your drush downloads will be handled by CVS.

alias drush='drush -v --package-handler=cvs'

You simply type drush on your command line as before.

Sid NoParrots
Why do this? OP would rather not use CVS.
googletorp
@googletorp: actually, I'm not sure that's true. In fact, his original question is "Can drush do CVS checkout?". Sounds like he might want to use CVS; he just doesn't want to install a CVS client. I think his question leaves some confusion as to what he really wants, thus my comment asking for clarification.
Aaron