33
bzr init makes this branch versioned
34
bzr branch make a copy of another branch
36
bzr add make files or directories versioned
37
bzr ignore ignore a file or pattern
38
bzr mv move or rename a versioned file
40
bzr status summarize changes in working copy
41
bzr diff show detailed diffs
43
bzr merge pull in changes from another branch
46
bzr log show history of changes
47
bzr check validate storage
49
Use e.g. 'bzr help init' for more details, or
50
'bzr help commands' for all commands.
34
bzr init makes this directory a versioned branch
35
bzr branch make a copy of another branch
37
bzr add make files or directories versioned
38
bzr ignore ignore a file or pattern
39
bzr mv move or rename a versioned file
41
bzr status summarize changes in working copy
42
bzr diff show detailed diffs
44
bzr merge pull in changes from another branch
45
bzr commit save some or all changes
47
bzr log show history of changes
48
bzr check validate storage
50
bzr help init more help on e.g. init command
51
bzr help commands list all commands
112
113
outfile.write(doc)
113
114
if doc[-1] != '\n':
114
115
outfile.write('\n')
116
help_on_options(cmd_object.takes_options, outfile=None)
119
def help_on_options(options, outfile=None):
120
from bzrlib.commands import SHORT_OPTIONS
116
help_on_command_options(cmd_object, outfile)
119
def help_on_command_options(cmd, outfile=None):
120
from bzrlib.option import Option
121
options = cmd.options()
125
124
if outfile == None:
126
125
outfile = sys.stdout
128
126
outfile.write('\noptions:\n')
131
for shortname, longname in SHORT_OPTIONS.items():
133
l += ', -' + shortname
135
outfile.write(l + '\n')
127
for option_name, option in sorted(options.items()):
128
l = ' --' + option_name
129
if option.type is not None:
130
l += ' ' + option.argname.upper()
131
short_name = option.short_name()
133
assert len(short_name) == 1
134
l += ', -' + short_name
135
l += (30 - len(l)) * ' ' + option.help
136
# TODO: split help over multiple lines with correct indenting and
138
wrapped = textwrap.fill(l, initial_indent='', subsequent_indent=30*' ')
139
outfile.write(wrapped + '\n')
138
142
def help_commands(outfile=None):