30
30
* No merge operators yet.
33
To make a branch, use 'bzr init' in an existing directory, then 'bzr
34
add' to make files versioned. 'bzr add .' will recursively add all
37
'bzr status' describes files that are unknown, ignored, or modified.
38
'bzr diff' shows the text changes to the tree or named files.
39
'bzr commit -m <MESSAGE>' commits all changes in that branch.
41
'bzr move' and 'bzr rename' allow you to rename files or directories.
42
'bzr remove' makes a file unversioned but keeps the working copy;
43
to delete that too simply delete the file.
45
'bzr log' shows a history of changes, and
46
'bzr info' gives summary statistical information.
47
'bzr check' validates all files are stored safely.
49
Files can be ignored by giving a path or a glob in .bzrignore at the
50
top of the tree. Use 'bzr ignored' to see what files are ignored and
51
why, and 'bzr unknowns' to see files that are neither versioned or
54
For more help on any command, type 'bzr help COMMAND', or 'bzr help
37
Show software version/licence/non-warranty.
39
Start versioning the current directory
43
Show revision history.
46
bzr move FROM... DESTDIR
47
Move one or more files to a different directory.
49
Show changes from last revision to working copy.
50
bzr commit -m 'MESSAGE'
51
Store current state as new revision.
52
bzr export [-r REVNO] DESTINATION
53
Export the branch state at a previous version.
55
Show summary of pending changes.
57
Make a file not versioned.
59
Show statistics about this branch.
61
Verify history is stored safely.
62
(for more type 'bzr help commands')
60
66
def help(topic=None):
66
72
help_on_command(topic)
69
def command_usage(cmdname, cmdclass):
70
"""Return single-line grammar for command.
72
Only describes arguments, not options.
75
def help_on_command(cmdname):
76
cmdname = str(cmdname)
78
from inspect import getdoc
80
topic, cmdclass = commands.get_cmd_class(cmdname)
82
doc = getdoc(cmdclass)
84
raise NotImplementedError("sorry, no detailed help yet for %r" % cmdname)
87
short, rest = doc.split('\n', 1)
92
print 'usage: bzr ' + topic,
75
93
for aname in cmdclass.takes_args:
76
94
aname = aname.upper()
77
95
if aname[-1] in ['$', '+']:
80
98
aname = '[' + aname[:-1] + ']'
81
99
elif aname[-1] == '*':
82
100
aname = '[' + aname[:-1] + '...]'
91
def help_on_command(cmdname):
92
cmdname = str(cmdname)
94
from inspect import getdoc
96
topic, cmdclass = commands.get_cmd_class(cmdname)
98
doc = getdoc(cmdclass)
100
raise NotImplementedError("sorry, no detailed help yet for %r" % cmdname)
102
print 'usage:', command_usage(topic, cmdclass)
104
105
if cmdclass.aliases:
105
106
print 'aliases: ' + ', '.join(cmdclass.aliases)
109
111
help_on_option(cmdclass.takes_options)
138
140
for cmdname, cmdclass in accu:
139
141
if cmdclass.hidden:
141
print command_usage(cmdname, cmdclass)
142
144
help = inspect.getdoc(cmdclass)
144
146
print " " + help.split('\n', 1)[0]