O'Reilly logo

Version Control with Subversion, 2nd Edition by Brian W. Fitzpatrick, Ben Collins-Sussman, C. Michael Pilato

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

svnversion Examples

If the working copy is all at the same revision (e.g., immediately after an update), then that revision is printed out:

$ svnversion
4168

You can add TRAIL_URL to make sure the working copy is not switched from what you expect. Note that the WC_PATH is required in this command:

$ svnversion . /var/svn/trunk
4168

For a mixed-revision working copy, the range of revisions present is printed:

$ svnversion
4123:4168

If the working copy contains modifications, a trailing “M” is added:

$ svnversion
4168M

If the working copy is switched, a trailing “S” is added:

$ svnversion
4168S

Thus, here is a mixed-revision, switched working copy containing some local modifications:

$ svnversion
4212:4168MS

If invoked on a directory that is not a working copy, svnversion assumes it is an exported working copy and prints “exported”:

$ svnversion
exported

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required