Merge lp:~jml/launchpad/legacy-vcs-imports into lp:launchpad

Proposed by Jonathan Lange
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jml/launchpad/legacy-vcs-imports
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~jml/launchpad/legacy-vcs-imports
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Review via email: mp+10900@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

This branch removes code from ProductSeries that was only used by legacy vcs-imports code. Best reviewed with https://code.edge.launchpad.net/~jml/launchpad/remove-vcs-imports/+merge/10899

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Looks like something I forgot to delete about 6 months ago :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/model/productseries.py'
2--- lib/lp/registry/model/productseries.py 2009-08-24 03:18:41 +0000
3+++ lib/lp/registry/model/productseries.py 2009-08-30 01:45:18 +0000
4@@ -594,46 +594,6 @@
5 except SQLObjectNotFound:
6 return default
7
8- def composeQueryString(self, text=None, importstatus=None):
9- """Build SQL "where" clause for `ProductSeries` search.
10-
11- :param text: Text to search for in the product and project titles and
12- descriptions.
13- :param importstatus: If specified, limit the list to series which have
14- the given import status; if not specified or None, limit to series
15- with non-NULL import status.
16- """
17- conditions = ["ProductSeries.product = Product.id"]
18- if text == u'':
19- text = None
20-
21- # First filter on text, if supplied.
22- if text is not None:
23- conditions.append("""
24- ((Project.fti @@ ftq(%s) AND Product.project IS NOT NULL) OR
25- Product.fti @@ ftq(%s))""" % (quote(text), quote(text)))
26-
27- # Exclude deactivated products.
28- conditions.append('Product.active IS TRUE')
29-
30- # Exclude deactivated projects, too.
31- conditions.append(
32- "((Product.project = Project.id AND Project.active) OR"
33- " Product.project IS NULL)")
34-
35- # Now just add the filter on import status.
36- if importstatus is None:
37- conditions.append('ProductSeries.importstatus IS NOT NULL')
38- else:
39- conditions.append('ProductSeries.importstatus = %s'
40- % sqlvalues(importstatus))
41-
42- # And build the query.
43- query = " AND ".join(conditions)
44- return """productseries.id IN
45- (SELECT productseries.id FROM productseries, product, project
46- WHERE %s) AND productseries.product = product.id""" % query
47-
48 def getSeriesForBranches(self, branches):
49 """See `IProductSeriesSet`."""
50 store = getUtility(IStoreSelector).get(MAIN_STORE, DEFAULT_FLAVOR)