Rev 5714: The problem wasn't due to sphinx version but to a spurious change in release-notes/bzr-2.2.txt, we still have to add support for topics though. in file:///home/vila/src/bzr/bugs/219334-texinfo/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Fri Mar 11 11:33:33 UTC 2011
At file:///home/vila/src/bzr/bugs/219334-texinfo/
------------------------------------------------------------
revno: 5714
revision-id: v.ladeuil+lp at free.fr-20110311113333-o55cclvfzdkrzlov
parent: pqm at pqm.ubuntu.com-20110310151010-da17g4uls3dn7hut
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: texinfo
timestamp: Fri 2011-03-11 12:33:33 +0100
message:
The problem wasn't due to sphinx version but to a spurious change in release-notes/bzr-2.2.txt, we still have to add support for topics though.
-------------- next part --------------
=== modified file 'bzrlib/doc_generate/writers/texinfo.py'
--- a/bzrlib/doc_generate/writers/texinfo.py 2010-07-21 08:07:14 +0000
+++ b/bzrlib/doc_generate/writers/texinfo.py 2011-03-11 11:33:33 +0000
@@ -143,9 +143,10 @@
# FIXME: Using a different visitor specific to toctree may be a better
# design and makes code clearer. -- vila 20100708
if node.has_key('toctree'):
- node.parent.collect_text('@menu\n')
- node.parent.collect_text(''.join(node['text']))
- node.parent.collect_text('@end menu\n')
+ if node['text']:
+ node.parent.collect_text('@menu\n')
+ node.parent.collect_text(''.join(node['text']))
+ node.parent.collect_text('@end menu\n')
self.in_toctree = False
elif self.in_toctree:
# * FIRST-ENTRY-NAME:(FILENAME)NODENAME. DESCRIPTION
=== modified file 'bzrlib/tests/doc_generate/builders/test_texinfo.py'
--- a/bzrlib/tests/doc_generate/builders/test_texinfo.py 2011-01-10 22:20:12 +0000
+++ b/bzrlib/tests/doc_generate/builders/test_texinfo.py 2011-03-11 11:33:33 +0000
@@ -43,8 +43,6 @@
class TestFileProduction(test_dg.TestSphinx):
def test_files_generated(self):
- if self.sphinx_version() >= (1, 0):
- raise tests.TestSkipped('Not compatible with sphinx >= 1.0')
self.build_tree_contents(
[('index.txt', """
Table of Contents
=== modified file 'bzrlib/tests/doc_generate/writers/test_texinfo.py'
--- a/bzrlib/tests/doc_generate/writers/test_texinfo.py 2011-01-10 22:20:12 +0000
+++ b/bzrlib/tests/doc_generate/writers/test_texinfo.py 2011-03-11 11:33:33 +0000
@@ -177,8 +177,6 @@
class TestTocTreeGeneration(test_dg.TestSphinx):
def test_toctree(self):
- if self.sphinx_version() >= (1, 0):
- raise tests.TestSkipped('Not compatible with sphinx >= 1.0')
self.build_tree_contents(
[('index.txt', """
Table of Contents
@@ -235,6 +233,29 @@
""",
'bzr-0.0.8.texi')
+ def test_toctree_empty(self):
+ self.build_tree_contents(
+ [('index.txt', """
+Table of Contents
+=================
+
+.. toctree::
+ :maxdepth: 1
+""")])
+ app, out, err = self.make_sphinx()
+ self.build(app)
+ self.assertFileEqual("""\
+This file has been converted using a beta rst->texinfo converter.
+Most of the info links are currently bogus, don't report bugs about them,
+this is currently worked on.
+ at node Top
+ at top Placeholder
+ at node table-of-contents
+ at chapter Table of Contents
+""",
+ 'index.texi')
+
+
class TestSections(test_dg.TestSphinx):
def test_sections(self):
=== modified file 'doc/en/release-notes/bzr-2.2.txt'
--- a/doc/en/release-notes/bzr-2.2.txt 2011-02-20 15:01:25 +0000
+++ b/doc/en/release-notes/bzr-2.2.txt 2011-03-11 11:33:33 +0000
@@ -2,8 +2,8 @@
Bazaar Release Notes
####################
-.. contents:: List of Releases
- :depth: 1
+.. toctree::
+ :maxdepth: 1
bzr 2.2.5
#########
More information about the bazaar-commits
mailing list