Merge lp:~abentley/launchpad/upgrade-badly-stacked into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Aaron Bentley on 2012-08-22 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15852 |
| Proposed branch: | lp:~abentley/launchpad/upgrade-badly-stacked |
| Merge into: | lp:launchpad |
| Diff against target: |
293 lines (+83/-34) 5 files modified
lib/lp/codehosting/safe_open.py (+9/-8) lib/lp/codehosting/tests/helpers.py (+11/-0) lib/lp/codehosting/tests/test_safe_open.py (+43/-22) lib/lp/codehosting/tests/test_upgrade.py (+16/-3) lib/lp/codehosting/upgrade.py (+4/-1) |
| To merge this branch: | bzr merge lp:~abentley/launchpad/upgrade-badly-stacked |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Deryck Hodge (community) | 2012-08-22 | Approve on 2012-08-22 | |
|
Review via email:
|
|||
Commit Message
Allow upgrader to fix cross-format stacking.
Description of the Change
= Summary =
Fix bug #1039558: upgrade_
== Proposed fix ==
Implement and use ignore_fallbacks parameter to safe_open.
== Pre-implementation notes ==
None
== LOC Rationale ==
I have a LOC credit of 1860. Also, once we run this script, we can delete all the associated code.
== Implementation details ==
bzr's upgrade functionality was designed to support upgrading a branch that was stacked on different-format branch, since that is inevitable. (Upgrade either a stacked or stacked-on branch, and you leave the other branch in that situation.) The ignore_fallbacks flag on Branch.open is designed to support such upgrades, but we weren't using it. It wasn't exposed on BzrBranch.
As a driveby, I fixed old stacking-related tests to forgo specifying a format. Evidently, these tests were written before the default format supported stacking (i.e. before 2a became the default). Now, it's just confusing to specify a format.
I extracted force_stacked_on from testSelfStacked
== Tests ==
bin/test -m 'test_upgrade|
== Demo and Q/A ==
None
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/

Looks good, thanks!