← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~sinzui/launchpad/peppermint-sticks into lp:launchpad

 

Curtis Hovey has proposed merging lp:~sinzui/launchpad/peppermint-sticks into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #385711 projectgroup sorts projects by their name instead of displayname
  https://bugs.launchpad.net/bugs/385711
  #398896 get rid of Author tags (etc) in Launchpad source code
  https://bugs.launchpad.net/bugs/398896


Fix ProjectGroup.products sort order and remove Author: comments.

    Launchpad bug:
        https://bugs.launchpad.net/bugs/385711
        https://bugs.launchpad.net/bugs/398896
    Pre-implementation: no one
    Test command: ./bin/test -vv \
      -t doc/projectgroup -t doc/milestone \
      -t xx-project-index -t xx-project-guided-filebug

Bug #385711 [projectgroup sorts projects by their name instead of displayname]
    The project drop-down menu in the form for filing a new bug on a
    projectgroup shows the project displayname, but it sorts the list by the
    project name. The project group page is also sorted wrong

Bug #398896 [get rid of Author tags (etc) in Launchpad source code]
    Some files in the Launchpad source code have "Author:" tags. They
    shouldn't.

--------------------------------------------------------------------

RULES

Bug #385711 [projectgroup sorts projects by their name instead of displayname]
    * Change ProjectGroup.products to sort by displayname.
    * ADDENDUM Remove ProductView.projproducts because it is never used.

Bug #398896 [get rid of Author tags (etc) in Launchpad source code]
    * Delete the lines


QA

Bug #385711 [projectgroup sorts projects by their name instead of displayname]
    * Visit https://launchpad.net/launchpad-project
    * Verify the projects are listed in alphabetical order.

Bug #398896 [get rid of Author tags (etc) in Launchpad source code]
    None


LINT

  cronscripts/buildd-queue-builder.py
  daemons/buildd-slave.tac
  doc/security.txt
  lib/canonical/buildd/__init__.py
  lib/canonical/buildd/generate-translation-templates
  lib/canonical/buildd/mount-chroot
  lib/canonical/buildd/override-sources-list
  lib/canonical/buildd/remove-build
  lib/canonical/buildd/scan-for-processes
  lib/canonical/buildd/umount-chroot
  lib/canonical/buildd/unpack-chroot
  lib/canonical/buildd/update-debian-chroot
  lib/canonical/buildd/debian/launchpad-buildd.init
  lib/canonical/launchpad/scripts/tests/__init__.py
  lib/lp/bugs/stories/guided-filebug/xx-project-guided-filebug.txt
  lib/lp/registry/browser/product.py
  lib/lp/registry/codesofconduct/README
  lib/lp/registry/doc/milestone.txt
  lib/lp/registry/doc/projectgroup.txt
  lib/lp/registry/model/projectgroup.py
  lib/lp/registry/stories/project/xx-project-index.txt

^ Lint hates the txt files. I can clean these up before I land.


IMPLEMENTATION

Bug #385711 [projectgroup sorts projects by their name instead of displayname]
    Changed the sort on ProjectGroup.products to displayname. Removed unused
    method from ProductView.projproducts and duplicate test from
    xx-project-guided-filebug.
    lib/lp/bugs/stories/guided-filebug/xx-project-guided-filebug.txt
    lib/lp/registry/browser/product.py
    lib/lp/registry/doc/milestone.txt
    lib/lp/registry/doc/projectgroup.txt
    lib/lp/registry/model/projectgroup.py
    lib/lp/registry/stories/project/xx-project-index.txt

