Defining a working copy

A Subversion working copy is an ordinary directory tree on your local system, containing a collection of files. You can edit these files however you wish, your working copy being your private work area. In order to make your own changes available to others or incorporate other people's changes, you must explicitly tell Subversion to do so. You can even have multiple working copies of the same project.

 

Figure 13.6. Working Copy View

Working Copy View

A Subversion working copy also contains some extra files, created and maintained by Subversion, to help it keep track of your files. In particular, each directory in your working copy contains a subdirectory named .svn, also known as the working copy administrative directory. This administrative directory contains an unaltered copy of the last updated files from the repository. This copy is usually referred to as the pristine copy or the BASE revision of the working copy. These files help Subversion recognize which files contain unpublished changes, and which files are out-of-date with respect to others' work.

A typical Subversion repository often holds the files (or source code) for several projects; usually, each project is a subdirectory in the repository's filesystem tree. In this arrangement, a user's working copy will usually correspond to a particular subtree of the repository.

 Check out a working copy

Check out is the term used to describe the process of making a copy of a project from a repository into your local filesystem. This checked out copy is called a working copy. A Subversion working copy is a specially formatted folder structure which contains additional .svn folders that store Subversion information, as well as a pristine copy of each item that is checked out.

You check out a working copy from the Repository View. If you have not yet defined a connection to your repository, you will need to add a new repository location.

To check out a new working copy, navigate inside the repository to the desired directory, right click on it and select Check Out... from the popup menu.

In the Check out dialog click on the Browse button and choose the location where the working copy will be checked out.

 

Figure 13.7. Check out dialog

Check out dialog

By default the last (HEAD) revision will be checked out. If you need another revision you can select the Revision radio button and then click on the History button and choose a desired revision from the new dialog. Or you can simply type the revision number in the corresponding text field.

 

Figure 13.8. History dialog

History dialog

The History dialog presents a list of revisions for a resource. There are presented information about revision, commit date, author and commit comment. The number of entries in the list is limited by default to 50. This can be adjusted in application's options page. The Affected Paths area displays all paths affected by the commit of that revision.

After a check out, the new working copy will be added to the list in the Working Copy view and its content will be displayed in that view.