/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: v.ladeuil+lp at free
  • Date: 2006-12-01 15:06:29 UTC
  • mto: (2172.3.1 bzr.73948)
  • mto: This revision was merged to the branch mainline in revision 2181.
  • Revision ID: v.ladeuil+lp@free.fr-20061201150629-zjd2an87u0r7nhhw
The tests that would have help avoid bug #73948 and all that mess :)

* bzrlib/transport/http/response.py:
(handle_response): Translate a 416 http error code into a bzr
exception.

* bzrlib/transport/http/_urllib2_wrappers.py:
(HTTPDefaultErrorHandler.http_error_default): Translate a 416 http
error code into a bzr exception.

* bzrlib/transport/http/_pycurl.py:
(PyCurlTransport._curl_perform): It could happen that pycrul
itself detect a short read.

* bzrlib/transport/http/__init__.py:
(HttpTransportBase._retry_get): New method, factorizing the retry
logic.
(HttpTransportBase.readv): We can have exception during the
initial GET worth degrading the range requirements (i.e. retrying
the GET request with either single or not ranges).

* bzrlib/tests/test_transport_implementations.py:
(TransportTests.test_readv_short_read): InvalidRange can also be
raised.

* bzrlib/tests/test_http.py:
(TestRangeRequestServer.test_readv_invalid_ranges): Was named
test_readv_short_read, the new name make the intent
clearer. Depending of the code path used (urllib or pycurl), both
exceptions can be raised.

* bzrlib/tests/HttpServer.py:
(TestingHTTPRequestHandler.do_GET): If invalid ranges are
specified, returns a 416 instead of the whole file (both are valid
according to the RFC).

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 routine 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 history of
 
30
             the tree, along with the commit times and commit message.
 
31
             This defaults to being empty unless ``--all`` or
 
32
             ``--include-history`` is supplied. This is useful if you
 
33
             want to track what bugfixes, etc, might be included in the
 
34
             released version. But for many projects it is more
 
35
             information than they need.
 
36
 
 
37
  `file_revisions`: A dictionary listing the last-modified revision for
 
38
                    all files in the project. This can be used similarly
 
39
                    to how ``$Id$`` keywords are used in CVS controlled
 
40
                    files. The last modified date can be determined by
 
41
                    looking in the ``revisions`` map. This is also empty by
 
42
                    default, and enabled only by ``--all`` or
 
43
                    ``--include-file-revisions``.
 
44
 
 
45
Check Clean
 
46
===========
 
47
 
 
48
Most information about the contents of the project can be cheaply
 
49
determined by just reading the revision entry. However, it can be useful
 
50
to know if the working tree was completely up-to-date when it was
 
51
packaged, or if there was a local modification. By supplying either
 
52
``--all`` or ``--check-clean``, ``bzr`` will inspect the working tree, and
 
53
set the ``clean`` flag in ``version_info``, as well as set entries in
 
54
``file_revisions`` as ``modified`` where appropriate.
 
55
 
 
56
.. 
 
57
   vim: tw=74 ft=rst spell spelllang=en_us