Rev 5646: (vila) Backport fix for option names with dots for sphinx in file:///home/pqm/archives/thelove/bzr/2.3/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon May 16 12:57:08 UTC 2011


At file:///home/pqm/archives/thelove/bzr/2.3/

------------------------------------------------------------
revno: 5646 [merge]
revision-id: pqm at pqm.ubuntu.com-20110516125705-urftr05i6ml3a2e4
parent: pqm at pqm.ubuntu.com-20110516102555-2agxwzp3hd2hfc35
parent: v.ladeuil+lp at free.fr-20110516103012-nc8t8q50j6p7f6e3
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.3
timestamp: Mon 2011-05-16 12:57:05 +0000
message:
  (vila) Backport fix for option names with dots for sphinx
   (#782289)(Vincent Ladeuil)
modified:
  bzrlib/commands.py             bzr.py-20050309040720-d10f4714595cf8c3
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2011-02-04 22:25:59 +0000
+++ b/bzrlib/commands.py	2011-05-16 10:30:12 +0000
@@ -514,12 +514,13 @@
         # so we get <https://bugs.launchpad.net/bzr/+bug/249908>.  -- mbp
         # 20090319
         options = option.get_optparser(self.options()).format_option_help()
-        # XXX: According to the spec, ReST option lists actually don't support 
-        # options like --1.9 so that causes syntax errors (in Sphinx at least).
-        # As that pattern always appears in the commands that break, we trap
-        # on that and then format that block of 'format' options as a literal
-        # block.
-        if not plain and options.find('  --1.9  ') != -1:
+        # FIXME: According to the spec, ReST option lists actually don't
+        # support options like --1.14 so that causes syntax errors (in Sphinx
+        # at least).  As that pattern always appears in the commands that
+        # break, we trap on that and then format that block of 'format' options
+        # as a literal block. We use the most recent format still listed so we
+        # don't have to do that too often -- vila 20110514
+        if not plain and options.find('  --1.14  ') != -1:
             options = options.replace(' format:\n', ' format::\n\n', 1)
         if options.startswith('Options:'):
             result += ':' + options




More information about the bazaar-commits mailing list