/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 bzrlib/commands.py

  • Committer: Vincent Ladeuil
  • Date: 2011-05-16 10:30:12 UTC
  • mto: (5609.39.3 2.3)
  • mto: This revision was merged to the branch mainline in revision 5885.
  • Revision ID: v.ladeuil+lp@free.fr-20110516103012-nc8t8q50j6p7f6e3
Backport fix for option names with dots for sphinx (#782289)

Show diffs side-by-side

added added

removed removed

Lines of Context:
514
514
        # so we get <https://bugs.launchpad.net/bzr/+bug/249908>.  -- mbp
515
515
        # 20090319
516
516
        options = option.get_optparser(self.options()).format_option_help()
517
 
        # XXX: According to the spec, ReST option lists actually don't support 
518
 
        # options like --1.9 so that causes syntax errors (in Sphinx at least).
519
 
        # As that pattern always appears in the commands that break, we trap
520
 
        # on that and then format that block of 'format' options as a literal
521
 
        # block.
522
 
        if not plain and options.find('  --1.9  ') != -1:
 
517
        # FIXME: According to the spec, ReST option lists actually don't
 
518
        # support options like --1.14 so that causes syntax errors (in Sphinx
 
519
        # at least).  As that pattern always appears in the commands that
 
520
        # break, we trap on that and then format that block of 'format' options
 
521
        # as a literal block. We use the most recent format still listed so we
 
522
        # don't have to do that too often -- vila 20110514
 
523
        if not plain and options.find('  --1.14  ') != -1:
523
524
            options = options.replace(' format:\n', ' format::\n\n', 1)
524
525
        if options.startswith('Options:'):
525
526
            result += ':' + options