KEMBAR78
Burlington, VT PHP Users Group Subversion Presentation | ODP
Subversion An Open-source Revision Control Systems
Why revision control? Keep track of changes to your code base over time. Retrieve past revisions. Compare differences in revisions (see exactly what has changed). More than one person can work on the same code base concurrently, even the same files.
Why Subversion? Created as a compelling replacement for CVS and by most accounts has met this goal. Free/Open-source Used by many free/open-source projects. Mature and stable software.
Subversion's Architecture 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) . See  Subversion's Architecture .
Installing Subversion 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.
Basic Concepts Repository – centralized data store Lock-modify-unlock Copy-modify-merge Working copy BASE
Typical Work Flow svn checkout  (creates your working  copy ) Modify  directories and/or files in the working copy. svn update  ( copy  and  merge  public repository changes into private working copy) svn commit  ( copy  and  merge  private working copy modifications into public repository) Go back to step 2 and repeat.
Common Working Copy Operations Make modifications to files already in the working copy. svn add  (adds files and/or directories) svn copy  (copy a file or directory) svn delete  (delete a file or directory) svn diff  (display differences between working copy item(s) and BASE) svn move  (move file or directory – equivalent to a copy followed by a delete) svn revert  (revert working copy changes) svn status  (print status of working copy files and directories)
Standard Repository Layout /trunk /branches /tags Trunk holds the “main line” of development. Trunk is copied (Subversion copies are “cheap”) to a branch, typically when preparing a release. A branch is copied to a tag, usually to “tag” a release. Tags should never be committed to.
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>
Advanced Topics Merging branches Vendor branches Keyword substitution ( svn:keywords ) End-of-line character ( svn:eol-style ) Externals definitions ( svn:externals ) Ignore unversioned items ( svn:ignore ) Read the  Version Control with Subversion  book! It's freely available online and a  very  well written resource.
Questions?

Burlington, VT PHP Users Group Subversion Presentation

  • 1.
    Subversion An Open-sourceRevision Control Systems
  • 2.
    Why revision control?Keep track of changes to your code base over time. Retrieve past revisions. Compare differences in revisions (see exactly what has changed). More than one person can work on the same code base concurrently, even the same files.
  • 3.
    Why Subversion? Createdas a compelling replacement for CVS and by most accounts has met this goal. Free/Open-source Used by many free/open-source projects. Mature and stable software.
  • 4.
    Subversion's Architecture Subversionis 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) . See Subversion's Architecture .
  • 5.
    Installing Subversion InstallingSubversion 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.
  • 6.
    Basic Concepts Repository– centralized data store Lock-modify-unlock Copy-modify-merge Working copy BASE
  • 7.
    Typical Work Flowsvn checkout (creates your working copy ) Modify directories and/or files in the working copy. svn update ( copy and merge public repository changes into private working copy) svn commit ( copy and merge private working copy modifications into public repository) Go back to step 2 and repeat.
  • 8.
    Common Working CopyOperations Make modifications to files already in the working copy. svn add (adds files and/or directories) svn copy (copy a file or directory) svn delete (delete a file or directory) svn diff (display differences between working copy item(s) and BASE) svn move (move file or directory – equivalent to a copy followed by a delete) svn revert (revert working copy changes) svn status (print status of working copy files and directories)
  • 9.
    Standard Repository Layout/trunk /branches /tags Trunk holds the “main line” of development. Trunk is copied (Subversion copies are “cheap”) to a branch, typically when preparing a release. A branch is copied to a tag, usually to “tag” a release. Tags should never be committed to.
  • 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.
    Advanced Topics Mergingbranches Vendor branches Keyword substitution ( svn:keywords ) End-of-line character ( svn:eol-style ) Externals definitions ( svn:externals ) Ignore unversioned items ( svn:ignore ) Read the Version Control with Subversion book! It's freely available online and a very well written resource.
  • 12.