[MERGE] Add --custom to Version Info in User Guide

Neil Martinsen-Burrell nmb at wartburg.edu
Sun Feb 24 03:32:05 GMT 2008


Neil Martinsen-Burrell <n.martinsen-burrell <at> wartburg.edu> writes:

Sorry, accidentally sent another empty bundle by not committing before doing bzr
send ...  Here it is:

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: nmb at wartburg.edu-20080224032949-ko5cm2kcfc63fpk3
# target_branch: ../bzr.dev
# testament_sha1: f731556e3c3b2b12e4cad22f0ef058877a55ad84
# timestamp: 2008-02-23 21:30:13 -0600
# source_branch: http://bazaar-vcs.org/bzr/bzr.dev
# base_revision_id: pqm at pqm.ubuntu.com-20080224013817-4ps9nmrzjtg9ugtz
# 
# Begin patch
=== modified file 'doc/en/user-guide/version_info.txt'
--- doc/en/user-guide/version_info.txt  2007-12-17 13:27:24 +0000
+++ doc/en/user-guide/version_info.txt  2008-02-24 03:29:49 +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,29 @@
     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.  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
 -----------

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWb9alpMAAeTfgBAQeWf//1uj
3wT////6UAWZqzu7we6azudG9q9ie2ElEymSnvSMk9MSmnqbKfk00mUPSZPU9IaAeoeoGhCNMlP0
00UGRtQxAA9T0gAAABkEJoE0TaptT2Sm1HpGgAB6I8U2UaaASJFNoaoxTyEeg1MTMpggMIwQBk9Q
SSTTQGjU000NKaYyJ6RoAGgGgaAUc9fNHfoxjFX5rzt9os4pIxCFU8Oeh3VYcJMQMlWDYyhq5NPr
k6peCwzHhK2wZ9A69aIhs3Gx5r5GF0ECwVc1fZIOEa/ZZzekcJliixB5XY7T7/GMQaDGuZdFCkCo
hDOdHbd3xdcjfCcBC5uFKmqnFWtWdVMohqBBsiPCMmRj26nHOyieLQ8Sc1uktVJhhsnD1TidjTUS
nPzQmHJl/H37mWF+x0lzIvcA3X6Yu0YBVq53K//ddNK14Cv2s5lJGyxQFj571n9El2RNfWPDgLdZ
GR3sM02+mlujVpl6UrYlvysWdVMXZg55SDDtWJYnx48aFtrgQNKNFIY4kSMo0GEBIUCIkGkFHv01
FnUslR9XZR46xZStmZ5DIatQkVpJEErvoQsCmirReFCNtj7SBPpEBMJlhhyFZAZhXg+pB/RiOzDB
wrAvNZ3heQv12Y2zp41UBNjGmYH4mRUJ+qAbGFOPNZlI1mzrtLxZm0uUtejAwfWWl2zUSMDlF05D
iVl8HLiz7RXYrcRgWHA12VsnzjtpNMPjgDh1iricB9cGZqRG0eFJPSOhWMXHKWE0BTVhKLjkqFQU
lBnqUlrMqynGFOawUFIiD3XFtxhYLgw7DbjGxmNslYNZp+JfCJ7TBvbE6i5aEnGRAgx3Lgy9/Jg3
17mPL7W8WeT1N3IZ/RTvi1b3nTlUDA87aeL87MIpK8LK/g4HjAfIGs3HyXacR8dXf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