← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/trivialities into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/trivialities into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #132411 in Launchpad itself: "Remove lib/canonical/launchpad/locales/"
  https://bugs.launchpad.net/launchpad/+bug/132411
  Bug #249532 in Launchpad itself: "Bug report says "You are not the assignee nor the maintainer", when you are or that's not relevant"
  https://bugs.launchpad.net/launchpad/+bug/249532
  Bug #381233 in Launchpad itself: "Link to PPA in Accepted email"
  https://bugs.launchpad.net/launchpad/+bug/381233
  Bug #470430 in Launchpad itself: ""Copy packages" link has edit icon"
  https://bugs.launchpad.net/launchpad/+bug/470430
  Bug #619658 in Launchpad itself: ""Removed files can still be downloaded from the Librarian" is unnecessarily technical and usually a lie"
  https://bugs.launchpad.net/launchpad/+bug/619658
  Bug #813593 in Launchpad itself: "Links to +branchvisibility should be shown to users with launchpad.Commercial"
  https://bugs.launchpad.net/launchpad/+bug/813593
  Bug #889083 in Launchpad itself: "random word in moderation page"
  https://bugs.launchpad.net/launchpad/+bug/889083
  Bug #904946 in Launchpad itself: "Tags portlet: use 'fewer tags' instead of 'less tags'"
  https://bugs.launchpad.net/launchpad/+bug/904946
  Bug #924537 in Launchpad itself: ""queue fetch" requires a changes file which copies sometimes lack"
  https://bugs.launchpad.net/launchpad/+bug/924537
  Bug #929498 in Launchpad itself: "Typo on 404 page (acounts instead of accounts)"
  https://bugs.launchpad.net/launchpad/+bug/929498

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/trivialities/+merge/92445

This branch fixes 10 trivial bugs, because why not.

 - Bug #132411: Removed the empty translations directory lib/lp/locales
   and its registration.

 - Bug #249532: Rewrote an obsolete warning from 2005 on
   BugTask:+editstatus.

 - Bug #381233: Added archive links to the PPA accept/reject emails.

 - Bug #470430: Changed the PPA copy/delete package icons from the
   generic edit icon to the sync/trash icons.

 - Bug #619658: Dropped a suggestion to download deleted PPA files from
   the librarian, since they're usually not there.

 - Bug #813593: Unified the wording for +branchvisibility links, and
   let commercial admins see them.

 - Bug #889083: Removed an accidental partial option from the mailing
   list moderation page.

 - Bug #904946: s/less tags/fewer tags/

 - Bug #924537: Fixed "queue fetch" to work on package syncs.

 - Bug #929498: Fixed a typo on the 404 page.
-- 
https://code.launchpad.net/~wgrant/launchpad/trivialities/+merge/92445
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/trivialities into lp:launchpad.
=== modified file 'lib/canonical/launchpad/icing/sprite.css.in'
--- lib/canonical/launchpad/icing/sprite.css.in	2011-12-05 04:19:12 +0000
+++ lib/canonical/launchpad/icing/sprite.css.in	2012-02-10 11:32:24 +0000
@@ -101,6 +101,10 @@
     background-image: url(/@@/package-source.png); /* sprite-ref: icon-sprites */
     background-repeat: no-repeat;
     }
