You are previewing Version Control with Subversion, 2nd Edition.
O'Reilly logo
Version Control with Subversion, 2nd Edition

Book Description

Written by members of the development team that maintains Subversion, this is the official guide and reference manual for the popular open source revision control technology. The new edition covers Subversion 1.5 with a complete introduction and guided tour of its capabilities, along with best practice recommendations. Version Control with Subversion is useful for people from a wide variety of backgrounds, from those with no previous version control experience to experienced system administrators. Subversion is the perfect tool to track individual changes when several people collaborate on documentation or, particularly, software development projects. As a more powerful and flexible successor to the CVS revision control system, Subversion makes life so much simpler, allowing each team member to work separately and then merge source code changes into a single repository that keeps a record of each separate version. Inside the updated edition Version Control with Subversion, you'll find:

  • An introduction to Subversion and basic concepts behind version control

  • A guided tour of the capabilities and structure of Subversion 1.5

  • Guidelines for installing and configuring Subversion to manage programming, documentation, or any other team-based project

  • Detailed coverage of complex topics such as branching and repository administration

  • Advanced features such as properties, externals, and access control

  • A guide to best practices

  • Complete Subversion reference and troubleshooting guide

If you've never used version control, you'll find everything you need to get started. And if you're a seasoned CVS pro, this book will help you make a painless leap into Subversion.

