/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 breezy/doc_generate/autodoc_man.py

  • Committer: Jelmer Vernooij
  • Date: 2018-05-06 11:48:54 UTC
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@jelmer.uk-20180506114854-h4qd9ojaqy8wxjsd
Move .mailmap to root.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
    """Assembles a man page"""
47
47
    d = get_autodoc_datetime()
48
48
    params = \
49
 
        {"brzcmd": options.brz_name,
50
 
         "datestamp": d.strftime("%Y-%m-%d"),
51
 
         "timestamp": d.strftime("%Y-%m-%d %H:%M:%S +0000"),
52
 
         "version": breezy.__version__,
53
 
         }
 
49
           { "brzcmd": options.brz_name,
 
50
             "datestamp": d.strftime("%Y-%m-%d"),
 
51
             "timestamp": d.strftime("%Y-%m-%d %H:%M:%S +0000"),
 
52
             "version": breezy.__version__,
 
53
             }
54
54
    outfile.write(man_preamble % params)
55
55
    outfile.write(man_escape(man_head % params))
56
56
    outfile.write(man_escape(getcommand_list(params)))
74
74
    for cmdname in breezy.commands.plugin_command_names():
75
75
        cmd_object = breezy.commands.get_cmd_object(cmdname)
76
76
        if (PLUGINS_TO_DOCUMENT is None or
77
 
                cmd_object.plugin_name() in PLUGINS_TO_DOCUMENT):
 
77
            cmd_object.plugin_name() in PLUGINS_TO_DOCUMENT):
78
78
            command_names.append(cmdname)
79
79
    command_names.sort()
80
80
    return command_names
81
81
 
82
82
 
83
 
def getcommand_list(params):
 
83
def getcommand_list (params):
84
84
    """Builds summary help for command names in manpage format"""
85
85
    brzcmd = params["brzcmd"]
86
86
    output = '.SH "COMMAND OVERVIEW"\n'
101
101
 
102
102
def getcommand_help(params):
103
103
    """Shows individual options for a brz command"""
104
 
    output = '.SH "COMMAND REFERENCE"\n'
 
104
    output='.SH "COMMAND REFERENCE"\n'
105
105
    formatted = {}
106
106
    for cmd_name in command_name_list():
107
107
        cmd_object = breezy.commands.get_cmd_object(cmd_name)
141
141
                    l += ', -' + short_name
142
142
                l += (30 - len(l)) * ' ' + (help or '')
143
143
                wrapped = textwrap.fill(l, initial_indent='',
144
 
                                        subsequent_indent=30 * ' ',
145
 
                                        break_long_words=False,
146
 
                                        )
 
144
                    subsequent_indent=30*' ',
 
145
                    break_long_words=False,
 
146
                    )
147
147
                option_str += wrapped + '\n'
148
148
 
149
149
    aliases_str = ""
249
249
.UR https://www.breezy-vcs.org/
250
250
.BR https://www.breezy-vcs.org/
251
251
"""
 
252