Tag Archive for 'HEAD'

Subversion Tip of the Week

Updating to a Particular Revision From the Command Line

When updating your working copy in Apache Subversion, you usually run the ‘SVN Update’ command and update to the HEAD revision. However, in some instances you may need to update your working copy to a particular revision – or even revert to a previous revision. This is achieved by running the ‘SVN Update’ command and specifying your target revision with the -r command:

svn update -r revision-number

You working copy will now be at the specified revision! In addition, there are several commands that you may find useful when targeting a particular, non-HEAD revision:

1) Find out which revision you’re currently at:

svn log -q -r BASE

2) Find out which revision is the HEAD:

svn log -q -r HEAD

3) See what’s changed between your working copy revision and HEAD:

svn log -r BASE:HEAD