Table of Contents

  1. Version Control with Subversion
  2. Foreword
  3. Preface
    1. What Is Subversion?
      1. Is Subversion the Right Tool?
      2. Subversion’s History
      3. Subversion’s Architecture
      4. Subversion’s Components
      5. What’s New in Subversion
    2. Audience
    3. How to Read This Book
    4. Conventions Used in This Book
    5. Organization of This Book
    6. This Book Is Free
    7. Using Code Examples
    8. Safari® Books Online
    9. How to Contact Us
    10. Acknowledgments
      1. From Ben Collins-Sussman
      2. From Brian W. Fitzpatrick
      3. From C. Michael Pilato
  4. 1. Fundamental Concepts
    1. The Repository
    2. Versioning Models
      1. The Problem of File Sharing
      2. The Lock-Modify-Unlock Solution
      3. The Copy-Modify-Merge Solution
    3. Subversion in Action
      1. Subversion Repository URLs
      2. Working Copies
      3. Revisions
      4. How Working Copies Track the Repository
      5. Mixed Revision Working Copies
        1. Updates and commits are separate
        2. Mixed revisions are normal
        3. Mixed revisions are useful
        4. Mixed revisions have limitations
    4. Summary
  5. 2. Basic Usage
    1. Help!
    2. Getting Data into Your Repository
      1. svn import
      2. Recommended Repository Layout
    3. Initial Checkout
      1. Disabling Password Caching
      2. Authenticating As a Different User
    4. Basic Work Cycle
      1. Update Your Working Copy
      2. Make Changes to Your Working Copy
      3. Examine Your Changes
        1. See an overview of your changes
        2. Examine the details of your local modifications
      4. Undoing Working Changes
      5. Resolve Conflicts (Merging Others’ Changes)
        1. Viewing conflict differences interactively
        2. Resolving conflict differences interactively
        3. Postponing conflict resolution
        4. Merging conflicts by hand
        5. Discarding your changes in favor of a newly fetched revision
        6. Punting: using svn revert
      6. Commit Your Changes
    5. Examining History
      1. Generating a List of Historical Changes
      2. Examining the Details of Historical Changes
        1. Examining local changes
        2. Comparing working copy to repository
        3. Comparing repository revisions
      3. Browsing the Repository
        1. svn cat
        2. svn list
      4. Fetching Older Repository Snapshots
    6. Sometimes You Just Need to Clean Up
      1. Disposing of a Working Copy
      2. Recovering from an Interruption
    7. Summary
  6. 3. Advanced Topics
    1. Revision Specifiers
      1. Revision Keywords
      2. Revision Dates
    2. Properties
      1. Why Properties?
      2. Manipulating Properties
      3. Properties and the Subversion Workflow
      4. Automatic Property Setting
    3. File Portability
      1. File Content Type
      2. File Executability
      3. End-of-Line Character Sequences
    4. Ignoring Unversioned Items
    5. Keyword Substitution
    6. Sparse Directories
    7. Locking
      1. Creating Locks
      2. Discovering Locks
      3. Breaking and Stealing Locks
      4. Lock Communication
    8. Externals Definitions
    9. Peg and Operative Revisions
    10. Changelists
      1. Creating and Modifying Changelists
      2. Changelists As Operation Filters
      3. Changelist Limitations
    11. Network Model
      1. Requests and Responses
      2. Client Credentials Caching
    12. Summary
  7. 4. Branching and Merging
    1. What’s a Branch?
    2. Using Branches
      1. Creating a Branch
      2. Working with Your Branch
      3. The Key Concepts Behind Branching
    3. Basic Merging
      1. Changesets
      2. Keeping a Branch in Sync
      3. Mergeinfo and Previews
      4. Undoing Changes
      5. Resurrecting Deleted Items
    4. Advanced Merging
      1. Cherrypicking
      2. Merge Syntax: Full Disclosure
      3. Merges Without Mergeinfo
      4. More on Merge Conflicts
      5. Blocking Changes
      6. Merge-Sensitive Logs and Annotations
      7. Noticing or Ignoring Ancestry
      8. Merges and Moves
      9. Blocking Merge-Unaware Clients
      10. The Final Word on Merge Tracking
    5. Traversing Branches
    6. Tags
      1. Creating a Simple Tag
      2. Creating a Complex Tag
    7. Branch Maintenance
      1. Repository Layout
      2. Data Lifetimes
    8. Common Branching Patterns
      1. Release Branches
      2. Feature Branches
    9. Vendor Branches
      1. General Vendor Branch Management Procedure
      2. svn_load_dirs.pl
    10. Summary
  8. 5. Repository Administration
    1. The Subversion Repository, Defined
    2. Strategies for Repository Deployment
      1. Planning Your Repository Organization
      2. Deciding Where and How to Host Your Repository
      3. Choosing a Data Store
        1. Berkeley DB
        2. FSFS
    3. Creating and Configuring Your Repository
      1. Creating the Repository
      2. Implementing Repository Hooks
      3. Berkeley DB Configuration
    4. Repository Maintenance
      1. An Administrator’s Toolkit
        1. svnadmin
        2. svnlook
        3. svndumpfilter
        4. svnsync
        5. fsfs-reshard.py
        6. Berkeley DB utilities
      2. Commit Log Message Correction
      3. Managing Disk Space
        1. How Subversion saves disk space
        2. Removing dead transactions
        3. Purging unused Berkeley DB logfiles
      4. Berkeley DB Recovery
      5. Migrating Repository Data Elsewhere
      6. Filtering Repository History
      7. Repository Replication
      8. Repository Backup
      9. Managing Repository UUIDs
    5. Moving and Removing Repositories
    6. Summary
  9. 6. Server Configuration
    1. Overview
    2. Choosing a Server Configuration
      1. The svnserve Server
      2. svnserve over SSH
      3. The Apache HTTP Server
      4. Recommendations
    3. svnserve, a Custom Server
      1. Invoking the Server
        1. svnserve as daemon
        2. svnserve via inetd
        3. svnserve over a tunnel
        4. svnserve as Windows service
      2. Built-in Authentication and Authorization
        1. Create a users file and realm
        2. Set access controls
      3. Using svnserve with SASL
        1. Authenticating with SASL
        2. SASL encryption
      4. Tunneling over SSH
      5. SSH configuration tricks
        1. Initial setup
        2. Controlling the invoked command
    4. httpd, the Apache HTTP Server
      1. Prerequisites
      2. Basic Apache Configuration
      3. Authentication Options
        1. Setting up HTTP authentication
        2. SSL certificate management
      4. Authorization Options
        1. Blanket access control
        2. Per-directory access control
        3. Disabling path-based checks
      5. Extra Goodies
        1. Repository browsing
          1. Proper MIME type
          2. Customizing the look
          3. Listing repositories
        2. Apache logging
        3. Write-through proxying
          1. Configure the servers
          2. Set up replication
          3. Caveats
        4. Other Apache features
    5. Path-Based Authorization
    6. Supporting Multiple Repository Access Methods
  10. 7. Customizing Your Subversion Experience
    1. Runtime Configuration Area
      1. Configuration Area Layout
      2. Configuration and the Windows Registry
      3. Configuration Options
        1. Servers
        2. Config
    2. Localization
      1. Understanding Locales
      2. Subversion’s Use of Locales
    3. Using External Editors
    4. Using External Differencing and Merge Tools
      1. External diff
      2. External diff3
    5. Summary
  11. 8. Embedding Subversion
    1. Layered Library Design
      1. Repository Layer
      2. Repository Access Layer
      3. Client Layer
    2. Inside the Working Copy Administration Area
      1. The Entries File
      2. Pristine Copies and Property Files
    3. Using the APIs
      1. The Apache Portable Runtime Library
      2. URL and Path Requirements
      3. Using Languages Other Than C and C++
      4. Code Samples
    4. Summary
  12. 9. Subversion Complete Reference
    1. The Subversion Command-Line Client: svn
      1. svn Options
      2. svn Subcommands
        1. svn add
        2. svn blame
        3. svn cat
        4. svn changelist
        5. svn checkout
        6. svn cleanup
        7. svn commit
        8. svn copy
        9. svn delete
        10. svn diff
        11. svn export
        12. svn help
        13. svn import
        14. svn info
        15. svn list
        16. svn lock
        17. svn log
        18. svn merge
        19. svn mergeinfo
        20. svn mkdir
        21. svn move
        22. svn propdel
        23. svn propedit
        24. svn propget
        25. svn proplist
        26. svn propset
        27. svn resolve
        28. svn resolved
        29. svn revert
        30. svn status
        31. svn switch
        32. svn unlock
        33. svn update
    2. svnadmin
      1. svnadmin Options
      2. svnadmin Subcommands
        1. svnadmin crashtest
        2. svnadmin create
        3. svnadmin deltify
        4. svnadmin dump
        5. svnadmin help
        6. svnadmin hotcopy
        7. svnadmin list-dblogs
        8. svnadmin list-unused-dblogs
        9. svnadmin load
        10. svnadmin lslocks
        11. svnadmin lstxns
        12. svnadmin recover
        13. svnadmin rmlocks
        14. svnadmin rmtxns
        15. svnadmin setlog
        16. svnadmin setrevprop
        17. svnadmin setuuid
        18. svnadmin upgrade
        19. svnadmin verify
    3. svnlook
      1. svnlook Options
      2. svnlook Subcommands
        1. svnlook author
        2. svnlook cat
        3. svnlook changed
        4. svnlook date
        5. svnlook diff
        6. svnlook dirs-changed
        7. svnlook help
        8. svnlook history
        9. svnlook info
        10. svnlook lock
        11. svnlook log
        12. svnlook propget
        13. svnlook proplist
        14. svnlook tree
        15. svnlook uuid
        16. svnlook youngest
    4. svnsync
      1. svnsync Options
      2. svnsync Subcommands
        1. svnsync copy-revprops
        2. svnsync help
        3. svnsync initialize
        4. svnsync synchronize
    5. svnserve
      1. svnserve Options
    6. svndumpfilter
      1. svndumpfilter Options
      2. svndumpfilter Subcommands
        1. svndumpfilter exclude
        2. svndumpfilter include
        3. svndumpfilter help
    7. svnversion
      1. svnversion Options
      2. svnversion Examples
    8. mod_dav_svn Configuration Directives
      1. Directives
      2. High-Level Logging
    9. mod_authz_svn
      1. Directives
    10. Subversion Properties
      1. Versioned Properties
      2. Unversioned Properties
    11. Repository Hooks
      1. start-commit
      2. pre-commit
      3. post-commit
      4. pre-revprop-change
      5. post-revprop-change
      6. pre-lock
      7. post-lock
      8. pre-unlock
      9. post-unlock
  13. A. Subversion Quick-Start Guide
    1. Installing Subversion
    2. High-Speed Tutorial
  14. B. Subversion for CVS Users
    1. Revision Numbers Are Different Now
    2. Directory Versions
    3. More Disconnected Operations
    4. Distinction Between Status and Update
      1. Status
      2. Update
    5. Branches and Tags
    6. Metadata Properties
    7. Conflict Resolution
    8. Binary Files and Translation
    9. Versioned Modules
    10. Authentication
    11. Converting a Repository from CVS to Subversion
  15. C. WebDAV and Autoversioning
    1. What Is WebDAV?
    2. Autoversioning
    3. Client Interoperability
      1. Standalone WebDAV Applications
        1. Microsoft Office, Dreamweaver, Photoshop
        2. cadaver, DAV Explorer
      2. File-Explorer WebDAV Extensions
        1. Microsoft Web Folders
        2. Nautilus, Konqueror
      3. WebDAV Filesystem Implementation
        1. WebDrive, NetDrive
        2. Mac OS X
        3. Linux davfs2
  16. D. Copyright
    1. Creative Commons Legal Code
      1. Attribution 2.0
        1. License
  17. Index
  18. About the Authors
  19. Colophon
  20. Copyright