[MERGE] Improve warning to 'bzr upgrade' to specify --rich-root or --subtree if needed.
John Arbash Meinel
john at arbash-meinel.com
Wed Jul 30 02:59:26 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrew Bennetts wrote:
| This patch improves the warning you see when you use an old repository to
| suggest “bzr upgrade --rich-root” or “bzr upgrade --subtree” if
necessary. This
| would have helped Russel Winder, who got bitten by doing what the
warning said
| only to find that “bzr upgrade” failed.
|
| To support this, I added a “supports_tree_reference” method to
Repository (with
| trivial per-implementation test), to match the supports_rich_root
method it
| already has. This wasn't strictly necessary, but I expect it will be
useful for
| RemoteRepository sooner or later (for RemoteRepository it's much easier if
| format features are checked via the repository instance than via a
format).
|
| I also added a hidden format called “subtree”, so that bzr upgrade
- --subtree
| would work. It's an alias for pack-0.92-subtree at the moment. I
think this is
| a reasonable alias to have, after all we already have --rich-root.
|
| This is related to <https://bugs.launchpad.net/bzr/+bug/252908>. It
doesn't fix
| that bug, but it does make it less urgent.
|
| One nice thing about extending the warning message this way is that it
is a
| reminder to the user that their repository is not in a default format.
So I
| think this is a good improvement to have, even if we do fix 252908
soon as well.
|
| -Andrew.
|
|
Well --rich-root is actually Knit format + rich roots. So it isn't
really the same thing as what you are proposing for --subtree.
Since we don't actually have another alias, I would rather not recommend
- --subtree.
Because they actually have to do:
bzr upgrade --rich-root-pack
though with 1.6 now, we would have them do:
bzr upgrade --1.6-rich-root
Also, we are trying to get people away from the -subtree format as it is
more experimental than the rest. There is a "happy" side-effect that you
can do "bzr init --rich-root-pack ; bzr pull ../my-subtree-repo" as long
as you don't actually use subtrees.
(It is technically a bug that pull lets you do this, though you *could*
argue that upgrade should work under the same conditions.)
BB:resubmit
So I think your recommendations are actually wrong, but otherwise I like
the idea to have people use upgrade that will actually, you know, *work*. :)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkiPyv4ACgkQJdeBCYSNAAPvFgCgz0kigd0Ncw7w8MqmxPjZc94A
cFMAoKnlSD3uFam2id+2E1SCwcw29XyS
=Ge3B
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list