210 likes | 335 Views
Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin. Team-Oriented Development with CVS and Eclipse. Tonight’s presentation. Agenda Who am I? About SourceHosting.net CVS introduction Team-oriented development with Eclipse Demo Summary. Who am I?.
E N D
Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin Team-Oriented Development with CVS and Eclipse
Tonight’s presentation • Agenda • Who am I? • About SourceHosting.net • CVS introduction • Team-oriented development with Eclipse • Demo • Summary
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
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
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
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!
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)
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
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
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”)
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
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
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
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
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
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
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
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
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
Q & A Session Gregory C. Larkin Founder & Principal SourceHosting.net, LLC PO Box 1013 Hollis, NH 03049 (603) 465-2955 glarkin@sourcehosting.net http://www.sourcehosting.net/