Simple musings of a Drupal developer.

Drush beats CVS

By krs · July 30, 2009 · 8 Comments · 663 Views

I had checked out a bunch of modules fron CVS, but then I realized that CVS checkouts don't come with all the info such as version numbers, so I wanted to delete them and replace them with real copies. I used Drush and Bash, and here's how I did it.

Need to delete every CVS file from the sites/all/modules directory, and then replace each module with a fresh copy downloaded from drupal.org, and do it without ruining your SVN repository? "What's the difference?" you ask. Well, modules checked out directly from CVS don't get extra packaging info from drupal.org, and don't keep track of their own version numbers properly (you'll see a blank Version column on admin/build/modules).

So by getting a fresh copy from drupal.org, you get a proper .info file, and a LICENSE.txt file added for you. And it's a long module list? No problemo!

Assumptions - you have Drush installed and you're working with a checkout of an SVN repository.

cd to your modules directory, usually
cd examplesite/sites/all/modules


Update your modules to their latest versions - Drush is going to try and download the latest anyway, and you want them to match up.

Tell Drush to grab fresh copies of modules from drupal.org with:
find . -name CVS -depth 2 | sed 's/\// /g' | awk {'print $2'} | xargs drush dl
and watch the "Project xxx downloaded to ..." messages scroll by.

Get rid of all the CVS files with
find . -name CVS -prune -exec svn rm {} \;


Add all the new files (should just be a bunch of LICENSE.txt files) with
svn status | grep '^?' | xargs svn add
Then do a quick svn status - and you should see a bunch of Deletes on CVS files, Adding LICENSE.txt files, and Modifying any .info files

Last, SVN commit the whole bunch! yay!
svn commit -m "removed old CVS tags, redownloaded modules from drupal.org" .

--

edit: thanks to Joel for a better introduction

Filed in:
Tagged with: , , , , ,

Heading to DrupalCampLA!

By krs · July 8, 2009 · 0 Comments · 18 Views

I'm excited to be going to my third LA DrupalCamp! The first one in 2007 was pretty soon after I was hired on at Achieve Internet, and it was my first real experience meeting the Drupal community. I must have had a good time, cause I'm still at it 2 years later :) It was also my first experience drinking with Steve Rude at a conference, which was awesome if you're not sharing a hotel room with him (sorry Bill)! There's still a month to go, so hopefully I can propose a session in time, feel free to send any suggestions.

Drupal Camp Los Angeles 2009 - August 8-9th
Tagged with: ,

About Me

Drupal.org username: kscheirer

subscribe

Drupal Cred

Drupal Camp Los Angeles 2009 - August 8-9th

Archive

November 2009
SMTWTFS
1234567
891011121314
15161718192021
22232425262728
2930 
August 2009
SMTWTFS
 1
2345678
9101112131415
16171819202122
23242526272829
3031 
July 2009
SMTWTFS
 1234
567891011
12131415161718
19202122232425
262728293031