Importing Files and Directories
Total Page:16
File Type:pdf, Size:1020Kb
Version Control with Subversion For Subversion 1.7 (Compiled from r4288) Ben Collins-Sussman Brian W. Fitzpatrick C. Michael Pilato Version Control with Subversion: For Subversion 1.7: (Compiled from r4288) 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 ............................................................................................................... xv Subversion's Components ............................................................................................................. xvii What's New in Subversion ............................................................................................................ xvii Audience .......................................................................................................................................... xviii How to Read This Book ...................................................................................................................... xviii Organization of This Book ..................................................................................................................... xix This Book Is Free ..................................................................................................................................xx Acknowledgments ................................................................................................................................ xxi 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 ................................................................................................ 39 Sometimes You Just Need to Clean Up ..................................................................................................... 40 Disposing of a Working Copy ......................................................................................................... 40 Recovering from an Interruption ...................................................................................................... 40 Dealing with Structural Conflicts ............................................................................................................. 41 An Example Tree Conflict .............................................................................................................. 41 Summary .............................................................................................................................................46 3. Advanced Topics .......................................................................................................................................47 Revision Specifiers ................................................................................................................................ 47 Revision Keywords ....................................................................................................................... 47 Revision Dates .............................................................................................................................48 iv Version Control with Subversion Peg and Operative Revisions ................................................................................................................... 49 Properties ............................................................................................................................................53 Why Properties? ........................................................................................................................... 54 Manipulating Properties ................................................................................................................. 55 Properties and the Subversion Workflow ........................................................................................... 58 Automatic Property Setting ............................................................................................................. 60 File Portability ......................................................................................................................................61 File Content Type ......................................................................................................................... 61 File Executability .........................................................................................................................