Subversion Version Control: Using the Subversion Version Control System in Development Projects

Overview

In any software development project, many developers contribute changes over a period of time. Using a version control system to track and manage these changes is vital to the continued success of the project. This book introduces you to Subversion, a free, open-source version control system, which is both more powerful and much less complex than its predecessor CVS.

In this practical, hands-on guide, you will learn how to use Subversion and how to effectively merge a version ...

See more details below
Other sellers (Paperback)
  • All (15) from $1.99   
  • New (1) from $60.00   
  • Used (14) from $1.99   
Sending request ...

Overview

In any software development project, many developers contribute changes over a period of time. Using a version control system to track and manage these changes is vital to the continued success of the project. This book introduces you to Subversion, a free, open-source version control system, which is both more powerful and much less complex than its predecessor CVS.

In this practical, hands-on guide, you will learn how to use Subversion and how to effectively merge a version control system within your development process. As a seasoned Subversion user, William Nagel draws on lessons learned through trial and error, providing useful tips for accomplishing tasks that arise in day-to-day software development. Nagel clearly explains how to expand on the built-in abilities of Subversion, making the system work better for you. He organizes Subversion commands by activity to allow for quick task reference. Using example scripts and configurations, he also includes development approaches that you can customize to fit your own environment.

Inside, you will find

  • A guide to installing Subversion on Linux, Windows, and Mac OS X.
  • A tutorial walkthrough of Subversion, from creating your first repository to basic branching and merging.
  • A detailed look at the most important Subversion client commands, as well as properties, user configuration, and integration with a variety of external tools.
  • A guide to repository administration and organization, including repository security and migration from another version control system.
  • An in-depth look at automation in Subversion, including using hook scripts, metadata, and the Subversion API, plus example scripts.
  • Case studies that examine both archetypal and real-world projects and their use of Subversion.
  • A Subversion command reference for fast access to essential technical information.
  • Details on Subversion's many advanced features, such as its Apache-integrated WebDAV server and database file storage system.

Whether you are an administrator, project manager, or software developer, Subversion Version Control will show you how to realize the full potential of Subversion.

Read More Show Less

Product Details

  • ISBN-13: 9780131855182
  • Publisher: Prentice Hall
  • Publication date: 5/16/2005
  • Series: Bruce Perens' Open Source Series
  • Pages: 368
  • Product dimensions: 7.02 (w) x 9.16 (h) x 0.95 (d)

Meet the Author

William Nagel is the chief software engineer for Stage Logic, LLC, a small technology development company, where he splits his time between designing real-time middleware systems and seeking new ways to improve and streamline Stage Logic's development process. After suffering one too many frustrations with CVS, he spearheaded the company's early adoption of Subversion.

Read More Show Less

Read an Excerpt

I was first introduced to version control (and CVS) in college, about the same time I was introduced to Linux. At that time though, most of the projects I worked on were small and generally involved only a couple of developers. So, although version control would have been useful, I never took the time to really use it; my knowledge of CVS remained limited to what little I needed to know to check out the occasional bleeding-edge project on Linux (which seemed necessary a little more often in those days). As my college career progressed, the projects I worked on became more involved, and I began to learn about "software engineering." The instruction I received on software engineering never really covered version control in any depth though, and despite the increased size of the software projects I was working on, I never delved into using a version control system to keep track of things. I wanted to; I thought CVS was a neat idea. I just never invested the timenecessary to learn how to set it up and use it. Then came my first major team project. It was a real-world project, with real-world clients, and its completion was required for graduation. Finally, I had an excuse to really give version control a try. I presented the case for CVS to my teammates and (although there was some small resistance) convinced them that we needed to use it. It was a success. By the end of the project, I was fully sold on the necessity of version control in any future projects, however big or small. I loved CVS.

After school came the real world, and the love affair with CVS didn't last long. As I learned (mostly through trial and error) how version control systems should be used, CVS steadily becamemore and more inadequate. I could see its potential, but it didn't measure up. Code was lost, fits were thrown, and hair was pulled. Still, CVS was the best free, open source version control system out there, and as an entrepreneur trying to keep a start-up company going, free was a required feature. Then someone told me about a new versioncontrol project called Subversion, so I went to its site and took a look. It seemed intriguing, but it wasn't quite up to the point where I could trust it for my code—and I barely had time to eat back then, so getting involved in the project's development was out of the question. Instead, Subversion went on my back burner and I moved on to other things.

Several months down the road, I saw that Subversion had become self-hosting. "Well," I thought, "If they trust it with their own code, maybe it's time to take another look." Rolling up my sleeves, I sat down to play around with it. Once again, I had fallen in love. Subversion was everything CVS could have been. It was stable, it was flexible, and it didn't eat my code. Thus, after a suitable period of testing, CVS was unceremoniously chucked and replaced by Subversion. I've never regretted the change. In fact, the only thing regrettable is the hours of my life wasted fighting with CVS.Writing the Book

