Merge lp:~bzr/bzr/smooth-upgrades into lp:~bzr/bzr/trunk-old
| Status: | Merged |
|---|---|
| Merge reported by: | Vincent Ladeuil |
| Merged at revision: | not available |
| Proposed branch: | lp:~bzr/bzr/smooth-upgrades |
| Merge into: | lp:~bzr/bzr/trunk-old |
| Diff against target: |
561 lines (has conflicts)
Text conflict in NEWS |
| To merge this branch: | bzr merge lp:~bzr/bzr/smooth-upgrades |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Martin Pool | 2009-07-17 | Needs Information on 2009-07-24 | |
|
Review via email:
|
|||
| Ian Clatworthy (ian-clatworthy) wrote : | # |
| Aaron Bentley (abentley) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I think you should specify using=True to repo.find_branches. Branches
which aren't using the shared repository aren't really part of it even
if they're inside its directory, and may be in an incompatible format.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkp
Ot8Ani+
=7UNy
-----END PGP SIGNATURE-----
| Robert Collins (lifeless) wrote : | # |
On Fri, 2009-07-17 at 02:45 +0000, Ian Clatworthy wrote:
> Ian Clatworthy has proposed merging lp:~bzr/bzr/smooth-upgrades into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
> This patch adds numerous enhancements to the upgrade command to make upgrading a lot smoother than it currently is. In particular, it now upgrades dependent branches when a shared repository is specified. Based on feedback provided on the mailing list a few months back, it now also supports several new options:
>
> * --dry-run for showing what will happen
>
> * --clean to remove the backup.dir directory on successful completion
I think these are useful
> * --pack to pack the repository on successful completion.
This isn't needed; bzr will autopack if packing helps.
> There's room to make things even nicer still but I think this patch is large enough as is. I'd also like to get these changes landed soon to encourage those of us running Bazaar's trunk to get as many branches as possible converted to 2a prior to the Bazaar 2.0 release.
-Rob
| Martin Pool (mbp) wrote : | # |
=== modified file 'NEWS'
--- NEWS 2009-07-15 19:06:39 +0000
+++ NEWS 2009-07-17 02:29:14 +0000
@@ -19,6 +19,17 @@
* ``merge --interactive`` applies a user-selected portion of the merge. The UI
is similar to ``shelve``. (Aaron Bentley)
+* ``upgrade`` now upgrades dependent branches when a shared repository is
+ specified. It also supports several new options:
+
+ * --dry-run for showing what will happen
+
+ * --clean to remove the backup.dir directory on successful completion
+
+ * --pack to pack the repository on successful completion.
+
+ (Ian Clatworthy)
+
I'd put the options in double-backticks too.
You might also find some bug numbers corresponding to these...
Bug Fixes
*********
=== modified file 'bzrlib/
--- bzrlib/builtins.py 2009-07-15 07:32:26 +0000
+++ bzrlib/builtins.py 2009-07-17 02:29:14 +0000
@@ -3122,27 +3122,60 @@
class cmd_upgrade(
- """Upgrade branch storage to current format.
-
- The check command or bzr developers may sometimes advise you to run
- this command. When the default format has changed you may also be warned
- during other operations to upgrade.
+ """Upgrade a repository, branch or working tree to a newer format.
+
+ The check command or Bazaar developers may sometimes advise you to run
+ this command. When the default format has changed after a major new
+ release of Bazaar, you may also be warned during other operations
+ that you should upgrade.
This bit about 'the check command' almost sounds like a mis-copy from
cmd_reconcile. Do we ever specifically recommend an upgrade from check?
Also it might be better off to have the first full paragraph be a more
general explanation like this:
Upgrading to a newer format may improve performance or make
new features available, but it may limit interoperability with
older repositories or with older versions of Bazaar.
Strictly speaking you can also use upgrade to downgrade; it doesn't have
to be to a newer format.
+
+ If the location given is a shared repository, dependent branches
+ are also converted provided the repository converts successfully.
+ If the conversion of a branch fails, remaining branches are still tried.
+
+ A backup.bzr directory is created at the start of the conversion
+ process. By default, this is left there on completion. If the
+ conversion fails, delete the new .bzr directory and rename this
+ one back in its place. Use the --clean option to ask for the
+ backup.bzr directory to be removed on successful conversion.
+ Alternatively, you can delete it by hand if everything looks
+ good afterwards.
+
+ It is often a good idea to pack the repository after an upgrade.
+ Use the --pack option to request this or do it separately using
+ the pack command.
+
+ For more information on upgrades, see the Bazaar 2.0 Upgrade Guide.
"""
- _see_also = ['check']
+ _see_also = ['check', 'reconcile', 'pack']
Also current-formats etc?
takes_args = ['url?']
takes_options = [
- RegistryOption(
- help='Upgrade to a specific format. See "bzr help'
- ...
- 4376. By Ian Clatworthy on 2009-08-19
-
Merge bzr.dev rev 4626
- 4377. By Ian Clatworthy on 2009-08-19
-
review feedback from abentley
- 4378. By Ian Clatworthy on 2009-08-20
-
Add basic checks to blackbox tests (beyond legal usage) as requested by poolie
- 4379. By Ian Clatworthy on 2009-08-20
-
Take --pack out of the UI and improve help (feedback from lifeless and poolie)
- 4380. By Ian Clatworthy on 2009-09-03
-
fix tests to truly use a shared repository, not standalone branches inside one
| Martin Pool (mbp) wrote : | # |
I think this is now back in Ian's court.
| Matthew Fuller (fullermd) wrote : | # |
See mp42746 for an updated version of this.
| Vincent Ladeuil (vila) wrote : | # |
This could be considered merged now.

This patch adds numerous enhancements to the upgrade command to make upgrading a lot smoother than it currently is. In particular, it now upgrades dependent branches when a shared repository is specified. Based on feedback provided on the mailing list a few months back, it now also supports several new options:
* --dry-run for showing what will happen
* --clean to remove the backup.dir directory on successful completion
* --pack to pack the repository on successful completion.
There's room to make things even nicer still but I think this patch is large enough as is. I'd also like to get these changes landed soon to encourage those of us running Bazaar's trunk to get as many branches as possible converted to 2a prior to the Bazaar 2.0 release.