An Introduction to Version Control An Introduction to Subversion Installing Subversion Basic Subversion Usage Working with a Working Copy

“svnbook” — 2005414 — 14:55 — page vii — 6 ✐ ✐ ✐ ✐ ✐ ✐ ✐ ✐ Contents Preface xvii Acknowledgments xxi Part I An Introduction to Version Control and Subversion 1

Chapter 1 An Introduction to Version Control

3 1.1 What Is Version Control? 4 1.2 Why Use It? 4 1.2.1 Data Integrity 4 1.2.2 Productivity 5 1.2.3 Accountability 5 1.2.4 Software Engineering Process Support 5 1.2.5 Development Branching 6 1.2.6 Record Keeping 6 1.2.7 Distribution of Work 6 1.2.8 Rapid Development 7 1.3 The Elements of Version Control 7 1.3.1 The Repository and Working Directory 7 1.3.2 Revisions 8 1.3.3 Logs 9 1.3.4 Tagging 10 1.3.5 Branching 10 1.3.6 Locking versus Merging 11 1.4 Summary 12 vii “svnbook” — 2005414 — 14:55 — page viii — 7 ✐ ✐ ✐ ✐ ✐ ✐ ✐ viii Contents

Chapter 2 An Introduction to Subversion

15 2.1 Why Subversion? 15 2.1.1 A Software Engineering Tool 15 2.1.2 Open Source Solutions 16 2.1.3 Major Features of SVN 17 2.2 Limitations of Subversion 21 2.3 Summary 23

Chapter 3 Installing Subversion

25 3.1 Installing on Linux 25 3.1.1 Subversion’s Prerequisites 25 3.1.2 Downloading the Source 27 3.1.3 Compiling and Installing 27 3.2 Installing on Mac OS X 29 3.2.1 Installing OS X Binaries 29 3.2.2 Compiling Subversion on OS X 29 3.2.3 Using Fink 30 3.3 Installing on Windows 30 3.4 Configuring SVN to Use Apache 31 3.4.1 Loading the Modules 31 3.4.2 Setting Up Access 32 3.4.3 Using Apache 2 and Apache 1 Together 33 3.5 Configuring to Use Svnserve 34 3.5.1 Running as a Daemon 34 3.5.2 Running with inetd 35 3.5.3 Tunneling over SSH 36 3.6 Summary 36

Chapter 4 Basic Subversion Usage

37 4.1 Creating the Repository 37 4.2 Getting Files into the Repository 38 4.3 Creating a Working Copy 40 4.4 Editing Files 40 4.5 Committing Changes 42 4.6 Viewing the Logs 42 4.7 Creating a Tag 43 4.8 Creating a Branch 44 “svnbook” — 2005414 — 14:55 — page ix — 8 ✐ ✐ ✐ ✐ ✐ ✐ ✐ Contents ix 4.9 Merging a Branch 46 4.10 Handling Conflicts 48 4.11 Summary 51 Part II Subversion from a Client User’s Perspective 53

Chapter 5 Working with a Working Copy

55 5.1 The Subversion Client 55 5.1.1 Common Command Options 56 5.1.2 Paths 57 5.2 Checking Out and Maintaining a Working Copy 57 5.2.1 Keeping Up-to-Date 59 5.3 Modifying and Committing Data 61 5.3.1 Adding New Files 63 5.3.2 Removing Files 64 5.3.3 Moving Things Around 65 5.4 Getting Information about the Repository 67 5.4.1 Getting Information on the Current State 67 5.4.2 Getting the Repository’s History 72 5.5 Changing the Working Copy Target 76 5.6 Resolving Conflicts 76 5.7 Branching, Tagging, and Merging 78 5.7.1 Creating a Branch or Tag 78 5.7.2 Merging a Branch 80 5.8 Troubleshooting the Working Copy 82 5.9 Summary 83

Chapter 6 Using Properties