[MERGE] Change the `bzr init-repo` default to --trees (#53483)
John Arbash Meinel
john at arbash-meinel.com
Fri Feb 2 19:15:32 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Wouter van Heyst wrote:
> The attached bundle changes the behaviour of `bzr int-repo` to make
> working trees for branches by default. While the semantics of a
> repository may change with tags, as long as it gets advertised as a
> storage optimization only, the current behaviour is confusing.
>
> Concerns:
> - I copped out of a better NEWS entry since I've been blocking on that
> for too long during this sprint. So just complain about it here :)
> - The help for init-repo is a direct conversion, writing a different
> example might be a better idea.
>
> Wouter van Heyst
>
>
> ------------------------------------------------------------------------
>
> # Bazaar revision bundle v0.8
> #
> # message:
> # Actually test that `bzr init-repo --{no,}-trees` still works
> # committer: Wouter van Heyst <larstiq at larstiq.dyndns.org>
> # date: Fri 2007-02-02 17:05:51.367000103 +0100
>
> === modified file NEWS // last-changed:larstiq at larstiq.dyndns.org-2007020212241
> ... 0-pvj8k5lqmdrwpazh
> --- NEWS
> +++ NEWS
> @@ -1,5 +1,11 @@
> IN DEVELOPMENT
>
> + NOTES WHEN UPGRADING:
> +
> + Release 0.15 of bzr changes the ``bzr init-repo`` command to default to
> + ``--trees`` instead of ``--no-trees``.
> + Existing shared repositories are not affected.
> +
> IMPROVEMENTS:
>
> * ``bzr mv`` enhanced to support already moved files.
> @@ -40,6 +46,9 @@
> formats. (Wouter van Heyst, Robert Collins)
>
> BUGFIXES:
> +
> + * Switch the ``bzr init-repo`` default from --no-trees to --trees.
> + (Wouter van Heyst, #53483)
>
> * ``bzr annotate`` now uses dotted revnos from the viewpoint of the
> branch, rather than the last changed revision of the file.
>
> === modified file bzrlib/builtins.py
> --- bzrlib/builtins.py
> +++ bzrlib/builtins.py
> @@ -1,4 +1,4 @@
> -# Copyright (C) 2004, 2005, 2006 Canonical Ltd
> +# Copyright (C) 2004, 2005, 2006, 2007 Canonical Ltd
> #
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> @@ -1150,7 +1150,7 @@
> shared storage.
>
> example:
> - bzr init-repo repo
> + bzr init-repo --no-trees repo
> bzr init repo/trunk
> bzr checkout --lightweight repo/trunk trunk-checkout
> cd trunk-checkout
> @@ -1165,11 +1165,11 @@
> registry=bzrdir.format_registry,
> converter=bzrdir.format_registry.make_bzrdir,
> value_switches=True),
> - Option('trees',
> - help='Allows branches in repository to have'
> + Option('no-trees',
> + help='Disallows branches in repository to have'
> ' a working tree')]
> aliases = ["init-repo"]
> - def run(self, location, format=None, trees=False):
> + def run(self, location, format=None, no_trees=False):
> if format is None:
> format = bzrdir.format_registry.make_bzrdir('default')
^- I agree with the change (making --trees the default), but I think
this is not the right way to do it.
I could be wrong, but I think this breaks:
bzr init-repo --trees
Because now the "correct" invocation is:
bzr init-repo --no-no-trees
I think the correct fix is:
Option('trees', ...)
def run(self, location, format=None, trees=True):
Aaron's earlier work means that all boolean options have a (hidden)
negative of "--no-X". I would like those to be not-hidden, which I think
is just a small change to the help-text generator, but I don't know exactly.
As an example for the help text, I would just put the negative just
before the positive, and leave the help text alone. So you would get:
--no-trees
--trees Set whether new branches inside the repository will
default to having a working tree or not.
I think if we have them next to eachother like this, it is pretty
obvious, and we just need to be a little careful with the help text to
make sure it reads correctly.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFw43TJdeBCYSNAAMRAh2gAKC020KZpmqy7hL5QGqyO5D/Xsf4KQCfbXk3
RYuy6NSCsvO2qoxe3h6hBG8=
=/Pwu
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list