Bug #398896 [get rid of Author tags (etc) in Launchpad source code]
    Deleted the author comments from the files.
    cronscripts/buildd-queue-builder.py
    daemons/buildd-slave.tac
    doc/security.txt
    lib/canonical/buildd/__init__.py
    lib/canonical/buildd/debian/launchpad-buildd.init
    lib/canonical/buildd/generate-translation-templates
    lib/canonical/buildd/mount-chroot
    lib/canonical/buildd/override-sources-list
    lib/canonical/buildd/remove-build
    lib/canonical/buildd/scan-for-processes
    lib/canonical/buildd/umount-chroot
    lib/canonical/buildd/unpack-chroot
    lib/canonical/buildd/update-debian-chroot
    lib/canonical/launchpad/scripts/tests/__init__.py
    lib/lp/registry/codesofconduct/README
-- 
https://code.launchpad.net/~sinzui/launchpad/peppermint-sticks/+merge/44378
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/peppermint-sticks into lp:launchpad.
=== modified file 'cronscripts/buildd-queue-builder.py'
--- cronscripts/buildd-queue-builder.py	2010-04-27 19:48:39 +0000
+++ cronscripts/buildd-queue-builder.py	2010-12-21 19:01:21 +0000
@@ -2,13 +2,8 @@
 #
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
+"""Build Jobs initialisation."""
 
-# pylint: disable-msg=C0103,W0403
-# Author: Daniel Silverstone <daniel.silverstone@xxxxxxxxxxxxx>
-#         Celso Providelo <celso.providelo@xxxxxxxxxxxxx>
-#
-# Build Jobs initialisation
-#
 __metaclass__ = type
 
 import _pythonpath

=== modified file 'daemons/buildd-slave.tac'
--- daemons/buildd-slave.tac	2010-10-20 18:43:29 +0000
+++ daemons/buildd-slave.tac	2010-12-21 19:01:21 +0000
@@ -1,8 +1,6 @@
 # Copyright 2009, 2010 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
-# Author: Daniel Silverstone <daniel.silverstone@xxxxxxxxxxxxx>
-
 # Buildd Slave implementation
 # XXX: dsilvers: 2005/01/21: Currently everything logged in the slave gets
 # passed through to the twistd log too. this could get dangerous/big

=== modified file 'doc/security.txt'
--- doc/security.txt	2010-12-18 03:05:44 +0000
+++ doc/security.txt	2010-12-21 19:01:21 +0000
@@ -1,9 +1,6 @@
 Security Policy in Launchpad
 ============================
 
-Author: Brad Bollenbach
-Date: 2005-01-26
-
 Zope 3 is a security-aware framework that makes it possible to develop complex
 applications with security policies that closely resemble the reality that the
 system is trying to model.

=== modified file 'lib/canonical/buildd/__init__.py'
--- lib/canonical/buildd/__init__.py	2009-06-25 05:39:50 +0000
+++ lib/canonical/buildd/__init__.py	2010-12-21 19:01:21 +0000
@@ -1,7 +1,5 @@
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
-# Author: Daniel Silverstone <daniel.silverstone@xxxxxxxxxxxxx>
-
 from canonical.buildd.slave import XMLRPCBuildDSlave
 from canonical.buildd.debian import DebianBuildManager

=== modified file 'lib/canonical/buildd/debian/launchpad-buildd.init'
--- lib/canonical/buildd/debian/launchpad-buildd.init	2010-07-22 16:12:39 +0000
+++ lib/canonical/buildd/debian/launchpad-buildd.init	2010-12-21 19:01:21 +0000
@@ -5,8 +5,6 @@
 #
 # launchpad-buildd
 #               This file is used to start and stop launchpad buildds
-#
-# Author:       Daniel Silverstone <daniel.silverstone@xxxxxxxxxxxxx>
 
 ### BEGIN INIT INFO
 # Provides:          launchpad_buildd

=== modified file 'lib/canonical/buildd/generate-translation-templates'
--- lib/canonical/buildd/generate-translation-templates	2010-05-19 15:32:21 +0000
+++ lib/canonical/buildd/generate-translation-templates	2010-12-21 19:01:21 +0000
@@ -2,8 +2,6 @@
 #
 # Copyright 2010 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
