Revisions: Numbers, Keywords, and Dates, Oh My!
Before we go on, you should know a bit about how to identify
a particular revision in your repository. As you learned in
the section called “Revisions”, a revision is a
“snapshot” of the repository at a particular moment
in time. As you continue to commit and grow your repository,
you need a mechanism for identifying these snapshots.
You specify these revisions by using the
--revision
(-r
) switch plus
the revision you want (
svn --revision REV
) or
you can specify a range by separating two revisions with a colon
(
svn --revision REV1:REV2
). And Subversion
lets you refer to these revisions by number, keyword, or
date.
When you create a new Subversion repository, it begins its
life at revision zero and each successive commit increases the
revision number by one. After your commit completes, the
Subversion client informs you of the new revision
number:
$ svn commit --message "Corrected number of cheese slices."
Sending sandwich.txt
Transmitting file data .
Committed revision 3.
If at any point in the future you want to refer to that
revision (we'll see how and why we might want to do that later
in this chapter), you can refer to it as
“3”.
[an error occurred while processing this directive]