SVN Glossary: Difference between revisions
No edit summary |
No edit summary |
||
Line 26: | Line 26: | ||
The HEAD revision is a synonym for the most recent revision (= the revision carrying the highest number). | The HEAD revision is a synonym for the most recent revision (= the revision carrying the highest number). | ||
{{ | {{tutorial-SVN}} |
Revision as of 10:32, 26 November 2007
The SVN terminology can be confusing at times, this is a (probably incomplete) list of terms explained:
Repository
The SVN repository is the "master container" containing all the files of a project, including all their history and other branches. An SVN Server can contain multiple repositories (e.g. our DarkMod SVN server holds the repositories darkmod, darkmod_src, texture_src, etc.). For downloading a repository, see Checkout.
Checkout
Downloading a copy of a SVN Repository to a location on your hard disk is called a checkout. A checkout is the initial download of a working copy, not to be confused with an Update. You checkout a working copy once, but you can update it multiple times.
Update
Updating a local copy means synchronising it with the server. Choosing update will download all changes since the last time you updated your copy (files added by other users, text changes made to files, file deletions). The process will update your working copy to the HEAD revision by default, but you can manually choose to update to a certain revision if you wish.
Commit
Just changing your local files isn't enough to "store" them in the server, you have to commit them. You need write access to the repository to be able to commit stuff. It is perfectly thinkable that the files you're about to commit have already been altered by another user. In the case of text/ascii files, the SVN Server tries to merge your changes into the files. If it fails (or if the files are not in text format (binary), the merge will fail and you run into a conflict.
Note: Committing files does not update your local copy, you'll have to do that manually.
Revision
Each time somebody performs a commit, the revision number of the repository is increased by one. It doesn't matter how many files you commit, or if the changes are minor, or if a file gets added or deleted - no matter what you commit, the revision number is always increased. The most recent revision is called the HEAD revision.
The advantage of having revisions is that you can go back to a specific point in the SVN history by specifying the revision number. For code changes this is especially useful: a bug in the software might be discovered now, but it may have been introduced long ago. By stepping back the revisions you can (more or less easily) find out when exactly the bug was introduced, which lines of code have been changed (see Diff) and by whom (see also Blame).
The revision system affects all files, also binary files like textures and Lightwave models, for instance.
For browsing the revisions, see also History, Repository Browser and Update.
HEAD
The HEAD revision is a synonym for the most recent revision (= the revision carrying the highest number).