[MERGE] Improve warning to 'bzr upgrade' to specify --rich-root or --subtree if needed.
Andrew Bennetts
andrew at canonical.com
Wed Jul 30 00:59:57 BST 2008
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: better-upgrade-warning-3584.patch
Type: text/x-diff
Size: 6692 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080730/f4f062ac/attachment-0001.bin
More information about the bazaar
mailing list