9
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
11
# GNU General Public License for more details.
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
105
105
""" % (usage, '-'*len(usage))
107
docsplit = cmd.__doc__.split('\n')
108
doc = '\n'.join([' '*4 + docsplit[0]] + docsplit[1:])
107
docsplit = cmd.help().split('\n')
108
doc = '\n'.join([' '*4+line for line in docsplit])
111
111
options = cmd.options()
113
113
option_str = "\n Options:\n"
114
114
for option_name, option in sorted(options.items()):
115
l = ' --' + option_name
116
if option.type is not None:
117
l += ' ' + option.argname.upper()
118
short_name = option.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
return subsection_header + option_str + "\n" + doc + "\n"
115
for name, short_name, argname, help in option.iter_switches():
117
if argname is not None:
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'
131
if len(cmd.aliases) > 1:
132
aliases_str += '\n Aliases: '
134
aliases_str += '\n Alias: '
135
aliases_str += ', '.join(cmd.aliases)
138
return subsection_header + option_str + aliases_str + "\n" + doc + "\n"
138
148
.. Generation time: %(timestamp)s
140
150
=============================================
141
Man page for %(bzrcmd)s (bazaar-ng)
151
Man page for Bazaar (%(bzrcmd)s)
142
152
=============================================
144
154
:Date: %(datestamp)s
169
bazaar-ng (or **%(bzrcmd)s**) is a project of Canonical to develop
179
Bazaar (or **%(bzrcmd)s**) is a project of Canonical to develop
170
180
an open source distributed version control system that is powerful,
171
181
friendly, and scalable. Version control means a system
172
182
that keeps track of previous revisions of software source code
181
191
Path where **%(bzrcmd)s** is to look for external command.
184
194
E-Mail address of the user. Overrides default user config.
187
E-Mail address of the user. Overriddes default user config.
197
E-Mail address of the user. Overrides default user config.
200
Editor for editing commit messages
203
Editor for editing commit messages
206
Paths where bzr should look for plugins
209
Home directory for bzr
192
**On Linux**: ``~/.bazaar/bazaar.conf/``
215
**On Linux**: ``~/.bazaar/bazaar.conf``
194
217
**On Windows**: ``C:\\Documents and Settings\\username\\Application Data\\bazaar\\2.0\\bazaar.conf``
196
Contains the default user config. Only one section, ``[DEFAULT]`` is allowed.
197
A typical default config file may be similiar to::
200
email=John Doe <jdoe@isp.com>
219
Contains the users default configuration. The section ``[DEFAULT]`` is
220
used to define general configuration that will be applied everywhere.
221
The section ``[ALIASES]`` can be used to create command aliases for
222
commonly used options.
224
A typical config file might look something like::
227
email=John Doe <jdoe@isp.com>
230
commit = commit --strict
231
log10 = log --short -r -10..-1