Merge lp:~vila/bzr/956860-doc-generate into lp:bzr

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Martin Packman
Approved revision: 6509
Merged at revision: 6511
Proposed branch: lp:~vila/bzr/956860-doc-generate
Merge into: lp:bzr
Diff against target: 26 lines (+6/-0)
2 files modified
doc/en/release-notes/bzr-2.6.txt (+3/-0)
tools/generate_docs.py (+3/-0)
To merge this branch: bzr merge lp:~vila/bzr/956860-doc-generate
Reviewer Review Type Date Requested Status
Martin Packman (community) Approve
Review via email: mp+97844@code.launchpad.net

Commit message

Ensures the format registry is not empty when generating docs for sphinx

Description of the change

Not worth thinking too much when the fix is that simple.

If this can avoid a failure on escudero when building
docs.bazaar.canonical.com, let's just do it.

See associated bug for details.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Hu, a script that uses bzrlib.initialize() and commands.install_bzr_command_hooks() but still needs more dancing to actually work.

We end up doing a lot using the bzrlib tree just when calling setup.py which dirties the state rather.

review: Approve
Revision history for this message
Vincent Ladeuil (vila) wrote :

> Hu, a script that uses bzrlib.initialize() and
> commands.install_bzr_command_hooks() but still needs more dancing to actually
> work.
>

<shudder>, yes :-/ And I did use bzrlib.initialize() *just* to avoid such issues here...(That is, the last time I touched generate_docs).

Poking jelmer for further advice as I think it's a fallout from his work on lazy loading (not throwing stones, really, but there may be a way to avoid this particular fallout by still loading something wt/branch/repo ?)

> We end up doing a lot using the bzrlib tree just when calling setup.py which
> dirties the state rather.

I don't follow, generate_docs is not related to setup.py, what do you mean ?

Revision history for this message
Vincent Ladeuil (vila) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doc/en/release-notes/bzr-2.6.txt'
2--- doc/en/release-notes/bzr-2.6.txt 2012-03-15 15:09:48 +0000
3+++ doc/en/release-notes/bzr-2.6.txt 2012-03-16 11:22:18 +0000
4@@ -37,6 +37,9 @@
5
6 .. Improved or updated documentation.
7
8+* Force format registration to avoid generate_docs.py traceback when the
9+ registry is empty. (Vincent Ladeuil, #956860)
10+
11 API Changes
12 ***********
13
14
15=== modified file 'tools/generate_docs.py'
16--- tools/generate_docs.py 2011-09-26 15:40:02 +0000
17+++ tools/generate_docs.py 2012-03-16 11:22:18 +0000
18@@ -41,6 +41,9 @@
19 import bzrlib
20 from bzrlib import (
21 commands,
22+ # Don't remove the following import, it triggers a format registration that
23+ # avoid http://pad.lv/956860
24+ branch,
25 doc_generate,
26 )
27