+.package-sync {
+    background-image: url(/@@/package-sync.png); /* sprite-ref: icon-sprites */
+    background-repeat: no-repeat;
+}
 .milestone {
     background-image: url(/@@/milestone.png); /* sprite-ref: icon-sprites */
     background-repeat: no-repeat;

=== modified file 'lib/lp/app/templates/launchpad-notfound.pt'
--- lib/lp/app/templates/launchpad-notfound.pt	2011-12-24 17:49:30 +0000
+++ lib/lp/app/templates/launchpad-notfound.pt	2012-02-10 11:32:24 +0000
@@ -38,7 +38,7 @@
         </p>
       </tal:referred>
       <p tal:condition="not:view/referrer">
-      Check that you are logged in with the correct acount, or that you
+      Check that you are logged in with the correct account, or that you
       entered the address correctly, or search for it:
       </p>
       <form

=== modified file 'lib/lp/bugs/javascript/bugtarget_portlet_bugtags.js'
--- lib/lp/bugs/javascript/bugtarget_portlet_bugtags.js	2012-01-11 10:20:21 +0000
+++ lib/lp/bugs/javascript/bugtarget_portlet_bugtags.js	2012-02-10 11:32:24 +0000
@@ -41,7 +41,7 @@
 };
 
 /**
- * Display the tag list and set up events for showing more/less tags.
+ * Display the tag list and set up events for showing more/fewer tags.
  */
 namespace.on_success = function(transactionid, response, arguments) {
     var portlet = Y.one('#portlet-tags');
@@ -51,7 +51,7 @@
     else {
         portlet.prepend(response.responseText);
         var show_more_link = Y.one('#show-more-tags-link');
-        var show_less_link = Y.one('#show-less-tags-link');
+        var show_fewer_link = Y.one('#show-fewer-tags-link');
         var tag_list = Y.all('.tag-list li');
         if (tag_list.size() > 20) {
             var extra_tags = tag_list.slice(20);
@@ -61,13 +61,13 @@
                 e.halt();
                 extra_tags.removeClass('hidden');
                 show_more_link.addClass('hidden');
-                show_less_link.removeClass('hidden');
+                show_fewer_link.removeClass('hidden');
             });
-            show_less_link.on('click', function(e) {
+            show_fewer_link.on('click', function(e) {
                 e.halt();
                 extra_tags.addClass('hidden');
                 show_more_link.removeClass('hidden');
-                show_less_link.addClass('hidden');
+                show_fewer_link.addClass('hidden');
             });
         }
     }

=== modified file 'lib/lp/bugs/javascript/tests/test_bugtarget_portlet_bugtags.html'
--- lib/lp/bugs/javascript/tests/test_bugtarget_portlet_bugtags.html	2011-11-17 08:35:16 +0000
+++ lib/lp/bugs/javascript/tests/test_bugtarget_portlet_bugtags.html	2012-02-10 11:32:24 +0000
@@ -28,7 +28,7 @@
       </div>
       <a id="tags-content-link" href="/launchpad/+bugtarget-portlet-tags-content"></a>
       <a href="" id="show-more-tags-link" class="js-action hidden">Show more tags&hellip;</a>
-      <a href="" id="show-less-tags-link" class="js-action hidden">Show less tags&hellip;</a>
+      <a href="" id="show-fewer-tags-link" class="js-action hidden">Show fewer tags&hellip;</a>
   </div>
   </body>
 </html>

=== modified file 'lib/lp/bugs/javascript/tests/test_bugtarget_portlet_bugtags.js'
--- lib/lp/bugs/javascript/tests/test_bugtarget_portlet_bugtags.js	2011-12-21 08:26:19 +0000
+++ lib/lp/bugs/javascript/tests/test_bugtarget_portlet_bugtags.js	2012-02-10 11:32:24 +0000
@@ -11,7 +11,7 @@
         tearDown: function() {
                 Y.one('.portletBody').remove();
                 Y.one('#show-more-tags-link').addClass('hidden');
-                Y.one('#show-less-tags-link').addClass('hidden');
+                Y.one('#show-fewer-tags-link').addClass('hidden');
             },
 
         test_io_url: function() {
@@ -39,17 +39,17 @@
                 responseHeaders: {'Content-type': 'text/html'}});
             var tags = Y.all('.tag-list li');
             var show_more_link = Y.one('#show-more-tags-link');
-            var show_less_link = Y.one('#show-less-tags-link');
+            var show_fewer_link = Y.one('#show-fewer-tags-link');
             Y.Assert.areEqual(0, tags.size(), 'The list should be empty');
             Y.Assert.isTrue(
                 show_more_link.hasClass('hidden'),
                 "The 'show more' link should be hidden.");
             Y.Assert.isTrue(
-                show_less_link.hasClass('hidden'),
-                "The 'show less' link should be hidden.");
+                show_fewer_link.hasClass('hidden'),
+                "The 'show fewer' link should be hidden.");
             },
 
