John Arbash Meinel wrote:
> Olaf Conradi wrote:
>> On 28/04/06, John Arbash Meinel <john at arbash-meinel.com> wrote:
>> ...
>>>> I would rather have the default be "default". Because in the future we
>>> may come up with something better than "metadir".
>> OK, I agree that's better.
>>>>> Since no client has been officially released with --format=metadir, I
>>> would be okay with just changing its name to --format=metaweave, and
>>> fixing the bug that caused it to create knit format.
>> Patch attached.
>>>> This changes "metadir" to "metaweave" which is metadirformat1 with
>> format7 weave repo.
>> Introduced format "default" which points to metadirformat1 (and is knit)
>> Fixes test cases accordingly.
>> Mentions "knit" as only supported format in "bzr help init" and "bzr
>> help init-repo". All other formats are available, but not shown in the
>> help. They are shown in "bzr help upgrade".
>>>> So when a users knows what he is doing, he can use a deprecated format.
>>>>http://deschacht.student.utwente.nl/bzr/bazaar-vcs/bzr.olaf.metaweave/>>>> -Olaf
>>>> ...
>>>>> @@ -902,12 +906,14 @@
>> takes_options = [
>> Option('format',
>> help='Create a specific format rather than the'
>> - ' current default format. Currently this '
>> - ' option only accepts "metadir"',
>> + ' current default format. Currently, the'
>> + ' only supported format is "knit"',
>> type=get_format_type),
>> ]
>> If we are only going to mention one format, I would tend to say it as:
> "The recommended format is 'knit'".
> I think we are honestly planning to support all of the formats, so
> saying 'knit' is the only supported one is wrong.
>> Maybe this:
> Specify the format for this branch. Current options are: default, knit,
> metaweave, and weave. default=knit, metaweave and weave are deprecated.
>> It is a little bit long, but I think it is honest.
>> Because it is long, and probably more confusing/distracting, I would
> tend to move the help text into some sort of advanced section. And do
> something like:
> Specify the format for this branch. See "bzr help branch-formats" for
> more information.
>> At present, we don't have a good mechanism for detailed extra help (at
> least that I know of). But I think that would be useful to have.
> It would also help us for "bzr help revision-specs", which we have long
> had issues with.
>> Attached is kind of a prototype of that system. There could certainly be
> other ways of doing it. What do people think?
>> John
> =:->
>>> ------------------------------------------------------------------------
>> === modified file 'bzrlib/help.py'
> --- bzrlib/help.py
> +++ bzrlib/help.py
> @@ -51,7 +51,24 @@
> """
>>> +extra_topics = {
> + 'branch-formats':"""Bzr supports multiple branch formats.
> +
> +Most are legacy formats, and are intended for interoperability
> +with older clients.
> +
> +default: This will always point to the current default format.
> +knit: Blah blah blah
> +metaweave: Blah blahdy blah
> +weave: The format for bzr 0.7, which only supports
> + standalone branches. Use this for compatibility.
> +"""
> +}
> +
> +
> import sys
> +
> +from bzrlib.errors import BzrCommandError
>>> def help(topic=None, outfile = None):
> @@ -62,7 +79,12 @@
> elif topic == 'commands':
> help_commands(outfile = outfile)
> else:
> - help_on_command(topic, outfile = outfile)
> + try:
> + help_on_command(topic, outfile = outfile)
> + except BzrCommandError, e:
> + if topic not in extra_topics:
> + raise
> + outfile.write(extra_topics[topic])
>>> def command_usage(cmd_object):
>
Does anyone else have an opinion on something like this. What I just
outlined would be fairly easy and minimally invasive for 0.8, but I
would want to know that people like it first.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060501/6911272f/attachment.pgp