When I was first approached about writing a book on Subversion, my first thought was, "Why?" There's already an excellent Subversion manual, written by several of the principle Subversion authors (who presumably know more about Subversion's inner workings than I do), and it's freely available at that. So, I almost turned down the opportunity to write this book because I couldn't imagine why anyone would want to read it. What could I possibly add that wasn't already written? Then I got to thinking back to my college days, when I learned version control through trial and error (mostly error). I had the manual to CVS, but it covered how to use CVS, not how to use version control. It was a good manual, it just wasn't complete. The Subversion manual is similar; although it is far, far better than the documentation available for CVS, it's still primarily a technical manual. As a technical manual, it is excellent. As a guide to realizing Subversion's full potential in relation to your software development project, it isn't complete. Therefore, I've written this book to be theguide I never had when I was learning how to use version control.

Of course, this book aims to cover the nuts and bolts of Subversion as completely as possible—you can't very well use Subversion to develop software if you can't use Subversion—but it does so in the context of how to do the things you want to do in dayto-day software development. The book also goes a step further: It explains how to expand on the built-in capabilities of Subversion to make the system work for you. In some places, that takes the form of example scripts or configurations. In others, it is merely ideas that you can expand to fit your software development process. This is not a book to sell a process. I do make suggestions here and there of what I think will work in certain situations, but you don't need to buy into my "exhalted process" to get the most from this book. Instead of showing you how you should develop your software, I show you how Subversion can make your process easier.The Layout of the Book

The book is split into five sections, each covering Subversion from a different perspective. Part I: An Introduction to Version Control and Subversion

This first part looks at Subversion from the beginner's perspective. It explains what version control is, why it is useful, and how Subversion fits into the version control world. It shows you how to install and set up Subversion, and it walks you through Subversion's essential features.

Chapter 1 An introduction to the essential concepts that make up a version control system.

Chapter 2 An introduction to Subversion's features and how they compare to some other common version control systems.

Chapter 3 A basic guide to installing Subversion on Linux, Windows, and Mac OS X.

Chapter 4 A tutorial walkthrough of Subversion, from creating your first repository to basic branching and merging.Part II: Subversion from a Client User's Perspective

The second part of the book examines Subversion from the perspective of the client user. It takes a detailed look at using the most important Subversion client commands, as well as properties, user configuration, and integration with a variety of external tools.

Chapter 5 Walk through a Subversion working copy and the commands used to interact with it. Most of the common Subversion client commands are covered in this chapter.

Chapter 6 How to use the Subversion tools to work with properties attached to versioned files.

Chapter 7 A look at Subversion client configuration and customization for an individual work environment.

Chapter 8 An overview of many of the client tools that Subversion can integrate and interact with.Part III: Subversion from an Administrator's Perspective

This is a look at Subversion from the admin's perspective. In this section, I talk about repository administration and organization. I show how to use automation to help integrate Subversion into your development process, and I examine the nuts and bolts of such things as repository security and migration from another version control system.

Chapter 9 Tips on repository organization, as well as how to migrate an old repository to Subversion with minimal loss of history and metadata.

Chapter 10 Basic repository administration: security, backup, and repository maintenance.

Chapter 11 An in-depth look at automation in Subversion, using hook scripts, metadata, and the Subversion API. Includes a number of example scripts that you can use in your project.Part IV: The Software Development Process

This part takes a look at Subversion from the project manager's perspective. It looks at the software development process and how Subversion can fit into a variety of different types of projects, with many different policies and philosophies.

Chapter 12 An overview of different policies adopted by many development projects and how Subversion can be used to complement those policies.

Chapter 13 An examination of the software development process and how Subversion can be integrated into that process.

Chapter 14 Case studies that examine both archetypal and real-world projects and their use of Subversion.Part V: Reference

The final section is a Subversion command reference. When you need to look up something quickly, it can be difficult to sift through paragraphs of expositional language. This section takes the essential technical information from the Subversion commands and makes it easy to find quickly.

Read More Show Less

Table of 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.3 The Elements of Version Control 7

1.4 Summary 12

Chapter 2: An Introduction to Subversion 15

2.1 Why Subversion? 15

2.2 Limitations of Subversion 21

2.3 Summary 23

Chapter 3: Installing Subversion 25

3.1 Installing on Linux 25

3.2 Installing on Mac OS X 29

3.3 Installing on Windows 30

3.4 Configuring SVN to Use Apache 31

3.5 Configuring to Use Svnserve 34

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

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.2 Checking Out and Maintaining a Working Copy 57

5.3 Modifying and Committing Data 61

5.4 Getting Information about the Repository 67

5.5 Changing the Working Copy Target 76

5.6 Resolving Conflicts 76

