11.07.2015 Views

Version Control with Subversion - Login

Version Control with Subversion - Login

Version Control with Subversion - Login

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Fundamental ConceptsWorking CopiesYou've already read about working copies; now we'll demonstrate how the <strong>Subversion</strong> clientcreates and uses them.A <strong>Subversion</strong> working copy is an ordinary directory tree on your local system, containing acollection of files. You can edit these files however you wish, and if they're source codefiles, you can compile your program from them in the usual way. Your working copy is yourown private work area: <strong>Subversion</strong> will never incorporate other people's changes, normake your own changes available to others, until you explicitly tell it to do so. You caneven have multiple working copies of the same project.After you've made some changes to the files in your working copy and verified that theywork properly, <strong>Subversion</strong> provides you <strong>with</strong> commands to “publish” your changes to theother people working <strong>with</strong> you on your project (by writing to the repository). If other peoplepublish their own changes, <strong>Subversion</strong> provides you <strong>with</strong> commands to merge thosechanges into your working copy (by reading from the repository).A working copy also contains some extra files, created and maintained by <strong>Subversion</strong>, tohelp it carry out these commands. In particular, each directory in your working copy containsa subdirectory named .svn, also known as the working copy's administrative directory.The files in each administrative directory help <strong>Subversion</strong> recognize which files containunpublished changes, and which files are out of date <strong>with</strong> respect to others' work.A typical <strong>Subversion</strong> 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.For example, suppose you have a repository that contains two software projects, paintand calc. Each project lives in its own top-level subdirectory, as shown in Figure 1.6, “Therepository's filesystem”.Figure 1.6. The repository's filesystem9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!