Merge lp:~sinzui/launchpad/series-branch-target into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Aaron Bentley on 2010-04-12 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | not available |
| Proposed branch: | lp:~sinzui/launchpad/series-branch-target |
| Merge into: | lp:launchpad |
| Diff against target: |
616 lines (+142/-153) 14 files modified
lib/lp/code/browser/tests/test_branch.py (+0/-6) lib/lp/code/configure.zcml (+0/-4) lib/lp/code/model/branchtarget.py (+0/-18) lib/lp/code/model/tests/test_branchtarget.py (+1/-26) lib/lp/code/stories/branches/xx-creating-branches.txt (+1/-1) lib/lp/registry/browser/configure.zcml (+26/-14) lib/lp/registry/browser/pillar.py (+1/-55) lib/lp/registry/browser/product.py (+34/-1) lib/lp/registry/browser/productseries.py (+48/-11) lib/lp/registry/browser/tests/pillar-views.txt (+0/-10) lib/lp/registry/browser/tests/productseries-views.txt (+28/-5) lib/lp/registry/model/distribution.py (+1/-0) lib/lp/registry/templates/productseries-codesummary.pt (+1/-1) lib/lp/registry/templates/productseries-linkbranch.pt (+1/-1) |
| To merge this branch: | bzr merge lp:~sinzui/launchpad/series-branch-target |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Curtis Hovey (community) | Abstain on 2010-04-12 | ||
| Aaron Bentley (community) | Approve on 2010-04-12 | ||
| Tim Penhey (community) | 2010-04-08 | Approve on 2010-04-08 | |
|
Review via email:
|
|||
Description of the Change
See the revised merge summary below
| Curtis Hovey (sinzui) wrote : | # |
Hi Tim.
There was a single test failure that showed that this change toppled all the facet/navigation links for product series. Both classes of link reply on IPrimaryContext. This change made all productseries application and involvement links go to the product.
I am reimplementing this by removing the IBranchTarget adapter. My fix is to subclass the the InvolvementMenu and view for IProductSeries. This is not as simple as it seems. Edwin did this recently and discovered that we could not import anything from browser.pillar without causing insane adaptions; he had to place product related classes in the pillar modile. My implementaiton solves this by removing the inline python providesAdapter() and using ZCML--damn it, ZCML is useful :(
Since Edwin's branch is landing, I will wait for his branch to be merged, and I will fix his classes. I will seek a re-review on Monday I think.
| Curtis Hovey (sinzui) wrote : | # |
This is my branch to remove ProductSeriesBr
lp:~sinzui/launchpad/series-branch-target
Diff size: 500
Launchpad bug: https:/
Test command: ./bin/test -vv \
-t test_branchtarget \
-t pillar-views \
-t productseries-views
Pre-
Target release: 10.04
Remove ProductSeriesBr
-------
Thumper says that ProductSeriesBr
follow the BranchTarget model and leads to confusion, and wasted effort
trying to understand it.
The suggested change of using a function to return ProductBranchTarget
broke the facet menus (Application/tab menus) because the IPrimaryContext
for IProductSeries was wrongly changed to IProduct.
The correct fix is to remove the branch adaption and fixing the link in an
adaption InvolvedMenu. This requires fixing the adaption insanity that
happens when lp.registry.
Rules
-----
* Remove the ProductBranchTarget subclass with a function that returns
ProductBr
* Subclass the InvolvedMenu to provide the correct link for ProductSeries.
* Fix the adaption issues caused by importing browser.pillar.
* Moved the Product and ProductSeries views in pillar to their proper
modules.
QA
--
* Visit https:/
* Choose Submit code from the Involvement menu
* Verify that you see the Register a branch on Gedit Developer Plugins
page (not an oops.)
Lint
----
Linting changed files:
* lib/lp/
* lib/lp/
* lib/lp/
* lib/lp/
* lib/lp/
* lib/lp/
* lib/lp/
* lib/lp/
* lib/lp/
Test
----
* lib/lp/
* Removed test for removed code.
* lib/lp/
* Removed product series test because there is a better test.
* lib/lp/
* Added a test to verify all the productseries links are to the
correct host and target.
Implementation
--------------
* lib/lp/
* Unregistered removed code.
* lib/lp/
* Removed the adapter.
* lib/lp/
* Moved the InvolvedMenu provideAdapter registration into the zcml to
insanity when pillar is imported.
* Moved the Product and ProductSeries registrations to their proper
location in the ZCML file.
* Registered a new adapter for ProductSeriesIn
* lib/lp/
* Removed the provideAdapter call that causes alternate registrations
when browser.pillar is imported. Used ZCML to do the registration.
* Moved the Product and ProductSeries views to their proper modules.
* lib/...

Looks good