diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-08-02 08:40:49 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-08-02 08:40:49 +0200 |
commit | cb3708825bf7ea32314040575cef35980dad0cd8 (patch) | |
tree | 31575a8525dc90ba6904268d94f47e1604bf0557 /readyaml.py | |
parent | a4bbbb6e664e605634cb3f9e0564c7e4a93697be (diff) | |
parent | 2712edb550968ce7ec8cd9800241d7944666631a (diff) | |
download | debian-dedup-cb3708825bf7ea32314040575cef35980dad0cd8.tar.gz |
Merge branch master into sqlalchemy
This makes the sqlalchemy branch schema-compatible with master again.
The biggest change on master was the introduction of the function table.
It caused most of the conflicts. Note that webapp had one conflict not
detected by git: The selecting of issues in show_package needed
sqlalchemy conversion.
Conflicts:
README
update_sharing.py
webapp.py
Diffstat (limited to 'readyaml.py')
-rwxr-xr-x | readyaml.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/readyaml.py b/readyaml.py index bb8ac54..21b1ca1 100755 --- a/readyaml.py +++ b/readyaml.py @@ -25,6 +25,8 @@ def readyaml(db, stream): pid = None cur.execute("BEGIN;") + cur.execute("SELECT name, id FROM function;") + funcmapping = dict(cur.fetchall()) if pid is not None: cur.execute("DELETE FROM content WHERE pid = ?;", (pid,)) cur.execute("DELETE FROM dependency WHERE pid = ?;", (pid,)) @@ -45,8 +47,8 @@ def readyaml(db, stream): cur.execute("INSERT INTO content (pid, filename, size) VALUES (?, ?, ?);", (pid, entry["name"], entry["size"])) cid = cur.lastrowid - cur.executemany("INSERT INTO hash (cid, function, hash) VALUES (?, ?, ?);", - ((cid, func, hexhash) + cur.executemany("INSERT INTO hash (cid, fid, hash) VALUES (?, ?, ?);", + ((cid, funcmapping[func], hexhash) for func, hexhash in entry["hashes"].items())) raise ValueError("missing commit block") |