launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #17772
[Merge] lp:~cjwatson/launchpad/pillarname-projectgroup into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/pillarname-projectgroup into lp:launchpad.
Commit message:
Rename PillarName.project to PillarName.projectgroup.
Requested reviews:
Colin Watson (cjwatson)
Related bugs:
Bug #523054 in Launchpad itself: "Rename Product.project to Product.projectgroup"
https://bugs.launchpad.net/launchpad/+bug/523054
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/pillarname-projectgroup/+merge/247978
Rename PillarName.project to PillarName.projectgroup.
--
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/code/model/branchlookup.py'
--- lib/lp/code/model/branchlookup.py 2013-06-20 05:50:00 +0000
+++ lib/lp/code/model/branchlookup.py 2015-01-29 13:22:14 +0000
@@ -103,9 +103,9 @@
pillar = getUtility(IPillarNameSet).getByName(name)
if pillar is None:
# Actually, the pillar is no such *anything*. The user might be
- # trying to refer to a project, a distribution or a product. We
- # raise a NoSuchProduct error since that's what we used to raise
- # when we only supported product & junk branches.
+ # trying to refer to a project group, a distribution or a
+ # project. We raise a NoSuchProduct error since that's what we
+ # used to raise when we only supported project & junk branches.
raise NoSuchProduct(name)
return pillar
=== modified file 'lib/lp/code/model/branchnamespace.py'
--- lib/lp/code/model/branchnamespace.py 2013-06-20 05:50:00 +0000
+++ lib/lp/code/model/branchnamespace.py 2015-01-29 13:22:14 +0000
@@ -538,7 +538,7 @@
If the given name is '+junk' or None, return None.
:raise NoSuchProduct if there's no pillar with the given name or it is
- a project.
+ a project group.
"""
if pillar_name == '+junk':
return None
=== modified file 'lib/lp/registry/doc/pillar.txt'
--- lib/lp/registry/doc/pillar.txt 2011-12-24 17:49:30 +0000
+++ lib/lp/registry/doc/pillar.txt 2015-01-29 13:22:14 +0000
@@ -39,8 +39,9 @@
...
NotFoundError: 'fnord'
-Inactive products/projects are not available through PillarNameSet unless we
-use the special getByName() method which returns active/inactive pillars..
+Inactive projects/project groups are not available through PillarNameSet
+unless we use the special getByName() method which returns active/inactive
+pillars.
>>> 'gimp' in pillar_set
True
=== modified file 'lib/lp/registry/interfaces/pillar.py'
--- lib/lp/registry/interfaces/pillar.py 2014-11-28 22:28:40 +0000
+++ lib/lp/registry/interfaces/pillar.py 2015-01-29 13:22:14 +0000
@@ -116,7 +116,7 @@
id = Int(title=_('The PillarName ID'))
name = TextLine(title=u"The name.")
product = Attribute('The project that has this name, or None')
- project = Attribute('The project that has this name, or None')
+ projectgroup = Attribute('The project group that has this name, or None')
distribution = Attribute('The distribution that has this name, or None')
active = Attribute('The pillar is active')
pillar = Attribute('The pillar object')
=== modified file 'lib/lp/registry/interfaces/projectgroup.py'
--- lib/lp/registry/interfaces/projectgroup.py 2015-01-29 10:35:21 +0000
+++ lib/lp/registry/interfaces/projectgroup.py 2015-01-29 13:22:14 +0000
@@ -88,7 +88,7 @@
from lp.translations.interfaces.translationpolicy import ITranslationPolicy
-class ProjectNameField(PillarNameField):
+class ProjectGroupNameField(PillarNameField):
@property
def _content_iface(self):
@@ -103,7 +103,7 @@
description=_("Whether or not this project group has been "
"reviewed.")))
name = exported(
- ProjectNameField(
+ ProjectGroupNameField(
title=_('Name'),
required=True,
description=_(
=== modified file 'lib/lp/registry/model/pillar.py'
--- lib/lp/registry/model/pillar.py 2013-06-20 05:50:00 +0000
+++ lib/lp/registry/model/pillar.py 2015-01-29 13:22:14 +0000
@@ -137,12 +137,12 @@
"One (and only one) of product, project or distribution may be "
"NOT NULL: %s" % row[1:])
- id, product, project, distribution = row
+ id, product, projectgroup, distribution = row
if product is not None:
return getUtility(IProductSet).get(product)
- elif project is not None:
- return getUtility(IProjectGroupSet).get(project)
+ elif projectgroup is not None:
+ return getUtility(IProjectGroupSet).get(projectgroup)
else:
return getUtility(IDistributionSet).get(distribution)
@@ -161,7 +161,7 @@
LeftJoin(
OtherPillarName, PillarName.alias_for == OtherPillarName.id),
LeftJoin(Product, PillarName.product == Product.id),
- LeftJoin(ProjectGroup, PillarName.project == ProjectGroup.id),
+ LeftJoin(ProjectGroup, PillarName.projectgroup == ProjectGroup.id),
LeftJoin(
Distribution, PillarName.distribution == Distribution.id),
]
@@ -231,7 +231,7 @@
stacklevel=2)
pillars = []
# Prefill pillar.product.licenses.
- for pillar_name, other, product, project, distro, licenses in (
+ for pillar_name, other, product, projectgroup, distro, licenses in (
result[:limit]):
pillar = pillar_name.pillar
if IProduct.providedBy(pillar):
@@ -281,7 +281,7 @@
dbName='name', notNull=True, unique=True, alternateID=True)
product = ForeignKey(
foreignKey='Product', dbName='product')
- project = ForeignKey(
+ projectgroup = ForeignKey(
foreignKey='ProjectGroup', dbName='project')
distribution = ForeignKey(
foreignKey='Distribution', dbName='distribution')
@@ -297,8 +297,8 @@
if pillar_name.distribution is not None:
return pillar_name.distribution
- elif pillar_name.project is not None:
- return pillar_name.project
+ elif pillar_name.projectgroup is not None:
+ return pillar_name.projectgroup
elif pillar_name.product is not None:
return pillar_name.product
else:
=== modified file 'lib/lp/registry/vocabularies.py'
--- lib/lp/registry/vocabularies.py 2014-10-22 20:39:04 +0000
+++ lib/lp/registry/vocabularies.py 2015-01-29 13:22:14 +0000
@@ -1776,7 +1776,7 @@
@property
def filter_terms(self):
- return [PillarName.project != None]
+ return [PillarName.projectgroup != None]
class VocabularyFilterDistribution(VocabularyFilter):
@@ -1863,7 +1863,7 @@
class DistributionOrProductVocabulary(PillarVocabularyBase):
"""Active `IDistribution` or `IProduct` objects vocabulary."""
displayname = 'Select a project'
- _filter = [PillarName.project == None, PillarName.active == True]
+ _filter = [PillarName.projectgroup == None, PillarName.active == True]
def __contains__(self, obj):
if IProduct.providedBy(obj):
=== modified file 'lib/lp/services/fields/__init__.py'
--- lib/lp/services/fields/__init__.py 2012-10-10 03:47:59 +0000
+++ lib/lp/services/fields/__init__.py 2015-01-29 13:22:14 +0000
@@ -795,7 +795,7 @@
class PillarNameField(BlacklistableContentNameField):
- """Base field used for names of distros/projects/products."""
+ """Base field used for names of distros/project groups/products."""
errormessage = _("%s is already used by another project")
References