~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tools/doc_generate/autodoc_rstx.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-11 00:23:23 UTC
  • mfrom: (2070 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2071.
  • Revision ID: john@arbash-meinel.com-20061011002323-82ba88c293d7caff
[merge] bzr.dev 2070

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
    if options:
113
113
        option_str = "\n    Options:\n"
114
114
        for option_name, option in sorted(options.items()):
115
 
            for name, short_name, argname, help in option.iter_switches():
116
 
                l = '    --' + name
117
 
                if argname is not None:
118
 
                    l += ' ' + argname
119
 
                if short_name:
120
 
                    assert len(short_name) == 1
121
 
                    l += ', -' + short_name
122
 
                l += (30 - len(l)) * ' ' + (help or '')
123
 
                # TODO: Split help over multiple lines with
124
 
                # correct indenting and wrapping.
125
 
                wrapped = textwrap.fill(l, initial_indent='',
126
 
                                        subsequent_indent=30*' ')
127
 
                option_str = option_str + wrapped + '\n'       
 
115
            l = '        --' + option_name
 
116
            if option.type is not None:
 
117
                l += ' ' + option.argname.upper()
 
118
            short_name = option.short_name()
 
119
            if short_name:
 
120
                assert len(short_name) == 1
 
121
                l += ', -' + short_name
 
122
            l += (30 - len(l)) * ' ' + option.help
 
123
            # TODO: Split help over multiple lines with
 
124
            # correct indenting and wrapping.
 
125
            wrapped = textwrap.fill(l, initial_indent='',
 
126
                                    subsequent_indent=30*' ')
 
127
            option_str = option_str + wrapped + '\n'
128
128
 
129
129
    aliases_str = ""
130
130
    if cmd.aliases:
194
194
                E-Mail address of the user. Overrides default user config.
195
195
 
196
196
**EMAIL**
197
 
                E-Mail address of the user. Overrides default user config.
 
197
                E-Mail address of the user. Overriddes default user config.
198
198
 
199
199
**BZR_EDITOR**
200
200
                Editor for editing commit messages