Chapter 2. Basic Concepts

Table of Contents

The Depot
Versioning Models
The Problem of File-Sharing
The Lock-Modify-Unlock Solution
The Copy-Modify-Merge Solution
SVK in Action
Working Copies
How Working Copies Track the Depot
Mixed Revision Working Copies
Updates and Commits are Separate
Mixed revisions are normal
Mixed revisions are useful
Mixed revisions have limitations

This chapter is a short, casual introduction to SVK. If you're new to version control, this chapter is definitely for you. We begin with a discussion of general version control concepts, work our way into the specific ideas behind SVK, and show some simple examples of SVK in use.

Even though the examples in this chapter show people sharing collections of program source code, keep in mind that SVK can manage any sort of file collection—it's not limited to helping computer programmers.

The Depot

SVK is a system for tracking history. At its core is a depot[2], which is a central store of data. The depot stores information in the form of a filesystem tree—a typical hierarchy of files and directories.

So why is this interesting? So far, this sounds like the definition of a typical file system. And indeed, the depot is a kind of file system but it's not your usual breed. What makes the SVK depot special is that it remembers every change ever written to it: every change to every file, and even changes to the directory tree itself, such as the addition, deletion, and rearrangement of files and directories.

When SVK reads data from the depot, it normally sees only the latest version of the filesystem tree. But it also has the ability to view previous states of the filesystem. For example, you can ask SVK historical questions like, “What did this directory contain last Wednesday?” or “Who was the last person to change this file, and what changes did they make?” These are the sorts of questions that are at the heart of any version control system: systems that are designed to record and track changes to data over time.

[2] Technically you can have more than one depot, but well talk about that later.