11.07.2015 Views

Version Control with Subversion - Login

Version Control with Subversion - Login

Version Control with Subversion - Login

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Subversion</strong> Complete ReferenceNamesvnversion — Summarize the local revision(s) of a working copy.Synopsissvnversion [OPTIONS] [WC_PATH [TRAIL_URL]]DescriptionOptionssvnversion is a program for summarizing the revision mixture of a working copy. The resultantrevision number, or revision range, is written to standard output.It's common to use this output in your build process when defining the version number ofyour program.TRAIL_URL, if present, is the trailing portion of the URL used to determine whetherWC_PATH itself is switched (detection of switches <strong>with</strong>in WC_PATH does not rely onTRAIL_URL).When WC_PATH is not defined, the current directory will be used as the working copy path.TRAIL_URL cannot be defined if WC_PATH is not explicitly given.Like svnserve, svnversion has no subcommands—only options:--no-newline (-n)Omits the usual trailing newline from the output.--committed (-c)Uses the last-changed revisions rather than the current (i.e., highest locally available)revisions.--help (-h)Prints a help summary.--versionPrints the version of svnversion and exit <strong>with</strong> no error.ExamplesIf the working copy is all at the same revision (e.g., immediately after an update), then thatrevision is printed out:$ svnversion4168You 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/trunk4168For a mixed-revision working copy, the range of revisions present is printed:344

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

Saved successfully!

Ooh no, something went wrong!