launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #04516
[Merge] lp:~abentley/launchpad/ubuntu_merges into lp:launchpad
Aaron Bentley has proposed merging lp:~abentley/launchpad/ubuntu_merges into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #798947 in Launchpad itself: "LocationError: 'proposal_count' raised browsing +merges page"
https://bugs.launchpad.net/launchpad/+bug/798947
For more details, see:
https://code.launchpad.net/~abentley/launchpad/ubuntu_merges/+merge/70772
= Summary =
Fix bug #798947: LocationError: 'proposal_count' raised browsing +merges page
== Proposed fix ==
Allow access to getMergeProposals for DistributionSourcePackage.
== Pre-implementation notes ==
None
== Implementation details ==
DistributionSourcePackage provides getMergeProposals, but unlike other IHasMergeProposals implementations, it was not allowed via configure.zcml. This adds it there.
It also updates our existing IHasMergeProposal compatibility tests to not remove the security proxy before verifying support.
== Tests ==
bin/test -t test_DistributionSourcePackage_implements_hasmergeproposals -t est_distribution_sourcepackage
== Demo and Q/A ==
When you go to https://code.launchpad.net/ubuntu/+source/bzr/+merges you should not get an OOPS.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/code/model/tests/test_hasmergeproposals.py
lib/lp/registry/configure.zcml
lib/lp/code/browser/tests/test_branchmergeproposallisting.py
--
https://code.launchpad.net/~abentley/launchpad/ubuntu_merges/+merge/70772
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~abentley/launchpad/ubuntu_merges into lp:launchpad.
=== modified file 'lib/lp/code/browser/tests/test_branchmergeproposallisting.py'
--- lib/lp/code/browser/tests/test_branchmergeproposallisting.py 2011-05-09 19:09:44 +0000
+++ lib/lp/code/browser/tests/test_branchmergeproposallisting.py 2011-08-08 18:31:29 +0000
@@ -192,6 +192,11 @@
self.getViewBrowser(personproduct, '+merges',
rootsite='code')
+ def test_DistributionSourcePackage(self):
+ """The merges view should be enabled for DistributionSourcePackage."""
+ package = self.factory.makeDistributionSourcePackage()
+ self.getViewBrowser(package, '+merges', rootsite='code')
+
class ActiveReviewGroupsTest(TestCaseWithFactory):
"""Tests for groupings used in for active reviews."""
=== modified file 'lib/lp/code/model/tests/test_hasmergeproposals.py'
--- lib/lp/code/model/tests/test_hasmergeproposals.py 2011-05-09 19:09:44 +0000
+++ lib/lp/code/model/tests/test_hasmergeproposals.py 2011-08-08 18:31:29 +0000
@@ -7,7 +7,7 @@
import unittest
-from canonical.launchpad.webapp.testing import verifyObject
+from zope.interface.verify import verifyObject
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.code.interfaces.hasbranches import IHasMergeProposals
from lp.registry.model.personproduct import PersonProduct
@@ -40,6 +40,11 @@
person_product = PersonProduct(product.owner, product)
verifyObject(IHasMergeProposals, person_product)
+ def test_DistributionSourcePackage_implements_hasmergeproposals(self):
+ # DistributionSourcePackages should implement IHasMergeProposals.
+ dsp = self.factory.makeDistributionSourcePackage()
+ verifyObject(IHasMergeProposals, dsp)
+
def test_suite():
return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/configure.zcml'
--- lib/lp/registry/configure.zcml 2011-08-02 05:35:39 +0000
+++ lib/lp/registry/configure.zcml 2011-08-08 18:31:29 +0000
@@ -488,6 +488,7 @@
findRelatedArchivePublications
findRelatedArchives
getPersonsByEmail
+ getMergeProposals
getReleasesAndPublishingHistory
getUsedBugTags
getUsedBugTagsWithOpenCounts