- Download Aptana at http://aptana.org/studio/download (there are many different flavours of IDE, let's not get into comparing them here). - Installation means unpacking the zip file and putting the Aptana folder in your Applications folder.
- Launch the Aptana application. Should open with a popup that lets you 'Install additional features'. Yes, we want to do that. - Under the nicely named 'Others', expand the SCM plugins and check the 'CVS' box. - Click the 'Install' button.
- Aha! You thought that would start installation of the CVS feature huh? Wrong! Instead: another popup will eh, pop up. - Expand the 'Collaboration Tools' section and check the 'Eclipse CVS Client' box. - Click 'Next'. You might see a couple of flashing progress bars. Don't worry.
Yes, that’s indeed what we want to install. Next please!
- 'Review the items to be installed'. Well yes, we want to install the Eclipse CVS Client, so let's click'Next>' once more and accept the license agreement.
Should really be installing now! Once finished, let's do the suggested restart of Aptana. The 'Customize Aptana Studio' popup will show again, close it for now. Congratulations, you’ve just installed your IDE and added CVS support to it!
Alright then, ready to get down to business! We'll download the latest version of Drupal HEAD from drupal.org’s CVS repository into a new project.
Let's take a look at the home screen: - Top left a browser for your file system, click the second 'Project' tab, we'll be working from there most of the time. - Bottom left has the getting started videos. Maybe later, ok? Let's close it for now.
- Right- or Control-Click somewhere in the empty project listing and select "Import…"
- Expand the 'CVS' section, select 'Projects from CVS' and click 'Next >'.
Now we have to supply the info needed to connect with the CVS repository on drupal.org. This is documented on http://drupal.org/node/320, though it took me some trial and error to find where some of the slashed are meant to be. This should work: Host: cvs.drupal.org Repository path: /cvs/drupal User: anonymous Password: anonymous Leave the Connection type settings as is. It's handy to check the 'Save password' box, you'll have to set a master password then. Click ‘Next>’
Fill out 'drupal' in the text field for 'Use specified module name'. Click 'Next >'…
Do *not* use the first option that uses the 'New Project Wizard', somehow that starts over the whole process… Instead, use the second 'Check out as a project in the workspace'. Choose a (slightly sensible) name for your project and click 'Next >' again.
Attention! You'll probably *not* want to check out (download) into the default workspace location. Instead, you want to download to the place where you keep all your local sites. I keep mine in the 'Sites' folder in my Home directory. I'm such a rebel… 'Next >'…
Yes, we want to check out from the 'HEAD' tag. No more 'Next >' clicks available, let's hit 'Finish' then!
You should see the download in progress now. When finished, you'll see a fresh new project in the left sidebar. If not, double check your Documents/Aptana workspace folder to see if you didn't check out into the default location after all.
That's it. If all went well, you now have a fresh CVS checkout of the latest Drupal HEAD on your system. Applause for yourself!
I'm skipping the part of setting up a virtual host, MySQL database and all that to actually get this Drupal installation up and running for now. Awww, really? Yes, really. There's quite a few tutorials out there that explain this quite well. http://drupal.org/node/128752 describes the process for Drupal version 6, which should get you on your way.
We’ll take a very simple example of making one change to just one file in the Drupal code. This could be a piece of interface text, code documentation, CSS or (gasp!) some actual PHP. We’ll do a very simple change to some CSS here…
You've been scanning the Drupal core CSS files and found this in aggregator.css: #aggregator .categorize-item h3 { margin-bottom: 1em; margin-top: 0; } This is of course an absolute travesty! You care about code optimization and rightfully think that this should be rewritten using CSS short-hand notation, like so: #aggregator .categorize-item h3 { margin: 0 0 1em 0; } This doesn't change any actual layout (I'm assuming there's no left or right margins defined elsewhere, it's an example ok?), so there's not that much to preview in this case.
Great! Let's assume that this is all you want to change to aggregator.css and you want to see this change added to the central Drupal code base (remember, you have only changed your local copy of Drupal now). To do so, you want to export this change in a format that can be easily applied to the central Drupal code repository. This now is what is called a patch. A patch sums up the changes in your local Drupal installation compared to the central repository. Yup, that's 'diff’ and that is exactly what a Version Control System allows you to do. Let's see how it's done in Aptana…
Right- or Control-click on your Drupal installation folder, choose ‘Team’ and then ‘Update’. This makes sure we’ll be comparing or changes to the latest version of the code. Right- or Control-click on the aggregator.css file Choose 'Team' > 'Create Patch…'
Choose the 'File' radio button, hit 'Browse…', type a name for your patch and select the place to save it to. Make sure you use .patch as the file extentsion. Hit 'Save' in this dialog and 'Next >' in the 'Create Patch' dialog.
- Oooh, advanced options… It's important to set the patch root to 'Project' here. - Click 'Finish'!
Then, hurry to the location on your file system where you told Aptana to save the patch and open it (in Aptana or your text editor of choice). For our aggregator example it should look something like this.