Create fake revisions for every commit in the base of a linked package

This is a rather complex operation, but whenever a package changes in
Factory, the inherited package gets a shadow revision consisting of the
3-way merge. If this happens due to a request being accepted, this is
actually in most cases also commited by 'buildservice-autocommit',
so we're making sure this is always happening (and are actually
duplicating revisions in cases that we filter out later as empty
commits).

To differenciate the fake revisions from the real revisions, I add
a fraction part
This commit is contained in:
Stephan Kulow
2022-10-24 20:21:53 +02:00
parent d17e60a608
commit 2784171f75
8 changed files with 24958 additions and 18353 deletions

View File

@@ -13,7 +13,10 @@ class Exporter:
def run(self):
db = DB()
cur = db.cursor()
cur.execute("SELECT * from revisions where package=%s", (self.package,))
cur.execute(
"SELECT * from revisions where package=%s ORDER BY project,rev",
(self.package,),
)
data = {"revisions": []}
for row in cur.fetchall():
data["revisions"].append(DBRevision(row).as_dict(db))