
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Revisions: Numbers, Keywords, and Dates, Oh My!
|
23
Revisions: Numbers, Keywords, and Dates,
Oh My!
Before we continue, you should know a bit about how to identify a particular revi-
sion in your repository. As you learned in “Revisions” in Chapter 2,” a revision is a
snapshot of the repository at a particular moment in time. As you continue to com-
mit 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). Subversion lets you refer to these revisions
by number, keyword, or date.
Revision Numbers
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 show how and
why you might want to do that later in this chapter), you can refer to it as 3.
Revision Keywords
The Subversion client understands ...