/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/version_info.txt

  • Committer: Adeodato Simó
  • Date: 2007-07-18 15:51:52 UTC
  • mto: (2639.1.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 2640.
  • Revision ID: dato@net.com.org.es-20070718155152-pv6rwq41eckqyxem
New EmailMessage class, façade around email.Message and MIMEMultipart.

* bzrlib/email_message.py,
  bzrlib/tests/test_email_message.py:
  New files.

* bzrlib/tests/__init__.py:
  (test_suite): add bzrlib.tests.test_email_message.

* bzrlib/merge_directive.py:
  (MergeDirective.to_email): Use EmailMessage instead of email.Message.

* bzrlib/tests/test_merge_directive.py,
  bzrlib/tests/blackbox/test_merge_directive.py:
  (__main__): adjust EMAIL1 and EMAIL2 strings to how EmailMessage
  formats itself.

* bzrlib/smtp_connection.py:
  (SMTPConnection.get_message_addresses): do not use methods present in
  email.Message but not in EmailMessage (get_all). Use get() instead of
  __getitem__ to make explicit that None is returned if the header does
  not exist.

* bzrlib/tests/test_smtp_connection.py:
  (TestSMTPConnection.test_get_message_addresses, 
   TestSMTPConnection.test_destination_address_required): test the
   functions against EmailMessage in addition to email.Message.

* NEWS:
  Mention EmailMessage in INTERNALS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
==========================
 
2
Using ``bzr version-info``
 
3
==========================
 
4
 
 
5
Overview
 
6
========
 
7
 
 
8
This document describes ways of using ``bzr version-info`` as part of a
 
9
build process to embed version information into a final project.
 
10
 
 
11
 
 
12
Python Project
 
13
==============
 
14
 
 
15
TODO: Figure out how to attach into ``setup.py``
 
16
 
 
17
 
 
18
If using a Makefile to build your project, you can generate the version
 
19
information file as simply as::
 
20
 
 
21
  library/_version.py:
 
22
        bzr version-info --format=python > library/_version.py
 
23
 
 
24
This generates a file which contains 3 dictionaries:
 
25
 
 
26
  * `version_info`: A dictionary containing the basic information about the
 
27
    current state.
 
28
 
 
29
  * `revisions`: A dictionary listing all of the revisions in the
 
30
    history of the tree, along with the commit times and commit
 
31
    message.  This defaults to being empty unless ``--all`` or
 
32
    ``--include-history`` is supplied. This is useful if you want to
 
33
    track what bug fixes, etc, might be included in the released
 
34
    version. But for many projects it is more information than needed.
 
35
 
 
36
  * `file_revisions`: A dictionary listing the last-modified revision
 
37
    for all files in the project. This can be used similarly to how
 
38
    ``$Id$`` keywords are used in CVS-controlled files. The last
 
39
    modified date can be determined by looking in the ``revisions``
 
40
    map. This is also empty by default, and enabled only by ``--all``
 
41
    or ``--include-file-revisions``.
 
42
 
 
43
Check Clean
 
44
===========
 
45
 
 
46
Most information about the contents of the project can be cheaply
 
47
determined by just reading the revision entry. However, it can be useful
 
48
to know if the working tree was completely up-to-date when it was
 
49
packaged, or if there was a local modification. By supplying either
 
50
``--all`` or ``--check-clean``, ``bzr`` will inspect the working tree, and
 
51
set the ``clean`` flag in ``version_info``, as well as set entries in
 
52
``file_revisions`` as ``modified`` where appropriate.
 
53
 
 
54
.. 
 
55
   vim: tw=74 ft=rst spell spelllang=en_us