Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Version Control with Subversion
Prev Home Next


Version Control with Subversion - svnversion

Name

svnversion — Summarize the local revision(s) of a working copy.

Synopsis

svnversion [OPTIONS] WC_PATH [TRAIL_URL]

Description

svnversion is a program for summarizing the revision mixture of a working copy. The resultant revision number, or revision range, is written to standard output.

TRAIL_URL , if present, is the trailing portion of the URL used to determine if WC_PATH itself is switched (detection of switches within WC_PATH does not rely on TRAIL_URL ).

Switches

Like svnserve , svnversion has no subcommands, it only has switches.

--no-newline (-n)

Omit the usual trailing newline from the output.

--committed (-c)

Use the last-changed revisions rather than the current (i.e., highest locally available) revisions.

--help (-h)

Print a help summary.

--version

Print the version of svnversion and exit with no error.

Examples

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

$ svnversion .
4168

You can add TRAIL_URL to show that the working copy is not switched from what you expect:

$ svnversion . /repos/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

[an error occurred while processing this directive]
Version Control with Subversion
Prev Home Next

 
 
  Published under the terms of the Creative Commons License Design by Interspire