Table of Contents
preface xiii
acknowledgments xv
about this book xvii
about the title xx
about the cover illustration xxi
- Introduction 1
- Understanding version control 2
- Why use version control 3, The repository 3, Checkout strategies 3, Commit and update 5, What are change logs? 5, The role of properties 7
- 30,000 foot view of Subversion 8
- Atomic commits 9, Everything is versioned 9, The three components of Subversion 9
- Revision numbers 10
- The old way 11, Subversion revision numbers 12
- Summary 14
- Getting started 15
- Getting Subversion 16
- Which package to get? 16, Installing on Windows 17, Installing on Linux 17, Subversion is installed; what now? 18
- Command-line interface 19
- Different clients 19, Getting help 20, Paths and URLs 21
- Creating a repository 22
- Finding a location for the repository 22, Permissions 23, Svnadmin create 24, Internal repository directories and files 25
- Common options 26
- Recursion 26, Entering the log message 27, Accessing specific revisions 30, Authentication 32
- Importing your files into Subversion 33
- A basic import 33, Changing what you import 34, Changing where you import 35
- Checking out the repository 35
- Finding your starting point 35, A simple checkout 36, The .svn directory 37, Checking out specific versions 37, Changing the paths 38
- Committing changes 39
- A path to commit 40, What and when do you commit? 40, Out-of-date transactions 41
- Summary 43
- Managing your working copy 44
- Checking the state of your working copy 45
- Understanding the status codes 45, Running the status command 48, Trimming your file list 49, Getting more information 51, Checking ignored files 51, Repository changes 52, When to use the status 53
- Updating your working copy 54
- Running the update command 54, Update status codes 55, Updating to specific revisions 55
- Conflicts 59
- Resolution files 59, Resolution scenarios 60, Cleaning up the conflict 64
- Adding files and directories 65
- Adding a single file 65, Adding a directory and its contents 66, Wildcards 68
- Copying 68
- Where is my previous version? 69, Making a local copy 70
- Moving and renaming 71
- Moving files in the working copy 72, Directories 73, Moving directly in the repository 74, Implications of moving files on previous revisions 74
- Removing files from the repository 75
- Running the remove command 76, Directories 77
- Summary 78
- Getting change information 79
- Viewing change logs 80
- Running the log command 80, Change logs for directories 81, Suppressing the log messages 83, Logs for specific revisions 84, Viewing the change paths 87, Stopping the change logs from a copy 89, Formatting the change logs 90, Changing log messages 94
- Getting a list of files 96
- A simple list 96, Verbose 97, Revisions 98, Recursive listing 98, List from URL 99, Old or nonexistent files 99
- Comparing revisions 100
- The diff syntax 100, Running the diff command on your local copy 102, Specifying revisions 103, Running diff directly from the repository 105, Using other diff programs 107, Running diff on directories 109
- Looking at file contents 111
- Running the cat command 111, Revision numbers 112, URLs 112
- Annotating a file 113
- Running the annotate command 114, Annotating specific revisions 114, Directly accessing the repository 115, Be cautious when using annotate 115
- Summary 117
- Branches and tags 119
- Branching overview 120
- What is a branch? 120, When should you use branches? 122, Branching strategies 124, Project root layout 126
- Creating branches 130
- Creating a branch from a working copy 130, Copying directly into the repository from a working copy 131, Creating a branch on a checkout 133, Repository to repository 134, Creating a branch from a specific revision 135
- Changing repository URLs 136
- Recursion 137, Moving repositories 138, Switching to an old revision 139
- Merging revisions 140
- A simple merge 140, Moving changes from a branch 141, Merging a single file 142, Conflicts 142, Keeping track of your merges 142, Doing a dry run 145
- Tags in Subversion 146
- Summary 147
- Properties 148
- Properties overview 149
- Name/value pairs 149, Properties are versioned 150
- Adding a property to an object 151
- Applying properties to a directory 152, Passing in arguments as file contents 153, Editing property values 155, Removing properties 156
- Listing properties on an object 159
- Listing the name and value 159, Property listings on a directory 160, Listing the properties of a specific revision 161
- Getting the value of a property 161
- Running the propget 161, Getting properties on multiple files 162, Getting older revisions 162, Removing extra characters from the output 163
- Built-in properties 164
- Ignore property 164, Keywords 169, Executable property 172, End-of-line style 173, Externals 174
- Revision properties 176
- Default revision properties 176, Adding properties 176, Viewing revision properties 177, Changing the properties 178
- Summary 178
- Repository administration 180
- Backing up your repository 181
- Dumping the repository 181, Loading from a dump file 185, Creating a hot backup of a repository 187, Exporting a non-versioned copy 188
- Setting up network access with svnserve 189
- Choosing between svnserve and Apache 190, Running the default configuration 191, Svnserve configuration file 192, Setting up authorization 194, Changing the URL 197, Changing the svnserve network settings 197, Running svnserve from the Linux xinetd 198, Running svnserve with ssh 199
- Setting up access with the Apache HTTP server 200
- Getting the modules set up 200, A basic setup 201, Multiple repositories 203, Users and authentication 203, Configuring authorization 205, Encrypting the transmission 208, Repository browsing 210
- Summary 213
- Advanced administration and configuration 214
- Client-side configuration 215
- Configuration files 215, Configuring the server connection information 217, SSL settings 220, Command configurations 221, Authentication caching 226
- Resolving deadlocks 227
- Working copy locks 227
- Berkeley DB 229
- Transaction logs 229, Old transactions 230
- Hooks 231
- Commit actions 232, Revision property actions 233, Scripts 234
- Summary 240
- Subversion utility clients 241
- The svnlook interface 242
- Transactions and revisions 242
- Getting change log information 243
- Getting the author 243, Finding the date of a revision 244, Viewing the log message 244, Getting all the change information 244, Finding the files that changed 245
- Getting information on properties 245
- Listing the properties 246, Getting the value of a property 247
- Finding out what changed 249
- Getting the differences between revisions 249, Viewing the entire contents of a file 250, Finding the directories that changed 251, Looking at the entire tree 251, Getting change information on a directory 252, Getting repository information
with svnlook 253
- Other Subversion programs 254
- The svnversion tool 254, The svndumpfilter interface 256
- Summary 262
- Third-party tools 263
- Importing a CVS repository 264
- Getting cvs2svn 264, Creating a Subversion dump from CVS 265, Changing the project root information 268, Converting directly into a Subversion repository 269
- Eclipse plug-in 271
- Getting Subclipse 271, Using Subclipse 272, Using the command line versus the plug-in 275
- Subversion browsing over Apache with a browser 275
- Configuration 276, Using WebSVN 278
- Windows graphical user interface 278
- Installing TortoiseSVN 278, Checking out a repository 280, Checking the status 281, Committing to the repository 282, Running other commands 282
- Summary 283
- Subversion in a development lifecycle 284
- Setting up your environment 285
- Ignored files 285, Using autoprops 285, Getting plug-ins and other tools 286
- Writing code 286
- Bug fixes 287, Patches 289
- Promoting code 292
- Properties 293, Tags 294, Automating code promotion 295
- Testing and Subversion 296
- Maintaining the testing environment 296, Locking down properties 297
- Summary 297
 
Appendix A: SSL certificates 299
Appendix B: Building Subversion 307
index 313