Version Control with Subversion

Book description

One of the greatest frustrations in most software projects is version control: the art of managing changes to information. Today's increasingly fast pace of software development--as programmers make small changes to software one day only to undo them the next--has only heightened the problem; consecutive work on code or single-programmer software is a rare sight these days. Without careful attention to version control, concurrent and collaborative work can create more headaches than it solves. This is where Subversion comes into play.Written by members of the Subversion open source development team, Version Control with Subversion introduces the powerful new versioning tool designed to be the successor to the Concurrent Version System or CVS. CVS users will find the "look and feel" Subversion comfortably familiar, but under the surface it's far more flexible, robust, and usable, and more importantly, it improves on CVS's more notable flaws.The book begins with a general introduction to Subversion, the basic concepts behind version control, and a guided tour of Subversion's capabilities and structure. With thorough attention to detail, the authors cover every aspect of installing and configuring Subversion for managing a programming project, documentation, or any other team-based endeavor. Later chapters cover the more complex topics of branching, repository administration, and other advanced features such as properties, externals, and access control. The book ends with reference material and appendices covering a number of useful topics such as a Subversion complete reference and troubleshooting guide.Version Control with Subversion aims to be useful to readers of widely different backgrounds, from those with no previous experience in version control to experienced sysadmins. If you've never used version control, you'll find everything you need to get started in this book. And if you're a seasoned CVS pro, this book will help you make a painless leap into Subversion.

