Merge lp:~sinzui/launchpad/move-binaryandsourcepackagename-0 into lp:launchpad

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 11666
Proposed branch: lp:~sinzui/launchpad/move-binaryandsourcepackagename-0
Merge into: lp:launchpad
Diff against target: 125 lines (+22/-41)
5 files modified
lib/canonical/launchpad/database/__init__.py (+0/-1)
lib/canonical/launchpad/zcml/binaryandsourcepackagename.zcml (+0/-36)
lib/canonical/launchpad/zcml/configure.zcml (+0/-1)
lib/lp/soyuz/configure.zcml (+20/-0)
lib/lp/soyuz/model/binaryandsourcepackagename.py (+2/-3)
To merge this branch: bzr merge lp:~sinzui/launchpad/move-binaryandsourcepackagename-0
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+37258@code.launchpad.net

Description of the change

This is my branch to move BinaryAndSourcePackageName to lp.soyuz.

    lp:~sinzui/launchpad/move-binaryandsourcepackagename-0
    Diff size: 126
    Launchpad bug:
          https://bugs.launchpad.net/bugs/653005
    Test command: The whole test suite
    Pre-implementation: no one
    Target release: 10.10

Move BinaryAndSourcePackageName to lp.soyuz
-------------------------------------------

The interfaces for BinaryAndSourcePackageName is defined in soyuz, but the
database class is still in canonical.launchpad.database.

Rules
-----

    * Use utilities/migrater/rename_module to move the module.
    * Copy the ZCML into the soyuz configure.zcml file.

QA
--

    * Verify you can select a binary or source package name from the
      target widget of a bug or question.

Lint
----