5.7 Branching, Tagging, and Merging 78

5.8 Troubleshooting the Working Copy 82

5.9 Summary 83

Chapter 6: Using Properties 85

6.1 Storing Metadata 85

6.2 Retrieving Metadata 87

6.3 Built-in Properties 90

6.4 Summary 96

Chapter 7: Configuring the Client 97

7.1 Finding the Configuration Files 97

7.2 Editing the Configuration Files 97

7.3 Summary 104

Chapter 8: Integrating with Other Tools 105

8.1 Accessing SVN through a GUI Client 105

8.2 Accessing Directly from an IDE 111

8.3 Using Autoversioning with WebDAV 114

8.4 Summary 116

Part III: Subversion from an Administrator's Perspective 117

Chapter 9: Organizing Your Repository 119

9.1 Laying Out the Repository 119

9.2 Planning for Growth 126

9.3 Migrating an Existing Repository 129

9.4 Summary 136

Chapter 10: Administrating the Repository 137

10.1 Controlling Access to the Repository 137

10.2 Backing Up the Repository 149

10.3 Unwedging Your Repository 154

10.4 Upgrading Subversion 156

10.5 Summary 156

Chapter 11: The Joy of Automation 159

11.1 An Introduction to Hooks 160

11.2 Making the Most of Hook Scripts 167

11.3 Taking Advantage of Metadata 191

11.4 The Subversion API 198

11.5 Summary 206

Part IV: The Software Development Process 207

Chapter 12: Development Process Policies 209

12.1 Effective Branching and Tagging 209

12.2 Checking In Code 217

12.3 Log Data 219

12.4 Project Builds 223

12.5 Testing and Quality Assurance 227

12.6 Communication 230

12.7 Enforcing Policies 232

12.8 Summary 233

Chapter 13: Integrating SVN with the Development Process 235

13.1 SVN in Different Developers' Workflows 235

13.2 Using SVN in Peer Reviews 240

13.3 Tying Revisions to Issue Tracking 246

13.4 Summary 249

Chapter 14: Case Studies in Development Processes 251

14.1 Archetypal Studies 251

14.2 Real-world Studies 260

Part V: Reference 271

Chapter 15: Command Reference 273

15.1 svn 273

15.2 svnadmin 308

15.3 svnlook 314

15.4 svnversion 320

15.5 svndumpfilter 321

Index 325

Read More Show Less

Preface

I was first introduced to version control (and CVS) in college, about the same time I was introduced to Linux. At that time though, most of the projects I worked on were small and generally involved only a couple of developers. So, although version control would have been useful, I never took the time to really use it; my knowledge of CVS remained limited to what little I needed to know to check out the occasional bleeding-edge project on Linux (which seemed necessary a little more often in those days). As my college career progressed, the projects I worked on became more involved, and I began to learn about "software engineering." The instruction I received on software engineering never really covered version control in any depth though, and despite the increased size of the software projects I was working on, I never delved into using a version control system to keep track of things. I wanted to; I thought CVS was a neat idea. I just never invested the timenecessary to learn how to set it up and use it. Then came my first major team project. It was a real-world project, with real-world clients, and its completion was required for graduation. Finally, I had an excuse to really give version control a try. I presented the case for CVS to my teammates and (although there was some small resistance) convinced them that we needed to use it. It was a success. By the end of the project, I was fully sold on the necessity of version control in any future projects, however big or small. I loved CVS.

After school came the real world, and the love affair with CVS didn't last long. As I learned (mostly through trial and error) how version control systems should be used, CVS steadily became more and more inadequate. I could see its potential, but it didn't measure up. Code was lost, fits were thrown, and hair was pulled. Still, CVS was the best free, open source version control system out there, and as an entrepreneur trying to keep a start-up company going, free was a required feature. Then someone told me about a new versioncontrol project called Subversion, so I went to its site and took a look. It seemed intriguing, but it wasn't quite up to the point where I could trust it for my code--and I barely had time to eat back then, so getting involved in the project's development was out of the question. Instead, Subversion went on my back burner and I moved on to other things.

Several months down the road, I saw that Subversion had become self-hosting. "Well," I thought, "If they trust it with their own code, maybe it's time to take another look." Rolling up my sleeves, I sat down to play around with it. Once again, I had fallen in love. Subversion was everything CVS could have been. It was stable, it was flexible, and it didn't eat my code. Thus, after a suitable period of testing, CVS was unceremoniously chucked and replaced by Subversion. I've never regretted the change. In fact, the only thing regrettable is the hours of my life wasted fighting with CVS.

Writing the Book

