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.

Advanced Topicsjust like running svn SUBCOMMAND file1 file2 file3 …. In the case ofthe svn add command, this has an effect similar to passing the --no-ignoreoption. So instead of using a wildcard, use svn add --force . to do a bulkscheduling of unversioned things for addition. The explicit target will ensurethat the current directory isn't overlooked because of being already under versioncontrol, and the --force option will cause <strong>Subversion</strong> to crawl throughthat directory, adding unversioned files while still honoring the svn:ignoreproperty and global-ignores runtime configuration variable. Be sure to alsoprovide the --depth files option to the svn add command if you don'twant a fully recursive crawl for things to add.Keyword Substitution<strong>Subversion</strong> has the ability to substitute keywords—pieces of useful, dynamic informationabout a versioned file—into the contents of the file itself. Keywords generally provide informationabout the last modification made to the file. Because this information changeseach time the file changes, and more importantly, just after the file changes, it is a hasslefor any process except the version control system to keep the data completely up to date.Left to human authors, the information would inevitably grow stale.For example, say you have a document in which you would like to display the last date onwhich it was modified. You could burden every author of that document to, just before committingtheir changes, also tweak the part of the document that describes when it was lastchanged. But sooner or later, someone would forget to do that. Instead, simply ask <strong>Subversion</strong>to perform keyword substitution on the LastChangedDate keyword. You controlwhere the keyword is inserted into your document by placing a keyword anchor at the desiredlocation in the file. This anchor is just a string of text formatted as $KeywordName$.All keywords are case-sensitive where they appear as anchors in files: you must use thecorrect capitalization for the keyword to be expanded. You should consider the value of thesvn:keywords property to be case-sensitive, too—certain keyword names will be recognizedregardless of case, but this behavior is deprecated.<strong>Subversion</strong> defines the list of keywords available for substitution. That list contains the followingfive keywords, some of which have aliases that you can also use:DateThis keyword describes the last time the file was known to have been changed in therepository, and is of the form $Date: 2006-07-22 21:42:37 -0700 (Sat, 22Jul 2006) $. It may also be specified as LastChangedDate. Unlike the Idkeyword, which uses UTC, the Date keyword displays dates using the local time zone.RevisionThis keyword describes the last known revision in which this file changed in the repository,and looks something like $Revision: 144 $. It may also be specified asLastChangedRevision or Rev.AuthorThis keyword describes the last known user to change this file in the repository, andlooks something like $Author: harry $. It may also be specified as Last-ChangedBy.HeadURLThis keyword describes the full URL to the latest version of the file in the repository,and looks something like $HeadURL: http://svn.collab.net/repos/trunk/README$. It may be abbreviated as URL.IdThis keyword is a compressed combination of the other keywords. Its substitution looks56

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

Saved successfully!

Ooh no, something went wrong!