Burlington, VT PHP Users Group Subversion Presentation


Published on

Presentation on the Subversion open-source revision control system for the Burlington, VT PHP Users Group

Published in: Technology

Burlington, VT PHP Users Group Subversion Presentation

  1. 1. Subversion An Open-source Revision Control Systems
  2. 2. Why revision control? <ul><li>Keep track of changes to your code base over time. </li></ul><ul><li>Retrieve past revisions. </li></ul><ul><li>Compare differences in revisions (see exactly what has changed). </li></ul><ul><li>More than one person can work on the same code base concurrently, even the same files. </li></ul>
  3. 3. Why Subversion? <ul><li>Created as a compelling replacement for CVS and by most accounts has met this goal. </li></ul><ul><li>Free/Open-source </li></ul><ul><li>Used by many free/open-source projects. </li></ul><ul><li>Mature and stable software. </li></ul>
  4. 4. Subversion's Architecture <ul><li>Subversion is made up of several layers including client access (command line or GUI), repository access (DAV, SVN, or Local), and repository storage (Berkeley DB or FSFS) . </li></ul><ul><li>See Subversion's Architecture . </li></ul>
  5. 5. Installing Subversion <ul><ul><li>Installing Subversion is beyond the scope of this presentation. See Installing Subversion in the Version Control with Subversion book. There are also several hosted Subversion options. See the “Sites that Offer Subversion Hosting” section on the Subversion Links page. </li></ul></ul>
  6. 6. Basic Concepts <ul><li>Repository – centralized data store </li></ul><ul><li>Lock-modify-unlock </li></ul><ul><li>Copy-modify-merge </li></ul><ul><li>Working copy </li></ul><ul><li>BASE </li></ul>
  7. 7. Typical Work Flow <ul><li>svn checkout (creates your working copy ) </li></ul><ul><li>Modify directories and/or files in the working copy. </li></ul><ul><li>svn update ( copy and merge public repository changes into private working copy) </li></ul><ul><li>svn commit ( copy and merge private working copy modifications into public repository) </li></ul><ul><li>Go back to step 2 and repeat. </li></ul>
  8. 8. Common Working Copy Operations <ul><li>Make modifications to files already in the working copy. </li></ul><ul><li>svn add (adds files and/or directories) </li></ul><ul><li>svn copy (copy a file or directory) </li></ul><ul><li>svn delete (delete a file or directory) </li></ul><ul><li>svn diff (display differences between working copy item(s) and BASE) </li></ul><ul><li>svn move (move file or directory – equivalent to a copy followed by a delete) </li></ul><ul><li>svn revert (revert working copy changes) </li></ul><ul><li>svn status (print status of working copy files and directories) </li></ul>
  9. 9. Standard Repository Layout <ul><li>/trunk </li></ul><ul><li>/branches </li></ul><ul><li>/tags </li></ul><ul><li>Trunk holds the “main line” of development. </li></ul><ul><li>Trunk is copied (Subversion copies are “cheap”) to a branch, typically when preparing a release. </li></ul><ul><li>A branch is copied to a tag, usually to “tag” a release. Tags should never be committed to. </li></ul>
  10. 10. Example Repository Layout /trunk <project files> /branches /1.0.x <project files> /1.1.x <project files> /tags /1.0.1 <project files> /1.0.2 <project files> /1.0.3 <project files> /1.1.0 <project files>
  11. 11. Advanced Topics <ul><li>Merging branches </li></ul><ul><li>Vendor branches </li></ul><ul><li>Keyword substitution ( svn:keywords ) </li></ul><ul><li>End-of-line character ( svn:eol-style ) </li></ul><ul><li>Externals definitions ( svn:externals ) </li></ul><ul><li>Ignore unversioned items ( svn:ignore ) </li></ul><ul><li>Read the Version Control with Subversion book! It's freely available online and a very well written resource. </li></ul>
  12. 12. Questions?