← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jelmer/launchpad/no-code-import-approval-2 into lp:launchpad

 

Jelmer Vernooij has proposed merging lp:~jelmer/launchpad/no-code-import-approval-2 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #524303 in Launchpad itself: "Inaccurate notification after creating Git import"
  https://bugs.launchpad.net/launchpad/+bug/524303

For more details, see:
https://code.launchpad.net/~jelmer/launchpad/no-code-import-approval-2/+merge/73388

Two trivial fixes related to code import approvals:

 * Fix an incorrect message about code imports - they're now all automatically approved.
 * Remove the "Create Approved Import" button from the new import page, as it no longer is any different from the "Request Import" button

There didn't appear to be any tests related to either of these.
-- 
https://code.launchpad.net/~jelmer/launchpad/no-code-import-approval-2/+merge/73388
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jelmer/launchpad/no-code-import-approval-2 into lp:launchpad.
=== modified file 'lib/lp/code/browser/codeimport.py'
--- lib/lp/code/browser/codeimport.py	2011-05-27 21:12:25 +0000
+++ lib/lp/code/browser/codeimport.py	2011-08-30 15:02:25 +0000
@@ -424,29 +424,7 @@
         self.next_url = canonical_url(code_import.branch)
 
         self.request.response.addNotification("""
-            New code import created. The code import operators
-            have been notified and the request will be reviewed shortly.""")
-
-    def _showApprove(self, ignored):
-        """Is the user an admin or member of vcs-imports?"""
-        return self._super_user
-
-    @action(_('Create Approved Import'), name='approve',
-            condition=_showApprove)
-    def approve_action(self, action, data):
-        """Create the code_import, and subscribe the user to the branch."""
-        try:
-            code_import = self._create_import(
-                data, CodeImportReviewStatus.REVIEWED)
-        except BranchExists, e:
-            self._setBranchExists(e.existing_branch)
-            return
-
-        # Don't subscribe the requester as they are an import operator.
-        self.next_url = canonical_url(code_import.branch)
-
-        self.request.response.addNotification(
-            "New reviewed code import created.")
+            New code import created. The code import will start shortly.""")
 
     def getProduct(self, data):
         """If the context is a product, use that, otherwise get from data."""


Follow ups