Version Control with Subversion for Subversion 1.7 (Compiled from R4825)
Total Page:16
File Type:pdf, Size:1020Kb
Version Control with Subversion For Subversion 1.7 (Compiled from r4825) Ben Collins-Sussman Brian W. Fitzpatrick C. Michael Pilato Version Control with Subversion: For Subversion 1.7: (Compiled from r4825) by Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Michael Pilato Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. Table of Contents Foreword .....................................................................................................................................................xii Preface .......................................................................................................................................................xiv What Is Subversion? ............................................................................................................................. xiv Is Subversion the Right Tool? ......................................................................................................... xiv Subversion's History ...................................................................................................................... xv Subversion's Architecture .............................................................................................................. xvi Subversion's Components ............................................................................................................ xviii What's New in Subversion ........................................................................................................... xviii Audience ............................................................................................................................................xix How to Read This Book ........................................................................................................................ xix Organization of This Book ...................................................................................................................... xx This Book Is Free .................................................................................................................................xxi Acknowledgments ............................................................................................................................... xxii 1. Fundamental Concepts ................................................................................................................................. 1 Version Control Basics ............................................................................................................................ 1 The Repository .............................................................................................................................. 1 The Working Copy ......................................................................................................................... 2 Versioning Models ......................................................................................................................... 2 Version Control the Subversion Way ......................................................................................................... 7 Subversion Repositories .................................................................................................................. 7 Revisions ...................................................................................................................................... 7 Addressing the Repository ............................................................................................................... 8 Subversion Working Copies ............................................................................................................. 9 Summary .............................................................................................................................................14 2. Basic Usage ..............................................................................................................................................15 Help! ..................................................................................................................................................15 Getting Data into Your Repository ........................................................................................................... 16 Importing Files and Directories ........................................................................................................ 16 Recommended Repository Layout .................................................................................................... 17 What's In a Name? ........................................................................................................................17 Creating a Working Copy ....................................................................................................................... 18 Basic Work Cycle .................................................................................................................................19 Update Your Working Copy ............................................................................................................ 20 Make Your Changes ...................................................................................................................... 20 Review Your Changes ................................................................................................................... 22 Fix Your Mistakes ......................................................................................................................... 25 Resolve Any Conflicts ................................................................................................................... 26 Commit Your Changes ................................................................................................................... 33 Examining History ................................................................................................................................ 34 Examining the Details of Historical Changes ...................................................................................... 34 Generating a List of Historical Changes ............................................................................................. 36 Browsing the Repository ................................................................................................................ 38 Fetching Older Repository Snapshots ................................................................................................ 40 Sometimes You Just Need to Clean Up ..................................................................................................... 41 Disposing of a Working Copy ......................................................................................................... 42 Recovering from an Interruption ...................................................................................................... 42 Dealing with Structural Conflicts ............................................................................................................. 42 An Example Tree Conflict .............................................................................................................. 43 Summary .............................................................................................................................................48 3. Advanced Topics .......................................................................................................................................49 Revision Specifiers ................................................................................................................................ 49 Revision Keywords ....................................................................................................................... 49 Revision Dates .............................................................................................................................50 iv Version Control with Subversion Peg and Operative Revisions ................................................................................................................... 51 Properties ............................................................................................................................................55 Why Properties? ........................................................................................................................... 56 Manipulating Properties ................................................................................................................. 57 Properties and the Subversion Workflow ........................................................................................... 60 Automatic Property Setting ............................................................................................................. 62 File Portability ......................................................................................................................................63 File Content Type ......................................................................................................................... 63 File Executability .........................................................................................................................