team-oriented development with cvs and eclipse presented june 9, 2004 manchester java users group...

21
Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

Upload: toby-watkins

Post on 05-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

Team-Oriented Development with CVS and Eclipse

Presented June 9, 2004Manchester Java Users Group Meeting

By Gregory C. Larkin

Page 2: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Tonight’s presentation

• Agenda– Who am I?– About SourceHosting.net– CVS introduction– Team-oriented development with Eclipse– Demo– Summary

Page 3: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Who am I?

• Greg Larkin, Founder and Principal of SourceHosting.net, LLC of Hollis, NH– Developing software since 1983– Using source code control since 1989– Independent consultant since 1996– Virtual work team member and CVS user

since 1997

Page 4: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

About SourceHosting.net

• SourceHosting.net provides:– Hosted source code control repositories

based on CVS– Other collaborative applications:

• Bugzilla• WebCalendar

• Founded in 2000 by Greg Larkin• 30 client companies representing 11

different countries and 18 different states

Page 5: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Introduction to CVS

• What is it?– It’s a source code control system– It’s open-source software– It’s cross-platform– It enables concurrent, team-oriented

development– It’s good for small or large teams

Page 6: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Introduction to CVS

• Why should I use it?– It records an audit trail for all code changes– It enables parallel development– It encourages clean code– It reduces confusion– It enables reconstruction of prior releases– It will probably save your hide some day!

Page 7: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Using Eclipse with CVS

• Eclipse provides a CVS client plugin– Facilitates team-oriented development

• Requirements:– Eclipse 2.1.3 or 3.0RC1 (for current CVS

servers)– Locally or remotely accessible CVS server– Encrypted connection to CVS server (remote

closed-source teams)

Page 8: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Setting up Eclipse for CVS

• Open the CVS Repository Explorer• Create a new repository location

– Hostname– Repository path– Username– Password– Connection method

• Multiple repositories allow you to switch projects with ease

Page 9: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Importing the project

• Access the CVS functions from the “Team” popup menu

• Share your project with the repository– Right-click on project name, then Team->

Share Project…– Choose repository location to share project

to– Choose module name or leave as default

Page 10: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Importing the project

• Right-click on module name in Synchronize pane and click “Commit…”

• Any pending changes will be sent to the remote repository (“checked in”)

Page 11: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Checking out the project

• Other team members use the CVS Repository Explorer to check out the code into a sandbox area

• Expand the repository location and:– Fetch from the “HEAD” revision– Or fetch from a defined branch revision

Page 12: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Team development

• After all developers have a checked-out copy of the code:– Each makes whatever changes are

necessary– Commits changes to repository– Merge as necessary

Page 13: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Tagging revisions

• Code checked into CVS should be “tagged” at important points so you can recreate at a specific time:– Releases– Branch points– Merge points

• Make sure to tag all files that comprise a release

Page 14: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Tagging revisions

• Right-click project name, Team->Tag as Version…, enter tag name

• Decide on a tag naming convention in the beginning

• Examples:– Release tags: REL_1_0, REL_2_1– Branch tags: ENH_DB_ARCH_BRANCH– Merge points: ENH_DB_ARCH_POST_MERGE

Page 15: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Branching and Merging

• Branching is used to:– create a parallel development area– fix bugs for a released product while new

development continues

• Changes made in one branch do not affect any other branch

• Merging brings the changes back into the ancestor branch

Page 16: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Branching and Merging

• Create a new branch in CVS:– Create a branch point tag– Right-click on project name, select Team->

Branch…– Enter new branch name

• Other users refresh their branch listing and use the CVS Repository Explorer to check out from the new branch

Page 17: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Branching and Merging

• After working on the new branch, merge the changes back into the ancestor branch:– Commit all pending changes to the branch– Switch to the ancestor branch– Right-click on project name, Team->Merge…– Select the merge starting point– Select the contributor branch name– Merge files, resolve conflicts, commit files– Tag the merge point

Page 18: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Summary

• CVS adds control and accountability to your team-oriented project

• A CVS server can be set up for use behind the firewall or over the Internet

• Eclipse contains streamlined task-based hooks for working with a CVS repository

• SourceHosting.net provides hosted CVS repositories for teams who prefer to focus on software development

Page 19: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Useful Links

• http://www.sourcehosting.net/manjug.php• http://www.cvshome.org/• http://www.cvsnt.org/• http://www.cmcrossroads.com/• http://www.cmwiki.com/• http://groups.google.com/groups?

q=comp.software.config-mgmt

Page 20: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Q & A Session

Gregory C. LarkinFounder & Principal

SourceHosting.net, LLCPO Box 1013

Hollis, NH 03049(603) 465-2955

[email protected]://www.sourcehosting.net/

Page 21: Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin

© 2004 SourceHosting.net, LLC www.sourcehosting.net

Thank you!