Rev 3274: (Neil Martinsen-Burrell) Explain version-info --custom in the User in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Mar 13 23:45:21 GMT 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3274
revision-id:pqm at pqm.ubuntu.com-20080313234511-fkj5oa8gm3nrfcro
parent: pqm at pqm.ubuntu.com-20080313215539-7i5xowiaaw6pzwta
parent: ian.clatworthy at canonical.com-20080313185113-05hpjc2cb9vb3m6g
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2008-03-13 23:45:11 +0000
message:
(Neil Martinsen-Burrell) Explain version-info --custom in the User
Guide
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
doc/en/user-guide/version_info.txt version_info.txt-20060921215543-gju6o5xdic8w25np-1
------------------------------------------------------------
revno: 3272.1.1
revision-id:ian.clatworthy at canonical.com-20080313185113-05hpjc2cb9vb3m6g
parent: pqm at pqm.ubuntu.com-20080313082937-sc9ovcwq3r10sjqd
parent: nmb at wartburg.edu-20080224032949-ko5cm2kcfc63fpk3
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: ianc-integration
timestamp: Thu 2008-03-13 13:51:13 -0500
message:
(Neil Martinsen-Burrell) Explain version-info --custom in the User Guide
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
doc/en/user-guide/version_info.txt version_info.txt-20060921215543-gju6o5xdic8w25np-1
------------------------------------------------------------
revno: 3234.4.1
revision-id:nmb at wartburg.edu-20080224032949-ko5cm2kcfc63fpk3
parent: pqm at pqm.ubuntu.com-20080224013817-4ps9nmrzjtg9ugtz
committer: Neil Martinsen-Burrell <nmb at wartburg.edu>
branch nick: template-doc-changes
timestamp: Sat 2008-02-23 21:29:49 -0600
message:
added version-info --custom section
modified:
doc/en/user-guide/version_info.txt version_info.txt-20060921215543-gju6o5xdic8w25np-1
=== modified file 'NEWS'
--- a/NEWS 2008-03-13 06:52:38 +0000
+++ b/NEWS 2008-03-13 18:51:13 +0000
@@ -93,6 +93,11 @@
* Use correct indices when emitting LCA conflicts. This fixes IndexError
errors. (Aaron Bentley, #196780)
+ DOCUMENTATION:
+
+ * Explained how to use ``version-info --custom`` in the User Guide.
+ (Neil Martinsen-Burrell)
+
API BREAKS:
* Support for loading plugins from zip files and
=== modified file 'doc/en/user-guide/version_info.txt'
--- a/doc/en/user-guide/version_info.txt 2007-12-17 13:27:24 +0000
+++ b/doc/en/user-guide/version_info.txt 2008-03-13 18:51:13 +0000
@@ -15,7 +15,7 @@
--------------------------------
The ``version-info`` command can be used to output more information
-about the lastest version like this::
+about the latest version like this::
$ bzr version-info
revision-id: pqm at pqm.ubuntu.com-20071211175118-s94sizduj201hrs5
@@ -67,14 +67,31 @@
or ``--include-file-revisions``.
-Projects in other languages
----------------------------
-
-Support for dumping version information in other languages is currently
-in development. Please contact us on the mailing list about your
-requirements in this area. (As of the Bazaar 1.0 release date, some patches
-are available for other languages but are not yet merged into the core product.)
-
+Getting version info in other formats
+-------------------------------------
+
+Bazaar supports a template-based method for getting version information in
+arbitrary formats. The ``--custom`` option to ``version-info`` can be
+used by providing a ``--template`` argument that contains variables that
+will be expanded based on the status of the working tree. For example, to
+generate a C header file with a formatted string containing the current
+revision number::
+
+ bzr version-info --custom \
+ --template="#define VERSION_INFO \"Project 1.2.3 (r{revno})\"\n" \
+ > version_info.h
+
+where the ``{revno}`` will be replaced by the revision number of the
+working tree. (If the example above doesn't work on your OS, try
+entering the command all on one line.) For more information on the
+variables that can be used in templates, see `Version Info`_ in the
+Bazaar User Reference.
+
+.. _Version Info: ../user-reference/bzr_man.html#version-info
+
+Predefined formats for dumping version information in specific languages
+are currently in development. Please contact us on the mailing list about
+your requirements in this area.
Check clean
-----------
More information about the bazaar-commits
mailing list