~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tools/doc_generate/autodoc_man.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-01-02 08:23:44 UTC
  • mfrom: (3140.1.9 find-branches)
  • Revision ID: pqm@pqm.ubuntu.com-20080102082344-qret383z2bdk1ud4
Optimize find_branches for standalone repositories (abentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
import bzrlib
30
30
import bzrlib.help
 
31
import bzrlib.help_topics
31
32
import bzrlib.commands
32
33
 
33
34
 
103
104
    """Provides long help for each public command"""
104
105
    subsection_header = '.SS "%s"\n' % (cmd._usage())
105
106
    doc = "%s\n" % (cmd.__doc__)
106
 
    doc = cmd.help()
 
107
    doc = bzrlib.help_topics.help_as_plain_text(cmd.help())
107
108
 
108
109
    option_str = ""
109
110
    options = cmd.options()
111
112
        option_str = "\nOptions:\n"
112
113
        for option_name, option in sorted(options.items()):
113
114
            for name, short_name, argname, help in option.iter_switches():
 
115
                if option.is_hidden(name):
 
116
                    continue
114
117
                l = '    --' + name
115
118
                if argname is not None:
116
119
                    l += ' ' + argname