Show version information about this tree.


brz version-info [LOCATION]


Include all possible information.


Check if tree is clean.

-h, --help

Show help message.


Include the last revision for each file.


Include the revision-history.

-q, --quiet

Only display errors and warnings.

-r ARG, --revision=ARG

See “help revisionspec” for details.


Template for the output.


Show usage message and options.

-v, --verbose

Display more information.


Select the output format.


Version info in Custom template-based format.


Version info in Python format.


Version info in RIO (simple text) format (default).


You can use this command to add information about version into source code of an application. The output can be in one of the supported formats or in a custom format based on a template.

For example:

brz version-info --custom \
  --template="#define VERSION_INFO \"Project 1.2.3 (r{revno})\"\n"

will produce a C header file with formatted string containing the current revision number. Other supported variables in templates are:

  • {date} - date of the last revision

  • {build_date} - current date

  • {revno} - revision number

  • {revision_id} - revision id

  • {branch_nick} - branch nickname

  • {clean} - 0 if the source tree contains uncommitted changes,

    otherwise 1