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

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Martin Packman
Approved revision: no longer in the source branch.
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
=== modified file 'doc/en/release-notes/bzr-2.6.txt'
--- doc/en/release-notes/bzr-2.6.txt 2012-03-15 15:09:48 +0000
+++ doc/en/release-notes/bzr-2.6.txt 2012-03-16 11:22:18 +0000
@@ -37,6 +37,9 @@
3737
38.. Improved or updated documentation.38.. Improved or updated documentation.
3939
40* Force format registration to avoid generate_docs.py traceback when the
41 registry is empty. (Vincent Ladeuil, #956860)
42
40API Changes43API Changes
41***********44***********
4245
4346
=== modified file 'tools/generate_docs.py'
--- tools/generate_docs.py 2011-09-26 15:40:02 +0000
+++ tools/generate_docs.py 2012-03-16 11:22:18 +0000
@@ -41,6 +41,9 @@
41import bzrlib41import bzrlib
42from bzrlib import (42from bzrlib import (
43 commands,43 commands,
44 # Don't remove the following import, it triggers a format registration that
45 # avoid http://pad.lv/956860
46 branch,
44 doc_generate,47 doc_generate,
45 )48 )
4649