-#
-# Author: Henning Eggers <henning@xxxxxxxxxxxxx>
 
 # Buildd Slave tool to generate translation templates. Boiler plate code
 # copied from sbuild-package.

=== modified file 'lib/canonical/buildd/mount-chroot'
--- lib/canonical/buildd/mount-chroot	2010-11-23 13:19:18 +0000
+++ lib/canonical/buildd/mount-chroot	2010-12-21 19:01:21 +0000
@@ -2,8 +2,6 @@
 #
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
-#
-# Author: Daniel Silverstone <daniel.silverstone@xxxxxxxxxxxxx>
 
 # Buildd Slave tool to mount a chroot
 

=== modified file 'lib/canonical/buildd/override-sources-list'
--- lib/canonical/buildd/override-sources-list	2009-06-30 21:06:27 +0000
+++ lib/canonical/buildd/override-sources-list	2010-12-21 19:01:21 +0000
@@ -2,8 +2,6 @@
 #
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
-#
-# Author: Colin Watson <cjwatson@xxxxxxxxxxxxx>
 
 # Buildd Slave tool to override sources.list in the chroot with a list of
 # archives

=== modified file 'lib/canonical/buildd/remove-build'
--- lib/canonical/buildd/remove-build	2009-06-30 21:06:27 +0000
+++ lib/canonical/buildd/remove-build	2010-12-21 19:01:21 +0000
@@ -2,8 +2,6 @@
 #
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
-#
-# Author: Daniel Silverstone <daniel.silverstone@xxxxxxxxxxxxx>
 
 # Buildd Slave tool to remove an unmounted chroot
 

=== modified file 'lib/canonical/buildd/scan-for-processes'
--- lib/canonical/buildd/scan-for-processes	2009-08-15 12:05:11 +0000
+++ lib/canonical/buildd/scan-for-processes	2010-12-21 19:01:21 +0000
@@ -2,8 +2,6 @@
 #
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
-#
-# Author: Daniel Silverstone <daniel.silverstone@xxxxxxxxxxxxx>
 
 # Buildd Slave tool to scan a chroot in case any processes are underneath it
 

=== modified file 'lib/canonical/buildd/umount-chroot'
--- lib/canonical/buildd/umount-chroot	2010-11-23 13:19:18 +0000
+++ lib/canonical/buildd/umount-chroot	2010-12-21 19:01:21 +0000
@@ -2,8 +2,6 @@
 #
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
-#
-# Author: Daniel Silverstone <daniel.silverstone@xxxxxxxxxxxxx>
 
 # Buildd Slave tool to mount a chroot
 

=== modified file 'lib/canonical/buildd/unpack-chroot'
--- lib/canonical/buildd/unpack-chroot	2009-06-30 21:06:27 +0000
+++ lib/canonical/buildd/unpack-chroot	2010-12-21 19:01:21 +0000
@@ -2,8 +2,6 @@
 #
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
-#
-# Author: Daniel Silverstone <daniel.silverstone@xxxxxxxxxxxxx>
 
 # Buildd Slave tool to unpack a chroot tarball
 

=== modified file 'lib/canonical/buildd/update-debian-chroot'
--- lib/canonical/buildd/update-debian-chroot	2010-07-13 10:57:06 +0000
+++ lib/canonical/buildd/update-debian-chroot	2010-12-21 19:01:21 +0000
@@ -2,8 +2,6 @@
 #
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
-#
-# Author: Daniel Silverstone <daniel.silverstone@xxxxxxxxxxxxx>
 
 # Buildd Slave tool to update a debian chroot
 