-        test_twenty_tags_or_less: function() {
+        test_twenty_tags_or_fewer: function() {
             var mockio = new Y.lp.testing.mockio.MockIo();
             var response = '<div class="portletBody"><div class="section">' +
                 '<h2>Tags</h2><ul class="tag-list">';
@@ -65,13 +65,13 @@
                 responseHeaders: {'Content-type': 'text/html'}});
             var tags = Y.all('.tag-list li');
             var show_more_link = Y.one('#show-more-tags-link');
-            var show_less_link = Y.one('#show-less-tags-link');
+            var show_fewer_link = Y.one('#show-fewer-tags-link');
             Y.assert(tags.size() <= 20,
-                "The list should have twenty tags or less.");
+                "The list should have twenty tags or fewer.");
             Y.Assert.isTrue(show_more_link.hasClass('hidden'),
                 "The 'show more' link should be hidden.");
-            Y.Assert.isTrue(show_less_link.hasClass('hidden'),
-                "The 'show less' link should be hidden.");
+            Y.Assert.isTrue(show_fewer_link.hasClass('hidden'),
+                "The 'show fewer' link should be hidden.");
             },
 
         test_more_than_twenty_tags: function() {
@@ -90,28 +90,28 @@
                 responseHeaders: {'Content-type': 'text/html'}});
             var tags = Y.all('.tag-list li');
             var show_more_link = Y.one('#show-more-tags-link');
-            var show_less_link = Y.one('#show-less-tags-link');
+            var show_fewer_link = Y.one('#show-fewer-tags-link');
             var tag_count = tags.size();
             Y.assert(tag_count > 20,
                 'The list should have more than twenty tags');
             Y.Assert.areEqual(20, tag_count - tags.filter('.hidden').size(),
                 'Only twenty tags should be visible');
-            Y.Assert.isTrue(show_less_link.hasClass('hidden'),
-                'The show less link should be hidden');
+            Y.Assert.isTrue(show_fewer_link.hasClass('hidden'),
+                'The show fewer link should be hidden');
             Y.Assert.isFalse(show_more_link.hasClass('hidden'),
-                'The show less link should be visible');
+                'The show fewer link should be visible');
             show_more_link.simulate('click');
             Y.Assert.areEqual(0, tags.filter('.hidden').size(),
                 'All the tags should now be visible');
             Y.Assert.isTrue(show_more_link.hasClass('hidden'),
                 'The show more link should now be hidden');
-            Y.Assert.isFalse(show_less_link.hasClass('hidden'),
-                'The show less link should now be visible');
-            show_less_link.simulate('click');
+            Y.Assert.isFalse(show_fewer_link.hasClass('hidden'),
+                'The show fewer link should now be visible');
+            show_fewer_link.simulate('click');
             Y.Assert.areEqual(20, tag_count - tags.filter('.hidden').size(),
                 'Only twenty tags should now be visible');
-            Y.Assert.isTrue(show_less_link.hasClass('hidden'),
-                'The show less link should now be hidden');
+            Y.Assert.isTrue(show_fewer_link.hasClass('hidden'),
+                'The show fewer link should now be hidden');
             Y.Assert.isFalse(show_more_link.hasClass('hidden'),
                 'The show more link should now be visible');
             }

=== modified file 'lib/lp/bugs/templates/bugtarget-portlet-bugtags.pt'
--- lib/lp/bugs/templates/bugtarget-portlet-bugtags.pt	2012-02-01 15:31:32 +0000
+++ lib/lp/bugs/templates/bugtarget-portlet-bugtags.pt	2012-02-10 11:32:24 +0000
@@ -16,7 +16,7 @@
     });
   </script>
   <a href="" id="show-more-tags-link" class="js-action hidden">Show more tags&hellip;</a>
-  <a href="" id="show-less-tags-link" class="js-action hidden">Show less tags&hellip;</a>
+  <a href="" id="show-fewer-tags-link" class="js-action hidden">Show fewer tags&hellip;</a>
   <ul class="edit-official-tags">
     <li tal:condition="view/show_manage_tags_link">
       <a class="sprite edit"

