Merge lp:~adiroiban/launchpad/bug-496352-series-status-refactor into lp:launchpad
- bug-496352-series-status-refactor
- Merge into devel
Proposed by
Adi Roiban
Status: | Merged |
---|---|
Approved by: | Aaron Bentley |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~adiroiban/launchpad/bug-496352-series-status-refactor |
Merge into: | lp:launchpad |
Diff against target: |
2059 lines (+333/-322) 58 files modified
lib/canonical/launchpad/doc/security-proxies.txt (+3/-3) lib/canonical/launchpad/interfaces/__init__.py (+1/-0) lib/canonical/launchpad/vocabularies/dbobjects.py (+3/-3) lib/lp/archivepublisher/tests/test_dominator.py (+2/-2) lib/lp/archivepublisher/tests/test_publisher.py (+4/-4) lib/lp/archivepublisher/tests/util.py (+2/-2) lib/lp/archiveuploader/tests/test_permission.py (+2/-2) lib/lp/archiveuploader/tests/test_uploadprocessor.py (+10/-10) lib/lp/archiveuploader/uploadpolicy.py (+2/-3) lib/lp/bugs/doc/bug-nomination.txt (+2/-2) lib/lp/bugs/model/bug.py (+3/-3) lib/lp/code/browser/branchlisting.py (+2/-2) lib/lp/code/tests/helpers.py (+9/-9) lib/lp/code/tests/test_branch.py (+3/-3) lib/lp/registry/browser/distribution.py (+3/-3) lib/lp/registry/browser/distroseries.py (+11/-11) lib/lp/registry/browser/product.py (+3/-3) lib/lp/registry/browser/productseries.py (+2/-2) lib/lp/registry/browser/tests/browser-views.txt (+4/-4) lib/lp/registry/browser/tests/distributionsourcepackage-views.txt (+2/-2) lib/lp/registry/browser/tests/packaging-views.txt (+3/-3) lib/lp/registry/browser/tests/productseries-views.txt (+2/-2) lib/lp/registry/doc/distroseries.txt (+27/-27) lib/lp/registry/doc/product.txt (+3/-4) lib/lp/registry/interfaces/distroseries.py (+3/-70) lib/lp/registry/interfaces/productseries.py (+3/-3) lib/lp/registry/interfaces/series.py (+78/-0) lib/lp/registry/model/distribution.py (+11/-10) lib/lp/registry/model/distroseries.py (+25/-24) lib/lp/registry/model/productseries.py (+3/-3) lib/lp/registry/stories/distribution/xx-distribution-packages.txt (+3/-3) lib/lp/registry/stories/productseries/xx-productseries-series.txt (+2/-2) lib/lp/registry/tests/test_distribution.py (+2/-2) lib/lp/registry/tests/test_sourcepackage.py (+3/-3) lib/lp/soyuz/browser/archive.py (+2/-2) lib/lp/soyuz/doc/build.txt (+3/-3) lib/lp/soyuz/doc/buildd-slavescanner.txt (+2/-2) lib/lp/soyuz/doc/nascentupload-announcements.txt (+8/-8) lib/lp/soyuz/doc/nascentupload.txt (+4/-4) lib/lp/soyuz/doc/package-diff.txt (+2/-2) lib/lp/soyuz/doc/soyuz-set-of-uploads.txt (+3/-3) lib/lp/soyuz/doc/uploadpolicy.txt (+2/-2) lib/lp/soyuz/scripts/buildd.py (+2/-2) lib/lp/soyuz/scripts/ftpmaster.py (+7/-7) lib/lp/soyuz/scripts/tests/test_copypackage.py (+2/-2) lib/lp/soyuz/scripts/tests/test_lpquerydistro.py (+2/-2) lib/lp/soyuz/scripts/tests/test_obsoletedistroseries.py (+3/-3) lib/lp/soyuz/scripts/tests/test_queue.py (+3/-3) lib/lp/soyuz/tests/test_packageset.py (+4/-4) lib/lp/soyuz/tests/test_packageupload.py (+3/-3) lib/lp/soyuz/tests/test_publishing_top_level_api.py (+10/-10) lib/lp/testing/factory.py (+10/-9) lib/lp/translations/browser/distribution.py (+2/-2) lib/lp/translations/browser/tests/distroseries-views.txt (+2/-2) lib/lp/translations/model/translationimportqueue.py (+3/-3) lib/lp/translations/scripts/remove_obsolete_translations.py (+7/-7) lib/lp/translations/templates/pofile-details.pt (+4/-6) lib/lp/translations/tests/test_autoapproval.py (+2/-2) |
To merge this branch: | bzr merge lp:~adiroiban/launchpad/bug-496352-series-status-refactor |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Adi Roiban (adiroiban) wrote : | # |
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Adi Roiban (adiroiban) wrote : | # |
I forgot one thing.
We also have lp.registry.
This has only internal usage for DistroSeries... maybe we should also move it or renamed it to DistroSeriesSta
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Aaron Bentley (abentley) wrote : | # |
This looks like a reasonable, mechanical change.
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/canonical/launchpad/doc/security-proxies.txt' | |||
2 | --- lib/canonical/launchpad/doc/security-proxies.txt 2009-08-13 15:12:16 +0000 | |||
3 | +++ lib/canonical/launchpad/doc/security-proxies.txt 2010-01-05 16:22:16 +0000 | |||
4 | @@ -49,13 +49,13 @@ | |||
5 | 49 | DB schema objects should be comparable correctly when proxied... | 49 | DB schema objects should be comparable correctly when proxied... |
6 | 50 | 50 | ||
7 | 51 | >>> from canonical.launchpad.interfaces import ( | 51 | >>> from canonical.launchpad.interfaces import ( |
9 | 52 | ... DistroSeriesStatus, IDistroSeriesSet) | 52 | ... SeriesStatus, IDistroSeriesSet) |
10 | 53 | >>> hoary = getUtility(IDistroSeriesSet).get(3) | 53 | >>> hoary = getUtility(IDistroSeriesSet).get(3) |
11 | 54 | >>> print hoary.status.name | 54 | >>> print hoary.status.name |
12 | 55 | DEVELOPMENT | 55 | DEVELOPMENT |
14 | 56 | >>> hoary.status == DistroSeriesStatus.DEVELOPMENT | 56 | >>> hoary.status == SeriesStatus.DEVELOPMENT |
15 | 57 | True | 57 | True |
17 | 58 | >>> hoary.status is DistroSeriesStatus.DEVELOPMENT | 58 | >>> hoary.status is SeriesStatus.DEVELOPMENT |
18 | 59 | False | 59 | False |
19 | 60 | 60 | ||
20 | 61 | Finally, tear down the test: | 61 | Finally, tear down the test: |
21 | 62 | 62 | ||
22 | === modified file 'lib/canonical/launchpad/interfaces/__init__.py' | |||
23 | --- lib/canonical/launchpad/interfaces/__init__.py 2009-12-05 18:37:28 +0000 | |||
24 | +++ lib/canonical/launchpad/interfaces/__init__.py 2010-01-05 16:22:16 +0000 | |||
25 | @@ -57,6 +57,7 @@ | |||
26 | 57 | from lp.registry.interfaces.distributionsourcepackage import * | 57 | from lp.registry.interfaces.distributionsourcepackage import * |
27 | 58 | from lp.soyuz.interfaces.distributionsourcepackagecache import * | 58 | from lp.soyuz.interfaces.distributionsourcepackagecache import * |
28 | 59 | from lp.soyuz.interfaces.distributionsourcepackagerelease import * | 59 | from lp.soyuz.interfaces.distributionsourcepackagerelease import * |
29 | 60 | from lp.registry.interfaces.series import * | ||
30 | 60 | from lp.soyuz.interfaces.distroarchseries import * | 61 | from lp.soyuz.interfaces.distroarchseries import * |
31 | 61 | from lp.soyuz.interfaces.distroarchseriesbinarypackage import * | 62 | from lp.soyuz.interfaces.distroarchseriesbinarypackage import * |
32 | 62 | from lp.soyuz.interfaces.distroarchseriesbinarypackagerelease\ | 63 | from lp.soyuz.interfaces.distroarchseriesbinarypackagerelease\ |
33 | 63 | 64 | ||
34 | === modified file 'lib/canonical/launchpad/vocabularies/dbobjects.py' | |||
35 | --- lib/canonical/launchpad/vocabularies/dbobjects.py 2009-10-26 18:40:04 +0000 | |||
36 | +++ lib/canonical/launchpad/vocabularies/dbobjects.py 2010-01-05 16:22:16 +0000 | |||
37 | @@ -90,8 +90,8 @@ | |||
38 | 90 | from lp.code.interfaces.branch import IBranch | 90 | from lp.code.interfaces.branch import IBranch |
39 | 91 | from lp.code.interfaces.branchcollection import IAllBranches | 91 | from lp.code.interfaces.branchcollection import IAllBranches |
40 | 92 | from lp.registry.interfaces.distribution import IDistribution | 92 | from lp.registry.interfaces.distribution import IDistribution |
43 | 93 | from lp.registry.interfaces.distroseries import ( | 93 | from lp.registry.interfaces.series import SeriesStatus |
44 | 94 | DistroSeriesStatus, IDistroSeries) | 94 | from lp.registry.interfaces.distroseries import IDistroSeries |
45 | 95 | from lp.registry.interfaces.person import IPerson | 95 | from lp.registry.interfaces.person import IPerson |
46 | 96 | from lp.registry.interfaces.product import IProduct | 96 | from lp.registry.interfaces.product import IProduct |
47 | 97 | from lp.registry.interfaces.productseries import IProductSeries | 97 | from lp.registry.interfaces.productseries import IProductSeries |
48 | @@ -780,7 +780,7 @@ | |||
49 | 780 | """Return all non-obsolete distribution series""" | 780 | """Return all non-obsolete distribution series""" |
50 | 781 | return [ | 781 | return [ |
51 | 782 | series for series in shortlist(self.distribution.series) | 782 | series for series in shortlist(self.distribution.series) |
53 | 783 | if series.status != DistroSeriesStatus.OBSOLETE] | 783 | if series.status != SeriesStatus.OBSOLETE] |
54 | 784 | 784 | ||
55 | 785 | def _queryNominatableObjectByName(self, name): | 785 | def _queryNominatableObjectByName(self, name): |
56 | 786 | """See BugNominatableSeriesVocabularyBase.""" | 786 | """See BugNominatableSeriesVocabularyBase.""" |
57 | 787 | 787 | ||
58 | === modified file 'lib/lp/archivepublisher/tests/test_dominator.py' | |||
59 | --- lib/lp/archivepublisher/tests/test_dominator.py 2009-08-28 07:34:44 +0000 | |||
60 | +++ lib/lp/archivepublisher/tests/test_dominator.py 2010-01-05 16:22:16 +0000 | |||
61 | @@ -14,7 +14,7 @@ | |||
62 | 14 | from lp.archivepublisher.domination import Dominator | 14 | from lp.archivepublisher.domination import Dominator |
63 | 15 | from lp.archivepublisher.publishing import Publisher | 15 | from lp.archivepublisher.publishing import Publisher |
64 | 16 | from canonical.database.sqlbase import flush_database_updates | 16 | from canonical.database.sqlbase import flush_database_updates |
66 | 17 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 17 | from lp.registry.interfaces.series import SeriesStatus |
67 | 18 | from lp.soyuz.interfaces.component import IComponentSet | 18 | from lp.soyuz.interfaces.component import IComponentSet |
68 | 19 | from lp.registry.interfaces.person import IPersonSet | 19 | from lp.registry.interfaces.person import IPersonSet |
69 | 20 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 20 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
70 | @@ -404,7 +404,7 @@ | |||
71 | 404 | def setUp(self): | 404 | def setUp(self): |
72 | 405 | TestDomination.setUp(self) | 405 | TestDomination.setUp(self) |
73 | 406 | self.ubuntutest['breezy-autotest'].status = ( | 406 | self.ubuntutest['breezy-autotest'].status = ( |
75 | 407 | DistroSeriesStatus.OBSOLETE) | 407 | SeriesStatus.OBSOLETE) |
76 | 408 | 408 | ||
77 | 409 | 409 | ||
78 | 410 | def test_suite(): | 410 | def test_suite(): |
79 | 411 | 411 | ||
80 | === modified file 'lib/lp/archivepublisher/tests/test_publisher.py' | |||
81 | --- lib/lp/archivepublisher/tests/test_publisher.py 2009-12-14 17:32:06 +0000 | |||
82 | +++ lib/lp/archivepublisher/tests/test_publisher.py 2010-01-05 16:22:16 +0000 | |||
83 | @@ -30,7 +30,7 @@ | |||
84 | 30 | from lp.soyuz.interfaces.binarypackagerelease import ( | 30 | from lp.soyuz.interfaces.binarypackagerelease import ( |
85 | 31 | BinaryPackageFormat) | 31 | BinaryPackageFormat) |
86 | 32 | from lp.registry.interfaces.distribution import IDistributionSet | 32 | from lp.registry.interfaces.distribution import IDistributionSet |
88 | 33 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 33 | from lp.registry.interfaces.series import SeriesStatus |
89 | 34 | from canonical.launchpad.interfaces.gpghandler import IGPGHandler | 34 | from canonical.launchpad.interfaces.gpghandler import IGPGHandler |
90 | 35 | from lp.registry.interfaces.person import IPersonSet | 35 | from lp.registry.interfaces.person import IPersonSet |
91 | 36 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 36 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
92 | @@ -137,7 +137,7 @@ | |||
93 | 137 | distroseries is always allowed, so check for that here. | 137 | distroseries is always allowed, so check for that here. |
94 | 138 | """ | 138 | """ |
95 | 139 | archive = self.ubuntutest.getArchiveByComponent('partner') | 139 | archive = self.ubuntutest.getArchiveByComponent('partner') |
97 | 140 | self.ubuntutest['breezy-autotest'].status = DistroSeriesStatus.CURRENT | 140 | self.ubuntutest['breezy-autotest'].status = SeriesStatus.CURRENT |
98 | 141 | pub_config = getPubConfig(archive) | 141 | pub_config = getPubConfig(archive) |
99 | 142 | pub_config.setupArchiveDirs() | 142 | pub_config.setupArchiveDirs() |
100 | 143 | disk_pool = DiskPool( | 143 | disk_pool = DiskPool( |
101 | @@ -201,7 +201,7 @@ | |||
102 | 201 | PackagePublishingPocket.UPDATES)]) | 201 | PackagePublishingPocket.UPDATES)]) |
103 | 202 | 202 | ||
104 | 203 | self.ubuntutest['breezy-autotest'].status = ( | 203 | self.ubuntutest['breezy-autotest'].status = ( |
106 | 204 | DistroSeriesStatus.CURRENT) | 204 | SeriesStatus.CURRENT) |
107 | 205 | 205 | ||
108 | 206 | pub_source = self.getPubSource( | 206 | pub_source = self.getPubSource( |
109 | 207 | filecontent='foo', | 207 | filecontent='foo', |
110 | @@ -645,7 +645,7 @@ | |||
111 | 645 | # If the distroseries is CURRENT, then the release pocket is not | 645 | # If the distroseries is CURRENT, then the release pocket is not |
112 | 646 | # marked as dirty. | 646 | # marked as dirty. |
113 | 647 | self.ubuntutest['breezy-autotest'].status = ( | 647 | self.ubuntutest['breezy-autotest'].status = ( |
115 | 648 | DistroSeriesStatus.CURRENT) | 648 | SeriesStatus.CURRENT) |
116 | 649 | 649 | ||
117 | 650 | publisher.dirty_pockets = set() | 650 | publisher.dirty_pockets = set() |
118 | 651 | publisher.A2_markPocketsWithDeletionsDirty() | 651 | publisher.A2_markPocketsWithDeletionsDirty() |
119 | 652 | 652 | ||
120 | === modified file 'lib/lp/archivepublisher/tests/util.py' | |||
121 | --- lib/lp/archivepublisher/tests/util.py 2009-10-26 18:40:04 +0000 | |||
122 | +++ lib/lp/archivepublisher/tests/util.py 2010-01-05 16:22:16 +0000 | |||
123 | @@ -8,7 +8,7 @@ | |||
124 | 8 | # Utility functions/classes for testing the archive publisher. | 8 | # Utility functions/classes for testing the archive publisher. |
125 | 9 | 9 | ||
126 | 10 | from lp.archivepublisher.tests import datadir | 10 | from lp.archivepublisher.tests import datadir |
128 | 11 | from canonical.launchpad.interfaces import DistroSeriesStatus | 11 | from canonical.launchpad.interfaces import SeriesStatus |
129 | 12 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 12 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
130 | 13 | 13 | ||
131 | 14 | __all__ = ['FakeLogger'] | 14 | __all__ = ['FakeLogger'] |
132 | @@ -44,7 +44,7 @@ | |||
133 | 44 | self.distribution = distro | 44 | self.distribution = distro |
134 | 45 | self.architectures = [FakeDistroArchSeries(self, "i386"), | 45 | self.architectures = [FakeDistroArchSeries(self, "i386"), |
135 | 46 | FakeDistroArchSeries(self, "powerpc")] | 46 | FakeDistroArchSeries(self, "powerpc")] |
137 | 47 | self.status = DistroSeriesStatus.DEVELOPMENT | 47 | self.status = SeriesStatus.DEVELOPMENT |
138 | 48 | self.distribution.registerSeries(self) | 48 | self.distribution.registerSeries(self) |
139 | 49 | 49 | ||
140 | 50 | 50 | ||
141 | 51 | 51 | ||
142 | === modified file 'lib/lp/archiveuploader/tests/test_permission.py' | |||
143 | --- lib/lp/archiveuploader/tests/test_permission.py 2009-11-20 22:22:53 +0000 | |||
144 | +++ lib/lp/archiveuploader/tests/test_permission.py 2010-01-05 16:22:16 +0000 | |||
145 | @@ -14,7 +14,7 @@ | |||
146 | 14 | 14 | ||
147 | 15 | from lp.archiveuploader.permission import ( | 15 | from lp.archiveuploader.permission import ( |
148 | 16 | check_upload_to_archive, components_valid_for) | 16 | check_upload_to_archive, components_valid_for) |
150 | 17 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 17 | from lp.registry.interfaces.series import SeriesStatus |
151 | 18 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 18 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
152 | 19 | from lp.soyuz.interfaces.archive import ArchivePurpose | 19 | from lp.soyuz.interfaces.archive import ArchivePurpose |
153 | 20 | from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet | 20 | from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet |
154 | @@ -131,7 +131,7 @@ | |||
155 | 131 | purpose=ArchivePurpose.PPA, owner=person) | 131 | purpose=ArchivePurpose.PPA, owner=person) |
156 | 132 | spn = self.factory.makeSourcePackageName() | 132 | spn = self.factory.makeSourcePackageName() |
157 | 133 | distroseries = self.factory.makeDistroSeries( | 133 | distroseries = self.factory.makeDistroSeries( |
159 | 134 | status=DistroSeriesStatus.CURRENT) | 134 | status=SeriesStatus.CURRENT) |
160 | 135 | self.assertCanUpload( | 135 | self.assertCanUpload( |
161 | 136 | person, spn, ppa, None, distroseries=distroseries) | 136 | person, spn, ppa, None, distroseries=distroseries) |
162 | 137 | 137 | ||
163 | 138 | 138 | ||
164 | === modified file 'lib/lp/archiveuploader/tests/test_uploadprocessor.py' | |||
165 | --- lib/lp/archiveuploader/tests/test_uploadprocessor.py 2009-11-18 02:58:23 +0000 | |||
166 | +++ lib/lp/archiveuploader/tests/test_uploadprocessor.py 2010-01-05 16:22:16 +0000 | |||
167 | @@ -38,7 +38,7 @@ | |||
168 | 38 | SourcePackageRelease) | 38 | SourcePackageRelease) |
169 | 39 | from canonical.launchpad.ftests import import_public_test_keys | 39 | from canonical.launchpad.ftests import import_public_test_keys |
170 | 40 | from lp.registry.interfaces.distribution import IDistributionSet | 40 | from lp.registry.interfaces.distribution import IDistributionSet |
172 | 41 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 41 | from lp.registry.interfaces.series import SeriesStatus |
173 | 42 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 42 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
174 | 43 | from lp.registry.interfaces.sourcepackage import SourcePackageFileType | 43 | from lp.registry.interfaces.sourcepackage import SourcePackageFileType |
175 | 44 | from lp.soyuz.interfaces.archive import ArchivePurpose, IArchiveSet | 44 | from lp.soyuz.interfaces.archive import ArchivePurpose, IArchiveSet |
176 | @@ -493,7 +493,7 @@ | |||
177 | 493 | 493 | ||
178 | 494 | # Make ubuntu/breezy a frozen distro, so a source upload for an | 494 | # Make ubuntu/breezy a frozen distro, so a source upload for an |
179 | 495 | # existing package will be allowed, but unapproved. | 495 | # existing package will be allowed, but unapproved. |
181 | 496 | self.breezy.status = DistroSeriesStatus.FROZEN | 496 | self.breezy.status = SeriesStatus.FROZEN |
182 | 497 | self.layer.txn.commit() | 497 | self.layer.txn.commit() |
183 | 498 | 498 | ||
184 | 499 | # Upload a newer version of bar. | 499 | # Upload a newer version of bar. |
185 | @@ -576,7 +576,7 @@ | |||
186 | 576 | See bug 369512. | 576 | See bug 369512. |
187 | 577 | """ | 577 | """ |
188 | 578 | self._checkCopyArchiveUploadToDistro( | 578 | self._checkCopyArchiveUploadToDistro( |
190 | 579 | PackagePublishingPocket.RELEASE, DistroSeriesStatus.CURRENT) | 579 | PackagePublishingPocket.RELEASE, SeriesStatus.CURRENT) |
191 | 580 | 580 | ||
192 | 581 | def testCopyArchiveUploadToSupportedDistro(self): | 581 | def testCopyArchiveUploadToSupportedDistro(self): |
193 | 582 | """Check binary copy archive uploads to RELEASE pockets. | 582 | """Check binary copy archive uploads to RELEASE pockets. |
194 | @@ -588,7 +588,7 @@ | |||
195 | 588 | See bug 369512. | 588 | See bug 369512. |
196 | 589 | """ | 589 | """ |
197 | 590 | self._checkCopyArchiveUploadToDistro( | 590 | self._checkCopyArchiveUploadToDistro( |
199 | 591 | PackagePublishingPocket.RELEASE, DistroSeriesStatus.SUPPORTED) | 591 | PackagePublishingPocket.RELEASE, SeriesStatus.SUPPORTED) |
200 | 592 | 592 | ||
201 | 593 | def testDuplicatedBinaryUploadGetsRejected(self): | 593 | def testDuplicatedBinaryUploadGetsRejected(self): |
202 | 594 | """The upload processor rejects duplicated binary uploads. | 594 | """The upload processor rejects duplicated binary uploads. |
203 | @@ -964,7 +964,7 @@ | |||
204 | 964 | def testPartnerUploadToProposedPocket(self): | 964 | def testPartnerUploadToProposedPocket(self): |
205 | 965 | """Upload a partner package to the proposed pocket.""" | 965 | """Upload a partner package to the proposed pocket.""" |
206 | 966 | self.setupBreezy() | 966 | self.setupBreezy() |
208 | 967 | self.breezy.status = DistroSeriesStatus.CURRENT | 967 | self.breezy.status = SeriesStatus.CURRENT |
209 | 968 | self.layer.txn.commit() | 968 | self.layer.txn.commit() |
210 | 969 | self.options.context = 'insecure' | 969 | self.options.context = 'insecure' |
211 | 970 | uploadprocessor = UploadProcessor( | 970 | uploadprocessor = UploadProcessor( |
212 | @@ -983,7 +983,7 @@ | |||
213 | 983 | distroseries is allowed. | 983 | distroseries is allowed. |
214 | 984 | """ | 984 | """ |
215 | 985 | self.setupBreezy() | 985 | self.setupBreezy() |
217 | 986 | self.breezy.status = DistroSeriesStatus.CURRENT | 986 | self.breezy.status = SeriesStatus.CURRENT |
218 | 987 | self.layer.txn.commit() | 987 | self.layer.txn.commit() |
219 | 988 | self.options.context = 'insecure' | 988 | self.options.context = 'insecure' |
220 | 989 | uploadprocessor = UploadProcessor( | 989 | uploadprocessor = UploadProcessor( |
221 | @@ -1029,21 +1029,21 @@ | |||
222 | 1029 | 1029 | ||
223 | 1030 | # Check unstable states: | 1030 | # Check unstable states: |
224 | 1031 | 1031 | ||
226 | 1032 | self.breezy.status = DistroSeriesStatus.DEVELOPMENT | 1032 | self.breezy.status = SeriesStatus.DEVELOPMENT |
227 | 1033 | self.layer.txn.commit() | 1033 | self.layer.txn.commit() |
228 | 1034 | self._uploadPartnerToNonReleasePocketAndCheckFail() | 1034 | self._uploadPartnerToNonReleasePocketAndCheckFail() |
229 | 1035 | 1035 | ||
231 | 1036 | self.breezy.status = DistroSeriesStatus.EXPERIMENTAL | 1036 | self.breezy.status = SeriesStatus.EXPERIMENTAL |
232 | 1037 | self.layer.txn.commit() | 1037 | self.layer.txn.commit() |
233 | 1038 | self._uploadPartnerToNonReleasePocketAndCheckFail() | 1038 | self._uploadPartnerToNonReleasePocketAndCheckFail() |
234 | 1039 | 1039 | ||
235 | 1040 | # Check stable states: | 1040 | # Check stable states: |
236 | 1041 | 1041 | ||
238 | 1042 | self.breezy.status = DistroSeriesStatus.CURRENT | 1042 | self.breezy.status = SeriesStatus.CURRENT |
239 | 1043 | self.layer.txn.commit() | 1043 | self.layer.txn.commit() |
240 | 1044 | self._uploadPartnerToNonReleasePocketAndCheckFail() | 1044 | self._uploadPartnerToNonReleasePocketAndCheckFail() |
241 | 1045 | 1045 | ||
243 | 1046 | self.breezy.status = DistroSeriesStatus.SUPPORTED | 1046 | self.breezy.status = SeriesStatus.SUPPORTED |
244 | 1047 | self.layer.txn.commit() | 1047 | self.layer.txn.commit() |
245 | 1048 | self._uploadPartnerToNonReleasePocketAndCheckFail() | 1048 | self._uploadPartnerToNonReleasePocketAndCheckFail() |
246 | 1049 | 1049 | ||
247 | 1050 | 1050 | ||
248 | === modified file 'lib/lp/archiveuploader/uploadpolicy.py' | |||
249 | --- lib/lp/archiveuploader/uploadpolicy.py 2009-11-24 23:12:23 +0000 | |||
250 | +++ lib/lp/archiveuploader/uploadpolicy.py 2010-01-05 16:22:16 +0000 | |||
251 | @@ -11,9 +11,8 @@ | |||
252 | 11 | 11 | ||
253 | 12 | from canonical.launchpad.interfaces import ILaunchpadCelebrities | 12 | from canonical.launchpad.interfaces import ILaunchpadCelebrities |
254 | 13 | from lp.registry.interfaces.distribution import IDistributionSet | 13 | from lp.registry.interfaces.distribution import IDistributionSet |
256 | 14 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 14 | from lp.registry.interfaces.series import SeriesStatus |
257 | 15 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 15 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
258 | 16 | from lp.soyuz.interfaces.archive import ArchivePurpose | ||
259 | 17 | 16 | ||
260 | 18 | 17 | ||
261 | 19 | # Number of seconds in an hour (used later) | 18 | # Number of seconds in an hour (used later) |
262 | @@ -295,7 +294,7 @@ | |||
263 | 295 | 294 | ||
264 | 296 | if self.pocket == PackagePublishingPocket.RELEASE: | 295 | if self.pocket == PackagePublishingPocket.RELEASE: |
265 | 297 | if (self.distroseries.status != | 296 | if (self.distroseries.status != |
267 | 298 | DistroSeriesStatus.FROZEN): | 297 | SeriesStatus.FROZEN): |
268 | 299 | return True | 298 | return True |
269 | 300 | return False | 299 | return False |
270 | 301 | 300 | ||
271 | 302 | 301 | ||
272 | === modified file 'lib/lp/bugs/doc/bug-nomination.txt' | |||
273 | --- lib/lp/bugs/doc/bug-nomination.txt 2009-10-26 18:40:04 +0000 | |||
274 | +++ lib/lp/bugs/doc/bug-nomination.txt 2010-01-05 16:22:16 +0000 | |||
275 | @@ -640,12 +640,12 @@ | |||
276 | 640 | NominationSeriesObsoleteError. Let's make a new obsolete distroseries | 640 | NominationSeriesObsoleteError. Let's make a new obsolete distroseries |
277 | 641 | to demonstrate. | 641 | to demonstrate. |
278 | 642 | 642 | ||
280 | 643 | >>> from canonical.launchpad.interfaces import DistroSeriesStatus | 643 | >>> from canonical.launchpad.interfaces import SeriesStatus |
281 | 644 | 644 | ||
282 | 645 | >>> login("foo.bar@canonical.com") | 645 | >>> login("foo.bar@canonical.com") |
283 | 646 | >>> ubuntu_edgy = factory.makeDistroRelease( | 646 | >>> ubuntu_edgy = factory.makeDistroRelease( |
284 | 647 | ... distribution=ubuntu, version='6.10', | 647 | ... distribution=ubuntu, version='6.10', |
286 | 648 | ... status=DistroSeriesStatus.OBSOLETE) | 648 | ... status=SeriesStatus.OBSOLETE) |
287 | 649 | >>> login("no-priv@canonical.com") | 649 | >>> login("no-priv@canonical.com") |
288 | 650 | 650 | ||
289 | 651 | >>> bug_one.addNomination(target=ubuntu_edgy, owner=no_privs) | 651 | >>> bug_one.addNomination(target=ubuntu_edgy, owner=no_privs) |
290 | 652 | 652 | ||
291 | === modified file 'lib/lp/bugs/model/bug.py' | |||
292 | --- lib/lp/bugs/model/bug.py 2009-12-14 15:25:55 +0000 | |||
293 | +++ lib/lp/bugs/model/bug.py 2010-01-05 16:22:16 +0000 | |||
294 | @@ -90,8 +90,8 @@ | |||
295 | 90 | from lp.registry.interfaces.distribution import IDistribution | 90 | from lp.registry.interfaces.distribution import IDistribution |
296 | 91 | from lp.registry.interfaces.distributionsourcepackage import ( | 91 | from lp.registry.interfaces.distributionsourcepackage import ( |
297 | 92 | IDistributionSourcePackage) | 92 | IDistributionSourcePackage) |
300 | 93 | from lp.registry.interfaces.distroseries import ( | 93 | from lp.registry.interfaces.series import SeriesStatus |
301 | 94 | DistroSeriesStatus, IDistroSeries) | 94 | from lp.registry.interfaces.distroseries import IDistroSeries |
302 | 95 | from lp.registry.interfaces.person import IPersonSet | 95 | from lp.registry.interfaces.person import IPersonSet |
303 | 96 | from lp.registry.interfaces.person import validate_public_person | 96 | from lp.registry.interfaces.person import validate_public_person |
304 | 97 | from lp.registry.interfaces.product import IProduct | 97 | from lp.registry.interfaces.product import IProduct |
305 | @@ -1086,7 +1086,7 @@ | |||
306 | 1086 | productseries = None | 1086 | productseries = None |
307 | 1087 | if IDistroSeries.providedBy(target): | 1087 | if IDistroSeries.providedBy(target): |
308 | 1088 | distroseries = target | 1088 | distroseries = target |
310 | 1089 | if target.status == DistroSeriesStatus.OBSOLETE: | 1089 | if target.status == SeriesStatus.OBSOLETE: |
311 | 1090 | raise NominationSeriesObsoleteError( | 1090 | raise NominationSeriesObsoleteError( |
312 | 1091 | "%s is an obsolete series." % target.bugtargetdisplayname) | 1091 | "%s is an obsolete series." % target.bugtargetdisplayname) |
313 | 1092 | else: | 1092 | else: |
314 | 1093 | 1093 | ||
315 | === modified file 'lib/lp/code/browser/branchlisting.py' | |||
316 | --- lib/lp/code/browser/branchlisting.py 2009-11-11 01:53:33 +0000 | |||
317 | +++ lib/lp/code/browser/branchlisting.py 2010-01-05 16:22:16 +0000 | |||
318 | @@ -85,7 +85,7 @@ | |||
319 | 85 | IFindOfficialBranchLinks) | 85 | IFindOfficialBranchLinks) |
320 | 86 | from lp.registry.browser.product import ( | 86 | from lp.registry.browser.product import ( |
321 | 87 | ProductDownloadFileMixin, SortSeriesMixin) | 87 | ProductDownloadFileMixin, SortSeriesMixin) |
323 | 88 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 88 | from lp.registry.interfaces.series import SeriesStatus |
324 | 89 | from lp.registry.interfaces.person import IPerson, IPersonSet | 89 | from lp.registry.interfaces.person import IPerson, IPersonSet |
325 | 90 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 90 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
326 | 91 | from lp.registry.interfaces.product import IProduct | 91 | from lp.registry.interfaces.product import IProduct |
327 | @@ -170,7 +170,7 @@ | |||
328 | 170 | @property | 170 | @property |
329 | 171 | def active_series(self): | 171 | def active_series(self): |
330 | 172 | return [series for series in self.associated_product_series | 172 | return [series for series in self.associated_product_series |
332 | 173 | if series.status != DistroSeriesStatus.OBSOLETE] | 173 | if series.status != SeriesStatus.OBSOLETE] |
333 | 174 | 174 | ||
334 | 175 | @property | 175 | @property |
335 | 176 | def bzr_identity(self): | 176 | def bzr_identity(self): |
336 | 177 | 177 | ||
337 | === modified file 'lib/lp/code/tests/helpers.py' | |||
338 | --- lib/lp/code/tests/helpers.py 2009-12-10 01:49:16 +0000 | |||
339 | +++ lib/lp/code/tests/helpers.py 2010-01-05 16:22:16 +0000 | |||
340 | @@ -21,7 +21,7 @@ | |||
341 | 21 | 21 | ||
342 | 22 | from lp.code.interfaces.seriessourcepackagebranch import ( | 22 | from lp.code.interfaces.seriessourcepackagebranch import ( |
343 | 23 | IMakeOfficialBranchLinks) | 23 | IMakeOfficialBranchLinks) |
345 | 24 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 24 | from lp.registry.interfaces.series import SeriesStatus |
346 | 25 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 25 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
347 | 26 | from lp.testing import time_counter | 26 | from lp.testing import time_counter |
348 | 27 | 27 | ||
349 | @@ -185,14 +185,14 @@ | |||
350 | 185 | mint = factory.makeDistribution( | 185 | mint = factory.makeDistribution( |
351 | 186 | name='mint', displayname='Mint', owner=albert, members=mint_team) | 186 | name='mint', displayname='Mint', owner=albert, members=mint_team) |
352 | 187 | series = [ | 187 | series = [ |
361 | 188 | ("wild", "5.5", DistroSeriesStatus.EXPERIMENTAL), | 188 | ("wild", "5.5", SeriesStatus.EXPERIMENTAL), |
362 | 189 | ("dev", "4.0", DistroSeriesStatus.DEVELOPMENT), | 189 | ("dev", "4.0", SeriesStatus.DEVELOPMENT), |
363 | 190 | ("stable", "3.0", DistroSeriesStatus.CURRENT), | 190 | ("stable", "3.0", SeriesStatus.CURRENT), |
364 | 191 | ("old", "2.0", DistroSeriesStatus.SUPPORTED), | 191 | ("old", "2.0", SeriesStatus.SUPPORTED), |
365 | 192 | ("very-old", "1.5", DistroSeriesStatus.SUPPORTED), | 192 | ("very-old", "1.5", SeriesStatus.SUPPORTED), |
366 | 193 | ("ancient", "1.0", DistroSeriesStatus.SUPPORTED), | 193 | ("ancient", "1.0", SeriesStatus.SUPPORTED), |
367 | 194 | ("mouldy", "0.6", DistroSeriesStatus.SUPPORTED), | 194 | ("mouldy", "0.6", SeriesStatus.SUPPORTED), |
368 | 195 | ("dead", "0.1", DistroSeriesStatus.OBSOLETE), | 195 | ("dead", "0.1", SeriesStatus.OBSOLETE), |
369 | 196 | ] | 196 | ] |
370 | 197 | for name, version, status in series: | 197 | for name, version, status in series: |
371 | 198 | factory.makeDistroRelease( | 198 | factory.makeDistroRelease( |
372 | 199 | 199 | ||
373 | === modified file 'lib/lp/code/tests/test_branch.py' | |||
374 | --- lib/lp/code/tests/test_branch.py 2009-11-13 05:13:07 +0000 | |||
375 | +++ lib/lp/code/tests/test_branch.py 2010-01-05 16:22:16 +0000 | |||
376 | @@ -15,9 +15,9 @@ | |||
377 | 15 | from lp.archiveuploader.permission import verify_upload | 15 | from lp.archiveuploader.permission import verify_upload |
378 | 16 | from lp.code.enums import ( | 16 | from lp.code.enums import ( |
379 | 17 | BranchSubscriptionDiffSize, BranchSubscriptionNotificationLevel, | 17 | BranchSubscriptionDiffSize, BranchSubscriptionNotificationLevel, |
381 | 18 | BranchType, CodeReviewNotificationLevel) | 18 | CodeReviewNotificationLevel) |
382 | 19 | from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch | 19 | from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch |
384 | 20 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 20 | from lp.registry.interfaces.series import SeriesStatus |
385 | 21 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 21 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
386 | 22 | from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet | 22 | from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet |
387 | 23 | from lp.testing import run_with_login, TestCaseWithFactory | 23 | from lp.testing import run_with_login, TestCaseWithFactory |
388 | @@ -247,7 +247,7 @@ | |||
389 | 247 | # Make sure the (distroseries, pocket) combination used allows us to | 247 | # Make sure the (distroseries, pocket) combination used allows us to |
390 | 248 | # upload to it. | 248 | # upload to it. |
391 | 249 | stable_states = ( | 249 | stable_states = ( |
393 | 250 | DistroSeriesStatus.SUPPORTED, DistroSeriesStatus.CURRENT) | 250 | SeriesStatus.SUPPORTED, SeriesStatus.CURRENT) |
394 | 251 | if branch.distroseries.status in stable_states: | 251 | if branch.distroseries.status in stable_states: |
395 | 252 | pocket = PackagePublishingPocket.BACKPORTS | 252 | pocket = PackagePublishingPocket.BACKPORTS |
396 | 253 | else: | 253 | else: |
397 | 254 | 254 | ||
398 | === modified file 'lib/lp/registry/browser/distribution.py' | |||
399 | --- lib/lp/registry/browser/distribution.py 2009-12-05 18:37:28 +0000 | |||
400 | +++ lib/lp/registry/browser/distribution.py 2010-01-05 16:22:16 +0000 | |||
401 | @@ -70,7 +70,7 @@ | |||
402 | 70 | IDistributionSet) | 70 | IDistributionSet) |
403 | 71 | from lp.registry.interfaces.distributionmirror import ( | 71 | from lp.registry.interfaces.distributionmirror import ( |
404 | 72 | IDistributionMirrorSet, MirrorContent, MirrorSpeed) | 72 | IDistributionMirrorSet, MirrorContent, MirrorSpeed) |
406 | 73 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 73 | from lp.registry.interfaces.series import SeriesStatus |
407 | 74 | from lp.registry.interfaces.product import IProduct | 74 | from lp.registry.interfaces.product import IProduct |
408 | 75 | from lp.soyuz.interfaces.publishedpackage import ( | 75 | from lp.soyuz.interfaces.publishedpackage import ( |
409 | 76 | IPublishedPackageSet) | 76 | IPublishedPackageSet) |
410 | @@ -812,9 +812,9 @@ | |||
411 | 812 | 812 | ||
412 | 813 | def getCssClass(self, series): | 813 | def getCssClass(self, series): |
413 | 814 | """The highlighted, unhighlighted, or dimmed CSS class.""" | 814 | """The highlighted, unhighlighted, or dimmed CSS class.""" |
415 | 815 | if series.status == DistroSeriesStatus.DEVELOPMENT: | 815 | if series.status == SeriesStatus.DEVELOPMENT: |
416 | 816 | return 'highlighted' | 816 | return 'highlighted' |
418 | 817 | elif series.status == DistroSeriesStatus.OBSOLETE: | 817 | elif series.status == SeriesStatus.OBSOLETE: |
419 | 818 | return 'dimmed' | 818 | return 'dimmed' |
420 | 819 | else: | 819 | else: |
421 | 820 | return 'unhighlighted' | 820 | return 'unhighlighted' |
422 | 821 | 821 | ||
423 | === modified file 'lib/lp/registry/browser/distroseries.py' | |||
424 | --- lib/lp/registry/browser/distroseries.py 2009-12-18 13:25:19 +0000 | |||
425 | +++ lib/lp/registry/browser/distroseries.py 2010-01-05 16:22:16 +0000 | |||
426 | @@ -35,8 +35,8 @@ | |||
427 | 35 | from canonical.launchpad.browser.packagesearch import PackageSearchViewBase | 35 | from canonical.launchpad.browser.packagesearch import PackageSearchViewBase |
428 | 36 | from lp.soyuz.browser.queue import QueueItemsView | 36 | from lp.soyuz.browser.queue import QueueItemsView |
429 | 37 | from lp.services.worlddata.interfaces.country import ICountry | 37 | from lp.services.worlddata.interfaces.country import ICountry |
432 | 38 | from lp.registry.interfaces.distroseries import ( | 38 | from lp.registry.interfaces.series import SeriesStatus |
433 | 39 | DistroSeriesStatus, IDistroSeries) | 39 | from lp.registry.interfaces.distroseries import IDistroSeries |
434 | 40 | from lp.translations.interfaces.distroserieslanguage import ( | 40 | from lp.translations.interfaces.distroserieslanguage import ( |
435 | 41 | IDistroSeriesLanguageSet) | 41 | IDistroSeriesLanguageSet) |
436 | 42 | from lp.services.worlddata.interfaces.language import ILanguageSet | 42 | from lp.services.worlddata.interfaces.language import ILanguageSet |
437 | @@ -244,7 +244,7 @@ | |||
438 | 244 | label = 'Search packages' | 244 | label = 'Search packages' |
439 | 245 | 245 | ||
440 | 246 | 246 | ||
442 | 247 | class DistroSeriesStatusMixin: | 247 | class SeriesStatusMixin: |
443 | 248 | """A mixin that provides status field support.""" | 248 | """A mixin that provides status field support.""" |
444 | 249 | 249 | ||
445 | 250 | def createStatusField(self): | 250 | def createStatusField(self): |
446 | @@ -256,15 +256,15 @@ | |||
447 | 256 | * unstable -> EXPERIMENTAL, DEVELOPMENT, FROZEN, FUTURE, CURRENT | 256 | * unstable -> EXPERIMENTAL, DEVELOPMENT, FROZEN, FUTURE, CURRENT |
448 | 257 | """ | 257 | """ |
449 | 258 | stable_status = ( | 258 | stable_status = ( |
453 | 259 | DistroSeriesStatus.CURRENT, | 259 | SeriesStatus.CURRENT, |
454 | 260 | DistroSeriesStatus.SUPPORTED, | 260 | SeriesStatus.SUPPORTED, |
455 | 261 | DistroSeriesStatus.OBSOLETE, | 261 | SeriesStatus.OBSOLETE, |
456 | 262 | ) | 262 | ) |
457 | 263 | 263 | ||
458 | 264 | if self.context.status not in stable_status: | 264 | if self.context.status not in stable_status: |
460 | 265 | terms = [status for status in DistroSeriesStatus.items | 265 | terms = [status for status in SeriesStatus.items |
461 | 266 | if status not in stable_status] | 266 | if status not in stable_status] |
463 | 267 | terms.append(DistroSeriesStatus.CURRENT) | 267 | terms.append(SeriesStatus.CURRENT) |
464 | 268 | else: | 268 | else: |
465 | 269 | terms = stable_status | 269 | terms = stable_status |
466 | 270 | 270 | ||
467 | @@ -282,7 +282,7 @@ | |||
468 | 282 | def updateDateReleased(self, status): | 282 | def updateDateReleased(self, status): |
469 | 283 | """Update the datereleased field if the status is set to CURRENT.""" | 283 | """Update the datereleased field if the status is set to CURRENT.""" |
470 | 284 | if (self.context.datereleased is None and | 284 | if (self.context.datereleased is None and |
472 | 285 | status == DistroSeriesStatus.CURRENT): | 285 | status == SeriesStatus.CURRENT): |
473 | 286 | self.context.datereleased = UTC_NOW | 286 | self.context.datereleased = UTC_NOW |
474 | 287 | 287 | ||
475 | 288 | 288 | ||
476 | @@ -328,7 +328,7 @@ | |||
477 | 328 | milestone_can_release = False | 328 | milestone_can_release = False |
478 | 329 | 329 | ||
479 | 330 | 330 | ||
481 | 331 | class DistroSeriesEditView(LaunchpadEditFormView, DistroSeriesStatusMixin): | 331 | class DistroSeriesEditView(LaunchpadEditFormView, SeriesStatusMixin): |
482 | 332 | """View class that lets you edit a DistroSeries object. | 332 | """View class that lets you edit a DistroSeries object. |
483 | 333 | 333 | ||
484 | 334 | It redirects to the main distroseries page after a successful edit. | 334 | It redirects to the main distroseries page after a successful edit. |
485 | @@ -375,7 +375,7 @@ | |||
486 | 375 | self.next_url = canonical_url(self.context) | 375 | self.next_url = canonical_url(self.context) |
487 | 376 | 376 | ||
488 | 377 | 377 | ||
490 | 378 | class DistroSeriesAdminView(LaunchpadEditFormView, DistroSeriesStatusMixin): | 378 | class DistroSeriesAdminView(LaunchpadEditFormView, SeriesStatusMixin): |
491 | 379 | """View class for administering a DistroSeries object. | 379 | """View class for administering a DistroSeries object. |
492 | 380 | 380 | ||
493 | 381 | It redirects to the main distroseries page after a successful edit. | 381 | It redirects to the main distroseries page after a successful edit. |
494 | 382 | 382 | ||
495 | === modified file 'lib/lp/registry/browser/product.py' | |||
496 | --- lib/lp/registry/browser/product.py 2009-12-11 19:54:04 +0000 | |||
497 | +++ lib/lp/registry/browser/product.py 2010-01-05 16:22:16 +0000 | |||
498 | @@ -66,7 +66,7 @@ | |||
499 | 66 | ILaunchBag, NotFoundError, UnsafeFormGetSubmissionError) | 66 | ILaunchBag, NotFoundError, UnsafeFormGetSubmissionError) |
500 | 67 | from lp.registry.interfaces.pillar import IPillarNameSet | 67 | from lp.registry.interfaces.pillar import IPillarNameSet |
501 | 68 | from lp.registry.interfaces.product import IProductReviewSearch, License | 68 | from lp.registry.interfaces.product import IProductReviewSearch, License |
503 | 69 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 69 | from lp.registry.interfaces.series import SeriesStatus |
504 | 70 | from lp.registry.interfaces.product import ( | 70 | from lp.registry.interfaces.product import ( |
505 | 71 | IProduct, IProductSet, LicenseStatus) | 71 | IProduct, IProductSet, LicenseStatus) |
506 | 72 | from lp.registry.interfaces.productrelease import ( | 72 | from lp.registry.interfaces.productrelease import ( |
507 | @@ -540,7 +540,7 @@ | |||
508 | 540 | # Callback for the filter which only allows series that have not been | 540 | # Callback for the filter which only allows series that have not been |
509 | 541 | # marked obsolete. | 541 | # marked obsolete. |
510 | 542 | def check_active(series): | 542 | def check_active(series): |
512 | 543 | return series.status != DistroSeriesStatus.OBSOLETE | 543 | return series.status != SeriesStatus.OBSOLETE |
513 | 544 | return self._sorted_filtered_list(check_active) | 544 | return self._sorted_filtered_list(check_active) |
514 | 545 | 545 | ||
515 | 546 | 546 | ||
516 | @@ -618,7 +618,7 @@ | |||
517 | 618 | """The highlighted, unhighlighted, or dimmed CSS class.""" | 618 | """The highlighted, unhighlighted, or dimmed CSS class.""" |
518 | 619 | if self.is_development_focus: | 619 | if self.is_development_focus: |
519 | 620 | return 'highlighted' | 620 | return 'highlighted' |
521 | 621 | elif self.status == DistroSeriesStatus.OBSOLETE: | 621 | elif self.status == SeriesStatus.OBSOLETE: |
522 | 622 | return 'dimmed' | 622 | return 'dimmed' |
523 | 623 | else: | 623 | else: |
524 | 624 | return 'unhighlighted' | 624 | return 'unhighlighted' |
525 | 625 | 625 | ||
526 | === modified file 'lib/lp/registry/browser/productseries.py' | |||
527 | --- lib/lp/registry/browser/productseries.py 2009-12-05 18:37:28 +0000 | |||
528 | +++ lib/lp/registry/browser/productseries.py 2010-01-05 16:22:16 +0000 | |||
529 | @@ -75,7 +75,7 @@ | |||
530 | 75 | from lp.registry.browser import ( | 75 | from lp.registry.browser import ( |
531 | 76 | MilestoneOverlayMixin, RegistryDeleteViewMixin) | 76 | MilestoneOverlayMixin, RegistryDeleteViewMixin) |
532 | 77 | from lp.registry.browser.packaging import PackagingAddView | 77 | from lp.registry.browser.packaging import PackagingAddView |
534 | 78 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 78 | from lp.registry.interfaces.series import SeriesStatus |
535 | 79 | from lp.registry.interfaces.productseries import IProductSeries | 79 | from lp.registry.interfaces.productseries import IProductSeries |
536 | 80 | 80 | ||
537 | 81 | 81 | ||
538 | @@ -329,7 +329,7 @@ | |||
539 | 329 | them for obsolete series can be a problem if many series are being | 329 | them for obsolete series can be a problem if many series are being |
540 | 330 | displayed. | 330 | displayed. |
541 | 331 | """ | 331 | """ |
543 | 332 | return self.context.status == DistroSeriesStatus.OBSOLETE | 332 | return self.context.status == SeriesStatus.OBSOLETE |
544 | 333 | 333 | ||
545 | 334 | @cachedproperty | 334 | @cachedproperty |
546 | 335 | def bugtask_status_counts(self): | 335 | def bugtask_status_counts(self): |
547 | 336 | 336 | ||
548 | === modified file 'lib/lp/registry/browser/tests/browser-views.txt' | |||
549 | --- lib/lp/registry/browser/tests/browser-views.txt 2009-09-10 22:09:44 +0000 | |||
550 | +++ lib/lp/registry/browser/tests/browser-views.txt 2010-01-05 16:22:16 +0000 | |||
551 | @@ -35,7 +35,7 @@ | |||
552 | 35 | attribute has the required attribute to sort. | 35 | attribute has the required attribute to sort. |
553 | 36 | 36 | ||
554 | 37 | >>> from lp.registry.browser import get_status_counts | 37 | >>> from lp.registry.browser import get_status_counts |
556 | 38 | >>> from lp.registry.interfaces.distroseries import DistroSeriesStatus | 38 | >>> from lp.registry.interfaces.series import SeriesStatus |
557 | 39 | 39 | ||
558 | 40 | >>> class Concept: | 40 | >>> class Concept: |
559 | 41 | ... def __init__(self, status, person): | 41 | ... def __init__(self, status, person): |
560 | @@ -48,9 +48,9 @@ | |||
561 | 48 | >>> a_person = factory.makePerson(name='andy', displayname="Andy") | 48 | >>> a_person = factory.makePerson(name='andy', displayname="Andy") |
562 | 49 | >>> b_person = factory.makePerson(name='bob', displayname="Bob") | 49 | >>> b_person = factory.makePerson(name='bob', displayname="Bob") |
563 | 50 | 50 | ||
567 | 51 | >>> concept_1 = Concept(DistroSeriesStatus.EXPERIMENTAL, a_person) | 51 | >>> concept_1 = Concept(SeriesStatus.EXPERIMENTAL, a_person) |
568 | 52 | >>> artefact_2 = Artefact(DistroSeriesStatus.EXPERIMENTAL, b_person) | 52 | >>> artefact_2 = Artefact(SeriesStatus.EXPERIMENTAL, b_person) |
569 | 53 | >>> artefact_3 = Artefact(DistroSeriesStatus.CURRENT, b_person) | 53 | >>> artefact_3 = Artefact(SeriesStatus.CURRENT, b_person) |
570 | 54 | 54 | ||
571 | 55 | The common example is for counting the status enums for an object. The default | 55 | The common example is for counting the status enums for an object. The default |
572 | 56 | rule is to sort on the 'sortkey' attribute of the object being counted. | 56 | rule is to sort on the 'sortkey' attribute of the object being counted. |
573 | 57 | 57 | ||
574 | === modified file 'lib/lp/registry/browser/tests/distributionsourcepackage-views.txt' | |||
575 | --- lib/lp/registry/browser/tests/distributionsourcepackage-views.txt 2009-11-10 21:33:20 +0000 | |||
576 | +++ lib/lp/registry/browser/tests/distributionsourcepackage-views.txt 2010-01-05 16:22:16 +0000 | |||
577 | @@ -10,8 +10,8 @@ | |||
578 | 10 | >>> publisher = SoyuzTestPublisher() | 10 | >>> publisher = SoyuzTestPublisher() |
579 | 11 | >>> publisher.prepareBreezyAutotest() | 11 | >>> publisher.prepareBreezyAutotest() |
580 | 12 | >>> ubuntutest = publisher.ubuntutest | 12 | >>> ubuntutest = publisher.ubuntutest |
583 | 13 | >>> from lp.registry.interfaces.distroseries import DistroSeriesStatus | 13 | >>> from lp.registry.interfaces.series import SeriesStatus |
584 | 14 | >>> publisher.distroseries.status = DistroSeriesStatus.DEVELOPMENT | 14 | >>> publisher.distroseries.status = SeriesStatus.DEVELOPMENT |
585 | 15 | 15 | ||
586 | 16 | # Publish the source 'gedit' in the ubuntutest main archive. | 16 | # Publish the source 'gedit' in the ubuntutest main archive. |
587 | 17 | >>> from datetime import datetime | 17 | >>> from datetime import datetime |
588 | 18 | 18 | ||
589 | === modified file 'lib/lp/registry/browser/tests/packaging-views.txt' | |||
590 | --- lib/lp/registry/browser/tests/packaging-views.txt 2009-12-10 20:03:11 +0000 | |||
591 | +++ lib/lp/registry/browser/tests/packaging-views.txt 2010-01-05 16:22:16 +0000 | |||
592 | @@ -206,12 +206,12 @@ | |||
593 | 206 | When the current Ubuntu series changes, the sourcepackagename is not known, | 206 | When the current Ubuntu series changes, the sourcepackagename is not known, |
594 | 207 | and a new entry can be added to the packaging history. | 207 | and a new entry can be added to the packaging history. |
595 | 208 | 208 | ||
597 | 209 | >>> from lp.registry.interfaces.distroseries import DistroSeriesStatus | 209 | >>> from lp.registry.interfaces.series import SeriesStatus |
598 | 210 | 210 | ||
599 | 211 | >>> login('admin@canonical.com') | 211 | >>> login('admin@canonical.com') |
601 | 212 | >>> hoary.status = DistroSeriesStatus.CURRENT | 212 | >>> hoary.status = SeriesStatus.CURRENT |
602 | 213 | >>> grumpy_series = ubuntu.getSeries('grumpy') | 213 | >>> grumpy_series = ubuntu.getSeries('grumpy') |
604 | 214 | >>> grumpy_series.status = DistroSeriesStatus.FROZEN | 214 | >>> grumpy_series.status = SeriesStatus.FROZEN |
605 | 215 | 215 | ||
606 | 216 | >>> a_user = factory.makePerson(name="hedgehog") | 216 | >>> a_user = factory.makePerson(name="hedgehog") |
607 | 217 | >>> login_person(a_user) | 217 | >>> login_person(a_user) |
608 | 218 | 218 | ||
609 | === modified file 'lib/lp/registry/browser/tests/productseries-views.txt' | |||
610 | --- lib/lp/registry/browser/tests/productseries-views.txt 2009-12-05 02:53:07 +0000 | |||
611 | +++ lib/lp/registry/browser/tests/productseries-views.txt 2010-01-05 16:22:16 +0000 | |||
612 | @@ -81,14 +81,14 @@ | |||
613 | 81 | has an is_obsolete property that templates can check when choosing the content | 81 | has an is_obsolete property that templates can check when choosing the content |
614 | 82 | to display. | 82 | to display. |
615 | 83 | 83 | ||
617 | 84 | >>> from lp.registry.interfaces.distroseries import DistroSeriesStatus | 84 | >>> from lp.registry.interfaces.series import SeriesStatus |
618 | 85 | 85 | ||
619 | 86 | >>> print series.status | 86 | >>> print series.status |
620 | 87 | Active Development | 87 | Active Development |
621 | 88 | >>> view.is_obsolete | 88 | >>> view.is_obsolete |
622 | 89 | False | 89 | False |
623 | 90 | 90 | ||
625 | 91 | >>> series.status = DistroSeriesStatus.OBSOLETE | 91 | >>> series.status = SeriesStatus.OBSOLETE |
626 | 92 | >>> view = create_view(series, '+index') | 92 | >>> view = create_view(series, '+index') |
627 | 93 | >>> view.is_obsolete | 93 | >>> view.is_obsolete |
628 | 94 | True | 94 | True |
629 | 95 | 95 | ||
630 | === modified file 'lib/lp/registry/doc/distroseries.txt' | |||
631 | --- lib/lp/registry/doc/distroseries.txt 2009-12-10 20:28:03 +0000 | |||
632 | +++ lib/lp/registry/doc/distroseries.txt 2010-01-05 16:22:16 +0000 | |||
633 | @@ -170,7 +170,7 @@ | |||
634 | 170 | >>> hoary = ubuntu['hoary'] | 170 | >>> hoary = ubuntu['hoary'] |
635 | 171 | 171 | ||
636 | 172 | >>> from lp.registry.interfaces.pocket import PackagePublishingPocket | 172 | >>> from lp.registry.interfaces.pocket import PackagePublishingPocket |
638 | 173 | >>> from canonical.launchpad.interfaces import DistroSeriesStatus | 173 | >>> from canonical.launchpad.interfaces import SeriesStatus |
639 | 174 | 174 | ||
640 | 175 | >>> warty.status.name | 175 | >>> warty.status.name |
641 | 176 | 'CURRENT' | 176 | 'CURRENT' |
642 | @@ -190,7 +190,7 @@ | |||
643 | 190 | the upload will have to wait for manual approval anyway: | 190 | the upload will have to wait for manual approval anyway: |
644 | 191 | 191 | ||
645 | 192 | >>> from zope.security.proxy import removeSecurityProxy | 192 | >>> from zope.security.proxy import removeSecurityProxy |
647 | 193 | >>> removeSecurityProxy(hoary).status = DistroSeriesStatus.FROZEN | 193 | >>> removeSecurityProxy(hoary).status = SeriesStatus.FROZEN |
648 | 194 | 194 | ||
649 | 195 | >>> hoary.status.name | 195 | >>> hoary.status.name |
650 | 196 | 'FROZEN' | 196 | 'FROZEN' |
651 | @@ -430,35 +430,35 @@ | |||
652 | 430 | 430 | ||
653 | 431 | Exactly what message is displayed depends on the series' status. | 431 | Exactly what message is displayed depends on the series' status. |
654 | 432 | 432 | ||
679 | 433 | >>> untranslatable_series.status = DistroSeriesStatus.EXPERIMENTAL | 433 | >>> untranslatable_series.status = SeriesStatus.EXPERIMENTAL |
680 | 434 | >>> print get_visibility_notice(untranslatable_series) | 434 | >>> print get_visibility_notice(untranslatable_series) |
681 | 435 | Translations for this release series are not available yet. | 435 | Translations for this release series are not available yet. |
682 | 436 | 436 | ||
683 | 437 | >>> untranslatable_series.status = DistroSeriesStatus.DEVELOPMENT | 437 | >>> untranslatable_series.status = SeriesStatus.DEVELOPMENT |
684 | 438 | >>> print get_visibility_notice(untranslatable_series) | 438 | >>> print get_visibility_notice(untranslatable_series) |
685 | 439 | Translations for this release series are not available yet. | 439 | Translations for this release series are not available yet. |
686 | 440 | 440 | ||
687 | 441 | >>> untranslatable_series.status = DistroSeriesStatus.FROZEN | 441 | >>> untranslatable_series.status = SeriesStatus.FROZEN |
688 | 442 | >>> print get_visibility_notice(untranslatable_series) | 442 | >>> print get_visibility_notice(untranslatable_series) |
689 | 443 | Translations for this release series are not currently available. | 443 | Translations for this release series are not currently available. |
690 | 444 | Please come back soon. | 444 | Please come back soon. |
691 | 445 | 445 | ||
692 | 446 | >>> untranslatable_series.status = DistroSeriesStatus.CURRENT | 446 | >>> untranslatable_series.status = SeriesStatus.CURRENT |
693 | 447 | >>> print get_visibility_notice(untranslatable_series) | 447 | >>> print get_visibility_notice(untranslatable_series) |
694 | 448 | Translations for this release series are not currently available. | 448 | Translations for this release series are not currently available. |
695 | 449 | Please come back soon. | 449 | Please come back soon. |
696 | 450 | 450 | ||
697 | 451 | >>> untranslatable_series.status = DistroSeriesStatus.SUPPORTED | 451 | >>> untranslatable_series.status = SeriesStatus.SUPPORTED |
698 | 452 | >>> print get_visibility_notice(untranslatable_series) | 452 | >>> print get_visibility_notice(untranslatable_series) |
699 | 453 | Translations for this release series are not currently available. | 453 | Translations for this release series are not currently available. |
700 | 454 | Please come back soon. | 454 | Please come back soon. |
701 | 455 | 455 | ||
702 | 456 | >>> untranslatable_series.status = DistroSeriesStatus.OBSOLETE | 456 | >>> untranslatable_series.status = SeriesStatus.OBSOLETE |
703 | 457 | >>> print get_visibility_notice(untranslatable_series) | 457 | >>> print get_visibility_notice(untranslatable_series) |
704 | 458 | This release series is obsolete. Its translations are no longer | 458 | This release series is obsolete. Its translations are no longer |
705 | 459 | available. | 459 | available. |
706 | 460 | 460 | ||
708 | 461 | >>> untranslatable_series.status = DistroSeriesStatus.FUTURE | 461 | >>> untranslatable_series.status = SeriesStatus.FUTURE |
709 | 462 | >>> print get_visibility_notice(untranslatable_series) | 462 | >>> print get_visibility_notice(untranslatable_series) |
710 | 463 | Translations for this release series are not available yet. | 463 | Translations for this release series are not available yet. |
711 | 464 | 464 | ||
712 | 465 | 465 | ||
713 | === modified file 'lib/lp/registry/doc/product.txt' | |||
714 | --- lib/lp/registry/doc/product.txt 2009-10-26 18:40:04 +0000 | |||
715 | +++ lib/lp/registry/doc/product.txt 2010-01-05 16:22:16 +0000 | |||
716 | @@ -636,11 +636,10 @@ | |||
717 | 636 | Once the 1.0 series is made obsolete, it no longer shows up in the set of | 636 | Once the 1.0 series is made obsolete, it no longer shows up in the set of |
718 | 637 | sorted active series. | 637 | sorted active series. |
719 | 638 | 638 | ||
722 | 639 | >>> from lp.registry.interfaces.distroseries import ( | 639 | >>> from lp.registry.interfaces.series import SeriesStatus |
721 | 640 | ... DistroSeriesStatus) | ||
723 | 641 | >>> sorted_series = firefox_view.sorted_active_series_list | 640 | >>> sorted_series = firefox_view.sorted_active_series_list |
724 | 642 | >>> last_series = firefox.getSeries(sorted_series[-1].name) | 641 | >>> last_series = firefox.getSeries(sorted_series[-1].name) |
726 | 643 | >>> last_series.status = DistroSeriesStatus.OBSOLETE | 642 | >>> last_series.status = SeriesStatus.OBSOLETE |
727 | 644 | >>> firefox_view = create_initialized_view(firefox, '+index') | 643 | >>> firefox_view = create_initialized_view(firefox, '+index') |
728 | 645 | >>> for series in firefox_view.sorted_active_series_list: | 644 | >>> for series in firefox_view.sorted_active_series_list: |
729 | 646 | ... print series.name | 645 | ... print series.name |
730 | @@ -649,7 +648,7 @@ | |||
731 | 649 | It is possible for the development series to be obsolete, and in that case, it | 648 | It is possible for the development series to be obsolete, and in that case, it |
732 | 650 | still shows up in the list. | 649 | still shows up in the list. |
733 | 651 | 650 | ||
735 | 652 | >>> firefox.development_focus.status = DistroSeriesStatus.OBSOLETE | 651 | >>> firefox.development_focus.status = SeriesStatus.OBSOLETE |
736 | 653 | >>> firefox_view = create_initialized_view(firefox, '+index') | 652 | >>> firefox_view = create_initialized_view(firefox, '+index') |
737 | 654 | >>> for series in firefox_view.sorted_active_series_list: | 653 | >>> for series in firefox_view.sorted_active_series_list: |
738 | 655 | ... print series.name | 654 | ... print series.name |
739 | 656 | 655 | ||
740 | === modified file 'lib/lp/registry/interfaces/distroseries.py' | |||
741 | --- lib/lp/registry/interfaces/distroseries.py 2009-12-14 13:49:03 +0000 | |||
742 | +++ lib/lp/registry/interfaces/distroseries.py 2010-01-05 16:22:16 +0000 | |||
743 | @@ -8,7 +8,6 @@ | |||
744 | 8 | __metaclass__ = type | 8 | __metaclass__ = type |
745 | 9 | 9 | ||
746 | 10 | __all__ = [ | 10 | __all__ = [ |
747 | 11 | 'DistroSeriesStatus', | ||
748 | 12 | 'IDistroSeries', | 11 | 'IDistroSeries', |
749 | 13 | 'IDistroSeriesEditRestricted', | 12 | 'IDistroSeriesEditRestricted', |
750 | 14 | 'IDistroSeriesPublic', | 13 | 'IDistroSeriesPublic', |
751 | @@ -20,11 +19,12 @@ | |||
752 | 20 | from zope.schema import Bool, Datetime, Choice, Object, TextLine | 19 | from zope.schema import Bool, Datetime, Choice, Object, TextLine |
753 | 21 | from zope.interface import Interface, Attribute | 20 | from zope.interface import Interface, Attribute |
754 | 22 | 21 | ||
756 | 23 | from lazr.enum import DBEnumeratedType, DBItem | 22 | from lazr.enum import DBEnumeratedType |
757 | 24 | 23 | ||
758 | 25 | from canonical.launchpad.fields import ( | 24 | from canonical.launchpad.fields import ( |
759 | 26 | ContentNameField, Description, PublicPersonChoice, Summary, Title, | 25 | ContentNameField, Description, PublicPersonChoice, Summary, Title, |
760 | 27 | UniqueField) | 26 | UniqueField) |
761 | 27 | from lp.registry.interfaces.series import SeriesStatus | ||
762 | 28 | from lp.registry.interfaces.structuralsubscription import ( | 28 | from lp.registry.interfaces.structuralsubscription import ( |
763 | 29 | IStructuralSubscriptionTarget) | 29 | IStructuralSubscriptionTarget) |
764 | 30 | from lp.bugs.interfaces.bugtarget import IBugTarget, IHasBugs | 30 | from lp.bugs.interfaces.bugtarget import IBugTarget, IHasBugs |
765 | @@ -54,73 +54,6 @@ | |||
766 | 54 | operation_returns_collection_of, operation_returns_entry, | 54 | operation_returns_collection_of, operation_returns_entry, |
767 | 55 | rename_parameters_as, webservice_error) | 55 | rename_parameters_as, webservice_error) |
768 | 56 | 56 | ||
769 | 57 | |||
770 | 58 | # XXX: salgado, 2008-06-02: We should use a more generic name here as this | ||
771 | 59 | # enum is used in ProductSeries.status as well. | ||
772 | 60 | class DistroSeriesStatus(DBEnumeratedType): | ||
773 | 61 | """Distro/Product Series Status | ||
774 | 62 | |||
775 | 63 | A Distro or Product series (warty, hoary, 1.4 for example) changes state | ||
776 | 64 | throughout its development. This schema describes the level of | ||
777 | 65 | development of the series. | ||
778 | 66 | """ | ||
779 | 67 | |||
780 | 68 | EXPERIMENTAL = DBItem(1, """ | ||
781 | 69 | Experimental | ||
782 | 70 | |||
783 | 71 | This series contains code that is far from active release planning or | ||
784 | 72 | management. | ||
785 | 73 | |||
786 | 74 | In the case of Ubuntu, series that are beyond the current | ||
787 | 75 | "development" release will be marked as "experimental". We create | ||
788 | 76 | those so that people have a place to upload code which is expected to | ||
789 | 77 | be part of that distant future release, but which we do not want to | ||
790 | 78 | interfere with the current development release. | ||
791 | 79 | """) | ||
792 | 80 | |||
793 | 81 | DEVELOPMENT = DBItem(2, """ | ||
794 | 82 | Active Development | ||
795 | 83 | |||
796 | 84 | The series that is under active development. | ||
797 | 85 | """) | ||
798 | 86 | |||
799 | 87 | FROZEN = DBItem(3, """ | ||
800 | 88 | Pre-release Freeze | ||
801 | 89 | |||
802 | 90 | When a series is near to release the administrators will freeze it, | ||
803 | 91 | which typically means all changes require significant review before | ||
804 | 92 | being accepted. | ||
805 | 93 | """) | ||
806 | 94 | |||
807 | 95 | CURRENT = DBItem(4, """ | ||
808 | 96 | Current Stable Release | ||
809 | 97 | |||
810 | 98 | This is the latest stable release. Normally there will only | ||
811 | 99 | be one of these for a given distribution. | ||
812 | 100 | """) | ||
813 | 101 | |||
814 | 102 | SUPPORTED = DBItem(5, """ | ||
815 | 103 | Supported | ||
816 | 104 | |||
817 | 105 | This series is still supported, but it is no longer the current stable | ||
818 | 106 | release. | ||
819 | 107 | """) | ||
820 | 108 | |||
821 | 109 | OBSOLETE = DBItem(6, """ | ||
822 | 110 | Obsolete | ||
823 | 111 | |||
824 | 112 | This series is no longer supported, it is considered obsolete and | ||
825 | 113 | should not be used on production systems. | ||
826 | 114 | """) | ||
827 | 115 | |||
828 | 116 | FUTURE = DBItem(7, """ | ||
829 | 117 | Future | ||
830 | 118 | |||
831 | 119 | This is a future series of this product/distro in which the developers | ||
832 | 120 | haven't started working yet. | ||
833 | 121 | """) | ||
834 | 122 | |||
835 | 123 | |||
836 | 124 | class DistroSeriesNameField(ContentNameField): | 57 | class DistroSeriesNameField(ContentNameField): |
837 | 125 | """A class to ensure `IDistroSeries` has unique names.""" | 58 | """A class to ensure `IDistroSeries` has unique names.""" |
838 | 126 | errormessage = _("%s is already in use by another series.") | 59 | errormessage = _("%s is already in use by another series.") |
839 | @@ -273,7 +206,7 @@ | |||
840 | 273 | status = exported( | 206 | status = exported( |
841 | 274 | Choice( | 207 | Choice( |
842 | 275 | title=_("Status"), required=True, | 208 | title=_("Status"), required=True, |
844 | 276 | vocabulary=DistroSeriesStatus)) | 209 | vocabulary=SeriesStatus)) |
845 | 277 | datereleased = exported( | 210 | datereleased = exported( |
846 | 278 | Datetime(title=_("Date released"))) | 211 | Datetime(title=_("Date released"))) |
847 | 279 | parent_series = exported( | 212 | parent_series = exported( |
848 | 280 | 213 | ||
849 | === modified file 'lib/lp/registry/interfaces/productseries.py' | |||
850 | --- lib/lp/registry/interfaces/productseries.py 2009-12-05 18:37:28 +0000 | |||
851 | +++ lib/lp/registry/interfaces/productseries.py 2010-01-05 16:22:16 +0000 | |||
852 | @@ -25,7 +25,7 @@ | |||
853 | 25 | IStructuralSubscriptionTarget) | 25 | IStructuralSubscriptionTarget) |
854 | 26 | from lp.code.interfaces.branch import IBranch | 26 | from lp.code.interfaces.branch import IBranch |
855 | 27 | from lp.bugs.interfaces.bugtarget import IBugTarget | 27 | from lp.bugs.interfaces.bugtarget import IBugTarget |
857 | 28 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 28 | from lp.registry.interfaces.series import SeriesStatus |
858 | 29 | from canonical.launchpad.interfaces.launchpad import ( | 29 | from canonical.launchpad.interfaces.launchpad import ( |
859 | 30 | IHasAppointedDriver, IHasDrivers) | 30 | IHasAppointedDriver, IHasDrivers) |
860 | 31 | from lp.registry.interfaces.role import IHasOwner | 31 | from lp.registry.interfaces.role import IHasOwner |
861 | @@ -106,8 +106,8 @@ | |||
862 | 106 | 106 | ||
863 | 107 | status = exported( | 107 | status = exported( |
864 | 108 | Choice( | 108 | Choice( |
867 | 109 | title=_('Status'), required=True, vocabulary=DistroSeriesStatus, | 109 | title=_('Status'), required=True, vocabulary=SeriesStatus, |
868 | 110 | default=DistroSeriesStatus.DEVELOPMENT)) | 110 | default=SeriesStatus.DEVELOPMENT)) |
869 | 111 | 111 | ||
870 | 112 | parent = Attribute('The structural parent of this series - the product') | 112 | parent = Attribute('The structural parent of this series - the product') |
871 | 113 | 113 | ||
872 | 114 | 114 | ||
873 | === added file 'lib/lp/registry/interfaces/series.py' | |||
874 | --- lib/lp/registry/interfaces/series.py 1970-01-01 00:00:00 +0000 | |||
875 | +++ lib/lp/registry/interfaces/series.py 2010-01-05 16:22:16 +0000 | |||
876 | @@ -0,0 +1,78 @@ | |||
877 | 1 | # Copyright 2009 Canonical Ltd. This software is licensed under the | ||
878 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | ||
879 | 3 | |||
880 | 4 | # pylint: disable-msg=E0211,E0213 | ||
881 | 5 | |||
882 | 6 | """Interfaces including common IDistroSeries and IProductSeries classes.""" | ||
883 | 7 | |||
884 | 8 | __metaclass__ = type | ||
885 | 9 | |||
886 | 10 | __all__ = [ | ||
887 | 11 | 'SeriesStatus' | ||
888 | 12 | ] | ||
889 | 13 | |||
890 | 14 | from lazr.enum import DBEnumeratedType, DBItem | ||
891 | 15 | |||
892 | 16 | class SeriesStatus(DBEnumeratedType): | ||
893 | 17 | """Distro/Product Series Status | ||
894 | 18 | |||
895 | 19 | A Distro or Product series (warty, hoary, 1.4 for example) changes state | ||
896 | 20 | throughout its development. This schema describes the level of | ||
897 | 21 | development of the series. | ||
898 | 22 | """ | ||
899 | 23 | |||
900 | 24 | EXPERIMENTAL = DBItem(1, """ | ||
901 | 25 | Experimental | ||
902 | 26 | |||
903 | 27 | This series contains code that is far from active release planning or | ||
904 | 28 | management. | ||
905 | 29 | |||
906 | 30 | In the case of Ubuntu, series that are beyond the current | ||
907 | 31 | "development" release will be marked as "experimental". We create | ||
908 | 32 | those so that people have a place to upload code which is expected to | ||
909 | 33 | be part of that distant future release, but which we do not want to | ||
910 | 34 | interfere with the current development release. | ||
911 | 35 | """) | ||
912 | 36 | |||
913 | 37 | DEVELOPMENT = DBItem(2, """ | ||
914 | 38 | Active Development | ||
915 | 39 | |||
916 | 40 | The series that is under active development. | ||
917 | 41 | """) | ||
918 | 42 | |||
919 | 43 | FROZEN = DBItem(3, """ | ||
920 | 44 | Pre-release Freeze | ||
921 | 45 | |||
922 | 46 | When a series is near to release the administrators will freeze it, | ||
923 | 47 | which typically means all changes require significant review before | ||
924 | 48 | being accepted. | ||
925 | 49 | """) | ||
926 | 50 | |||
927 | 51 | CURRENT = DBItem(4, """ | ||
928 | 52 | Current Stable Release | ||
929 | 53 | |||
930 | 54 | This is the latest stable release. Normally there will only | ||
931 | 55 | be one of these for a given distribution. | ||
932 | 56 | """) | ||
933 | 57 | |||
934 | 58 | SUPPORTED = DBItem(5, """ | ||
935 | 59 | Supported | ||
936 | 60 | |||
937 | 61 | This series is still supported, but it is no longer the current stable | ||
938 | 62 | release. | ||
939 | 63 | """) | ||
940 | 64 | |||
941 | 65 | OBSOLETE = DBItem(6, """ | ||
942 | 66 | Obsolete | ||
943 | 67 | |||
944 | 68 | This series is no longer supported, it is considered obsolete and | ||
945 | 69 | should not be used on production systems. | ||
946 | 70 | """) | ||
947 | 71 | |||
948 | 72 | FUTURE = DBItem(7, """ | ||
949 | 73 | Future | ||
950 | 74 | |||
951 | 75 | This is a future series of this product/distro in which the developers | ||
952 | 76 | haven't started working yet. | ||
953 | 77 | """) | ||
954 | 78 | |||
955 | 0 | 79 | ||
956 | === modified file 'lib/lp/registry/model/distribution.py' | |||
957 | --- lib/lp/registry/model/distribution.py 2009-12-09 14:55:02 +0000 | |||
958 | +++ lib/lp/registry/model/distribution.py 2010-01-05 16:22:16 +0000 | |||
959 | @@ -84,8 +84,8 @@ | |||
960 | 84 | IDistributionSet) | 84 | IDistributionSet) |
961 | 85 | from lp.registry.interfaces.distributionmirror import ( | 85 | from lp.registry.interfaces.distributionmirror import ( |
962 | 86 | IDistributionMirror, MirrorContent, MirrorStatus) | 86 | IDistributionMirror, MirrorContent, MirrorStatus) |
965 | 87 | from lp.registry.interfaces.distroseries import ( | 87 | from lp.registry.interfaces.series import SeriesStatus |
966 | 88 | DistroSeriesStatus, NoSuchDistroSeries) | 88 | from lp.registry.interfaces.distroseries import NoSuchDistroSeries |
967 | 89 | from canonical.launchpad.interfaces.launchpad import ( | 89 | from canonical.launchpad.interfaces.launchpad import ( |
968 | 90 | IHasIcon, IHasLogo, IHasMugshot, ILaunchpadCelebrities, ILaunchpadUsage) | 90 | IHasIcon, IHasLogo, IHasMugshot, ILaunchpadCelebrities, ILaunchpadUsage) |
969 | 91 | from lp.soyuz.interfaces.queue import PackageUploadStatus | 91 | from lp.soyuz.interfaces.queue import PackageUploadStatus |
970 | @@ -394,8 +394,9 @@ | |||
971 | 394 | 394 | ||
972 | 395 | def newMirror(self, owner, speed, country, content, displayname=None, | 395 | def newMirror(self, owner, speed, country, content, displayname=None, |
973 | 396 | description=None, http_base_url=None, | 396 | description=None, http_base_url=None, |
976 | 397 | ftp_base_url=None, rsync_base_url=None, official_candidate=False, | 397 | ftp_base_url=None, rsync_base_url=None, |
977 | 398 | enabled=False, whiteboard=None): | 398 | official_candidate=False, enabled=False, |
978 | 399 | whiteboard=None): | ||
979 | 399 | """See `IDistribution`.""" | 400 | """See `IDistribution`.""" |
980 | 400 | # NB this functionality is only available to distributions that have | 401 | # NB this functionality is only available to distributions that have |
981 | 401 | # the full functionality of Launchpad enabled. This is Ubuntu and | 402 | # the full functionality of Launchpad enabled. This is Ubuntu and |
982 | @@ -450,15 +451,15 @@ | |||
983 | 450 | 451 | ||
984 | 451 | # If we have a frozen one, return that. | 452 | # If we have a frozen one, return that. |
985 | 452 | for series in self.series: | 453 | for series in self.series: |
987 | 453 | if series.status == DistroSeriesStatus.FROZEN: | 454 | if series.status == SeriesStatus.FROZEN: |
988 | 454 | return series | 455 | return series |
989 | 455 | # If we have one in development, return that. | 456 | # If we have one in development, return that. |
990 | 456 | for series in self.series: | 457 | for series in self.series: |
992 | 457 | if series.status == DistroSeriesStatus.DEVELOPMENT: | 458 | if series.status == SeriesStatus.DEVELOPMENT: |
993 | 458 | return series | 459 | return series |
994 | 459 | # If we have a stable one, return that. | 460 | # If we have a stable one, return that. |
995 | 460 | for series in self.series: | 461 | for series in self.series: |
997 | 461 | if series.status == DistroSeriesStatus.CURRENT: | 462 | if series.status == SeriesStatus.CURRENT: |
998 | 462 | return series | 463 | return series |
999 | 463 | # If we have ANY, return the first one. | 464 | # If we have ANY, return the first one. |
1000 | 464 | if len(self.series) > 0: | 465 | if len(self.series) > 0: |
1001 | @@ -509,7 +510,7 @@ | |||
1002 | 509 | """See `IDistribution`.""" | 510 | """See `IDistribution`.""" |
1003 | 510 | return DistroSeries.selectBy( | 511 | return DistroSeries.selectBy( |
1004 | 511 | distribution=self, | 512 | distribution=self, |
1006 | 512 | status=DistroSeriesStatus.DEVELOPMENT) | 513 | status=SeriesStatus.DEVELOPMENT) |
1007 | 513 | 514 | ||
1008 | 514 | def getMilestone(self, name): | 515 | def getMilestone(self, name): |
1009 | 515 | """See `IDistribution`.""" | 516 | """See `IDistribution`.""" |
1010 | @@ -1002,7 +1003,7 @@ | |||
1011 | 1002 | # we're searching for. | 1003 | # we're searching for. |
1012 | 1003 | return ( | 1004 | return ( |
1013 | 1004 | DistroSeries.distribution == self, | 1005 | DistroSeries.distribution == self, |
1015 | 1005 | DistroSeries.status != DistroSeriesStatus.OBSOLETE, | 1006 | DistroSeries.status != SeriesStatus.OBSOLETE, |
1016 | 1006 | BinaryPackageRelease.binarypackagename == BinaryPackageName.id, | 1007 | BinaryPackageRelease.binarypackagename == BinaryPackageName.id, |
1017 | 1007 | DistroArchSeries.distroseries == DistroSeries.id, | 1008 | DistroArchSeries.distroseries == DistroSeries.id, |
1018 | 1008 | Build.distroarchseries == DistroArchSeries.id, | 1009 | Build.distroarchseries == DistroArchSeries.id, |
1019 | @@ -1482,7 +1483,7 @@ | |||
1020 | 1482 | summary=summary, | 1483 | summary=summary, |
1021 | 1483 | description=description, | 1484 | description=description, |
1022 | 1484 | version=version, | 1485 | version=version, |
1024 | 1485 | status=DistroSeriesStatus.EXPERIMENTAL, | 1486 | status=SeriesStatus.EXPERIMENTAL, |
1025 | 1486 | parent_series=parent_series, | 1487 | parent_series=parent_series, |
1026 | 1487 | owner=owner) | 1488 | owner=owner) |
1027 | 1488 | if owner.inTeam(self.driver) and not owner.inTeam(self.owner): | 1489 | if owner.inTeam(self.driver) and not owner.inTeam(self.owner): |
1028 | 1489 | 1490 | ||
1029 | === modified file 'lib/lp/registry/model/distroseries.py' | |||
1030 | --- lib/lp/registry/model/distroseries.py 2009-12-22 17:41:46 +0000 | |||
1031 | +++ lib/lp/registry/model/distroseries.py 2010-01-05 16:22:16 +0000 | |||
1032 | @@ -95,8 +95,9 @@ | |||
1033 | 95 | from lp.soyuz.interfaces.buildrecords import IHasBuildRecords | 95 | from lp.soyuz.interfaces.buildrecords import IHasBuildRecords |
1034 | 96 | from lp.soyuz.interfaces.binarypackagename import ( | 96 | from lp.soyuz.interfaces.binarypackagename import ( |
1035 | 97 | IBinaryPackageName) | 97 | IBinaryPackageName) |
1036 | 98 | from lp.registry.interfaces.series import SeriesStatus | ||
1037 | 98 | from lp.registry.interfaces.distroseries import ( | 99 | from lp.registry.interfaces.distroseries import ( |
1039 | 99 | DistroSeriesStatus, IDistroSeries, IDistroSeriesSet, ISeriesMixin) | 100 | IDistroSeries, IDistroSeriesSet, ISeriesMixin) |
1040 | 100 | from lp.translations.interfaces.languagepack import LanguagePackType | 101 | from lp.translations.interfaces.languagepack import LanguagePackType |
1041 | 101 | from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet | 102 | from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet |
1042 | 102 | from lp.soyuz.interfaces.queue import PackageUploadStatus | 103 | from lp.soyuz.interfaces.queue import PackageUploadStatus |
1043 | @@ -129,10 +130,10 @@ | |||
1044 | 129 | @property | 130 | @property |
1045 | 130 | def active(self): | 131 | def active(self): |
1046 | 131 | return self.status in [ | 132 | return self.status in [ |
1051 | 132 | DistroSeriesStatus.DEVELOPMENT, | 133 | SeriesStatus.DEVELOPMENT, |
1052 | 133 | DistroSeriesStatus.FROZEN, | 134 | SeriesStatus.FROZEN, |
1053 | 134 | DistroSeriesStatus.CURRENT, | 135 | SeriesStatus.CURRENT, |
1054 | 135 | DistroSeriesStatus.SUPPORTED | 136 | SeriesStatus.SUPPORTED |
1055 | 136 | ] | 137 | ] |
1056 | 137 | 138 | ||
1057 | 138 | 139 | ||
1058 | @@ -157,7 +158,7 @@ | |||
1059 | 157 | description = StringCol(notNull=True) | 158 | description = StringCol(notNull=True) |
1060 | 158 | version = StringCol(notNull=True) | 159 | version = StringCol(notNull=True) |
1061 | 159 | status = EnumCol( | 160 | status = EnumCol( |
1063 | 160 | dbName='releasestatus', notNull=True, schema=DistroSeriesStatus) | 161 | dbName='releasestatus', notNull=True, schema=SeriesStatus) |
1064 | 161 | date_created = UtcDateTimeCol(notNull=False, default=UTC_NOW) | 162 | date_created = UtcDateTimeCol(notNull=False, default=UTC_NOW) |
1065 | 162 | datereleased = UtcDateTimeCol(notNull=False, default=None) | 163 | datereleased = UtcDateTimeCol(notNull=False, default=None) |
1066 | 163 | parent_series = ForeignKey( | 164 | parent_series = ForeignKey( |
1067 | @@ -332,8 +333,8 @@ | |||
1068 | 332 | @property | 333 | @property |
1069 | 333 | def supported(self): | 334 | def supported(self): |
1070 | 334 | return self.status in [ | 335 | return self.status in [ |
1073 | 335 | DistroSeriesStatus.CURRENT, | 336 | SeriesStatus.CURRENT, |
1074 | 336 | DistroSeriesStatus.SUPPORTED | 337 | SeriesStatus.SUPPORTED |
1075 | 337 | ] | 338 | ] |
1076 | 338 | 339 | ||
1077 | 339 | @property | 340 | @property |
1078 | @@ -377,12 +378,12 @@ | |||
1079 | 377 | def canUploadToPocket(self, pocket): | 378 | def canUploadToPocket(self, pocket): |
1080 | 378 | """See `IDistroSeries`.""" | 379 | """See `IDistroSeries`.""" |
1081 | 379 | # Allow everything for distroseries in FROZEN state. | 380 | # Allow everything for distroseries in FROZEN state. |
1083 | 380 | if self.status == DistroSeriesStatus.FROZEN: | 381 | if self.status == SeriesStatus.FROZEN: |
1084 | 381 | return True | 382 | return True |
1085 | 382 | 383 | ||
1086 | 383 | # Define stable/released states. | 384 | # Define stable/released states. |
1089 | 384 | stable_states = (DistroSeriesStatus.SUPPORTED, | 385 | stable_states = (SeriesStatus.SUPPORTED, |
1090 | 385 | DistroSeriesStatus.CURRENT) | 386 | SeriesStatus.CURRENT) |
1091 | 386 | 387 | ||
1092 | 387 | # Deny uploads for RELEASE pocket in stable states. | 388 | # Deny uploads for RELEASE pocket in stable states. |
1093 | 388 | if (pocket == PackagePublishingPocket.RELEASE and | 389 | if (pocket == PackagePublishingPocket.RELEASE and |
1094 | @@ -727,14 +728,14 @@ | |||
1095 | 727 | return | 728 | return |
1096 | 728 | 729 | ||
1097 | 729 | future = [ | 730 | future = [ |
1101 | 730 | DistroSeriesStatus.EXPERIMENTAL, | 731 | SeriesStatus.EXPERIMENTAL, |
1102 | 731 | DistroSeriesStatus.DEVELOPMENT, | 732 | SeriesStatus.DEVELOPMENT, |
1103 | 732 | DistroSeriesStatus.FUTURE, | 733 | SeriesStatus.FUTURE, |
1104 | 733 | ] | 734 | ] |
1105 | 734 | if self.status in future: | 735 | if self.status in future: |
1106 | 735 | raise TranslationUnavailable( | 736 | raise TranslationUnavailable( |
1107 | 736 | "Translations for this release series are not available yet.") | 737 | "Translations for this release series are not available yet.") |
1109 | 737 | elif self.status == DistroSeriesStatus.OBSOLETE: | 738 | elif self.status == SeriesStatus.OBSOLETE: |
1110 | 738 | raise TranslationUnavailable( | 739 | raise TranslationUnavailable( |
1111 | 739 | "This release series is obsolete. Its translations are no " | 740 | "This release series is obsolete. Its translations are no " |
1112 | 740 | "longer available.") | 741 | "longer available.") |
1113 | @@ -830,9 +831,9 @@ | |||
1114 | 830 | def isUnstable(self): | 831 | def isUnstable(self): |
1115 | 831 | """See `IDistroSeries`.""" | 832 | """See `IDistroSeries`.""" |
1116 | 832 | return self.status in [ | 833 | return self.status in [ |
1120 | 833 | DistroSeriesStatus.FROZEN, | 834 | SeriesStatus.FROZEN, |
1121 | 834 | DistroSeriesStatus.DEVELOPMENT, | 835 | SeriesStatus.DEVELOPMENT, |
1122 | 835 | DistroSeriesStatus.EXPERIMENTAL, | 836 | SeriesStatus.EXPERIMENTAL, |
1123 | 836 | ] | 837 | ] |
1124 | 837 | 838 | ||
1125 | 838 | def getAllPublishedSources(self): | 839 | def getAllPublishedSources(self): |
1126 | @@ -1734,7 +1735,7 @@ | |||
1127 | 1734 | return True | 1735 | return True |
1128 | 1735 | 1736 | ||
1129 | 1736 | # FROZEN state also allow all pockets to be published. | 1737 | # FROZEN state also allow all pockets to be published. |
1131 | 1737 | if self.status == DistroSeriesStatus.FROZEN: | 1738 | if self.status == SeriesStatus.FROZEN: |
1132 | 1738 | return True | 1739 | return True |
1133 | 1739 | 1740 | ||
1134 | 1740 | # If we're not republishing, we want to make sure that | 1741 | # If we're not republishing, we want to make sure that |
1135 | @@ -1875,14 +1876,14 @@ | |||
1136 | 1875 | if isreleased: | 1876 | if isreleased: |
1137 | 1876 | # The query is filtered on released releases. | 1877 | # The query is filtered on released releases. |
1138 | 1877 | where_clause += "releasestatus in (%s, %s)" % sqlvalues( | 1878 | where_clause += "releasestatus in (%s, %s)" % sqlvalues( |
1141 | 1878 | DistroSeriesStatus.CURRENT, | 1879 | SeriesStatus.CURRENT, |
1142 | 1879 | DistroSeriesStatus.SUPPORTED) | 1880 | SeriesStatus.SUPPORTED) |
1143 | 1880 | else: | 1881 | else: |
1144 | 1881 | # The query is filtered on unreleased releases. | 1882 | # The query is filtered on unreleased releases. |
1145 | 1882 | where_clause += "releasestatus in (%s, %s, %s)" % sqlvalues( | 1883 | where_clause += "releasestatus in (%s, %s, %s)" % sqlvalues( |
1149 | 1883 | DistroSeriesStatus.EXPERIMENTAL, | 1884 | SeriesStatus.EXPERIMENTAL, |
1150 | 1884 | DistroSeriesStatus.DEVELOPMENT, | 1885 | SeriesStatus.DEVELOPMENT, |
1151 | 1885 | DistroSeriesStatus.FROZEN) | 1886 | SeriesStatus.FROZEN) |
1152 | 1886 | if orderBy is not None: | 1887 | if orderBy is not None: |
1153 | 1887 | return DistroSeries.select(where_clause, orderBy=orderBy) | 1888 | return DistroSeries.select(where_clause, orderBy=orderBy) |
1154 | 1888 | else: | 1889 | else: |
1155 | 1889 | 1890 | ||
1156 | === modified file 'lib/lp/registry/model/productseries.py' | |||
1157 | --- lib/lp/registry/model/productseries.py 2009-12-05 18:37:28 +0000 | |||
1158 | +++ lib/lp/registry/model/productseries.py 2010-01-05 16:22:16 +0000 | |||
1159 | @@ -50,7 +50,7 @@ | |||
1160 | 50 | from lp.registry.model.structuralsubscription import ( | 50 | from lp.registry.model.structuralsubscription import ( |
1161 | 51 | StructuralSubscriptionTargetMixin) | 51 | StructuralSubscriptionTargetMixin) |
1162 | 52 | from canonical.launchpad.helpers import shortlist | 52 | from canonical.launchpad.helpers import shortlist |
1164 | 53 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 53 | from lp.registry.interfaces.series import SeriesStatus |
1165 | 54 | from lp.registry.model.distroseries import SeriesMixin | 54 | from lp.registry.model.distroseries import SeriesMixin |
1166 | 55 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities | 55 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
1167 | 56 | from lp.registry.interfaces.packaging import PackagingType | 56 | from lp.registry.interfaces.packaging import PackagingType |
1168 | @@ -89,8 +89,8 @@ | |||
1169 | 89 | 89 | ||
1170 | 90 | product = ForeignKey(dbName='product', foreignKey='Product', notNull=True) | 90 | product = ForeignKey(dbName='product', foreignKey='Product', notNull=True) |
1171 | 91 | status = EnumCol( | 91 | status = EnumCol( |
1174 | 92 | notNull=True, schema=DistroSeriesStatus, | 92 | notNull=True, schema=SeriesStatus, |
1175 | 93 | default=DistroSeriesStatus.DEVELOPMENT) | 93 | default=SeriesStatus.DEVELOPMENT) |
1176 | 94 | name = StringCol(notNull=True) | 94 | name = StringCol(notNull=True) |
1177 | 95 | summary = StringCol(notNull=True) | 95 | summary = StringCol(notNull=True) |
1178 | 96 | datecreated = UtcDateTimeCol(notNull=True, default=UTC_NOW) | 96 | datecreated = UtcDateTimeCol(notNull=True, default=UTC_NOW) |
1179 | 97 | 97 | ||
1180 | === modified file 'lib/lp/registry/stories/distribution/xx-distribution-packages.txt' | |||
1181 | --- lib/lp/registry/stories/distribution/xx-distribution-packages.txt 2009-11-18 02:58:23 +0000 | |||
1182 | +++ lib/lp/registry/stories/distribution/xx-distribution-packages.txt 2010-01-05 16:22:16 +0000 | |||
1183 | @@ -124,9 +124,9 @@ | |||
1184 | 124 | >>> publisher = SoyuzTestPublisher() | 124 | >>> publisher = SoyuzTestPublisher() |
1185 | 125 | >>> publisher.prepareBreezyAutotest() | 125 | >>> publisher.prepareBreezyAutotest() |
1186 | 126 | >>> ubuntutest = publisher.ubuntutest | 126 | >>> ubuntutest = publisher.ubuntutest |
1190 | 127 | >>> from lp.registry.interfaces.distroseries import DistroSeriesStatus | 127 | >>> from lp.registry.interfaces.series import SeriesStatus |
1191 | 128 | >>> ubuntutest['breezy-autotest'].status = DistroSeriesStatus.DEVELOPMENT | 128 | >>> ubuntutest['breezy-autotest'].status = SeriesStatus.DEVELOPMENT |
1192 | 129 | >>> ubuntutest['hoary-test'].status = DistroSeriesStatus.DEVELOPMENT | 129 | >>> ubuntutest['hoary-test'].status = SeriesStatus.DEVELOPMENT |
1193 | 130 | 130 | ||
1194 | 131 | # Publish the source 'netapplet' in the breezy-autotest and | 131 | # Publish the source 'netapplet' in the breezy-autotest and |
1195 | 132 | # main archive. | 132 | # main archive. |
1196 | 133 | 133 | ||
1197 | === modified file 'lib/lp/registry/stories/productseries/xx-productseries-series.txt' | |||
1198 | --- lib/lp/registry/stories/productseries/xx-productseries-series.txt 2009-09-18 15:24:30 +0000 | |||
1199 | +++ lib/lp/registry/stories/productseries/xx-productseries-series.txt 2010-01-05 16:22:16 +0000 | |||
1200 | @@ -4,14 +4,14 @@ | |||
1201 | 4 | # There are no obsolete series in the data, create one. | 4 | # There are no obsolete series in the data, create one. |
1202 | 5 | >>> from zope.component import getUtility | 5 | >>> from zope.component import getUtility |
1203 | 6 | >>> from lp.registry.interfaces.product import IProductSet | 6 | >>> from lp.registry.interfaces.product import IProductSet |
1205 | 7 | >>> from lp.registry.interfaces.distroseries import DistroSeriesStatus | 7 | >>> from lp.registry.interfaces.series import SeriesStatus |
1206 | 8 | 8 | ||
1207 | 9 | >>> login('test@canonical.com') | 9 | >>> login('test@canonical.com') |
1208 | 10 | >>> productset = getUtility(IProductSet) | 10 | >>> productset = getUtility(IProductSet) |
1209 | 11 | >>> firefox = productset.getByName('firefox') | 11 | >>> firefox = productset.getByName('firefox') |
1210 | 12 | >>> series = factory.makeProductSeries( | 12 | >>> series = factory.makeProductSeries( |
1211 | 13 | ... name='xxx', product=firefox, summary='Use true GTK UI.') | 13 | ... name='xxx', product=firefox, summary='Use true GTK UI.') |
1213 | 14 | >>> series.status = DistroSeriesStatus.OBSOLETE | 14 | >>> series.status = SeriesStatus.OBSOLETE |
1214 | 15 | >>> transaction.commit() | 15 | >>> transaction.commit() |
1215 | 16 | >>> logout() | 16 | >>> logout() |
1216 | 17 | 17 | ||
1217 | 18 | 18 | ||
1218 | === modified file 'lib/lp/registry/tests/test_distribution.py' | |||
1219 | --- lib/lp/registry/tests/test_distribution.py 2009-11-07 22:19:06 +0000 | |||
1220 | +++ lib/lp/registry/tests/test_distribution.py 2010-01-05 16:22:16 +0000 | |||
1221 | @@ -13,7 +13,7 @@ | |||
1222 | 13 | TestDistroSeriesCurrentSourceReleases) | 13 | TestDistroSeriesCurrentSourceReleases) |
1223 | 14 | from lp.soyuz.interfaces.distributionsourcepackagerelease import ( | 14 | from lp.soyuz.interfaces.distributionsourcepackagerelease import ( |
1224 | 15 | IDistributionSourcePackageRelease) | 15 | IDistributionSourcePackageRelease) |
1226 | 16 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 16 | from lp.registry.interfaces.series import SeriesStatus |
1227 | 17 | 17 | ||
1228 | 18 | 18 | ||
1229 | 19 | class TestDistributionCurrentSourceReleases( | 19 | class TestDistributionCurrentSourceReleases( |
1230 | @@ -36,7 +36,7 @@ | |||
1231 | 36 | # version numbers. We don't care whether the version is | 36 | # version numbers. We don't care whether the version is |
1232 | 37 | # published in a earlier or later series. | 37 | # published in a earlier or later series. |
1233 | 38 | self.current_series = self.factory.makeDistroRelease( | 38 | self.current_series = self.factory.makeDistroRelease( |
1235 | 39 | self.distribution, '1.0', status=DistroSeriesStatus.CURRENT) | 39 | self.distribution, '1.0', status=SeriesStatus.CURRENT) |
1236 | 40 | self.publisher.getPubSource( | 40 | self.publisher.getPubSource( |
1237 | 41 | version='0.9', distroseries=self.current_series) | 41 | version='0.9', distroseries=self.current_series) |
1238 | 42 | self.publisher.getPubSource( | 42 | self.publisher.getPubSource( |
1239 | 43 | 43 | ||
1240 | === modified file 'lib/lp/registry/tests/test_sourcepackage.py' | |||
1241 | --- lib/lp/registry/tests/test_sourcepackage.py 2009-09-16 05:59:52 +0000 | |||
1242 | +++ lib/lp/registry/tests/test_sourcepackage.py 2010-01-05 16:22:16 +0000 | |||
1243 | @@ -13,7 +13,7 @@ | |||
1244 | 13 | 13 | ||
1245 | 14 | from canonical.launchpad.ftests import login_person, logout | 14 | from canonical.launchpad.ftests import login_person, logout |
1246 | 15 | from lp.registry.interfaces.distribution import NoPartnerArchive | 15 | from lp.registry.interfaces.distribution import NoPartnerArchive |
1248 | 16 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 16 | from lp.registry.interfaces.series import SeriesStatus |
1249 | 17 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities | 17 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
1250 | 18 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 18 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
1251 | 19 | from lp.soyuz.interfaces.archive import ArchivePurpose | 19 | from lp.soyuz.interfaces.archive import ArchivePurpose |
1252 | @@ -145,9 +145,9 @@ | |||
1253 | 145 | # the source package. | 145 | # the source package. |
1254 | 146 | distribution = self.factory.makeDistribution() | 146 | distribution = self.factory.makeDistribution() |
1255 | 147 | dev_series = self.factory.makeDistroRelease( | 147 | dev_series = self.factory.makeDistroRelease( |
1257 | 148 | distribution=distribution, status=DistroSeriesStatus.DEVELOPMENT) | 148 | distribution=distribution, status=SeriesStatus.DEVELOPMENT) |
1258 | 149 | other_series = self.factory.makeDistroRelease( | 149 | other_series = self.factory.makeDistroRelease( |
1260 | 150 | distribution=distribution, status=DistroSeriesStatus.OBSOLETE) | 150 | distribution=distribution, status=SeriesStatus.OBSOLETE) |
1261 | 151 | self.assertEqual(dev_series, distribution.currentseries) | 151 | self.assertEqual(dev_series, distribution.currentseries) |
1262 | 152 | dev_sourcepackage = self.factory.makeSourcePackage( | 152 | dev_sourcepackage = self.factory.makeSourcePackage( |
1263 | 153 | distroseries=dev_series) | 153 | distroseries=dev_series) |
1264 | 154 | 154 | ||
1265 | === modified file 'lib/lp/soyuz/browser/archive.py' | |||
1266 | --- lib/lp/soyuz/browser/archive.py 2009-12-14 12:47:54 +0000 | |||
1267 | +++ lib/lp/soyuz/browser/archive.py 2010-01-05 16:22:16 +0000 | |||
1268 | @@ -66,7 +66,7 @@ | |||
1269 | 66 | BuildStatus, BuildSetStatus, IBuildSet) | 66 | BuildStatus, BuildSetStatus, IBuildSet) |
1270 | 67 | from lp.soyuz.interfaces.buildrecords import IHasBuildRecords | 67 | from lp.soyuz.interfaces.buildrecords import IHasBuildRecords |
1271 | 68 | from lp.soyuz.interfaces.component import IComponentSet | 68 | from lp.soyuz.interfaces.component import IComponentSet |
1273 | 69 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 69 | from lp.registry.interfaces.series import SeriesStatus |
1274 | 70 | from canonical.launchpad.interfaces.launchpad import ( | 70 | from canonical.launchpad.interfaces.launchpad import ( |
1275 | 71 | ILaunchpadCelebrities, NotFoundError) | 71 | ILaunchpadCelebrities, NotFoundError) |
1276 | 72 | from lp.soyuz.interfaces.packagecopyrequest import ( | 72 | from lp.soyuz.interfaces.packagecopyrequest import ( |
1277 | @@ -1190,7 +1190,7 @@ | |||
1278 | 1190 | # it will be probably simpler to use the DistroSeries vocabulary | 1190 | # it will be probably simpler to use the DistroSeries vocabulary |
1279 | 1191 | # and validate the selected value before copying. | 1191 | # and validate the selected value before copying. |
1280 | 1192 | for series in self.context.distribution.series: | 1192 | for series in self.context.distribution.series: |
1282 | 1193 | if series.status == DistroSeriesStatus.OBSOLETE: | 1193 | if series.status == SeriesStatus.OBSOLETE: |
1283 | 1194 | continue | 1194 | continue |
1284 | 1195 | terms.append( | 1195 | terms.append( |
1285 | 1196 | SimpleTerm(series, str(series.name), series.displayname)) | 1196 | SimpleTerm(series, str(series.name), series.displayname)) |
1286 | 1197 | 1197 | ||
1287 | === modified file 'lib/lp/soyuz/doc/build.txt' | |||
1288 | --- lib/lp/soyuz/doc/build.txt 2009-11-24 07:02:21 +0000 | |||
1289 | +++ lib/lp/soyuz/doc/build.txt 2010-01-05 16:22:16 +0000 | |||
1290 | @@ -261,12 +261,12 @@ | |||
1291 | 261 | We will reactivate ubuntu/warty allowing the pmount build to be | 261 | We will reactivate ubuntu/warty allowing the pmount build to be |
1292 | 262 | retried. | 262 | retried. |
1293 | 263 | 263 | ||
1295 | 264 | >>> from canonical.launchpad.interfaces import DistroSeriesStatus | 264 | >>> from canonical.launchpad.interfaces import SeriesStatus |
1296 | 265 | >>> from lp.registry.interfaces.distribution import IDistributionSet | 265 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
1297 | 266 | >>> login('foo.bar@canonical.com') | 266 | >>> login('foo.bar@canonical.com') |
1298 | 267 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] | 267 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
1299 | 268 | >>> warty = ubuntu.getSeries('warty') | 268 | >>> warty = ubuntu.getSeries('warty') |
1301 | 269 | >>> warty.status = DistroSeriesStatus.DEVELOPMENT | 269 | >>> warty.status = SeriesStatus.DEVELOPMENT |
1302 | 270 | >>> flush_database_updates() | 270 | >>> flush_database_updates() |
1303 | 271 | >>> login(ANONYMOUS) | 271 | >>> login(ANONYMOUS) |
1304 | 272 | 272 | ||
1305 | @@ -333,7 +333,7 @@ | |||
1306 | 333 | it won't interfere in the next tests. | 333 | it won't interfere in the next tests. |
1307 | 334 | 334 | ||
1308 | 335 | >>> login('foo.bar@canonical.com') | 335 | >>> login('foo.bar@canonical.com') |
1310 | 336 | >>> warty.status = DistroSeriesStatus.SUPPORTED | 336 | >>> warty.status = SeriesStatus.SUPPORTED |
1311 | 337 | >>> flush_database_updates() | 337 | >>> flush_database_updates() |
1312 | 338 | >>> login(ANONYMOUS) | 338 | >>> login(ANONYMOUS) |
1313 | 339 | 339 | ||
1314 | 340 | 340 | ||
1315 | === modified file 'lib/lp/soyuz/doc/buildd-slavescanner.txt' | |||
1316 | --- lib/lp/soyuz/doc/buildd-slavescanner.txt 2009-12-14 20:36:19 +0000 | |||
1317 | +++ lib/lp/soyuz/doc/buildd-slavescanner.txt 2010-01-05 16:22:16 +0000 | |||
1318 | @@ -1381,8 +1381,8 @@ | |||
1319 | 1381 | Change the distroseries status for testing. FROZEN allows building in | 1381 | Change the distroseries status for testing. FROZEN allows building in |
1320 | 1382 | all pockets: | 1382 | all pockets: |
1321 | 1383 | 1383 | ||
1324 | 1384 | >>> from canonical.launchpad.interfaces import DistroSeriesStatus | 1384 | >>> from canonical.launchpad.interfaces import SeriesStatus |
1325 | 1385 | >>> hoary_i386.distroseries.status = DistroSeriesStatus.FROZEN | 1385 | >>> hoary_i386.distroseries.status = SeriesStatus.FROZEN |
1326 | 1386 | 1386 | ||
1327 | 1387 | Now we can start a build in other pockets, and see what archives are | 1387 | Now we can start a build in other pockets, and see what archives are |
1328 | 1388 | passed to the slave. | 1388 | passed to the slave. |
1329 | 1389 | 1389 | ||
1330 | === modified file 'lib/lp/soyuz/doc/nascentupload-announcements.txt' | |||
1331 | --- lib/lp/soyuz/doc/nascentupload-announcements.txt 2009-05-13 14:05:27 +0000 | |||
1332 | +++ lib/lp/soyuz/doc/nascentupload-announcements.txt 2010-01-05 16:22:16 +0000 | |||
1333 | @@ -58,11 +58,11 @@ | |||
1334 | 58 | address and allow uploads to universe: | 58 | address and allow uploads to universe: |
1335 | 59 | 59 | ||
1336 | 60 | >>> from canonical.launchpad.interfaces import ( | 60 | >>> from canonical.launchpad.interfaces import ( |
1338 | 61 | ... DistroSeriesStatus, IComponentSet, IDistributionSet, | 61 | ... SeriesStatus, IComponentSet, IDistributionSet, |
1339 | 62 | ... ILibraryFileAliasSet) | 62 | ... ILibraryFileAliasSet) |
1340 | 63 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] | 63 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
1341 | 64 | >>> hoary = ubuntu['hoary'] | 64 | >>> hoary = ubuntu['hoary'] |
1343 | 65 | >>> hoary.status = DistroSeriesStatus.DEVELOPMENT | 65 | >>> hoary.status = SeriesStatus.DEVELOPMENT |
1344 | 66 | >>> hoary.changeslist = "hoary-announce@lists.ubuntu.com" | 66 | >>> hoary.changeslist = "hoary-announce@lists.ubuntu.com" |
1345 | 67 | >>> from canonical.launchpad.database import ComponentSelection | 67 | >>> from canonical.launchpad.database import ComponentSelection |
1346 | 68 | >>> universe = getUtility(IComponentSet)['universe'] | 68 | >>> universe = getUtility(IComponentSet)['universe'] |
1347 | @@ -393,7 +393,7 @@ | |||
1348 | 393 | 393 | ||
1349 | 394 | Release hoary, enable uploads to post-release pockets: | 394 | Release hoary, enable uploads to post-release pockets: |
1350 | 395 | 395 | ||
1352 | 396 | >>> hoary.status = DistroSeriesStatus.CURRENT | 396 | >>> hoary.status = SeriesStatus.CURRENT |
1353 | 397 | 397 | ||
1354 | 398 | UNAPPROVED source uploads for 'translations' section via insecure: | 398 | UNAPPROVED source uploads for 'translations' section via insecure: |
1355 | 399 | 399 | ||
1356 | @@ -730,7 +730,7 @@ | |||
1357 | 730 | Make hoary developmental again, as syncs only happen at that stage of a | 730 | Make hoary developmental again, as syncs only happen at that stage of a |
1358 | 731 | distroseries. | 731 | distroseries. |
1359 | 732 | 732 | ||
1361 | 733 | >>> hoary.status = DistroSeriesStatus.DEVELOPMENT | 733 | >>> hoary.status = SeriesStatus.DEVELOPMENT |
1362 | 734 | 734 | ||
1363 | 735 | >>> bar_src = NascentUpload( | 735 | >>> bar_src = NascentUpload( |
1364 | 736 | ... datadir( | 736 | ... datadir( |
1365 | @@ -779,7 +779,7 @@ | |||
1366 | 779 | 779 | ||
1367 | 780 | Reset hoary back to released and remove disk files created during processing: | 780 | Reset hoary back to released and remove disk files created during processing: |
1368 | 781 | 781 | ||
1370 | 782 | >>> hoary.status = DistroSeriesStatus.CURRENT | 782 | >>> hoary.status = SeriesStatus.CURRENT |
1371 | 783 | >>> os.remove(os.path.join(datadir('suite/bar_1.0-5_debian_auto_sync'), | 783 | >>> os.remove(os.path.join(datadir('suite/bar_1.0-5_debian_auto_sync'), |
1372 | 784 | ... 'bar_1.0.orig.tar.gz')) | 784 | ... 'bar_1.0.orig.tar.gz')) |
1373 | 785 | >>> os.remove(os.path.join(datadir('suite/bar_1.0-6'), | 785 | >>> os.remove(os.path.join(datadir('suite/bar_1.0-6'), |
1374 | @@ -846,7 +846,7 @@ | |||
1375 | 846 | and binary known in hoary, then our operations in post-release | 846 | and binary known in hoary, then our operations in post-release |
1376 | 847 | pockets can work: | 847 | pockets can work: |
1377 | 848 | 848 | ||
1379 | 849 | >>> hoary.status = DistroSeriesStatus.DEVELOPMENT | 849 | >>> hoary.status = SeriesStatus.DEVELOPMENT |
1380 | 850 | >>> modified_sync_policy = getPolicy( | 850 | >>> modified_sync_policy = getPolicy( |
1381 | 851 | ... name='sync', distro='ubuntu', distroseries='hoary') | 851 | ... name='sync', distro='ubuntu', distroseries='hoary') |
1382 | 852 | >>> modified_sync_policy.can_upload_mixed = True | 852 | >>> modified_sync_policy.can_upload_mixed = True |
1383 | @@ -859,7 +859,7 @@ | |||
1384 | 859 | >>> result = foo_v1.do_accept() | 859 | >>> result = foo_v1.do_accept() |
1385 | 860 | >>> foo_v1.queue_root.setAccepted() | 860 | >>> foo_v1.queue_root.setAccepted() |
1386 | 861 | >>> pub_records = foo_v1.queue_root.realiseUpload() | 861 | >>> pub_records = foo_v1.queue_root.realiseUpload() |
1388 | 862 | >>> hoary.status = DistroSeriesStatus.CURRENT | 862 | >>> hoary.status = SeriesStatus.CURRENT |
1389 | 863 | 863 | ||
1390 | 864 | Get rid of any emails generated: | 864 | Get rid of any emails generated: |
1391 | 865 | 865 | ||
1392 | @@ -975,7 +975,7 @@ | |||
1393 | 975 | permitted, but converted to ASCII, which is a limitation of the mailer. | 975 | permitted, but converted to ASCII, which is a limitation of the mailer. |
1394 | 976 | However, UTF-8 in the mail content is preserved. | 976 | However, UTF-8 in the mail content is preserved. |
1395 | 977 | 977 | ||
1397 | 978 | >>> hoary.status = DistroSeriesStatus.DEVELOPMENT | 978 | >>> hoary.status = SeriesStatus.DEVELOPMENT |
1398 | 979 | >>> anything_policy = getPolicy( | 979 | >>> anything_policy = getPolicy( |
1399 | 980 | ... name='anything', distro='ubuntu', distroseries='hoary') | 980 | ... name='anything', distro='ubuntu', distroseries='hoary') |
1400 | 981 | >>> bar_upload = NascentUpload( | 981 | >>> bar_upload = NascentUpload( |
1401 | 982 | 982 | ||
1402 | === modified file 'lib/lp/soyuz/doc/nascentupload.txt' | |||
1403 | --- lib/lp/soyuz/doc/nascentupload.txt 2009-08-28 06:41:25 +0000 | |||
1404 | +++ lib/lp/soyuz/doc/nascentupload.txt 2010-01-05 16:22:16 +0000 | |||
1405 | @@ -18,11 +18,11 @@ | |||
1406 | 18 | "launchpad" to handle this. | 18 | "launchpad" to handle this. |
1407 | 19 | 19 | ||
1408 | 20 | >>> from canonical.launchpad.interfaces import ( | 20 | >>> from canonical.launchpad.interfaces import ( |
1410 | 21 | ... DistroSeriesStatus, IComponentSet, IDistributionSet) | 21 | ... SeriesStatus, IComponentSet, IDistributionSet) |
1411 | 22 | >>> from canonical.launchpad.database import ComponentSelection | 22 | >>> from canonical.launchpad.database import ComponentSelection |
1412 | 23 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] | 23 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
1413 | 24 | >>> hoary = ubuntu['hoary'] | 24 | >>> hoary = ubuntu['hoary'] |
1415 | 25 | >>> hoary.status = DistroSeriesStatus.DEVELOPMENT | 25 | >>> hoary.status = SeriesStatus.DEVELOPMENT |
1416 | 26 | >>> universe = getUtility(IComponentSet)['universe'] | 26 | >>> universe = getUtility(IComponentSet)['universe'] |
1417 | 27 | >>> from canonical.testing import LaunchpadZopelessLayer | 27 | >>> from canonical.testing import LaunchpadZopelessLayer |
1418 | 28 | >>> from canonical.database.sqlbase import commit | 28 | >>> from canonical.database.sqlbase import commit |
1419 | @@ -717,7 +717,7 @@ | |||
1420 | 717 | to upload to -UPDATES in a DEVELOPMENT series. | 717 | to upload to -UPDATES in a DEVELOPMENT series. |
1421 | 718 | 718 | ||
1422 | 719 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') | 719 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') |
1424 | 720 | >>> hoary.status = DistroSeriesStatus.CURRENT | 720 | >>> hoary.status = SeriesStatus.CURRENT |
1425 | 721 | >>> commit() | 721 | >>> commit() |
1426 | 722 | >>> LaunchpadZopelessLayer.switchDbUser('uploader') | 722 | >>> LaunchpadZopelessLayer.switchDbUser('uploader') |
1427 | 723 | 723 | ||
1428 | @@ -749,7 +749,7 @@ | |||
1429 | 749 | And pop it back to development now that we're done | 749 | And pop it back to development now that we're done |
1430 | 750 | 750 | ||
1431 | 751 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') | 751 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') |
1433 | 752 | >>> hoary.status = DistroSeriesStatus.DEVELOPMENT | 752 | >>> hoary.status = SeriesStatus.DEVELOPMENT |
1434 | 753 | >>> commit() | 753 | >>> commit() |
1435 | 754 | >>> LaunchpadZopelessLayer.switchDbUser('uploader') | 754 | >>> LaunchpadZopelessLayer.switchDbUser('uploader') |
1436 | 755 | 755 | ||
1437 | 756 | 756 | ||
1438 | === modified file 'lib/lp/soyuz/doc/package-diff.txt' | |||
1439 | --- lib/lp/soyuz/doc/package-diff.txt 2009-09-23 12:02:35 +0000 | |||
1440 | +++ lib/lp/soyuz/doc/package-diff.txt 2010-01-05 16:22:16 +0000 | |||
1441 | @@ -172,8 +172,8 @@ | |||
1442 | 172 | We will release ubuntu/hoary so we can upload to post-RELEASE pockets | 172 | We will release ubuntu/hoary so we can upload to post-RELEASE pockets |
1443 | 173 | and ubuntu/breezy-autotest. | 173 | and ubuntu/breezy-autotest. |
1444 | 174 | 174 | ||
1447 | 175 | >>> from canonical.launchpad.interfaces import DistroSeriesStatus | 175 | >>> from canonical.launchpad.interfaces import SeriesStatus |
1448 | 176 | >>> hoary.status = DistroSeriesStatus.CURRENT | 176 | >>> hoary.status = SeriesStatus.CURRENT |
1449 | 177 | 177 | ||
1450 | 178 | We upload version '1.0-9' to hoary-updates and get the diff against | 178 | We upload version '1.0-9' to hoary-updates and get the diff against |
1451 | 179 | the last published version in the RELEASE pocket. | 179 | the last published version in the RELEASE pocket. |
1452 | 180 | 180 | ||
1453 | === modified file 'lib/lp/soyuz/doc/soyuz-set-of-uploads.txt' | |||
1454 | --- lib/lp/soyuz/doc/soyuz-set-of-uploads.txt 2009-10-26 18:40:04 +0000 | |||
1455 | +++ lib/lp/soyuz/doc/soyuz-set-of-uploads.txt 2010-01-05 16:22:16 +0000 | |||
1456 | @@ -502,8 +502,8 @@ | |||
1457 | 502 | Set ubuntutest/breezy as the "current series" to activate post-release | 502 | Set ubuntutest/breezy as the "current series" to activate post-release |
1458 | 503 | pockets. | 503 | pockets. |
1459 | 504 | 504 | ||
1462 | 505 | >>> from canonical.launchpad.interfaces import DistroSeriesStatus | 505 | >>> from canonical.launchpad.interfaces import SeriesStatus |
1463 | 506 | >>> breezy.status = DistroSeriesStatus.CURRENT | 506 | >>> breezy.status = SeriesStatus.CURRENT |
1464 | 507 | >>> LaunchpadZopelessLayer.txn.commit() | 507 | >>> LaunchpadZopelessLayer.txn.commit() |
1465 | 508 | 508 | ||
1466 | 509 | Since we are using 'sync' policy in the following tests the packages | 509 | Since we are using 'sync' policy in the following tests the packages |
1467 | @@ -599,7 +599,7 @@ | |||
1468 | 599 | Set ubuntutest/breezy to 'experimental' state again to not affect the | 599 | Set ubuntutest/breezy to 'experimental' state again to not affect the |
1469 | 600 | rest of the test: | 600 | rest of the test: |
1470 | 601 | 601 | ||
1472 | 602 | >>> breezy.status = DistroSeriesStatus.EXPERIMENTAL | 602 | >>> breezy.status = SeriesStatus.EXPERIMENTAL |
1473 | 603 | >>> breezy.syncUpdate() | 603 | >>> breezy.syncUpdate() |
1474 | 604 | 604 | ||
1475 | 605 | 605 | ||
1476 | 606 | 606 | ||
1477 | === modified file 'lib/lp/soyuz/doc/uploadpolicy.txt' | |||
1478 | --- lib/lp/soyuz/doc/uploadpolicy.txt 2009-05-13 14:05:27 +0000 | |||
1479 | +++ lib/lp/soyuz/doc/uploadpolicy.txt 2010-01-05 16:22:16 +0000 | |||
1480 | @@ -78,7 +78,7 @@ | |||
1481 | 78 | instead of UNAPPROVED) | 78 | instead of UNAPPROVED) |
1482 | 79 | 79 | ||
1483 | 80 | >>> from canonical.launchpad.interfaces import ( | 80 | >>> from canonical.launchpad.interfaces import ( |
1485 | 81 | ... DistroSeriesStatus, IDistributionSet) | 81 | ... SeriesStatus, IDistributionSet) |
1486 | 82 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] | 82 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
1487 | 83 | >>> hoary = ubuntu['hoary'] | 83 | >>> hoary = ubuntu['hoary'] |
1488 | 84 | 84 | ||
1489 | @@ -102,7 +102,7 @@ | |||
1490 | 102 | When the distroseries is FROZEN the uploads should wait in UNAPPROVED queue: | 102 | When the distroseries is FROZEN the uploads should wait in UNAPPROVED queue: |
1491 | 103 | 103 | ||
1492 | 104 | >>> login('foo.bar@canonical.com') | 104 | >>> login('foo.bar@canonical.com') |
1494 | 105 | >>> hoary.status = DistroSeriesStatus.FROZEN | 105 | >>> hoary.status = SeriesStatus.FROZEN |
1495 | 106 | >>> from canonical.database.sqlbase import flush_database_updates | 106 | >>> from canonical.database.sqlbase import flush_database_updates |
1496 | 107 | >>> flush_database_updates() | 107 | >>> flush_database_updates() |
1497 | 108 | 108 | ||
1498 | 109 | 109 | ||
1499 | === modified file 'lib/lp/soyuz/scripts/buildd.py' | |||
1500 | --- lib/lp/soyuz/scripts/buildd.py 2009-10-26 18:40:04 +0000 | |||
1501 | +++ lib/lp/soyuz/scripts/buildd.py 2010-01-05 16:22:16 +0000 | |||
1502 | @@ -21,7 +21,7 @@ | |||
1503 | 21 | from lp.services.scripts.base import ( | 21 | from lp.services.scripts.base import ( |
1504 | 22 | LaunchpadCronScript, LaunchpadScriptFailure) | 22 | LaunchpadCronScript, LaunchpadScriptFailure) |
1505 | 23 | from lp.registry.interfaces.distribution import IDistributionSet | 23 | from lp.registry.interfaces.distribution import IDistributionSet |
1507 | 24 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 24 | from lp.registry.interfaces.series import SeriesStatus |
1508 | 25 | 25 | ||
1509 | 26 | # XXX cprov 2009-04-16: This function should live in | 26 | # XXX cprov 2009-04-16: This function should live in |
1510 | 27 | # lp.registry.interfaces.distroseries. It cannot be done right now | 27 | # lp.registry.interfaces.distroseries. It cannot be done right now |
1511 | @@ -159,7 +159,7 @@ | |||
1512 | 159 | # Iterate over all supported distroarchseries with available chroot. | 159 | # Iterate over all supported distroarchseries with available chroot. |
1513 | 160 | build_set = getUtility(IBuildSet) | 160 | build_set = getUtility(IBuildSet) |
1514 | 161 | for distroseries in distribution: | 161 | for distroseries in distribution: |
1516 | 162 | if distroseries.status == DistroSeriesStatus.OBSOLETE: | 162 | if distroseries.status == SeriesStatus.OBSOLETE: |
1517 | 163 | self.logger.debug( | 163 | self.logger.debug( |
1518 | 164 | "Skipping obsolete distroseries: %s" % distroseries.title) | 164 | "Skipping obsolete distroseries: %s" % distroseries.title) |
1519 | 165 | continue | 165 | continue |
1520 | 166 | 166 | ||
1521 | === modified file 'lib/lp/soyuz/scripts/ftpmaster.py' | |||
1522 | --- lib/lp/soyuz/scripts/ftpmaster.py 2009-12-10 11:42:07 +0000 | |||
1523 | +++ lib/lp/soyuz/scripts/ftpmaster.py 2010-01-05 16:22:16 +0000 | |||
1524 | @@ -37,7 +37,7 @@ | |||
1525 | 37 | from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet | 37 | from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet |
1526 | 38 | from canonical.launchpad.webapp.interfaces import NotFoundError | 38 | from canonical.launchpad.webapp.interfaces import NotFoundError |
1527 | 39 | from lp.registry.interfaces.distribution import IDistributionSet | 39 | from lp.registry.interfaces.distribution import IDistributionSet |
1529 | 40 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 40 | from lp.registry.interfaces.series import SeriesStatus |
1530 | 41 | from lp.registry.interfaces.person import IPersonSet | 41 | from lp.registry.interfaces.person import IPersonSet |
1531 | 42 | from lp.registry.interfaces.pocket import ( | 42 | from lp.registry.interfaces.pocket import ( |
1532 | 43 | PackagePublishingPocket, pocketsuffix) | 43 | PackagePublishingPocket, pocketsuffix) |
1533 | @@ -1064,7 +1064,7 @@ | |||
1534 | 1064 | """ | 1064 | """ |
1535 | 1065 | self.checkNoSuiteDefined() | 1065 | self.checkNoSuiteDefined() |
1536 | 1066 | try: | 1066 | try: |
1538 | 1067 | series = self.getSeriesByStatus(DistroSeriesStatus.CURRENT) | 1067 | series = self.getSeriesByStatus(SeriesStatus.CURRENT) |
1539 | 1068 | except NotFoundError, err: | 1068 | except NotFoundError, err: |
1540 | 1069 | raise LaunchpadScriptFailure(err) | 1069 | raise LaunchpadScriptFailure(err) |
1541 | 1070 | 1070 | ||
1542 | @@ -1087,8 +1087,8 @@ | |||
1543 | 1087 | """ | 1087 | """ |
1544 | 1088 | self.checkNoSuiteDefined() | 1088 | self.checkNoSuiteDefined() |
1545 | 1089 | series = None | 1089 | series = None |
1548 | 1090 | wanted_status = (DistroSeriesStatus.DEVELOPMENT, | 1090 | wanted_status = (SeriesStatus.DEVELOPMENT, |
1549 | 1091 | DistroSeriesStatus.FROZEN) | 1091 | SeriesStatus.FROZEN) |
1550 | 1092 | for status in wanted_status: | 1092 | for status in wanted_status: |
1551 | 1093 | try: | 1093 | try: |
1552 | 1094 | series = self.getSeriesByStatus(status) | 1094 | series = self.getSeriesByStatus(status) |
1553 | @@ -1118,8 +1118,8 @@ | |||
1554 | 1118 | """ | 1118 | """ |
1555 | 1119 | self.checkNoSuiteDefined() | 1119 | self.checkNoSuiteDefined() |
1556 | 1120 | supported_series = [] | 1120 | supported_series = [] |
1559 | 1121 | unsupported_status = (DistroSeriesStatus.EXPERIMENTAL, | 1121 | unsupported_status = (SeriesStatus.EXPERIMENTAL, |
1560 | 1122 | DistroSeriesStatus.OBSOLETE) | 1122 | SeriesStatus.OBSOLETE) |
1561 | 1123 | for distroseries in self.location.distribution: | 1123 | for distroseries in self.location.distribution: |
1562 | 1124 | if distroseries.status not in unsupported_status: | 1124 | if distroseries.status not in unsupported_status: |
1563 | 1125 | supported_series.append(distroseries.name) | 1125 | supported_series.append(distroseries.name) |
1564 | @@ -1361,7 +1361,7 @@ | |||
1565 | 1361 | "and which is not the most recent distroseries.") | 1361 | "and which is not the most recent distroseries.") |
1566 | 1362 | 1362 | ||
1567 | 1363 | # Is the distroseries in an obsolete state? Bail out now if not. | 1363 | # Is the distroseries in an obsolete state? Bail out now if not. |
1569 | 1364 | if distroseries.status != DistroSeriesStatus.OBSOLETE: | 1364 | if distroseries.status != SeriesStatus.OBSOLETE: |
1570 | 1365 | raise SoyuzScriptError( | 1365 | raise SoyuzScriptError( |
1571 | 1366 | "%s is not at status OBSOLETE." % distroseries.name) | 1366 | "%s is not at status OBSOLETE." % distroseries.name) |
1572 | 1367 | 1367 | ||
1573 | 1368 | 1368 | ||
1574 | === modified file 'lib/lp/soyuz/scripts/tests/test_copypackage.py' | |||
1575 | --- lib/lp/soyuz/scripts/tests/test_copypackage.py 2009-12-21 12:54:47 +0000 | |||
1576 | +++ lib/lp/soyuz/scripts/tests/test_copypackage.py 2010-01-05 16:22:16 +0000 | |||
1577 | @@ -23,7 +23,7 @@ | |||
1578 | 23 | CreateBugParams, IBugSet) | 23 | CreateBugParams, IBugSet) |
1579 | 24 | from lp.bugs.interfaces.bugtask import BugTaskStatus | 24 | from lp.bugs.interfaces.bugtask import BugTaskStatus |
1580 | 25 | from lp.registry.interfaces.distribution import IDistributionSet | 25 | from lp.registry.interfaces.distribution import IDistributionSet |
1582 | 26 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 26 | from lp.registry.interfaces.series import SeriesStatus |
1583 | 27 | from lp.registry.interfaces.person import IPersonSet | 27 | from lp.registry.interfaces.person import IPersonSet |
1584 | 28 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 28 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
1585 | 29 | from lp.soyuz.adapters.packagelocation import PackageLocationError | 29 | from lp.soyuz.adapters.packagelocation import PackageLocationError |
1586 | @@ -947,7 +947,7 @@ | |||
1587 | 947 | # Make ubuntutest/breezy-autotest CURRENT so uploads to SECURITY | 947 | # Make ubuntutest/breezy-autotest CURRENT so uploads to SECURITY |
1588 | 948 | # pocket can be accepted. | 948 | # pocket can be accepted. |
1589 | 949 | self.test_publisher.breezy_autotest.status = ( | 949 | self.test_publisher.breezy_autotest.status = ( |
1591 | 950 | DistroSeriesStatus.CURRENT) | 950 | SeriesStatus.CURRENT) |
1592 | 951 | 951 | ||
1593 | 952 | def createDelayedCopyContext(self): | 952 | def createDelayedCopyContext(self): |
1594 | 953 | """Create a context to allow delayed-copies test. | 953 | """Create a context to allow delayed-copies test. |
1595 | 954 | 954 | ||
1596 | === modified file 'lib/lp/soyuz/scripts/tests/test_lpquerydistro.py' | |||
1597 | --- lib/lp/soyuz/scripts/tests/test_lpquerydistro.py 2009-06-25 04:06:00 +0000 | |||
1598 | +++ lib/lp/soyuz/scripts/tests/test_lpquerydistro.py 2010-01-05 16:22:16 +0000 | |||
1599 | @@ -15,7 +15,7 @@ | |||
1600 | 15 | from canonical.database.sqlbase import flush_database_updates | 15 | from canonical.database.sqlbase import flush_database_updates |
1601 | 16 | from canonical.testing import LaunchpadLayer | 16 | from canonical.testing import LaunchpadLayer |
1602 | 17 | from lp.registry.interfaces.distribution import IDistributionSet | 17 | from lp.registry.interfaces.distribution import IDistributionSet |
1604 | 18 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 18 | from lp.registry.interfaces.series import SeriesStatus |
1605 | 19 | from lp.services.scripts.base import LaunchpadScriptFailure | 19 | from lp.services.scripts.base import LaunchpadScriptFailure |
1606 | 20 | from lp.soyuz.scripts.ftpmaster import LpQueryDistro | 20 | from lp.soyuz.scripts.ftpmaster import LpQueryDistro |
1607 | 21 | from canonical.testing import LaunchpadZopelessLayer | 21 | from canonical.testing import LaunchpadZopelessLayer |
1608 | @@ -156,7 +156,7 @@ | |||
1609 | 156 | self.assertEqual(helper.location.distribution.name, u'ubuntu') | 156 | self.assertEqual(helper.location.distribution.name, u'ubuntu') |
1610 | 157 | self.assertEqual(self.test_output, u'hoary') | 157 | self.assertEqual(self.test_output, u'hoary') |
1611 | 158 | 158 | ||
1613 | 159 | hoary.status = DistroSeriesStatus.FROZEN | 159 | hoary.status = SeriesStatus.FROZEN |
1614 | 160 | flush_database_updates() | 160 | flush_database_updates() |
1615 | 161 | 161 | ||
1616 | 162 | helper = self.getLpQueryDistro(test_args=['development']) | 162 | helper = self.getLpQueryDistro(test_args=['development']) |
1617 | 163 | 163 | ||
1618 | === modified file 'lib/lp/soyuz/scripts/tests/test_obsoletedistroseries.py' | |||
1619 | --- lib/lp/soyuz/scripts/tests/test_obsoletedistroseries.py 2009-06-25 04:06:00 +0000 | |||
1620 | +++ lib/lp/soyuz/scripts/tests/test_obsoletedistroseries.py 2010-01-05 16:22:16 +0000 | |||
1621 | @@ -21,7 +21,7 @@ | |||
1622 | 21 | SecureSourcePackagePublishingHistory, | 21 | SecureSourcePackagePublishingHistory, |
1623 | 22 | SourcePackagePublishingHistory) | 22 | SourcePackagePublishingHistory) |
1624 | 23 | from lp.registry.interfaces.distribution import IDistributionSet | 23 | from lp.registry.interfaces.distribution import IDistributionSet |
1626 | 24 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 24 | from lp.registry.interfaces.series import SeriesStatus |
1627 | 25 | from lp.soyuz.interfaces.publishing import PackagePublishingStatus | 25 | from lp.soyuz.interfaces.publishing import PackagePublishingStatus |
1628 | 26 | from canonical.testing import LaunchpadZopelessLayer | 26 | from canonical.testing import LaunchpadZopelessLayer |
1629 | 27 | 27 | ||
1630 | @@ -132,7 +132,7 @@ | |||
1631 | 132 | def testNothingToDoCase(self): | 132 | def testNothingToDoCase(self): |
1632 | 133 | """When there is nothing to do, we expect an exception.""" | 133 | """When there is nothing to do, we expect an exception.""" |
1633 | 134 | obsoleter = self.getObsoleter() | 134 | obsoleter = self.getObsoleter() |
1635 | 135 | self.warty.status = DistroSeriesStatus.OBSOLETE | 135 | self.warty.status = SeriesStatus.OBSOLETE |
1636 | 136 | 136 | ||
1637 | 137 | # Get all the published sources in warty. | 137 | # Get all the published sources in warty. |
1638 | 138 | published_sources, published_binaries = ( | 138 | published_sources, published_binaries = ( |
1639 | @@ -151,7 +151,7 @@ | |||
1640 | 151 | def testObsoleteDistroseriesWorks(self): | 151 | def testObsoleteDistroseriesWorks(self): |
1641 | 152 | """Make sure the required publications are obsoleted.""" | 152 | """Make sure the required publications are obsoleted.""" |
1642 | 153 | obsoleter = self.getObsoleter() | 153 | obsoleter = self.getObsoleter() |
1644 | 154 | self.warty.status = DistroSeriesStatus.OBSOLETE | 154 | self.warty.status = SeriesStatus.OBSOLETE |
1645 | 155 | 155 | ||
1646 | 156 | # Get all the published sources in warty. | 156 | # Get all the published sources in warty. |
1647 | 157 | published_sources, published_binaries = ( | 157 | published_sources, published_binaries = ( |
1648 | 158 | 158 | ||
1649 | === modified file 'lib/lp/soyuz/scripts/tests/test_queue.py' | |||
1650 | --- lib/lp/soyuz/scripts/tests/test_queue.py 2009-08-28 07:34:44 +0000 | |||
1651 | +++ lib/lp/soyuz/scripts/tests/test_queue.py 2010-01-05 16:22:16 +0000 | |||
1652 | @@ -28,7 +28,7 @@ | |||
1653 | 28 | from lp.bugs.interfaces.bugtask import IBugTaskSet | 28 | from lp.bugs.interfaces.bugtask import IBugTaskSet |
1654 | 29 | from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet | 29 | from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet |
1655 | 30 | from lp.registry.interfaces.distribution import IDistributionSet | 30 | from lp.registry.interfaces.distribution import IDistributionSet |
1657 | 31 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 31 | from lp.registry.interfaces.series import SeriesStatus |
1658 | 32 | from lp.registry.interfaces.person import IPersonSet | 32 | from lp.registry.interfaces.person import IPersonSet |
1659 | 33 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 33 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
1660 | 34 | from lp.soyuz.interfaces.archive import ArchivePurpose, IArchiveSet | 34 | from lp.soyuz.interfaces.archive import ArchivePurpose, IArchiveSet |
1661 | @@ -474,7 +474,7 @@ | |||
1662 | 474 | # to BACKPORTS. | 474 | # to BACKPORTS. |
1663 | 475 | breezy_autotest = getUtility( | 475 | breezy_autotest = getUtility( |
1664 | 476 | IDistributionSet)['ubuntu']['breezy-autotest'] | 476 | IDistributionSet)['ubuntu']['breezy-autotest'] |
1666 | 477 | breezy_autotest.status = DistroSeriesStatus.CURRENT | 477 | breezy_autotest.status = SeriesStatus.CURRENT |
1667 | 478 | 478 | ||
1668 | 479 | LaunchpadZopelessLayer.txn.commit() | 479 | LaunchpadZopelessLayer.txn.commit() |
1669 | 480 | LaunchpadZopelessLayer.switchDbUser(self.dbuser) | 480 | LaunchpadZopelessLayer.switchDbUser(self.dbuser) |
1670 | @@ -522,7 +522,7 @@ | |||
1671 | 522 | # to PROPOSED. | 522 | # to PROPOSED. |
1672 | 523 | breezy_autotest = getUtility( | 523 | breezy_autotest = getUtility( |
1673 | 524 | IDistributionSet)['ubuntu']['breezy-autotest'] | 524 | IDistributionSet)['ubuntu']['breezy-autotest'] |
1675 | 525 | breezy_autotest.status = DistroSeriesStatus.CURRENT | 525 | breezy_autotest.status = SeriesStatus.CURRENT |
1676 | 526 | 526 | ||
1677 | 527 | LaunchpadZopelessLayer.txn.commit() | 527 | LaunchpadZopelessLayer.txn.commit() |
1678 | 528 | LaunchpadZopelessLayer.switchDbUser(self.dbuser) | 528 | LaunchpadZopelessLayer.switchDbUser(self.dbuser) |
1679 | 529 | 529 | ||
1680 | === modified file 'lib/lp/soyuz/tests/test_packageset.py' | |||
1681 | --- lib/lp/soyuz/tests/test_packageset.py 2009-10-29 14:12:58 +0000 | |||
1682 | +++ lib/lp/soyuz/tests/test_packageset.py 2010-01-05 16:22:16 +0000 | |||
1683 | @@ -9,7 +9,7 @@ | |||
1684 | 9 | 9 | ||
1685 | 10 | from lp.testing import TestCaseWithFactory | 10 | from lp.testing import TestCaseWithFactory |
1686 | 11 | from lp.registry.interfaces.distribution import IDistributionSet | 11 | from lp.registry.interfaces.distribution import IDistributionSet |
1688 | 12 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 12 | from lp.registry.interfaces.series import SeriesStatus |
1689 | 13 | from lp.soyuz.interfaces.packageset import ( | 13 | from lp.soyuz.interfaces.packageset import ( |
1690 | 14 | DuplicatePackagesetName, IPackagesetSet) | 14 | DuplicatePackagesetName, IPackagesetSet) |
1691 | 15 | 15 | ||
1692 | @@ -26,7 +26,7 @@ | |||
1693 | 26 | self.distroseries_current = self.distribution.currentseries | 26 | self.distroseries_current = self.distribution.currentseries |
1694 | 27 | self.distroseries_experimental = self.factory.makeDistroRelease( | 27 | self.distroseries_experimental = self.factory.makeDistroRelease( |
1695 | 28 | distribution = self.distribution, name="experimental", | 28 | distribution = self.distribution, name="experimental", |
1697 | 29 | status=DistroSeriesStatus.EXPERIMENTAL) | 29 | status=SeriesStatus.EXPERIMENTAL) |
1698 | 30 | 30 | ||
1699 | 31 | self.person1 = self.factory.makePerson( | 31 | self.person1 = self.factory.makePerson( |
1700 | 32 | name='hacker', displayname=u'Happy Hacker') | 32 | name='hacker', displayname=u'Happy Hacker') |
1701 | @@ -133,10 +133,10 @@ | |||
1702 | 133 | self.distroseries_current = self.distribution.currentseries | 133 | self.distroseries_current = self.distribution.currentseries |
1703 | 134 | self.distroseries_experimental = self.factory.makeDistroRelease( | 134 | self.distroseries_experimental = self.factory.makeDistroRelease( |
1704 | 135 | distribution = self.distribution, name="experimental", | 135 | distribution = self.distribution, name="experimental", |
1706 | 136 | status=DistroSeriesStatus.EXPERIMENTAL) | 136 | status=SeriesStatus.EXPERIMENTAL) |
1707 | 137 | self.distroseries_experimental2 = self.factory.makeDistroRelease( | 137 | self.distroseries_experimental2 = self.factory.makeDistroRelease( |
1708 | 138 | distribution = self.distribution, name="experimental2", | 138 | distribution = self.distribution, name="experimental2", |
1710 | 139 | status=DistroSeriesStatus.EXPERIMENTAL) | 139 | status=SeriesStatus.EXPERIMENTAL) |
1711 | 140 | 140 | ||
1712 | 141 | self.person1 = self.factory.makePerson( | 141 | self.person1 = self.factory.makePerson( |
1713 | 142 | name='hacker', displayname=u'Happy Hacker') | 142 | name='hacker', displayname=u'Happy Hacker') |
1714 | 143 | 143 | ||
1715 | === modified file 'lib/lp/soyuz/tests/test_packageupload.py' | |||
1716 | --- lib/lp/soyuz/tests/test_packageupload.py 2009-12-07 13:45:31 +0000 | |||
1717 | +++ lib/lp/soyuz/tests/test_packageupload.py 2010-01-05 16:22:16 +0000 | |||
1718 | @@ -15,7 +15,7 @@ | |||
1719 | 15 | from email import message_from_string | 15 | from email import message_from_string |
1720 | 16 | from lp.archiveuploader.tests import datadir | 16 | from lp.archiveuploader.tests import datadir |
1721 | 17 | from lp.registry.interfaces.distribution import IDistributionSet | 17 | from lp.registry.interfaces.distribution import IDistributionSet |
1723 | 18 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 18 | from lp.registry.interfaces.series import SeriesStatus |
1724 | 19 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 19 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
1725 | 20 | from lp.services.mail import stub | 20 | from lp.services.mail import stub |
1726 | 21 | from lp.soyuz.interfaces.archive import ArchivePurpose | 21 | from lp.soyuz.interfaces.archive import ArchivePurpose |
1727 | @@ -180,7 +180,7 @@ | |||
1728 | 180 | # Release ubuntutest/breezy-autotest, so delayed-copies to | 180 | # Release ubuntutest/breezy-autotest, so delayed-copies to |
1729 | 181 | # SECURITY pocket can be accepted. | 181 | # SECURITY pocket can be accepted. |
1730 | 182 | self.test_publisher.breezy_autotest.status = ( | 182 | self.test_publisher.breezy_autotest.status = ( |
1732 | 183 | DistroSeriesStatus.CURRENT) | 183 | SeriesStatus.CURRENT) |
1733 | 184 | 184 | ||
1734 | 185 | # Create an ancestry publication in 'multiverse'. | 185 | # Create an ancestry publication in 'multiverse'. |
1735 | 186 | ancestry_source = self.test_publisher.getPubSource( | 186 | ancestry_source = self.test_publisher.getPubSource( |
1736 | @@ -281,7 +281,7 @@ | |||
1737 | 281 | # Create the default delayed-copy context. | 281 | # Create the default delayed-copy context. |
1738 | 282 | delayed_copy = self.createDelayedCopy(source_only=True) | 282 | delayed_copy = self.createDelayedCopy(source_only=True) |
1739 | 283 | self.test_publisher.breezy_autotest.status = ( | 283 | self.test_publisher.breezy_autotest.status = ( |
1741 | 284 | DistroSeriesStatus.CURRENT) | 284 | SeriesStatus.CURRENT) |
1742 | 285 | self.layer.txn.commit() | 285 | self.layer.txn.commit() |
1743 | 286 | 286 | ||
1744 | 287 | # Accept and publish the delayed-copy. | 287 | # Accept and publish the delayed-copy. |
1745 | 288 | 288 | ||
1746 | === modified file 'lib/lp/soyuz/tests/test_publishing_top_level_api.py' | |||
1747 | --- lib/lp/soyuz/tests/test_publishing_top_level_api.py 2009-08-28 07:34:44 +0000 | |||
1748 | +++ lib/lp/soyuz/tests/test_publishing_top_level_api.py 2010-01-05 16:22:16 +0000 | |||
1749 | @@ -7,7 +7,7 @@ | |||
1750 | 7 | 7 | ||
1751 | 8 | from lp.soyuz.tests.test_publishing import TestNativePublishingBase | 8 | from lp.soyuz.tests.test_publishing import TestNativePublishingBase |
1752 | 9 | 9 | ||
1754 | 10 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 10 | from lp.registry.interfaces.series import SeriesStatus |
1755 | 11 | from lp.registry.interfaces.pocket import PackagePublishingPocket | 11 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
1756 | 12 | from lp.soyuz.interfaces.publishing import PackagePublishingStatus | 12 | from lp.soyuz.interfaces.publishing import PackagePublishingStatus |
1757 | 13 | 13 | ||
1758 | @@ -167,7 +167,7 @@ | |||
1759 | 167 | Publication to UPDATES pocket (post-release pockets) are ignored | 167 | Publication to UPDATES pocket (post-release pockets) are ignored |
1760 | 168 | """ | 168 | """ |
1761 | 169 | self.assertEqual( | 169 | self.assertEqual( |
1763 | 170 | self.breezy_autotest.status, DistroSeriesStatus.EXPERIMENTAL) | 170 | self.breezy_autotest.status, SeriesStatus.EXPERIMENTAL) |
1764 | 171 | self.assertEqual(self.breezy_autotest.isUnstable(), True) | 171 | self.assertEqual(self.breezy_autotest.isUnstable(), True) |
1765 | 172 | self.checkPublicationsAreConsidered(PackagePublishingPocket.RELEASE) | 172 | self.checkPublicationsAreConsidered(PackagePublishingPocket.RELEASE) |
1766 | 173 | self.checkPublicationsAreIgnored(PackagePublishingPocket.UPDATES) | 173 | self.checkPublicationsAreIgnored(PackagePublishingPocket.UPDATES) |
1767 | @@ -179,11 +179,11 @@ | |||
1768 | 179 | Publications to UPDATES pocket are considered. | 179 | Publications to UPDATES pocket are considered. |
1769 | 180 | """ | 180 | """ |
1770 | 181 | # Release ubuntu/breezy-autotest. | 181 | # Release ubuntu/breezy-autotest. |
1772 | 182 | self.breezy_autotest.status = DistroSeriesStatus.CURRENT | 182 | self.breezy_autotest.status = SeriesStatus.CURRENT |
1773 | 183 | self.layer.commit() | 183 | self.layer.commit() |
1774 | 184 | 184 | ||
1775 | 185 | self.assertEqual( | 185 | self.assertEqual( |
1777 | 186 | self.breezy_autotest.status, DistroSeriesStatus.CURRENT) | 186 | self.breezy_autotest.status, SeriesStatus.CURRENT) |
1778 | 187 | self.assertEqual(self.breezy_autotest.isUnstable(), False) | 187 | self.assertEqual(self.breezy_autotest.isUnstable(), False) |
1779 | 188 | self.checkPublicationsAreConsidered(PackagePublishingPocket.UPDATES) | 188 | self.checkPublicationsAreConsidered(PackagePublishingPocket.UPDATES) |
1780 | 189 | self.checkPublicationsAreIgnored(PackagePublishingPocket.RELEASE) | 189 | self.checkPublicationsAreIgnored(PackagePublishingPocket.RELEASE) |
1781 | @@ -194,11 +194,11 @@ | |||
1782 | 194 | Publications to both, RELEASE and UPDATES, pockets are considered. | 194 | Publications to both, RELEASE and UPDATES, pockets are considered. |
1783 | 195 | """ | 195 | """ |
1784 | 196 | # Release ubuntu/breezy-autotest. | 196 | # Release ubuntu/breezy-autotest. |
1786 | 197 | self.breezy_autotest.status = DistroSeriesStatus.FROZEN | 197 | self.breezy_autotest.status = SeriesStatus.FROZEN |
1787 | 198 | self.layer.commit() | 198 | self.layer.commit() |
1788 | 199 | 199 | ||
1789 | 200 | self.assertEqual( | 200 | self.assertEqual( |
1791 | 201 | self.breezy_autotest.status, DistroSeriesStatus.FROZEN) | 201 | self.breezy_autotest.status, SeriesStatus.FROZEN) |
1792 | 202 | self.assertEqual( | 202 | self.assertEqual( |
1793 | 203 | self.breezy_autotest.isUnstable(), True) | 203 | self.breezy_autotest.isUnstable(), True) |
1794 | 204 | self.checkPublicationsAreConsidered(PackagePublishingPocket.UPDATES) | 204 | self.checkPublicationsAreConsidered(PackagePublishingPocket.UPDATES) |
1795 | @@ -249,7 +249,7 @@ | |||
1796 | 249 | self._createDefaulSourcePublications()) | 249 | self._createDefaulSourcePublications()) |
1797 | 250 | 250 | ||
1798 | 251 | # Release 'breezy-autotest'. | 251 | # Release 'breezy-autotest'. |
1800 | 252 | self.breezy_autotest.status = DistroSeriesStatus.CURRENT | 252 | self.breezy_autotest.status = SeriesStatus.CURRENT |
1801 | 253 | self.layer.commit() | 253 | self.layer.commit() |
1802 | 254 | 254 | ||
1803 | 255 | # Since the distroseries is stable, nothing is returned because | 255 | # Since the distroseries is stable, nothing is returned because |
1804 | @@ -282,7 +282,7 @@ | |||
1805 | 282 | pub_pending_release, pub_published_release, pub_pending_updates = ( | 282 | pub_pending_release, pub_published_release, pub_pending_updates = ( |
1806 | 283 | self._createDefaulSourcePublications()) | 283 | self._createDefaulSourcePublications()) |
1807 | 284 | # Freeze 'breezy-autotest'. | 284 | # Freeze 'breezy-autotest'. |
1809 | 285 | self.breezy_autotest.status = DistroSeriesStatus.FROZEN | 285 | self.breezy_autotest.status = SeriesStatus.FROZEN |
1810 | 286 | self.layer.commit() | 286 | self.layer.commit() |
1811 | 287 | 287 | ||
1812 | 288 | # Usual publication procedure for a distroseries in development | 288 | # Usual publication procedure for a distroseries in development |
1813 | @@ -361,7 +361,7 @@ | |||
1814 | 361 | self._createDefaulBinaryPublications()) | 361 | self._createDefaulBinaryPublications()) |
1815 | 362 | 362 | ||
1816 | 363 | # Release 'breezy-autotest' | 363 | # Release 'breezy-autotest' |
1818 | 364 | self.breezy_autotest.status = DistroSeriesStatus.CURRENT | 364 | self.breezy_autotest.status = SeriesStatus.CURRENT |
1819 | 365 | self.layer.commit() | 365 | self.layer.commit() |
1820 | 366 | 366 | ||
1821 | 367 | # Since the distroseries is stable, nothing is returned because | 367 | # Since the distroseries is stable, nothing is returned because |
1822 | @@ -394,7 +394,7 @@ | |||
1823 | 394 | pub_pending_release, pub_published_release, pub_pending_updates = ( | 394 | pub_pending_release, pub_published_release, pub_pending_updates = ( |
1824 | 395 | self._createDefaulBinaryPublications()) | 395 | self._createDefaulBinaryPublications()) |
1825 | 396 | # Freeze 'breezy-autotest' | 396 | # Freeze 'breezy-autotest' |
1827 | 397 | self.breezy_autotest.status = DistroSeriesStatus.FROZEN | 397 | self.breezy_autotest.status = SeriesStatus.FROZEN |
1828 | 398 | self.layer.commit() | 398 | self.layer.commit() |
1829 | 399 | 399 | ||
1830 | 400 | # Usual publication procedure for a distroseries in development | 400 | # Usual publication procedure for a distroseries in development |
1831 | 401 | 401 | ||
1832 | === modified file 'lib/lp/testing/factory.py' | |||
1833 | --- lib/lp/testing/factory.py 2010-01-05 00:53:47 +0000 | |||
1834 | +++ lib/lp/testing/factory.py 2010-01-05 16:22:16 +0000 | |||
1835 | @@ -14,11 +14,11 @@ | |||
1836 | 14 | ] | 14 | ] |
1837 | 15 | 15 | ||
1838 | 16 | from datetime import datetime, timedelta | 16 | from datetime import datetime, timedelta |
1844 | 17 | from email.Encoders import encode_base64 | 17 | from email.encoders import encode_base64 |
1845 | 18 | from email.Utils import make_msgid, formatdate | 18 | from email.utils import make_msgid, formatdate |
1846 | 19 | from email.Message import Message as EmailMessage | 19 | from email.message import Message as EmailMessage |
1847 | 20 | from email.MIMEText import MIMEText | 20 | from email.mime.text import MIMEText |
1848 | 21 | from email.MIMEMultipart import MIMEMultipart | 21 | from email.mime.multipart import MIMEMultipart |
1849 | 22 | from itertools import count | 22 | from itertools import count |
1850 | 23 | from StringIO import StringIO | 23 | from StringIO import StringIO |
1851 | 24 | import os.path | 24 | import os.path |
1852 | @@ -100,8 +100,8 @@ | |||
1853 | 100 | from lp.registry.model.milestone import Milestone | 100 | from lp.registry.model.milestone import Milestone |
1854 | 101 | from lp.registry.model.suitesourcepackage import SuiteSourcePackage | 101 | from lp.registry.model.suitesourcepackage import SuiteSourcePackage |
1855 | 102 | from lp.registry.interfaces.distribution import IDistributionSet | 102 | from lp.registry.interfaces.distribution import IDistributionSet |
1858 | 103 | from lp.registry.interfaces.distroseries import ( | 103 | from lp.registry.interfaces.series import SeriesStatus |
1859 | 104 | DistroSeriesStatus, IDistroSeries) | 104 | from lp.registry.interfaces.distroseries import IDistroSeries |
1860 | 105 | from lp.registry.interfaces.gpg import GPGKeyAlgorithm, IGPGKeySet | 105 | from lp.registry.interfaces.gpg import GPGKeyAlgorithm, IGPGKeySet |
1861 | 106 | from lp.registry.interfaces.mailinglist import ( | 106 | from lp.registry.interfaces.mailinglist import ( |
1862 | 107 | IMailingListSet, MailingListStatus) | 107 | IMailingListSet, MailingListStatus) |
1863 | @@ -511,7 +511,8 @@ | |||
1864 | 511 | group = self.makeTranslationGroup() | 511 | group = self.makeTranslationGroup() |
1865 | 512 | if person is None: | 512 | if person is None: |
1866 | 513 | person = self.makePerson() | 513 | person = self.makePerson() |
1868 | 514 | ITranslationsPerson(person).translations_relicensing_agreement = license | 514 | ITranslationsPerson(person).translations_relicensing_agreement = ( |
1869 | 515 | license) | ||
1870 | 515 | return getUtility(ITranslatorSet).new(group, language, person) | 516 | return getUtility(ITranslatorSet).new(group, language, person) |
1871 | 516 | 517 | ||
1872 | 517 | def makeMilestone( | 518 | def makeMilestone( |
1873 | @@ -1442,7 +1443,7 @@ | |||
1874 | 1442 | members, owner) | 1443 | members, owner) |
1875 | 1443 | 1444 | ||
1876 | 1444 | def makeDistroRelease(self, distribution=None, version=None, | 1445 | def makeDistroRelease(self, distribution=None, version=None, |
1878 | 1445 | status=DistroSeriesStatus.DEVELOPMENT, | 1446 | status=SeriesStatus.DEVELOPMENT, |
1879 | 1446 | parent_series=None, name=None): | 1447 | parent_series=None, name=None): |
1880 | 1447 | """Make a new distro release.""" | 1448 | """Make a new distro release.""" |
1881 | 1448 | if distribution is None: | 1449 | if distribution is None: |
1882 | 1449 | 1450 | ||
1883 | === modified file 'lib/lp/translations/browser/distribution.py' | |||
1884 | --- lib/lp/translations/browser/distribution.py 2009-10-26 18:40:04 +0000 | |||
1885 | +++ lib/lp/translations/browser/distribution.py 2010-01-05 16:22:16 +0000 | |||
1886 | @@ -19,7 +19,7 @@ | |||
1887 | 19 | LaunchpadView, Link) | 19 | LaunchpadView, Link) |
1888 | 20 | from canonical.launchpad.webapp.menu import NavigationMenu | 20 | from canonical.launchpad.webapp.menu import NavigationMenu |
1889 | 21 | from lp.registry.interfaces.distribution import IDistribution | 21 | from lp.registry.interfaces.distribution import IDistribution |
1891 | 22 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 22 | from lp.registry.interfaces.series import SeriesStatus |
1892 | 23 | from lp.registry.browser.distribution import DistributionEditView | 23 | from lp.registry.browser.distribution import DistributionEditView |
1893 | 24 | from lp.translations.browser.translations import TranslationsMixin | 24 | from lp.translations.browser.translations import TranslationsMixin |
1894 | 25 | 25 | ||
1895 | @@ -100,7 +100,7 @@ | |||
1896 | 100 | series = [ | 100 | series = [ |
1897 | 101 | series | 101 | series |
1898 | 102 | for series in self.context.series | 102 | for series in self.context.series |
1900 | 103 | if (series.status != DistroSeriesStatus.OBSOLETE | 103 | if (series.status != SeriesStatus.OBSOLETE |
1901 | 104 | and (self.translation_focus is None or | 104 | and (self.translation_focus is None or |
1902 | 105 | self.translation_focus.id != series.id)) | 105 | self.translation_focus.id != series.id)) |
1903 | 106 | ] | 106 | ] |
1904 | 107 | 107 | ||
1905 | === modified file 'lib/lp/translations/browser/tests/distroseries-views.txt' | |||
1906 | --- lib/lp/translations/browser/tests/distroseries-views.txt 2009-07-16 14:40:28 +0000 | |||
1907 | +++ lib/lp/translations/browser/tests/distroseries-views.txt 2010-01-05 16:22:16 +0000 | |||
1908 | @@ -5,7 +5,7 @@ | |||
1909 | 5 | Let's use ubuntu/hoary for these tests. | 5 | Let's use ubuntu/hoary for these tests. |
1910 | 6 | 6 | ||
1911 | 7 | >>> from canonical.launchpad.interfaces import IDistributionSet | 7 | >>> from canonical.launchpad.interfaces import IDistributionSet |
1913 | 8 | >>> from lp.registry.interfaces.distroseries import DistroSeriesStatus | 8 | >>> from lp.registry.interfaces.series import SeriesStatus |
1914 | 9 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') | 9 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
1915 | 10 | >>> hoary = ubuntu.getSeries('hoary') | 10 | >>> hoary = ubuntu.getSeries('hoary') |
1916 | 11 | 11 | ||
1917 | @@ -13,7 +13,7 @@ | |||
1918 | 13 | message. | 13 | message. |
1919 | 14 | 14 | ||
1920 | 15 | >>> login('foo.bar@canonical.com') | 15 | >>> login('foo.bar@canonical.com') |
1922 | 16 | >>> hoary.status = DistroSeriesStatus.CURRENT | 16 | >>> hoary.status = SeriesStatus.CURRENT |
1923 | 17 | 17 | ||
1924 | 18 | == Hiding translations == | 18 | == Hiding translations == |
1925 | 19 | 19 | ||
1926 | 20 | 20 | ||
1927 | === modified file 'lib/lp/translations/model/translationimportqueue.py' | |||
1928 | --- lib/lp/translations/model/translationimportqueue.py 2009-12-24 11:34:12 +0000 | |||
1929 | +++ lib/lp/translations/model/translationimportqueue.py 2010-01-05 16:22:16 +0000 | |||
1930 | @@ -36,8 +36,8 @@ | |||
1931 | 36 | from canonical.launchpad.interfaces.lpstorm import IMasterStore | 36 | from canonical.launchpad.interfaces.lpstorm import IMasterStore |
1932 | 37 | from canonical.launchpad.webapp.interfaces import NotFoundError | 37 | from canonical.launchpad.webapp.interfaces import NotFoundError |
1933 | 38 | from lp.registry.interfaces.distribution import IDistribution | 38 | from lp.registry.interfaces.distribution import IDistribution |
1936 | 39 | from lp.registry.interfaces.distroseries import ( | 39 | from lp.registry.interfaces.series import SeriesStatus |
1937 | 40 | IDistroSeries, DistroSeriesStatus) | 40 | from lp.registry.interfaces.distroseries import IDistroSeries |
1938 | 41 | from lp.registry.interfaces.person import ( | 41 | from lp.registry.interfaces.person import ( |
1939 | 42 | IPerson, validate_person_not_private_membership) | 42 | IPerson, validate_person_not_private_membership) |
1940 | 43 | from lp.registry.interfaces.product import IProduct | 43 | from lp.registry.interfaces.product import IProduct |
1941 | @@ -1284,7 +1284,7 @@ | |||
1942 | 1284 | Distribution.id = DistroSeries.distribution | 1284 | Distribution.id = DistroSeries.distribution |
1943 | 1285 | WHERE DistroSeries.releasestatus = %s | 1285 | WHERE DistroSeries.releasestatus = %s |
1944 | 1286 | LIMIT 100) | 1286 | LIMIT 100) |
1946 | 1287 | """ % quote(DistroSeriesStatus.OBSOLETE)) | 1287 | """ % quote(SeriesStatus.OBSOLETE)) |
1947 | 1288 | return cur.rowcount | 1288 | return cur.rowcount |
1948 | 1289 | 1289 | ||
1949 | 1290 | def cleanUpQueue(self): | 1290 | def cleanUpQueue(self): |
1950 | 1291 | 1291 | ||
1951 | === modified file 'lib/lp/translations/scripts/remove_obsolete_translations.py' | |||
1952 | --- lib/lp/translations/scripts/remove_obsolete_translations.py 2009-07-17 00:26:05 +0000 | |||
1953 | +++ lib/lp/translations/scripts/remove_obsolete_translations.py 2010-01-05 16:22:16 +0000 | |||
1954 | @@ -10,7 +10,7 @@ | |||
1955 | 10 | 10 | ||
1956 | 11 | from canonical.database.sqlbase import quote | 11 | from canonical.database.sqlbase import quote |
1957 | 12 | 12 | ||
1959 | 13 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 13 | from lp.registry.interfaces.series import SeriesStatus |
1960 | 14 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities | 14 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
1961 | 15 | from canonical.launchpad.interfaces.looptuner import ITunableLoop | 15 | from canonical.launchpad.interfaces.looptuner import ITunableLoop |
1962 | 16 | 16 | ||
1963 | @@ -174,7 +174,7 @@ | |||
1964 | 174 | ON POTemplate.distroseries=DistroSeries.id | 174 | ON POTemplate.distroseries=DistroSeries.id |
1965 | 175 | WHERE DistroSeries.releasestatus=%s AND | 175 | WHERE DistroSeries.releasestatus=%s AND |
1966 | 176 | DistroSeries.distribution=%s""" % ( | 176 | DistroSeries.distribution=%s""" % ( |
1968 | 177 | quote(DistroSeriesStatus.OBSOLETE), | 177 | quote(SeriesStatus.OBSOLETE), |
1969 | 178 | quote(getUtility(ILaunchpadCelebrities).ubuntu)) | 178 | quote(getUtility(ILaunchpadCelebrities).ubuntu)) |
1970 | 179 | result = self.store.execute(query) | 179 | result = self.store.execute(query) |
1971 | 180 | count = result.get_one() | 180 | count = result.get_one() |
1972 | @@ -200,7 +200,7 @@ | |||
1973 | 200 | WHERE DistroSeries.releasestatus != %s | 200 | WHERE DistroSeries.releasestatus != %s |
1974 | 201 | GROUP BY DistroSeries.id | 201 | GROUP BY DistroSeries.id |
1975 | 202 | ORDER BY DistroSeries.id""" % quote( | 202 | ORDER BY DistroSeries.id""" % quote( |
1977 | 203 | DistroSeriesStatus.OBSOLETE) | 203 | SeriesStatus.OBSOLETE) |
1978 | 204 | result = self.store.execute(query) | 204 | result = self.store.execute(query) |
1979 | 205 | return result.get_all() | 205 | return result.get_all() |
1980 | 206 | 206 | ||
1981 | @@ -216,7 +216,7 @@ | |||
1982 | 216 | productseries IS NOT NULL | 216 | productseries IS NOT NULL |
1983 | 217 | GROUP BY POTemplate.id | 217 | GROUP BY POTemplate.id |
1984 | 218 | ORDER BY POTemplate.id""" % quote( | 218 | ORDER BY POTemplate.id""" % quote( |
1986 | 219 | DistroSeriesStatus.OBSOLETE) | 219 | SeriesStatus.OBSOLETE) |
1987 | 220 | result = self.store.execute(query) | 220 | result = self.store.execute(query) |
1988 | 221 | return result.get_all() | 221 | return result.get_all() |
1989 | 222 | 222 | ||
1990 | @@ -232,7 +232,7 @@ | |||
1991 | 232 | productseries IS NOT NULL | 232 | productseries IS NOT NULL |
1992 | 233 | GROUP BY POTemplate.id | 233 | GROUP BY POTemplate.id |
1993 | 234 | ORDER BY POTemplate.id""" % quote( | 234 | ORDER BY POTemplate.id""" % quote( |
1995 | 235 | DistroSeriesStatus.OBSOLETE) | 235 | SeriesStatus.OBSOLETE) |
1996 | 236 | result = self.store.execute(query) | 236 | result = self.store.execute(query) |
1997 | 237 | return result.get_all() | 237 | return result.get_all() |
1998 | 238 | 238 | ||
1999 | @@ -250,7 +250,7 @@ | |||
2000 | 250 | productseries IS NOT NULL | 250 | productseries IS NOT NULL |
2001 | 251 | GROUP BY POFile.id | 251 | GROUP BY POFile.id |
2002 | 252 | ORDER BY POFile.id""" % quote( | 252 | ORDER BY POFile.id""" % quote( |
2004 | 253 | DistroSeriesStatus.OBSOLETE) | 253 | SeriesStatus.OBSOLETE) |
2005 | 254 | result = self.store.execute(query) | 254 | result = self.store.execute(query) |
2006 | 255 | return result.get_all() | 255 | return result.get_all() |
2007 | 256 | 256 | ||
2008 | @@ -316,7 +316,7 @@ | |||
2009 | 316 | 'join_column' : 'distroseries', | 316 | 'join_column' : 'distroseries', |
2010 | 317 | 'distribution' : | 317 | 'distribution' : |
2011 | 318 | quote(getUtility(ILaunchpadCelebrities).ubuntu), | 318 | quote(getUtility(ILaunchpadCelebrities).ubuntu), |
2013 | 319 | 'releasestatus' : quote(DistroSeriesStatus.OBSOLETE), | 319 | 'releasestatus' : quote(SeriesStatus.OBSOLETE), |
2014 | 320 | 'collection_sql' : collect_obsolete_potemplates_query, | 320 | 'collection_sql' : collect_obsolete_potemplates_query, |
2015 | 321 | }, | 321 | }, |
2016 | 322 | } | 322 | } |
2017 | 323 | 323 | ||
2018 | === modified file 'lib/lp/translations/templates/pofile-details.pt' | |||
2019 | --- lib/lp/translations/templates/pofile-details.pt 2009-12-13 08:28:51 +0000 | |||
2020 | +++ lib/lp/translations/templates/pofile-details.pt 2010-01-05 16:22:16 +0000 | |||
2021 | @@ -42,12 +42,10 @@ | |||
2022 | 42 | 42 | ||
2023 | 43 | <ul tal:condition="view/contributors"> | 43 | <ul tal:condition="view/contributors"> |
2024 | 44 | <li tal:repeat="contributor view/contributors"> | 44 | <li tal:repeat="contributor view/contributors"> |
2031 | 45 | <tal:not-merged condition="not: contributor/merged"> | 45 | <a tal:replace="structure contributor/fmt:link" /> |
2032 | 46 | <a tal:replace="structure contributor/fmt:link" /> | 46 | (<a tal:attributes=" |
2033 | 47 | (<a tal:attributes=" | 47 | href string:${context/fmt:url}/+filter?person=${contributor/name}" |
2034 | 48 | href string:${context/fmt:url}/+filter?person=${contributor/name}" | 48 | >filter</a>) |
2029 | 49 | >filter</a>) | ||
2030 | 50 | </tal:not-merged> | ||
2035 | 51 | </li> | 49 | </li> |
2036 | 52 | </ul> | 50 | </ul> |
2037 | 53 | 51 | ||
2038 | 54 | 52 | ||
2039 | === modified file 'lib/lp/translations/tests/test_autoapproval.py' | |||
2040 | --- lib/lp/translations/tests/test_autoapproval.py 2009-12-18 09:25:14 +0000 | |||
2041 | +++ lib/lp/translations/tests/test_autoapproval.py 2010-01-05 16:22:16 +0000 | |||
2042 | @@ -18,7 +18,7 @@ | |||
2043 | 18 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities | 18 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
2044 | 19 | from canonical.launchpad.interfaces.lpstorm import IMasterStore | 19 | from canonical.launchpad.interfaces.lpstorm import IMasterStore |
2045 | 20 | 20 | ||
2047 | 21 | from lp.registry.interfaces.distroseries import DistroSeriesStatus | 21 | from lp.registry.interfaces.series import SeriesStatus |
2048 | 22 | from lp.registry.model.distribution import Distribution | 22 | from lp.registry.model.distribution import Distribution |
2049 | 23 | from lp.registry.model.sourcepackagename import ( | 23 | from lp.registry.model.sourcepackagename import ( |
2050 | 24 | SourcePackageName, | 24 | SourcePackageName, |
2051 | @@ -820,7 +820,7 @@ | |||
2052 | 820 | self.queue._cleanUpObsoleteDistroEntries(self.store) | 820 | self.queue._cleanUpObsoleteDistroEntries(self.store) |
2053 | 821 | self.assertTrue(self._exists(entry_id)) | 821 | self.assertTrue(self._exists(entry_id)) |
2054 | 822 | 822 | ||
2056 | 823 | entry.distroseries.status = DistroSeriesStatus.OBSOLETE | 823 | entry.distroseries.status = SeriesStatus.OBSOLETE |
2057 | 824 | entry.distroseries.syncUpdate() | 824 | entry.distroseries.syncUpdate() |
2058 | 825 | 825 | ||
2059 | 826 | become_the_gardener(self.layer) | 826 | become_the_gardener(self.layer) |
= Bug 496352 =
Since DistroSeriesStatus is also used for ProductSeries, it should be renamed and moved to a dedicated file.
This is the note from Salgado status as well.
# XXX: salgado, 2008-06-02: We should use a more generic name here as this
# enum is used in ProductSeries.
== Proposed fix ==
Just rename the class DistroSeriesStatus to SeriesStatus and create a new module Series to host it (in the future it can contain any other common classes (interfaces).
== Implementation details ==
After touching those files, now lint complain about them.
My changes should have not affect any of the reported problems.
Any hint in fixing them is much appreciated.
== Tests ==
A full test should be ran
== Demo and Q/A ==
After these changes nothings has to be changed from the users point of view.
= Lint =
I think there is a problem with pylint setup as it does not pick up lazr modules.
Also I don't know why this interface is not accepted lib/lp/ registry/ interfaces/ distroseries. py
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: archiveuploader /uploadpolicy. py code/tests/ test_branch. py registry/ interfaces/ distroseries. py registry/ model/distribut ion.py testing/ factory. py translations/ browser/ product. py translations/ stories/ standalone/ xx-productserie s-translations. txt
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ registry/ interfaces/ distroseries. py fields' (No module named restful) declarations' (No module named restful) sionField. _validate] Use super on an old style class blic.getPackage Uploads] Operator not preceded by a space =_("Return items that are more recent than this " False),
22: [F0401] Unable to import 'lazr.enum' (No module named enum)
49: [F0401] Unable to import 'lazr.restful.
50: [F0401] Unable to import 'lazr.restful.
115: [E1002, DistroSeriesVer
426: [C0322, IDistroSeriesPu
description
^
"timestamp."),
required=
status=Choice(
vocabulary= DBEnumeratedTyp e, _("Package Upload Status"), =_("Return only items that have this status."), False), Reference(
title=
description
required=
archive=
schema= Interface, _("Archive" ), =_("Return only items for this archive."), False),
title=
description
required=
pocket=Choice(
vocabulary= DBEnumeratedTyp e, _("Pocket" ), =_("Return only items targeted to this pocket"), False), type=Choice(
title=
description
required=
custom_
vocabulary= DBEnumeratedTyp e, =_("Return only items with custom files of this " False),
title=_("Custom Type"),
description
"type."),
required=
)
@operation_ returns_ collection_ of(Interface) read_operation( ) ds(created_ since_date, status, archive, pocket,
@export_
def getPackageUploa
custom_type):
lib/lp/ testing/ factory. py
17: [F0401] Unable to import 'email.Encoders' (No module named Encoders)
18: [F0401] Unable to import 'email.Utils' (No module named Utils)
19: [F0401] Unable to import 'email.Message' (No module named Message)
20: [F...