=== modified file 'lib/canonical/launchpad/scripts/tests/__init__.py'
--- lib/canonical/launchpad/scripts/tests/__init__.py	2010-09-29 16:20:36 +0000
+++ lib/canonical/launchpad/scripts/tests/__init__.py	2010-12-21 19:01:21 +0000
@@ -1,9 +1,6 @@
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
-# Author: Carlos Perello Marin <carlos.perello@xxxxxxxxxxxxx>
-#         David Allouche <david.allouche@xxxxxxxxxxxxx>
-
 # Make this a package.
 
 # Note: by adding one's name to the copyright section, one is arguably making

=== modified file 'lib/lp/bugs/stories/guided-filebug/xx-project-guided-filebug.txt'
--- lib/lp/bugs/stories/guided-filebug/xx-project-guided-filebug.txt	2010-06-16 15:28:35 +0000
+++ lib/lp/bugs/stories/guided-filebug/xx-project-guided-filebug.txt	2010-12-21 19:01:21 +0000
@@ -267,38 +267,3 @@
     >>> user_browser.getLink('File a bug here').click()
     >>> user_browser.url
     'http://launchpad.dev/ubuntu/+source/thunderbird/+filebug'
-
-If we add a second product to the project, this too will be shown on the
-filebug page:
-
-    >>> admin_browser.open('http://launchpad.dev/test-group/+newproduct')
-    >>> admin_browser.getControl(name='field.name', index=0).value = 'second-test'
-    >>> admin_browser.getControl(name='field.displayname').value = 'Another product'
-    >>> admin_browser.getControl(name='field.title').value = 'For Testing'
-    >>> admin_browser.getControl(name='field.summary').value = 'Used for testing'
-    >>> admin_browser.getControl('Continue').click()
-    >>> print admin_browser.url
-    http://launchpad.dev/test-group/+newproduct
-
-    >>> admin_browser.getControl(name='field.licenses').value = ['GNU_GPL_V2']
-    >>> admin_browser.getControl('Complete Registration').click()
-    >>> admin_browser.url
-    'http://launchpad.dev/second-test'
-
-    >>> user_browser.open('http://launchpad.dev/test-group/+filebug')
-    >>> print extract_text(find_tag_by_id(user_browser.contents,
-    ...     'product-list-summary'))
-    There are 2 projects registered as part of Test Group but none of them use
-    Launchpad as their bug tracker.
-
-    >>> for tag in find_tags_by_class(
-    ...     user_browser.contents, 'product-bug-options'):
-    ...     print extract_text(tag)
-    Another product
-    Another product does not use an external bug tracker or has not registered
-    it with launchpad.
-    Another product is not registered with any source packages. You can help
-    by linking them for us.
-    Testy Product
-    External bug tracker: Debian Bug tracker.
-    Source package: Ubuntu thunderbird (File a bug here)

=== modified file 'lib/lp/registry/browser/product.py'
--- lib/lp/registry/browser/product.py	2010-12-16 19:59:20 +0000
+++ lib/lp/registry/browser/product.py	2010-12-21 19:01:21 +0000
@@ -1070,14 +1070,6 @@
     def browserLanguages(self):
         return helpers.browserLanguages(self.request)
 
-    def projproducts(self):
-        """Return a list of other products from the same project as this
-        product, excluding this product"""
-        if self.context.project is None:
-            return []
-        return [product for product in self.context.project.products
-                        if product.id != self.context.id]
-
     def getClosedBugsURL(self, series):
         status = [status.title for status in RESOLVED_BUGTASK_STATUSES]
         url = canonical_url(series) + '/+bugs'

=== modified file 'lib/lp/registry/codesofconduct/README'
--- lib/lp/registry/codesofconduct/README	2005-10-31 18:29:12 +0000
+++ lib/lp/registry/codesofconduct/README	2010-12-21 19:01:21 +0000
@@ -1,8 +1,5 @@
 = Code of Conducts Directory =
 
-Author: CelsoProvidelo
-Date: 20050217
-
 This directory should store all the CoC (Code of Conducts) releases for
 within the launchpad System.
 

