/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/en/user-guide/version_info.txt

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
If you only need the last revision number in your build scripts, you can
8
8
use the ``revno`` command to get that value like this::
9
9
 
10
 
  $ bzr revno
 
10
  $ brz revno
11
11
  3104
12
12
 
13
13
 
17
17
The ``version-info`` command can be used to output more information
18
18
about the latest version like this::
19
19
 
20
 
  $ bzr version-info
 
20
  $ brz version-info
21
21
  revision-id: pqm@pqm.ubuntu.com-20071211175118-s94sizduj201hrs5
22
22
  date: 2007-12-11 17:51:18 +0000
23
23
  build-date: 2007-12-13 13:14:51 +1000
24
24
  revno: 3104
25
 
  branch-nick: bzr.dev
 
25
  branch-nick: brz.dev
26
26
 
27
27
You can easily filter that output using operating system tools or
28
28
scripts. For example::
29
29
 
30
 
  $ bzr version-info | grep ^date
 
30
  $ brz version-info | grep ^date
31
31
  date: 2007-12-11 17:51:18 +0000
32
32
 
33
33
The ``--all`` option will actually dump version information about
45
45
information file as simply as::
46
46
 
47
47
  library/_version.py:
48
 
        bzr version-info --format python > library/_version.py
 
48
        brz version-info --format python > library/_version.py
49
49
 
50
50
This generates a file which contains 3 dictionaries:
51
51
 
70
70
Getting version info in other formats
71
71
-------------------------------------
72
72
 
73
 
Bazaar supports a template-based method for getting version information in
 
73
Breezy supports a template-based method for getting version information in
74
74
arbitrary formats.  The ``--custom`` option to ``version-info`` can be
75
75
used by providing a ``--template`` argument that contains variables that
76
76
will be expanded based on the status of the working tree.  For example, to
77
77
generate a C header file with a formatted string containing the current
78
78
revision number::
79
79
 
80
 
 bzr version-info --custom \
 
80
 brz version-info --custom \
81
81
      --template="#define VERSION_INFO \"Project 1.2.3 (r{revno})\"\n" \
82
82
      > version_info.h
83
83
 
85
85
working tree.  (If the example above doesn't work on your OS, try
86
86
entering the command all on one line.) For more information on the
87
87
variables that can be used in templates, see `Version Info`_ in the
88
 
Bazaar User Reference.
 
88
Breezy User Reference.
89
89
 
90
90
.. _Version Info: ../user-reference/index.html#version-info
91
91
 
100
100
determined by just reading the revision entry. However, it can be useful
101
101
to know if the working tree was completely up-to-date when it was
102
102
packaged, or if there was a local modification. By supplying either
103
 
``--all`` or ``--check-clean``, ``bzr`` will inspect the working tree, and
 
103
``--all`` or ``--check-clean``, ``brz`` will inspect the working tree, and
104
104
set the ``clean`` flag in ``version_info``, as well as set entries in
105
105
``file_revisions`` as ``modified`` where appropriate.
106
106