revision control drupalcampla

Post on 05-Dec-2014

2.768 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Talk by Tom Friedhof at DrupalCampLA 2008, LA Convention Center

TRANSCRIPT

presentation by: Tom Friedhof

Revision Control

What I’ll cover today.

• I’ll talk about Revision Control Concepts

• CVS, SVN, git

• How Drupal Ninjas Install Drupal and Contrib Modules (from CVS).

• How Drupal’s release system works.

• (i.e. Branches and Tags)

What I’ll cover today. (cont.)

• Installing Updates.

• Creating Patches and Applying Patches

• Managing Your Development Environment and Custom Changes with CVS and SVN.

• Demo (if we have time)

What is Revision Control?

• A software system for sharing information

• Keeps Track all changes made to a set of files.

• Allows for collaborative editing of data.

Centralized vs.

De-centralized

Centralized Version Control

Centralized

Repository

Developer 1 Developer 2 Developer 3

Staging Server

checkout

add

commit

update

delete

checkout

update

Decentralized Version Control

Developer 3

Repository

Developer 3

Staging Server

Staging

Repository

Developer 2

Repository

Developer 2

Developer 1

Repository

Developer 1

push

pull

Advantage's to being decentralized.

• You have a repository whether you have a network connection or not.

• Fast. The repository is local.

• Sharing with selected people is easy.

• You can create branches and never push them out. Promotes Experimentation.

CVS(Concurrent Versions System)

CVS Facts

• The Drupal Project uses CVS.

• It’s been around since 1986.

• CVS has some limitations

What’s wrong with CVS?

CVS Limitations

• Too hard to move or rename files.

• No atomic commits.

• CVS treats all files as text.

• (cvs add -kb image.jpg)

• It’s not a distributed system.

Then there is . . .

SVN(Subversion)

SVN Facts

• Was designed to replace CVS.

• Overcame pretty much all CVS limitations.

Keywords

SVNis still not a distributed

system.

git

git Facts

• Developed by Linus Torvalds in 2005

• It’s a distributed version control system

• Not as easy to grasp as CVS or SVN

What’s all this have to do with Drupal?

We’re getting there...

... but first some simple commands

import

checkout

add

commit

update

delete

How Ninjas install Drupal.

cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout drupal

Well that would get us the HEAD version of Drupal.

A NINJA WOULDN’T DO THAT

HEAD, Branches, TagsHEAD

DRUPAL-6

DRUPAL-5

DRUPAL-6-4

This is how Drupal handles version releases.

How Ninjas install Drupal.

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal co -d local_directory -r DRUPAL-6-4 drupal

REAL

(http://drupal.org/node/320)

Let’s add some modules to the mix.

Two Drupal Repositories

• /cvs/drupal

• /cvs/drupal-contrib

• Contributed Modules and Themes

Let’s Download CCK

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib co -d sites/all/modules/cck -r DRUPAL-6-4--2-0-RC6 contributions/modules/cck

Browsing the CVS Repository

Installing Updates

cvs update -dP

cvs up -dP /* For Lazy People */

cvs up -dP -r DRUPAL-6--2-0-RC7

Creating Patches

• Patch files contain the differences between two different files.

• cvs diff

• diff (Unix utility)

• Core patches should ALWAYS be made from Drupal root.

• Contrib patches can be made from the root module directory

Creating patches

cvs diff -uRp > patchfile.patch

diff -urp original_directory new_directory > patchfile.patch

(http://drupal.org/patch/create)

Applying patches

patch -p0 < patchfile.patch

(http://drupal.org/patch/apply)

How do I keep track of all my local changes?

SubversionOr any other version control software, not CVS.

Software Project ManagementGit and Subversion Hosting

Helping you and your team do things right.

(http://unfuddle.com/)

SVN(unfuddle)

CVS(cvs.drupal.org)

Developer

What I covered.

• I talked about Revision Control Concepts

• Installing Drupal and Modules from CVS.

• Drupal’s release system.

• Installing Updates from CVS.

• Creating Patches and Applying Patches

• Managing Your Development Environment and Custom Changes with CVS and SVN.

Demo(if we have time)

Questions?

Enjoy the rest of

Enjoy the rest of

Thanks!Presented by: Tom Friedhof

top related