Table of contents

  1. Copyright
  2. Table of Contents
  3. Foreword
  4. Preface
    1. Audience
    2. How to Read this Book
    3. Conventions Used in This Book
      1. Typographic Conventions
      2. Icons
    4. Organization of This Book
    5. This Book is Free
    6. Comments and Questions
    7. Acknowledgments
      1. From Ben Collins-Sussman
      2. From Brian W. Fitzpatrick
      3. From C. Michael Pilato
  5. Introduction
    1. What Is Subversion?
    2. Subversion’s History
    3. Subversion’s Features
    4. Subversion’s Architecture
    5. Installing Subversion
    6. Subversion’s Components
    7. A Quick Start
  6. Basic 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. Working Copies
      2. Revisions
      3. How Working Copies Track the Repository
      4. The Limitations of Mixed Revisions
    4. Summary
  7. Guided Tour
    1. Help!
    2. Import
    3. Revisions: Numbers, Keywords, and Dates, Oh My!
      1. Revision Numbers
      2. Revision Keywords
      3. Revision Dates
    4. Initial Checkout
    5. Basic Work Cycle
      1. Update Your Working Copy
      2. Make Changes to Your Working Copy
      3. Examine Your Changes (1/2)
      4. Examine Your Changes (2/2)
        1. svn status
        2. svn diff
        3. svn revert
      5. Resolve Conflicts (Merging Others’ Changes)
        1. Merging conflicts by hand
        2. Copying a file onto your working file
        3. Punting: Using svn revert
      6. Commit Your Changes
    6. Examining History
      1. svn log
      2. svn diff
        1. Examining local changes
        2. Comparing working copy to repository
        3. Comparing repository to repository
      3. svn cat
      4. svn list
      5. A Final Word on History
    7. Other Useful Commands
      1. svn cleanup
      2. svn import
    8. Summary
  8. 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 Branches
    3. Copying Changes Between Branches
      1. Copying Specific Changes
      2. Best Practices for Merging
        1. Tracking merges manually
        2. Previewing merges
        3. Noticing or Ignoring Ancestry
    4. Common Use-Cases for Merging
      1. Merging a Whole Branch to Another
      2. Undoing Changes
      3. Resurrecting Deleted Items
    5. Switching a Working Copy
    6. Tags
      1. Creating a Simple Tag
      2. Creating a Complex Tag
    7. Branch Maintenance
      1. Repository Layout
      2. Data Lifetimes
    8. Summary
  9. Repository Administration
    1. Repository Basics
      1. Understanding Transactions and Revisions
      2. Unversioned Properties
      3. Berkeley DB
    2. Repository Creation and Configuration
      1. Hook Scripts
      2. Berkeley DB Configuration
    3. Repository Maintenance
      1. An Administrator’s Toolkit
        1. svnlook
        2. svnadmin
        3. svndumpfilter
        4. svnshell.py
        5. Berkeley DB utilities
      2. Repository Cleanup
      3. Managing Disk Space
      4. Repository Recovery
      5. Migrating a Repository
      6. Repository Backup
    4. Adding Projects
      1. Choosing a Repository Layout
      2. Creating the Layout and Importing Initial Data
    5. Summary
  10. Server Configuration
    1. Overview
    2. Network Model
      1. Requests and Responses
      2. Client Credentials Caching
    3. svnserve; A Custom Server
      1. Invoking the Server
      2. Built-In Authentication and Authorization
        1. Create a “users” file and realm
        2. Set access controls
      3. SSH Authentication and Authorization
    4. httpd; The Apache HTTP Server
      1. Prerequisites
      2. Basic Apache Configuration
      3. Authentication Options
        1. Basic HTTP authentication
        2. SSL certificate management
      4. Authorization Options
        1. Blanket access control
        2. Per-directory access control
      5. Extra Goodies
        1. Repository browsing
        2. Other features
    5. Supporting Multiple Repository Access Methods
  11. Advanced Topics
    1. Runtime Configuration Area
      1. Configuration Area Layout
      2. Configuration and the Windows Registry
      3. Configuration Options
        1. Servers
        2. Config
    2. Properties
      1. Why Properties?
      2. Manipulating Properties
      3. Special Properties (1/2)
      4. Special Properties (2/2)
        1. svn:executable
        2. svn:mime-type
        3. svn:ignore
        4. svn:keywords
        5. svn:eol-style
        6. svn:externals
      5. Automatic Property Setting
    3. Externals Definitions
    4. Vendor Branches
      1. General Vendor Branch Management Procedure
      2. svn_load_dirs.pl
  12. Developer Information
    1. Layered Library Design
      1. Repository Layer (1/2)
      2. Repository Layer (2/2)
      3. Repository Access Layer
        1. RA-DAV (repository access using HTTP/DAV)
        2. RA-SVN (custom protocol repository access)
        3. RA-Local (direct repository access)
        4. Your RA library here
      4. Client Layer
    2. Using the APIs
      1. The Apache Portable Runtime Library
      2. URL and Path Requirements
      3. Using Languages Other than C and C++
    3. Inside the Working Copy Administration Area
      1. The Entries File
      2. Pristine Copies and Property Files
    4. WebDAV
    5. Programming with Memory Pools
    6. Contributing to Subversion
      1. Join the Community
      2. Get the Source Code
      3. Become Familiar with Community Policies
      4. Make and Test Your Changes
      5. Donate Your Changes
  13. Subversion Complete Reference
    1. The Subversion Command Line Client: svn
      1. svn Switches
      2. svn Subcommands (1/8)
      3. svn Subcommands (2/8)
      4. svn Subcommands (3/8)
      5. svn Subcommands (4/8)
      6. svn Subcommands (5/8)
      7. svn Subcommands (6/8)
      8. svn Subcommands (7/8)
      9. svn Subcommands (8/8)
        1. svn add
        2. svn blame
        3. svn cat
        4. svn checkout
        5. svn cleanup
        6. svn commit
        7. svn copy
        8. svn delete
        9. svn diff
        10. svn export
        11. svn help
        12. svn import
        13. svn info
        14. svn list
        15. svn log
        16. svn merge
        17. svn mkdir
        18. svn move
        19. svn propdel
        20. svn propedit
        21. svn propget
        22. svn proplist
        23. svn propset
        24. svn resolved
        25. svn revert
        26. svn status
        27. svn switch
        28. svn update
    2. svnadmin
      1. svnadmin Switches
      2. svnadmin Subcommands (1/2)
      3. svnadmin Subcommands (2/2)
        1. svnadmin create
        2. svnadmin deltify
        3. svnadmin dump
        4. svnadmin help
        5. svnadmin hotcopy
        6. svnadmin list-dblogs
        7. svnadmin list-unused-dblogs
        8. svnadmin load
        9. svnadmin lstxns
        10. svnadmin recover
        11. svnadmin rmtxns
        12. svnadmin setlog
        13. svnadmin verify
    3. svnlook
      1. svnlook Switches
      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 log
        11. svnlook propget
        12. svnlook proplist
        13. svnlook tree
        14. svnlook uuid
        15. svnlook youngest
    4. svnserve
      1. svnserve Switches
  14. Subversion for CVS Users
    1. Revision Numbers Are Different Now
    2. Directory Versions
    3. More Disconnected Operations
    4. Distinction Between Status and 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. Troubleshooting
    1. Common Problems
      1. Problems Using Subversion
        1. Every time I try to access my repository, my Subversion client just hangs.
        2. Every time I try to run svn, it says my working copy is locked.
        3. I’m getting errors finding or opening a repository, but I know my repository URL is correct.
        4. How can I specify a Windows drive letter in a file:// URL?
        5. I’m having trouble doing write operations to a Subversion repository over a network.
        6. Under Windows XP, the Subversion server sometimes seems to send out corrupted data.
        7. What is the best method of doing a network trace of the conversation between a Subversion client ...
        8. I just built the distribution binary, and when I try to check out Subversion, I get an error abou...
        9. Why does the svn revert command require an explicit target? Why is it not recursive by default? T...
        10. When I start Apache, mod_dav_svn complains about a “bad database version,” that it found db-3.X, ...
        11. I’m getting “Function not implemented” errors on RedHat 9, and nothing works. How do I fix this?
        12. Why does log say “(no author)” for files committed or imported via Apache (ra_dav)?
        13. I’m getting occasional “Access Denied” errors on Windows. They seem to happen at random.
        14. On FreeBSD, certain operations (especially svnadmin create) sometimes hang.
        15. I can see my repository in a web browser, but svn checkout gives me an error about “301 Moved Per...
        16. I’m trying to look at an old version of my file, but svn says something about “path not found.”
  16. WebDAV and Autoversioning
    1. Basic WebDAV Concepts
      1. Just Plain WebDAV
      2. DeltaV Extensions
    2. Subversion and DeltaV
      1. Mapping Subversion to DeltaV
      2. Autoversioning Support
      3. The mod_dav_lock Alternative
    3. Autoversioning Interoperability
      1. Win32 WebFolders
      2. Mac OS X
      3. Unix: Nautilus 2
      4. Linux davfs2
  17. Third-Party Tools
    1. Clients and Plugins
    2. Language Bindings
    3. Repository Converters
    4. Higher-Level Tools
    5. Repository Browsing Tools
  18. Creative Commons Attribution License
    1. Creative Commons Legal Code
      1. Attribution 2.0
        1. License
  19. Index (1/5)
  20. Index (2/5)
  21. Index (3/5)
  22. Index (4/5)
  23. Index (5/5)

Product information

  • Title: Version Control with Subversion
  • Author(s): Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato
  • Release date: June 2004
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9780596517106