← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/remove-branch-navigation-menu into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/remove-branch-navigation-menu into lp:launchpad.

Commit message:
Remove no-longer-used IBranchNavigationMenu.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/remove-branch-navigation-menu/+merge/256316

Remove no-longer-used IBranchNavigationMenu.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/remove-branch-navigation-menu into lp:launchpad.
=== modified file 'lib/lp/code/interfaces/branch.py'
--- lib/lp/code/interfaces/branch.py	2015-02-25 12:48:27 +0000
+++ lib/lp/code/interfaces/branch.py	2015-04-15 13:51:16 +0000
@@ -17,7 +17,6 @@
     'IBranchCloud',
     'IBranchDelta',
     'IBranchListingQueryOptimiser',
-    'IBranchNavigationMenu',
     'IBranchSet',
     'user_has_special_branch_access',
     'WrongNumberOfReviewTypeArguments',
@@ -240,10 +239,6 @@
     """A marker interface for registering the appropriate branch listings."""
 
 
-class IBranchNavigationMenu(Interface):
-    """A marker interface to indicate the need to show the branch menu."""
-
-
 class IBranchPublic(Interface):
     """Public attributes for a branch."""
 

=== modified file 'lib/lp/code/model/branch.py'
--- lib/lp/code/model/branch.py	2015-02-25 12:48:27 +0000
+++ lib/lp/code/model/branch.py	2015-04-15 13:51:16 +0000
@@ -108,7 +108,6 @@
     BzrIdentityMixin,
     DEFAULT_BRANCH_STATUS_IN_LISTING,
     IBranch,
-    IBranchNavigationMenu,
     IBranchSet,
     user_has_special_branch_access,
     WrongNumberOfReviewTypeArguments,
@@ -191,7 +190,7 @@
 class Branch(SQLBase, BzrIdentityMixin):
     """A sequence of ordered revisions in Bazaar."""
 
-    implements(IBranch, IBranchNavigationMenu, IPrivacy, IInformationType)
+    implements(IBranch, IPrivacy, IInformationType)
     _table = 'Branch'
 
     branch_type = EnumCol(enum=BranchType, notNull=True)

=== modified file 'lib/lp/code/model/branchmergeproposal.py'
--- lib/lp/code/model/branchmergeproposal.py	2015-03-13 19:05:50 +0000
+++ lib/lp/code/model/branchmergeproposal.py	2015-04-15 13:51:16 +0000
@@ -55,7 +55,6 @@
     NewCodeReviewCommentEvent,
     ReviewerNominatedEvent,
     )
-from lp.code.interfaces.branch import IBranchNavigationMenu
 from lp.code.interfaces.branchcollection import IAllBranches
 from lp.code.interfaces.branchmergeproposal import (
     BRANCH_MERGE_PROPOSAL_FINAL_STATES as FINAL_STATES,
@@ -168,7 +167,7 @@
 class BranchMergeProposal(SQLBase):
     """A relationship between a person and a branch."""
 
-    implements(IBranchMergeProposal, IBranchNavigationMenu, IHasBranchTarget)
+    implements(IBranchMergeProposal, IHasBranchTarget)
 
     _table = 'BranchMergeProposal'
     _defaultOrder = ['-date_created', 'id']

=== modified file 'lib/lp/code/model/branchsubscription.py'
--- lib/lp/code/model/branchsubscription.py	2013-01-07 02:40:55 +0000
+++ lib/lp/code/model/branchsubscription.py	2015-04-15 13:51:16 +0000
@@ -12,7 +12,6 @@
     BranchSubscriptionNotificationLevel,
     CodeReviewNotificationLevel,
     )
-from lp.code.interfaces.branch import IBranchNavigationMenu
 from lp.code.interfaces.branchsubscription import IBranchSubscription
 from lp.code.interfaces.branchtarget import IHasBranchTarget
 from lp.code.security import BranchSubscriptionEdit
@@ -26,7 +25,7 @@
 class BranchSubscription(SQLBase):
     """A relationship between a person and a branch."""
 
-    implements(IBranchSubscription, IBranchNavigationMenu, IHasBranchTarget)
+    implements(IBranchSubscription, IHasBranchTarget)
 
     _table = 'BranchSubscription'
 

=== modified file 'lib/lp/code/model/codereviewcomment.py'
--- lib/lp/code/model/codereviewcomment.py	2011-12-30 06:14:56 +0000
+++ lib/lp/code/model/codereviewcomment.py	2015-04-15 13:51:16 +0000
@@ -17,7 +17,6 @@
 from zope.interface import implements
 
 from lp.code.enums import CodeReviewVote
-from lp.code.interfaces.branch import IBranchNavigationMenu
 from lp.code.interfaces.branchtarget import IHasBranchTarget
 from lp.code.interfaces.codereviewcomment import (
     ICodeReviewComment,
@@ -64,7 +63,6 @@
     """A table linking branch merge proposals and messages."""
 
     implements(
-        IBranchNavigationMenu,
         ICodeReviewComment,
         ICodeReviewCommentDeletion,
         IHasBranchTarget,

=== removed file 'lib/lp/code/model/tests/test_branchnavigationmenu.py'
--- lib/lp/code/model/tests/test_branchnavigationmenu.py	2012-01-01 02:58:52 +0000
+++ lib/lp/code/model/tests/test_branchnavigationmenu.py	1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
-# GNU Affero General Public License version 3 (see the file LICENSE).
-
-"""Tests for IBranchNavigationMenu implementations"""
-
-__metaclass__ = type
-
-from lp.code.interfaces.branch import IBranchNavigationMenu
-from lp.testing import TestCaseWithFactory
-from lp.testing.layers import LaunchpadZopelessLayer
-
-
-class TestBranchNavigation(TestCaseWithFactory):
-
-    layer = LaunchpadZopelessLayer
-
-    def test_simple_branch(self):
-        """Branches implement IBranchNavigation"""
-        branch = self.factory.makeAnyBranch()
-        self.assertTrue(IBranchNavigationMenu.providedBy(branch))
-
-    def test_merge_proposal(self):
-        """Merge proposals implement IBranchNavigation"""
-        merge_proposal = self.factory.makeBranchMergeProposal()
-        self.assertTrue(IBranchNavigationMenu.providedBy(merge_proposal))
-
-    def test_branch_subscription(self):
-        """Branch subscriptions implement IBranchNavigation"""
-        subscription = self.factory.makeBranchSubscription()
-        self.assertTrue(IBranchNavigationMenu.providedBy(subscription))
-
-    def test_review_comment(self):
-        """Review comments implement IBranchNavigation"""
-        comment = self.factory.makeCodeReviewComment()
-        self.assertTrue(IBranchNavigationMenu.providedBy(comment))


Follow ups