=== modified file 'lib/lp/bugs/templates/bugtask-edit-form.pt'
--- lib/lp/bugs/templates/bugtask-edit-form.pt	2011-11-18 04:06:16 +0000
+++ lib/lp/bugs/templates/bugtask-edit-form.pt	2012-02-10 11:32:24 +0000
@@ -26,9 +26,7 @@
   </p>
 
   <p tal:condition="not: context/required:launchpad.Edit" class="error message">
-    You are not the bug assignee nor the maintainer of
-    <tal:context replace="context/bugtargetdisplayname">project</tal:context>,
-    and therefore cannot edit this bug's status.
+    You need to log in to change this bug's status.
   </p>
   <tal:has_watch
       condition="context/bugwatch"

=== modified file 'lib/lp/configure.zcml'
--- lib/lp/configure.zcml	2011-12-30 10:01:49 +0000
+++ lib/lp/configure.zcml	2012-02-10 11:32:24 +0000
@@ -36,7 +36,6 @@
 
     <include file="permissions.zcml" />
 
-    <i18n:registerTranslations directory="locales" />
     <webservice:register module="lp.patchwebservice" />
     <authorizations module="lp.security" />
 

=== removed directory 'lib/lp/locales'
=== modified file 'lib/lp/registry/browser/product.py'
--- lib/lp/registry/browser/product.py	2012-02-09 01:19:04 +0000
+++ lib/lp/registry/browser/product.py	2012-02-10 11:32:24 +0000
@@ -515,9 +515,9 @@
         text = 'Downloads'
         return Link('+download', text)
 
-    @enabled_with_permission('launchpad.Admin')
+    @enabled_with_permission('launchpad.Commercial')
     def branchvisibility(self):
-        text = 'Branch Visibility Policy'
+        text = 'Define branch visibility'
         return Link('+branchvisibility', text)
 
 
@@ -672,9 +672,9 @@
         text = 'Downloads'
         return Link('+download', text, icon='info')
 
-    @enabled_with_permission('launchpad.Admin')
+    @enabled_with_permission('launchpad.Commercial')
     def branchvisibility(self):
-        text = 'Branch Visibility Policy'
+        text = 'Define branch visibility'
         return Link('+branchvisibility', text, icon='edit')
 
     def branch_add(self):

=== modified file 'lib/lp/registry/templates/team-mailinglist-moderate.pt'
--- lib/lp/registry/templates/team-mailinglist-moderate.pt	2010-09-14 00:21:04 +0000
+++ lib/lp/registry/templates/team-mailinglist-moderate.pt	2012-02-10 11:32:24 +0000
@@ -35,7 +35,6 @@
           action for obvious spam.</li>
           <li><strong>Hold</strong> - Continue to hold the message, deferring
           your decision until later.</li>
-          <li>Toss</li>
         </ul>
       </div>
       <div metal:fill-slot="widgets">

