Show version information about this tree.


bzr version-info [LOCATION]


Include all possible information.

-v, --verbose

Display more information.


Include the revision-history.


Check if tree is clean.

-q, --quiet

Only display errors and warnings.


Include the last revision for each file.


Template for the output.


Show usage message and options.

-r ARG, --revision=ARG

See “help revisionspec” for details.

-h, --help

Show help message.


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:

bzr 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

Previous topic


Next topic


This Page