OnWorks favicon

autorevision - Online in the Cloud

Run autorevision in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command autorevision that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



autorevision - extract current-revision metadata from version-control repositories


autorevision {-t <output-type> | -s <symbol>} [-o <cache-file> [-f]] [-U] [-V]


Extracts metadata about the head revision from your repository.

This program is meant to be used by project build systems to extract properties that can
be used in software version strings. It can emit source files containing variable and
macro definitions suitable for use with C, C++, Java, sh, Python, Perl, Mac info.plist and
other types of files (see below for the full list).

The generated source is written to standard output.

This program can normally be called from anywhere within a repository copy. Under bzr the
copy must be of a branch, not a full multibranch repository. Under Subversion it must be
called under a repository checkout, not the repository itself.

If you specify a cache file, then when autorevision is run where no repository can be
recognized, the values from the cache file will be used instead. If a repository can be
recognized, the cache is rewritten. This feature makes it possible for your build to run
from an unpacked tarball that includes the cache file.

Valid Repository Types
Git: A version greater than is recommended.

Mercurial: A version greater than 1.6 is recommended.

Subversion: Any production version.

Bazaar: Any production version.

Valid Output Types
A clojure source file setting clojure variables.

A header file suitable for C/C++.

Alternate C++ header file with namespace. Namespace is assigned from VCS_BASENAME.

A ini source file setting ini variables.

A Java source file setting class properties.

A Java properties file (like ini); useful when META-INF is readable in Java.

A javascript source file setting javascript variables.

A JSON format file.

A lua source file setting lua variables.

An m4 source file defining m4 macros.

Matlab output.

Octave output.

A PHP source file setting PHP variables.

A Perl source file setting Perl variables (perl is an acceptable synonym).

A Python source file setting Python variables (python is an acceptable synonym).

A RPM spec file format setting spec file macros.

A scheme source file setting scheme variables.

A text file suitable for including from a bash script. Will work with Ruby.

A Swift source file setting Swift global constants.

Unless set VCS_EXTRA and any symbols that are are missing because of repository
support are set to nil.

A TeX source file defining TeX macros. Note that the symbols are given different names
since the underscore has a special meaning in TeX. For example, VCS_SHORT_HASH is
renamed to \vcsShortHash.

A header like output for use with xcode to populate info.plist strings.

Valid Symbol Names
The repository type - "git", "hg", "bzr", or "svn".

The basename of the directory root. For most VCSes this will simply be the basename of
the repository root directory. For Subversion, autorevision will navigate up though
trunk, branches, and tags directories to find the actual root.

A count of revisions between the current one and the initial one; useful for reporting
build numbers.

A universally unique identifier, generated from the root commit in git and hg; for svn
it uses the supplied UUID.

For git we choose the oldest commit if there is more than one.

Not currently implemented for bzr.

The date of the most recent commit in true ISO-8601/RFC3339 format, including seconds.

The name of the branch of the commit graph that was selected when autoversion was run.

Under git, this will normally be the shortname of the current branch (the asterisked
line in the output of of "git branch") except that when the branch doesn’t have a
shortname it will be a full refspec.

Under hg the feature that is called branches is actually a sort of graph coloring
(multiple heads can have the same branch name) so this symbol is filled with the
current bookmark if it exists, with the current branch name as a fallback.

Under Subversion this will normally be either trunk or the basename of some branch or
tag subdirectory, depending on where autoversion was run.

Under bzr, this is the nick of the branch you are on.

The name of the most recent tag ancestral to the current commit.

Empty under Subversion.

A count of commits since most recent tag ancestral to the current commit or an alias
of VCS_NUM if there are no prior tags.

Empty under Subversion.

A symbol set aside specifically to be set by the user through the environment or via

A full unique identifier for the current revision.

A shortened version of VCS_FULL_HASH, but VCS_FULL_HASH if it cannot be shortened.

Set to 1 if the current working directory has been modified and 0 if not. If the
output language has native Boolean literals, true will mean modified and false
unmodified. The C/C++ output is left as numeric so the preprocessor can test it.
Untracked files are not ignored; see -U for details.


-t <output-type>
Sets the output type. It is required unless -s is specified; both -t and -s cannot be
used in the same invocation.

-s <symbol>
Changes the reporting behavior; instead of emitting a symbol file to stdout, only the
value of that individual symbol will be reported. It is required unless -t is
specified; both -t and -s cannot be used in the same invocation.

-o <cache-file>
Sets the name of the cache file.

Forces the use of cache data even when in a repo; useful for speeding up subsequent
runs if more than one output format is needed.

Causes untracked files to be checked when determining if the working copy is modified
for Subversion only. While this is the default behavior for all other repository
types, it is off by default for Subversion because of speed concerns.

Emits the autorevision version and exits.

Use autorevision online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

Linux commands

  • 1
    a2mp3 - program to optimize your music
    for your mp3 player ...
    Run a2mp3
  • 2
    a2ping.pl -- convert between PS, EPS
    and PDF and other page description
    formats ...
    Run a2ping
  • 3
    cover - report coverage statistics
    VERSION: version 1.21 ...
    Run coverp
  • 4
    coverageCount - counting the coverage
    of mapped reads at each location on the
    entire reference genome DESCRIPTION:
    coverageCount Version 1.5.0-p1 This
    program ...
    Run coverageCount
  • 5
    g.mapsets - Modifies/prints the user�s
    current mapset search path. Affects the
    user�s access to data existing under the
    other mapsets in the current location. ...
    Run g.mapsetsgrass
  • 6
    g.message - Prints a message, warning,
    progress info, or fatal error in the
    GRASS way. This module should be used in
    scripts for messages served to user.
    Run g.messagegrass
  • More »