
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
150
|
Chapter 7: Advanced Topics
svn:keywords
Subversion has the ability to substitute keywords—pieces of useful, dynamic infor-
mation about a versioned file—into the contents of the file itself. Keywords gener-
ally describe information about the last time the file was known to be modified.
Because this information changes each time the file changes, and more importantly,
just after the file changes, it is a hassle for any process except the version control sys-
tem to keep the data completely up-to-date. Left to human authors, the information
would inevitably grow stale.
Assume you have a document in which you would like to display the last date on
which it was modified. You could burden every author of that document to, just before
committing their changes, also tweak the part of the document that describes when it
was last changed. But, sooner or later, someone would forget to do that. Instead, sim-
ply ask Subversion to perform keyword substitution on the
LastChangedDate keyword.
You control where the keyword is inserted into your document by placing a keyword
anchor at the desired location in the file. This anchor is just a string of text formatted as
$KeywordName$.
Subversion defines the list of keywords available for substitution. That list contains
the following five keywords,