=== modified file 'lib/lp/soyuz/adapters/notification.py'
--- lib/lp/soyuz/adapters/notification.py	2012-01-01 02:58:52 +0000
+++ lib/lp/soyuz/adapters/notification.py	2012-02-10 11:32:24 +0000
@@ -52,9 +52,6 @@
     :param reason: The reason for the rejection.
     """
     ignored, filename = os.path.split(changes_file_path)
-    subject = '%s rejected' % filename
-    if archive and archive.is_ppa:
-        subject = '[PPA %s] %s' % (get_ppa_reference(archive), subject)
     information = {
         'SUMMARY': reason,
         'CHANGESFILE': '',
@@ -63,8 +60,13 @@
         'MAINTAINER': '',
         'SIGNER': '',
         'ORIGIN': '',
+        'ARCHIVE_URL': '',
         'USERS_ADDRESS': config.launchpad.users_address,
     }
+    subject = '%s rejected' % filename
+    if archive and archive.is_ppa:
+        subject = '[PPA %s] %s' % (get_ppa_reference(archive), subject)
+        information['ARCHIVE_URL'] = '\n%s' % canonical_url(archive)
     template = get_template(archive, 'rejected')
     body = template % information
     to_addrs = get_upload_notification_recipients(
@@ -282,6 +284,7 @@
         'ORIGIN': '',
         'SIGNER': '',
         'SPR_URL': '',
+        'ARCHIVE_URL': '\n%s' % canonical_url(archive),
         'USERS_ADDRESS': config.launchpad.users_address,
         }
     if spr:

=== modified file 'lib/lp/soyuz/adapters/tests/test_notification.py'
--- lib/lp/soyuz/adapters/tests/test_notification.py	2012-01-01 02:58:52 +0000
+++ lib/lp/soyuz/adapters/tests/test_notification.py	2012-02-10 11:32:24 +0000
@@ -195,7 +195,8 @@
         removeSecurityProxy(
             bpr.build.source_package_release).changelog = changelog
         self.layer.txn.commit()
-        archive = self.factory.makeArchive()
+        person = self.factory.makePerson(name='archiver')
+        archive = self.factory.makeArchive(owner=person, name='ppa')
         pocket = self.factory.getAnyPocket()
         distroseries = self.factory.makeDistroSeries()
         person = self.factory.makePerson()
@@ -218,8 +219,8 @@
             If you don't understand why your files were rejected please send an email
             to launchpad-users@xxxxxxxxxxxxxxxxxxx for help (requires membership).
 
-            -- =
-
+            --
+            http://launchpad.dev/~archiver/+archive/ppa
             You are receiving this email because you are the uploader of the above
             PPA package.
             """)

=== modified file 'lib/lp/soyuz/browser/archive.py'
--- lib/lp/soyuz/browser/archive.py	2012-01-30 05:32:34 +0000
+++ lib/lp/soyuz/browser/archive.py	2012-02-10 11:32:24 +0000
@@ -505,7 +505,7 @@
     def delete(self):
         """Display a delete menu option for non-copy archives."""
         text = 'Delete packages'
-        link = Link('+delete-packages', text, icon='edit')
+        link = Link('+delete-packages', text, icon='trash-icon')
 
         # This link should not be available for copy archives or
         # archives without any sources.
@@ -520,7 +520,7 @@
     def copy(self):
         """Display a copy menu option for non-copy archives."""
         text = 'Copy packages'
-        link = Link('+copy-packages', text, icon='edit')
+        link = Link('+copy-packages', text, icon='package-sync')
 
         # This link should not be available for copy archives.
         if self.context.is_copy:

=== modified file 'lib/lp/soyuz/emailtemplates/ppa-upload-accepted.txt'
--- lib/lp/soyuz/emailtemplates/ppa-upload-accepted.txt	2011-12-18 23:30:56 +0000
+++ lib/lp/soyuz/emailtemplates/ppa-upload-accepted.txt	2012-02-10 11:32:24 +0000
@@ -3,6 +3,6 @@
 
 %(CHANGESFILE)s
 
--- 
+--%(ARCHIVE_URL)s
 You are receiving this email because you are the uploader of the above
 PPA package.

=== modified file 'lib/lp/soyuz/emailtemplates/ppa-upload-rejection.txt'
--- lib/lp/soyuz/emailtemplates/ppa-upload-rejection.txt	2011-12-18 23:30:56 +0000
+++ lib/lp/soyuz/emailtemplates/ppa-upload-rejection.txt	2012-02-10 11:32:24 +0000
@@ -8,6 +8,6 @@
 If you don't understand why your files were rejected please send an email
 to %(USERS_ADDRESS)s for help (requires membership).
 
--- 
+--%(ARCHIVE_URL)s
 You are receiving this email because you are the uploader of the above
 PPA package.

=== modified file 'lib/lp/soyuz/scripts/queue.py'
--- lib/lp/soyuz/scripts/queue.py	2011-12-30 01:10:37 +0000
+++ lib/lp/soyuz/scripts/queue.py	2012-02-10 11:32:24 +0000
@@ -409,7 +409,8 @@
         self.displayRule()
         for queue_item in self.items:
             file_list = []
-            file_list.append(queue_item.changesfile)
+            if queue_item.changesfile is not None:
+                file_list.append(queue_item.changesfile)
 
             for source in queue_item.sources:
                 for spr_file in source.sourcepackagerelease.files:

