Subversion Saves The Day

633 views
595 views

Published on

An introduction to Subversion for seasoned web developers.

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

  • Be the first to like this

No Downloads
Views
Total views
633
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Subversion Saves The Day

  1. 1. Subversion Takes Back the Night How Version Control makes web development better
  2. 2. WHY? <ul><li>Track your changes to show them you really are working </li></ul><ul><li>Rollback mistakes without rolling on your rifle in despair </li></ul><ul><li>Experiment safely without borking the “real” code base </li></ul><ul><li>Collaborate sanely with both “Lone Wolves” and “Dream Teams” </li></ul>
  3. 3. Key Concepts <ul><li>Revision: </li></ul><ul><ul><li>Group of files at same stage </li></ul></ul><ul><li>Repository </li></ul><ul><ul><li>Everyone’s stuff combined </li></ul></ul><ul><li>Working Copy </li></ul><ul><ul><li>Your own stuff </li></ul></ul>Repository Your Working Copy Her Working Copy
  4. 4. Your Subversion Toolbox <ul><li>A Client </li></ul><ul><ul><li>Windows: TortoiseSVN </li></ul></ul><ul><ul><li>OSX: SCPlugin </li></ul></ul><ul><ul><li>Linux: the CLI, of course </li></ul></ul><ul><ul><li>Lots of plug-ins for Editors / IDEs </li></ul></ul><ul><li>A Server </li></ul><ul><ul><li>Subversion on a local file system </li></ul></ul><ul><ul><li>Apache: mod_dav_svn </li></ul></ul>
  5. 5. Making a Repository <ul><li>Make an empty directory </li></ul><ul><li>Create a repository there </li></ul><ul><li>Add 3 directories: </li></ul><ul><ul><ul><li>trunk </li></ul></ul></ul><ul><ul><ul><li>branches </li></ul></ul></ul><ul><ul><ul><li>tags </li></ul></ul></ul><ul><ul><li>(Subversion basically requires this) </li></ul></ul><ul><li>Create your directory for a working copy </li></ul>
  6. 6. Use Case: Lone Wolf <ul><li>Keeps Personal Repository on local File system </li></ul><ul><li>Has a Hard Time Sharing </li></ul><ul><li>Deploys Files to Web Server with: </li></ul><ul><ul><li>Capistrano </li></ul></ul><ul><ul><li>Phing </li></ul></ul><ul><ul><li>Ant </li></ul></ul><ul><ul><li>Or simply “svn export” because he’s a lone wolf who doesn’t believe in the sanctity of build scripts </li></ul></ul>
  7. 7. “Lone Wolf” Workflow <ul><li>Add Files to Repository </li></ul><ul><li>Hack…hack… </li></ul><ul><li>Commit to Repository </li></ul><ul><li>Client: “What have you done for me today, Wolf?” </li></ul><ul><ul><li>Here you go: “svn log –r {2010-01-13}:HEAD” </li></ul></ul>
  8. 8. Use Case: Dream Team <ul><li>Central Repository on Web Server </li></ul><ul><li>Lots of loving, group-based development </li></ul><ul><li>…each with his/her own working copy = FUN! </li></ul>
  9. 9. Dream Team Workflow <ul><li>Teammate: “I’ll do this part, you do that part and then we’ll merge!” </li></ul><ul><ul><li>You: “You bet, buddy!” </li></ul></ul><ul><ul><ul><li>Hack…hack… </li></ul></ul></ul><ul><ul><ul><li>svn commit </li></ul></ul></ul><ul><ul><ul><li>svn update </li></ul></ul></ul><ul><ul><ul><li>svn status </li></ul></ul></ul><ul><ul><li>“ Oh No! A merge conflict” </li></ul></ul><ul><ul><ul><li>Diff it </li></ul></ul></ul><ul><ul><ul><li>Edit it </li></ul></ul></ul><ul><ul><ul><li>‘ svn resolved index.php’ </li></ul></ul></ul><ul><ul><ul><li>Re-commit </li></ul></ul></ul>
  10. 10. Wrap it up <ul><li>http://subversion.tigris.org </li></ul><ul><li>http://svnbook.red-bean.com / </li></ul><ul><li>Questions </li></ul>

×