version-info — Breezy 3.0.2dev documentation

Table of Contents (3.0.2dev)

# version-info

Purpose

  Show version information about this tree.

Usage

  brz version-info [LOCATION]

Options
  `--all`

    Include all possible information.

  `--check-clean`

    Check if tree is clean.

  `-h, --help`

    Show help message.

  `--include-file-revisions`

    Include the last revision for each file.

  `--include-history`

    Include the revision-history.

  `-q, --quiet`

    Only display errors and warnings.

  `-r ARG, --revision=ARG`

    See “help revisionspec” for details.

  `--template=ARG`

    Template for the output.

  `--usage`

    Show usage message and options.

  `-v, --verbose`

    Display more information.

  format:
    `--format=ARG`

      Select the output format.

    `--custom`

      Version info in Custom template-based format.

    `--python`

      Version info in Python format.

    `--rio`

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

Description

  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