[Collab-qa-commits] r1836 - in udd: sql udd web
Lucas Nussbaum
lucas at alioth.debian.org
Mon Nov 1 10:21:23 UTC 2010
Author: lucas
Date: 2010-11-01 10:21:22 +0000 (Mon, 01 Nov 2010)
New Revision: 1836
Modified:
udd/sql/setup.sql
udd/udd/deferred_gatherer.py
udd/web/bugs.cgi
Log:
s/bug/id/ in deferred_closes
Modified: udd/sql/setup.sql
===================================================================
--- udd/sql/setup.sql 2010-11-01 10:18:34 UTC (rev 1835)
+++ udd/sql/setup.sql 2010-11-01 10:21:22 UTC (rev 1836)
@@ -767,8 +767,8 @@
FOREIGN KEY (source, version) REFERENCES deferred DEFERRABLE);
CREATE TABLE deferred_closes
- (source text, version debversion, bug int,
- PRIMARY KEY (source, version, bug),
+ (source text, version debversion, id int,
+ PRIMARY KEY (source, version, id),
FOREIGN KEY (source, version) REFERENCES deferred DEFERRABLE);
GRANT SELECT ON deferred TO public;
Modified: udd/udd/deferred_gatherer.py
===================================================================
--- udd/udd/deferred_gatherer.py 2010-11-01 10:18:34 UTC (rev 1835)
+++ udd/udd/deferred_gatherer.py 2010-11-01 10:21:22 UTC (rev 1836)
@@ -49,8 +49,8 @@
q_defarch = "EXECUTE da_insert(%(Source)s, %(Version)s, %(Architecture)s)"
cur.execute("PREPARE da_binary AS INSERT INTO deferred_binary (source, version, package) VALUES ($1, $2, $3)")
q_defbin = "EXECUTE da_binary(%(Source)s, %(Version)s, %(Package)s)"
- cur.execute("PREPARE da_closes AS INSERT INTO deferred_closes (source, version, bug) VALUES ($1, $2, $3)")
- q_defcloses = "EXECUTE da_closes(%(Source)s, %(Version)s, %(Bug)s)"
+ cur.execute("PREPARE da_closes AS INSERT INTO deferred_closes (source, version, id) VALUES ($1, $2, $3)")
+ q_defcloses = "EXECUTE da_closes(%(Source)s, %(Version)s, %(Id)s)"
cur.execute("DELETE FROM deferred_closes")
cur.execute("DELETE FROM deferred_binary")
@@ -75,7 +75,7 @@
db_list.append(current_binary)
for bug in set(current['Closes'].split()):
current_c = {'Source': current['Source'], 'Version': current['Version']}
- current_c['Bug'] = bug
+ current_c['Id'] = bug
dc_list.append(current_c)
cur.executemany(q_deferred, d_list)
Modified: udd/web/bugs.cgi
===================================================================
--- udd/web/bugs.cgi 2010-11-01 10:18:34 UTC (rev 1835)
+++ udd/web/bugs.cgi 2010-11-01 10:21:22 UTC (rev 1836)
@@ -22,7 +22,7 @@
['pending', 'tagged pending', 'id in (select id from bugs_tags where tag=\'pending\')'],
['security', 'tagged security', 'id in (select id from bugs_tags where tag=\'security\')'],
['claimed', 'claimed bugs', "id in (select id from bugs_usertags where email='bugsquash at qa.debian.org')"],
- ['deferred', 'fixed in deferred/delayed', "id in (select bug from deferred_closes)"],
+ ['deferred', 'fixed in deferred/delayed', "id in (select id from deferred_closes)"],
['notmain', 'packages not in main', 'id not in (select id from bugs_packages, sources where bugs_packages.source = sources.source and component=\'main\')'],
['notsqueeze', 'packages not in squeeze', 'id not in (select id from bugs_packages, sources where bugs_packages.source = sources.source and release=\'squeeze\')'],
['base', 'packages in base system', 'bugs.source in (select source from sources where priority=\'required\' or priority=\'important\')'],
@@ -308,7 +308,7 @@
if cols['cdeferred']
ids = rows.map { |r| r['id'] }.join(',')
- sthd = dbh.prepare("select bug, deferred.source, deferred.version, extract (day from delayed_until) as du from deferred, deferred_closes where deferred.source = deferred_closes.source and deferred.version = deferred_closes.version and deferred_closes.bug in (#{ids})")
+ sthd = dbh.prepare("select bug, deferred.source, deferred.version, extract (day from delayed_until) as du from deferred, deferred_closes where deferred.source = deferred_closes.source and deferred.version = deferred_closes.version and deferred_closes.id in (#{ids})")
sthd.execute
rowsd = sthd.fetch_all
deferredbugs = {}
More information about the Collab-qa-commits
mailing list