Linting changed files:
  lib/canonical/launchpad/database/__init__.py
  lib/canonical/launchpad/zcml/configure.zcml
  lib/lp/soyuz/configure.zcml
  lib/lp/soyuz/model/binaryandsourcepackagename.py

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/database/__init__.py'
2--- lib/canonical/launchpad/database/__init__.py 2010-09-30 03:39:35 +0000
3+++ lib/canonical/launchpad/database/__init__.py 2010-10-01 14:01:09 +0000
4@@ -4,7 +4,6 @@
5 # pylint: disable-msg=W0401,C0301
6
7 from canonical.launchpad.database.account import *
8-from canonical.launchpad.database.binaryandsourcepackagename import *
9 from canonical.launchpad.database.emailaddress import *
10 from canonical.launchpad.database.librarian import *
11 from canonical.launchpad.database.logintoken import *
12
13=== removed file 'lib/canonical/launchpad/zcml/binaryandsourcepackagename.zcml'
14--- lib/canonical/launchpad/zcml/binaryandsourcepackagename.zcml 2010-09-30 02:52:07 +0000
15+++ lib/canonical/launchpad/zcml/binaryandsourcepackagename.zcml 1970-01-01 00:00:00 +0000
16@@ -1,36 +0,0 @@
17-<!-- Copyright 2009-2010 Canonical Ltd. This software is licensed under the
18- GNU Affero General Public License version 3 (see the file LICENSE).
19--->
20-
21-<configure
22- xmlns="http://namespaces.zope.org/zope"
23- xmlns:browser="http://namespaces.zope.org/browser"
24- xmlns:i18n="http://namespaces.zope.org/i18n"
25- i18n_domain="launchpad">
26-
27- <facet facet="overview">
28-
29- <!-- BinaryAndSourcePackagename -->
30- <class class="canonical.launchpad.database.binaryandsourcepackagename.BinaryAndSourcePackageName">
31- <allow interface="lp.soyuz.interfaces.binarypackagename.IBinaryAndSourcePackageName" />
32- </class>
33-
34- <class class="canonical.launchpad.database.binaryandsourcepackagename.BinaryAndSourcePackageNameIterator">
35- <allow interface="canonical.launchpad.webapp.vocabulary.ICountableIterator" />
36- </class>
37-
38- <securedutility
39- name="BinaryAndSourcePackageName"
40- component="canonical.launchpad.database.binaryandsourcepackagename.BinaryAndSourcePackageNameVocabulary"
41- provides="zope.schema.interfaces.IVocabularyFactory"
42- >
43- <allow interface="zope.schema.interfaces.IVocabularyFactory"/>
44- </securedutility>
45-
46- <class class="canonical.launchpad.database.binaryandsourcepackagename.BinaryAndSourcePackageNameVocabulary">
47- <allow interface="canonical.launchpad.webapp.vocabulary.IHugeVocabulary"/>
48- </class>
49-
50-
51- </facet>
52-</configure>
53
54=== modified file 'lib/canonical/launchpad/zcml/configure.zcml'
55--- lib/canonical/launchpad/zcml/configure.zcml 2010-09-12 15:15:16 +0000
56+++ lib/canonical/launchpad/zcml/configure.zcml 2010-10-01 14:01:09 +0000
57@@ -11,7 +11,6 @@
58 <!-- Content class configuration -->
59 <include file="account.zcml" />
60 <include file="batchnavigator.zcml" />
61- <include file="binaryandsourcepackagename.zcml" />
62 <include file="datetime.zcml" />
63 <include file="decoratedresultset.zcml" />
64 <include file="emailaddress.zcml" />
65
66=== modified file 'lib/lp/soyuz/configure.zcml'
67--- lib/lp/soyuz/configure.zcml 2010-09-30 02:52:07 +0000
68+++ lib/lp/soyuz/configure.zcml 2010-10-01 14:01:09 +0000
69@@ -878,4 +878,24 @@
70 callable="lp.archiveuploader.tests.register_archive_upload_policy_adapters"
71 />
72
73+ <!-- BinaryAndSourcePackagename -->
74+ <class class="lp.soyuz.model.binaryandsourcepackagename.BinaryAndSourcePackageName">
75+ <allow interface="lp.soyuz.interfaces.binarypackagename.IBinaryAndSourcePackageName" />
76+ </class>
77+
78+ <class class="lp.soyuz.model.binaryandsourcepackagename.BinaryAndSourcePackageNameIterator">
79+ <allow interface="canonical.launchpad.webapp.vocabulary.ICountableIterator" />
80+ </class>
81+
82+ <securedutility
83+ name="BinaryAndSourcePackageName"
84+ component="lp.soyuz.model.binaryandsourcepackagename.BinaryAndSourcePackageNameVocabulary"
85+ provides="zope.schema.interfaces.IVocabularyFactory"
86+ >
87+ <allow interface="zope.schema.interfaces.IVocabularyFactory"/>
88+ </securedutility>
89+
90+ <class class="lp.soyuz.model.binaryandsourcepackagename.BinaryAndSourcePackageNameVocabulary">
91+ <allow interface="canonical.launchpad.webapp.vocabulary.IHugeVocabulary"/>
92+ </class>
93 </configure>
94
95=== renamed file 'lib/canonical/launchpad/database/binaryandsourcepackagename.py' => 'lib/lp/soyuz/model/binaryandsourcepackagename.py'
96--- lib/canonical/launchpad/database/binaryandsourcepackagename.py 2010-08-20 20:31:18 +0000
97+++ lib/lp/soyuz/model/binaryandsourcepackagename.py 2010-10-01 14:01:09 +0000
98@@ -14,12 +14,12 @@
99 from zope.schema.vocabulary import SimpleTerm
100
101 from canonical.database.sqlbase import SQLBase
102-from canonical.launchpad.interfaces import IBinaryAndSourcePackageName
103 from canonical.launchpad.webapp.vocabulary import (
104 BatchedCountableIterator,
105 NamedSQLObjectHugeVocabulary,
106 )
107 from lp.registry.model.sourcepackagename import getSourcePackageDescriptions
108+from lp.soyuz.interfaces.binarypackagename import IBinaryAndSourcePackageName
109 from lp.soyuz.model.binarypackagename import getBinaryPackageDescriptions
110
111
112@@ -43,6 +43,7 @@
113 Builds descriptions from source and binary descriptions it can
114 identify based on the names returned when queried.
115 """
116+
117 def getTermsWithDescriptions(self, results):
118 # Note that we grab first source package descriptions and then
119 # binary package descriptions, giving preference to the latter,
120@@ -70,5 +71,3 @@
121 displayname = 'Select a Package'
122 _orderBy = 'name'
123 iterator = BinaryAndSourcePackageNameIterator
124-
125-