~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
--------------------------------
16
16
 
17
17
The ``version-info`` command can be used to output more information
18
 
about the lastest version like this::
 
18
about the latest version like this::
19
19
 
20
20
  $ bzr version-info
21
21
  revision-id: pqm@pqm.ubuntu.com-20071211175118-s94sizduj201hrs5
67
67
    or ``--include-file-revisions``.
68
68
 
69
69
 
70
 
Projects in other languages
71
 
---------------------------
72
 
 
73
 
Support for dumping version information in other languages is currently
74
 
in development. Please contact us on the mailing list about your
75
 
requirements in this area. (As of the Bazaar 1.0 release date, some patches
76
 
are available for other languages but are not yet merged into the core product.)
77
 
 
 
70
Getting version info in other formats
 
71
-------------------------------------
 
72
 
 
73
Bazaar supports a template-based method for getting version information in
 
74
arbitrary formats.  The ``--custom`` option to ``version-info`` can be
 
75
used by providing a ``--template`` argument that contains variables that
 
76
will be expanded based on the status of the working tree.  For example, to
 
77
generate a C header file with a formatted string containing the current
 
78
revision number::
 
79
 
 
80
 bzr version-info --custom \
 
81
      --template="#define VERSION_INFO \"Project 1.2.3 (r{revno})\"\n" \
 
82
      > version_info.h
 
83
 
 
84
where the ``{revno}`` will be replaced by the revision number of the
 
85
working tree.  (If the example above doesn't work on your OS, try
 
86
entering the command all on one line.) For more information on the
 
87
variables that can be used in templates, see `Version Info`_ in the
 
88
Bazaar User Reference.
 
89
 
 
90
.. _Version Info: ../user-reference/bzr_man.html#version-info
 
91
 
 
92
Predefined formats for dumping version information in specific languages
 
93
are currently in development. Please contact us on the mailing list about
 
94
your requirements in this area.
78
95
 
79
96
Check clean
80
97
-----------
87
104
set the ``clean`` flag in ``version_info``, as well as set entries in
88
105
``file_revisions`` as ``modified`` where appropriate.
89
106
 
90
 
.. 
 
107
..
91
108
   vim: tw=74 ft=rst spell spelllang=en_us