View
215
Download
0
Category
Preview:
Citation preview
Team-Oriented Development with CVS and Eclipse
Presented June 9, 2004Manchester 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
© 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
© 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
© 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
© 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!
© 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)
© 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
© 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
© 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”)
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
glarkin@sourcehosting.nethttp://www.sourcehosting.net/
© 2004 SourceHosting.net, LLC www.sourcehosting.net
Thank you!
Recommended