=== modified file 'lib/lp/soyuz/scripts/tests/test_copypackage.py'
--- lib/lp/soyuz/scripts/tests/test_copypackage.py	2012-01-24 17:27:44 +0000
+++ lib/lp/soyuz/scripts/tests/test_copypackage.py	2012-02-10 11:32:24 +0000
@@ -1433,8 +1433,10 @@
         changelog = self.factory.makeChangelog(spn="foo", versions=["1.0-2"])
         source.sourcepackagerelease.changelog = changelog
         transaction.commit()
+        person = self.factory.makePerson(name='archiver')
         target_archive = self.factory.makeArchive(
-            distribution=self.test_publisher.ubuntutest)
+            distribution=self.test_publisher.ubuntutest,
+            owner=person, name='ppa')
         [copied_source] = do_copy(
             [source], target_archive, nobby, source.pocket, False,
             person=target_archive.owner, check_permissions=False,
@@ -1453,8 +1455,8 @@
 
               * 1.0-2.
 
-            -- =
-
+            --
+            http://launchpad.dev/~archiver/+archive/ppa
             You are receiving this email because you are the uploader of the above
             PPA package.
             """)

=== modified file 'lib/lp/soyuz/scripts/tests/test_queue.py'
--- lib/lp/soyuz/scripts/tests/test_queue.py	2012-01-20 15:42:44 +0000
+++ lib/lp/soyuz/scripts/tests/test_queue.py	2012-02-10 11:32:24 +0000
@@ -1242,3 +1242,18 @@
         self.assertEqual(
             ['mozilla-firefox_0.9_i386.changes', 'netapplet-1.0.0.tar.gz'],
             files)
+
+    def testFetchWithoutChanges(self):
+        """Check that fetch works without a changes file (eg. from gina)."""
+        pus = getUtility(IDistributionSet).getByName('ubuntu').getSeries(
+            'breezy-autotest').getPackageUploads(name=u'pmount')
+        for pu in pus:
+            removeSecurityProxy(pu).changesfile = None
+
+        FAKE_DEB_CONTENT = "Fake DEB"
+        fillLibrarianFile(90, FAKE_DEB_CONTENT)
+        self.execute_command('fetch pmount')
+
+        # Check the files' names.
+        files = sorted(self._listfiles())
+        self.assertEqual(['pmount_1.0-1_all.deb'], files)

=== modified file 'lib/lp/soyuz/stories/ppa/xx-delete-packages.txt'
--- lib/lp/soyuz/stories/ppa/xx-delete-packages.txt	2012-01-30 05:38:37 +0000
+++ lib/lp/soyuz/stories/ppa/xx-delete-packages.txt	2012-02-10 11:32:24 +0000
@@ -517,9 +517,8 @@
     >>> from lp.services.database.sqlbase import flush_database_updates
     >>> flush_database_updates()
 
-Now, not only the 'Removed from disk' notice is rendered inside the
-expandable area, but also the message mentioned pointing to the file
-links at the end of the section.
+Now the 'Removed from disk' notice is rendered inside the expandable
+area.
 
     >>> user_browser.getControl(
     ...    name='field.status_filter').value = ['superseded']
@@ -533,7 +532,6 @@
     Removed from disk ... ago.
     Deleted ... ago by No Privileges Person
     Deletion of a number of base pairs that is not evenly divisible by ...
-    Removed files can still be downloaded from the Librarian; see below.
     Changelog
     Builds
       i386

=== modified file 'lib/lp/soyuz/templates/packagepublishing-details.pt'
--- lib/lp/soyuz/templates/packagepublishing-details.pt	2011-03-03 02:17:12 +0000
+++ lib/lp/soyuz/templates/packagepublishing-details.pt	2012-02-10 11:32:24 +0000
@@ -70,11 +70,4 @@
     </li>
 
   </ul>
-
-  <tal:ppa condition="context/archive/is_ppa">
-    <p tal:condition="view/isRemoved">
-      Removed files can still be downloaded from the Librarian; see below.
-    </p>
-  </tal:ppa>
-
 </tal:root>