When I was first approached about writing a book on Subversion, my first thought was, "Why?" There's already an excellent Subversion manual, written by several of the principle Subversion authors (who presumably know more about Subversion's inner workings than I do), and it's freely available at that. So, I almost turned down the opportunity to write this book because I couldn't imagine why anyone would want to read it. What could I possibly add that wasn't already written? Then I got to thinking back to my college days, when I learned version control through trial and error (mostly error). I had the manual to CVS, but it covered how to use CVS, not how to use version control. It was a good manual, it just wasn't complete. The Subversion manual is similar; although it is far, far better than the documentation available for CVS, it's still primarily a technical manual. As a technical manual, it is excellent. As a guide to realizing Subversion's full potential in relation to your software development project, it isn't complete. Therefore, I've written this book to be theguide I never had when I was learning how to use version control.

Of course, this book aims to cover the nuts and bolts of Subversion as completely as possible--you can't very well use Subversion to develop software if you can't use Subversion--but it does so in the context of how to do the things you want to do in dayto-day software development. The book also goes a step further: It explains how to expand on the built-in capabilities of Subversion to make the system work for you. In some places, that takes the form of example scripts or configurations. In others, it is merely ideas that you can expand to fit your software development process. This is not a book to sell a process. I do make suggestions here and there of what I think will work in certain situations, but you don't need to buy into my "exhalted process" to get the most from this book. Instead of showing you how you should develop your software, I show you how Subversion can make your process easier.

The Layout of the Book

The book is split into five sections, each covering Subversion from a different perspective.

Part I: An Introduction to Version Control and Subversion

This first part looks at Subversion from the beginner's perspective. It explains what version control is, why it is useful, and how Subversion fits into the version control world. It shows you how to install and set up Subversion, and it walks you through Subversion's essential features.

Chapter 1 An introduction to the essential concepts that make up a version control system.

Chapter 2 An introduction to Subversion's features and how they compare to some other common version control systems.

Chapter 3 A basic guide to installing Subversion on Linux, Windows, and Mac OS X.

Chapter 4 A tutorial walkthrough of Subversion, from creating your first repository to basic branching and merging.

Part II: Subversion from a Client User's Perspective

The second part of the book examines Subversion from the perspective of the client user. It takes a detailed look at using the most important Subversion client commands, as well as properties, user configuration, and integration with a variety of external tools.

Chapter 5 Walk through a Subversion working copy and the commands used to interact with it. Most of the common Subversion client commands are covered in this chapter.

Chapter 6 How to use the Subversion tools to work with properties attached to versioned files.

Chapter 7 A look at Subversion client configuration and customization for an individual work environment.

Chapter 8 An overview of many of the client tools that Subversion can integrate and interact with.

Part III: Subversion from an Administrator's Perspective

This is a look at Subversion from the admin's perspective. In this section, I talk about repository administration and organization. I show how to use automation to help integrate Subversion into your development process, and I examine the nuts and bolts of such things as repository security and migration from another version control system.

Chapter 9 Tips on repository organization, as well as how to migrate an old repository to Subversion with minimal loss of history and metadata.

Chapter 10 Basic repository administration: security, backup, and repository maintenance.

Chapter 11 An in-depth look at automation in Subversion, using hook scripts, metadata, and the Subversion API. Includes a number of example scripts that you can use in your project.

Part IV: The Software Development Process

This part takes a look at Subversion from the project manager's perspective. It looks at the software development process and how Subversion can fit into a variety of different types of projects, with many different policies and philosophies.

Chapter 12 An overview of different policies adopted by many development projects and how Subversion can be used to complement those policies.

Chapter 13 An examination of the software development process and how Subversion can be integrated into that process.

Chapter 14 Case studies that examine both archetypal and real-world projects and their use of Subversion.

Part V: Reference

The final section is a Subversion command reference. When you need to look up something quickly, it can be difficult to sift through paragraphs of expositional language. This section takes the essential technical information from the Subversion commands and makes it easy to find quickly.

0131855182P04212005

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 2 Customer Reviews
  • Posted March 30, 2009

    Convinced me to use GIT

    Used Subversion for some time now. If you are a yellow-dog Subversion fan, than this book is good enough to do everything you need. Frankly, I find merging with Subversion to be a pain - I usually do it outside of my IDE using multiple updated workspaces (i.e. Eclipse) and Winmerge.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted June 12, 2005

    directories now on a par with files

    It's a pity that Nagel did not take a slight stroll on the wild side and call his book simply 'Subversion Control'. The actual title is logically correct but sounds redundant. Like the misbegotten phrase 'The Los Angeles Angels'. But if he'd chosen the shortened version, it would sound like a Homeland Security brochure. Subversion is offered as a big improvement over the dominant CVS. The book describes a deliberately similar command line approach. With the same syntax for Subversion commands that map to corresponding CVS commands. Perhaps the single biggest improvement is the better handling of directories. You can now version these just as you would files. This may be very apropos if you have a complex project. Where directories can encode high level structural decisions that may be as important as any subset of actual code.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 2 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)