=== modified file 'lib/lp/registry/doc/milestone.txt'
--- lib/lp/registry/doc/milestone.txt	2010-10-18 22:24:59 +0000
+++ lib/lp/registry/doc/milestone.txt	2010-12-21 19:01:21 +0000
@@ -137,11 +137,11 @@
     ...     print '%s %s' % (
     ...         product.name,
     ...         [milestone.title for milestone in product.all_milestones])
-    applets []
     evolution [u'Evolution 2.1.6']
     gnome-terminal []
-    gnomebaker []
+    applets []
     netapplet [u'NetApplet 1.0']
+    gnomebaker []
     >>> print [milestone.title for milestone in gnome.all_milestones]
     [u'GNOME 2.1.6', u'GNOME 1.0']
 
@@ -262,11 +262,11 @@
 
     >>> for product in gnome.products:
     ...     print product.name, list(product.all_specifications)
-    applets []
     evolution []
     gnome-terminal []
-    gnomebaker []
+    applets []
     netapplet []
+    gnomebaker []
     >>> print list(gnome.getMilestone('1.1').specifications)
     []
 

=== modified file 'lib/lp/registry/doc/projectgroup.txt'
--- lib/lp/registry/doc/projectgroup.txt	2010-11-16 22:39:59 +0000
+++ lib/lp/registry/doc/projectgroup.txt	2010-12-21 19:01:21 +0000
@@ -122,7 +122,7 @@
 ordered by their names.
 
     >>> [product.name for product in gnome.products]
-    [u'applets', u'evolution', u'gnome-terminal', u'gnomebaker', u'netapplet']
+    [u'evolution', u'gnome-terminal', u'applets', u'netapplet', u'gnomebaker']
 
     >>> netapplet = gnome.getProduct('netapplet')
 
@@ -132,7 +132,7 @@
     >>> netapplet.active = False
     >>> flush_database_updates()
     >>> [product.name for product in gnome.products]
-    [u'applets', u'evolution', u'gnome-terminal', u'gnomebaker']
+    [u'evolution', u'gnome-terminal', u'applets', u'gnomebaker']
 
     # Re-activate netapplet so that we don't interfere in other tests below.
     >>> netapplet.active = True

=== modified file 'lib/lp/registry/model/projectgroup.py'
--- lib/lp/registry/model/projectgroup.py	2010-12-01 20:53:19 +0000
+++ lib/lp/registry/model/projectgroup.py	2010-12-21 19:01:21 +0000
@@ -169,7 +169,8 @@
 
     @property
     def products(self):
-        return Product.selectBy(project=self, active=True, orderBy='name')
+        return Product.selectBy(
+            project=self, active=True, orderBy='displayname')
 
     def getProduct(self, name):
         return Product.selectOneBy(project=self, name=name)
@@ -193,7 +194,7 @@
             Join(ProductSeries, Product.id == ProductSeries.productID),
             Join(POTemplate, ProductSeries.id == POTemplate.productseriesID),
             ]
-        # XXX j.c.sackett 2010-11-19 bug=677532 It's less than ideal that 
+        # XXX j.c.sackett 2010-11-19 bug=677532 It's less than ideal that
         # this query is using _translations_usage, but there's no cleaner
         # way to deal with it. Once the bug above is resolved, this should
         # should be fixed to use translations_usage.

=== modified file 'lib/lp/registry/stories/project/xx-project-index.txt'
--- lib/lp/registry/stories/project/xx-project-index.txt	2010-09-28 00:07:37 +0000
+++ lib/lp/registry/stories/project/xx-project-index.txt	2010-12-21 19:01:21 +0000
@@ -29,11 +29,11 @@
 
     >>> print extract_text(find_tag_by_id(anon_browser.contents, 'products'))
     Projects
-    Gnome Applets
     Evolution
     GNOME Terminal
+    Gnome Applets
+    NetApplet
     gnomebaker
-    NetApplet
     ...
 
 The projects are linked.