20
20
# executable files with reasonable names.
22
22
# TODO: `help commands --all` should show hidden commands
26
"""Bazaar -- a free distributed version-control tool
27
http://bazaar-vcs.org/
31
bzr init makes this directory a versioned branch
32
bzr branch make a copy of another branch
34
bzr add make files or directories versioned
35
bzr ignore ignore a file or pattern
36
bzr mv move or rename a versioned file
38
bzr status summarize changes in working copy
39
bzr diff show detailed diffs
41
bzr merge pull in changes from another branch
42
bzr commit save some or all changes
44
bzr log show history of changes
45
bzr check validate storage
47
bzr help init more help on e.g. init command
48
bzr help commands list all commands
55
def help(topic=None, outfile = None):
26
from bzrlib import help_topics
29
help_topics.add_topic("commands",
30
(lambda name, outfile: help_commands(outfile)),
31
"Basic help for all commands")
34
def help(topic=None, outfile=None):
35
"""Print out the help for a specific topic or command."""
56
37
if outfile is None:
57
38
outfile = sys.stdout
59
outfile.write(global_help)
60
elif topic == 'commands':
61
help_commands(outfile = outfile)
40
help_topics.write_topic("basic", outfile)
41
elif help_topics.is_topic(topic):
42
help_topics.write_topic(topic, outfile)
63
help_on_command(topic, outfile = outfile)
44
help_on_command(topic, outfile=outfile)
66
47
def command_usage(cmd_object):