The Subversion client understands a number of revision
keywords. These keywords can be used instead of integer arguments
option and are resolved into specific revision numbers by
The latest (or “youngest”) revision in the repository.
The revision number of an item in a working copy. If the item has been locally modified, this refers to the way the item appears without those local modifications.
The most recent revision prior to, or equal to,
BASE, in which an item changed.
The revision immediately before the
last revision in which an item changed. Technically, this boils
As can be derived from their descriptions, the
COMMITTED revision keywords are
used only when referring to a working copy path—they don’t apply to
HEAD, on the other
hand, can be used in conjunction with both of these path types.
Here are some examples of revision keywords in action:
$ svn diff -r PREV:COMMITTED foo.c # shows the last change committed to foo.c $ svn log -r HEAD # shows log message for the latest repository commit $ svn diff -r HEAD # compares your working copy (with all of its local changes) to the # latest version of that tree in the repository $ svn diff -r BASE:HEAD foo.c # compares the unmodified version of foo.c with the latest version of # foo.c in the repository $ svn log -r BASE:HEAD # shows all commit logs for the current versioned directory since you # last updated ...