Team-Oriented Development with CVS and Eclipse Presented June 9, 2004 Manchester Java Users Group Meeting By Gregory C. Larkin
© 2004 SourceHosting.net, LLC Tonight’s presentation Agenda –Who am I? –About SourceHosting.net –CVS introduction –Team-oriented development with Eclipse –Demo –Summary
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC 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!
© 2004 SourceHosting.net, LLC Using Eclipse with CVS Eclipse provides a CVS client plugin –Facilitates team-oriented development Requirements: –Eclipse or 3.0RC1 (for current CVS servers) –Locally or remotely accessible CVS server –Encrypted connection to CVS server (remote closed-source teams)
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC 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”)
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC 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
© 2004 SourceHosting.net, LLC Useful Links ware.config-mgmt
© 2004 SourceHosting.net, LLC Q & A Session Gregory C. Larkin Founder & Principal SourceHosting.net, LLC PO Box 1013 Hollis, NH (603)
© 2004 SourceHosting.net, LLC Thank you!