Your SlideShare is downloading. ×
Version Control with Subversion
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Version Control with Subversion

4,086

Published on

Largely based on Vishnu Gopal's presentation http://www.slideshare.net/vishnu/basic-source-control-with-subversion …

Largely based on Vishnu Gopal's presentation http://www.slideshare.net/vishnu/basic-source-control-with-subversion

Used for a quick SVN introduction in a Software Engineering course at Massey University.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
4,086
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
210
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Software Version Control using Subversion Guy K. Kloss Computer Science Massey University, Albany Softare Engineering 158.329 Auckland, 11 May 2009 Guy K. Kloss | Software Version Control using Subversion 1/22
  • 2. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Outline 1 What, Why and How? 2 Subversion Commands 3 Demo: Command-line Tools 4 GUI Tools 5 Project Layout 6 Demo: Trac Guy K. Kloss | Software Version Control using Subversion 2/22
  • 3. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Outline 1 What, Why and How? 2 Subversion Commands 3 Demo: Command-line Tools 4 GUI Tools 5 Project Layout 6 Demo: Trac Guy K. Kloss | Software Version Control using Subversion 3/22
  • 4. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac What? Subversion maintains snapshots of the code repository. Allows many people to concurrently work on a codebase. Subversion is source control with a central repository. Usually integrates with a frontend: Trac Guy K. Kloss | Software Version Control using Subversion 4/22
  • 5. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Why? Continuous incremental backup. Ability to recall older code. Distributed development. Various versions of a single project. Tracking bugs, timeline, goals and releases. Guy K. Kloss | Software Version Control using Subversion 5/22
  • 6. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Central Repository Guy K. Kloss | Software Version Control using Subversion 6/22
  • 7. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac How? Developers checkout code from the repository to a local working-copy. After making edits, they commit changes. At any point, they can revert to an older version of the codebase. They update their local working copy frequently to keep up with changes. Guy K. Kloss | Software Version Control using Subversion 7/22
  • 8. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Work with Subversion Guy K. Kloss | Software Version Control using Subversion 8/22
  • 9. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac How does Subversion work? A system to track changes in files. The code is initially imported into the repository. Then a special “subversion-aware” directory is checked-out. Developers commit and update. Subversion tracks the changesets and the commit-log. Guy K. Kloss | Software Version Control using Subversion 9/22
  • 10. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Outline 1 What, Why and How? 2 Subversion Commands 3 Demo: Command-line Tools 4 GUI Tools 5 Project Layout 6 Demo: Trac Guy K. Kloss | Software Version Control using Subversion 10/22
  • 11. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Common Subversion Commands checkout: Obtain a new working copy. import: Import code into repository initially. commit: Update repository with changes. update: Update working-copy with changes. Other commands: revert, move, copy, merge. Guy K. Kloss | Software Version Control using Subversion 11/22
  • 12. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Outline 1 What, Why and How? 2 Subversion Commands 3 Demo: Command-line Tools 4 GUI Tools 5 Project Layout 6 Demo: Trac Guy K. Kloss | Software Version Control using Subversion 12/22
  • 13. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac To be shown . . . For examples see slides 49–77 in the presentation “SVN – SubVersioN” here: http://www.slideshare.net/slidesharechaos/svn-subversion Guy K. Kloss | Software Version Control using Subversion 13/22
  • 14. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Outline 1 What, Why and How? 2 Subversion Commands 3 Demo: Command-line Tools 4 GUI Tools 5 Project Layout 6 Demo: Trac Guy K. Kloss | Software Version Control using Subversion 14/22
  • 15. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac GUI Tools TortoiseSVN in Windows Right-click a directory: get a context-menu with everything in there. Useful Integration with diff and patch. Reasonably fast. Guy K. Kloss | Software Version Control using Subversion 15/22
  • 16. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Outline 1 What, Why and How? 2 Subversion Commands 3 Demo: Command-line Tools 4 GUI Tools 5 Project Layout 6 Demo: Trac Guy K. Kloss | Software Version Control using Subversion 16/22
  • 17. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Project Layout trunk/ → All constant development happens here. branches/ → Special purpose development here. tags/ → Releases are “tagged” for archiving. Guy K. Kloss | Software Version Control using Subversion 17/22
  • 18. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Outline 1 What, Why and How? 2 Subversion Commands 3 Demo: Command-line Tools 4 GUI Tools 5 Project Layout 6 Demo: Trac Guy K. Kloss | Software Version Control using Subversion 18/22
  • 19. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Major features of Trac Web frontend to a Subversion repository. Shows the changesets and timeline. Has a bug tracker which integrates with the Subversion commit-log. Simple project management. Guy K. Kloss | Software Version Control using Subversion 19/22
  • 20. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Some good Subversion practices Follow the branches, tags, trunk structure. All code should be in the repository! Update code at the start of every day. Only commit coherent changes. The central repository should always be consistent. No dependent stuff! Branch as less as possible. Guy K. Kloss | Software Version Control using Subversion 20/22
  • 21. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac Questions? G.Kloss@massey.ac.nz Guy K. Kloss | Software Version Control using Subversion 21/22
  • 22. What, Why and How? Subversion Commands Demo: Command-line Tools GUI Tools Project Layout Demo: Trac References Thanks to Vishnu Gopal’s presentation “Basic SCM with Subversion & Trac” Subversion Quick Reference Card http://www.digilife.be/quickreferences/quickrefs.htm Subversion Cheat Sheet http://ariejan.net/svncheatsheet/ TortoiseSVN client for Windows http://tortoisesvn.tigris.org/ Guy K. Kloss | Software Version Control using Subversion 22/22

×